All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Patching buildroot package makefiles with BR2_EXTERNAL
@ 2022-03-08  8:57 Danilo
  2022-03-08 10:19 ` Simon Doppler
  0 siblings, 1 reply; 5+ messages in thread
From: Danilo @ 2022-03-08  8:57 UTC (permalink / raw)
  To: buildroot

Hello

I'm trying to set up an Nginx module package (nginx-rtmp-module) in a Buildroot
project that uses BR2_EXTERNAL. I added the new external package, that works.
However, Nginx modules need to be compiled along with Nginx, which means that I
need to patch the Buildroot nginx.mk file, right?

What I need to inject into the makefile, is the following:

    NGINX_DEPENDENCIES += nginx-rtmp-module
    NGINX_CONF_OPTS += --add-module=$(NGINX_RTMP_MODULE_DIR)

Is there a mechanism to do this from outside the Buildroot source? It seems
that BR2_GLOBAL_PATCH_DIR only works for packet sources, but not for Buildroot
makefiles, correct?

I tried adding the assignments above into the package makefile
(nginx-rtmp-module.mk), but that doesn't seem to work.

Any help would be appreciated!
Danilo
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] Patching buildroot package makefiles with BR2_EXTERNAL
  2022-03-08  8:57 [Buildroot] Patching buildroot package makefiles with BR2_EXTERNAL Danilo
@ 2022-03-08 10:19 ` Simon Doppler
  2022-03-08 22:58   ` Danilo
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Doppler @ 2022-03-08 10:19 UTC (permalink / raw)
  To: Danilo, buildroot

Hi,

On Tue, 2022-03-08 at 09:57 +0100, Danilo wrote:
> [ snip ]
> 
> What I need to inject into the makefile, is the following:
> 
>     NGINX_DEPENDENCIES += nginx-rtmp-module
>     NGINX_CONF_OPTS += --add-module=$(NGINX_RTMP_MODULE_DIR)
> 
> Is there a mechanism to do this from outside the Buildroot source? It
> seems
> that BR2_GLOBAL_PATCH_DIR only works for packet sources, but not for
> Buildroot
> makefiles, correct?
> 
> I tried adding the assignments above into the package makefile
> (nginx-rtmp-module.mk), but that doesn't seem to work.

I hit a similar issue last month (see [1]): I needed to add a
dependency (host-stm32wrapper4dbg) to the arm-trusted-firmware from an
external tree but I failed (a temporary workaround for me is to
manually trigger the build of the host-stm32wrapper4dbg dependency then
build the whole system).

I did expect that adding the dependency as you did would work but it
failed: they show up when running `make arm-
trusted-firmware-show-depends` but not in `make arm-trusted-
firmware-show-build-order`. Does the same happen for you?
I confirmed that adding a post-build hook from an external makefile
works fully, only the dependency has issues.

I did start to investigate the issue, but it is currently low on my
priority list since I have an easy workaround for it. I suspect it is
somewhere in the package/pkg-generic.mk file, but I'm not entirely sure
where the issue is.

As far as I know, there is no way to patch the buildroot source, only
downloaded sources can be patched in the build process.

[1]: 
https://lists.buildroot.org/pipermail/buildroot/2022-February/637237.html

Best regards,

Simon Doppler

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] Patching buildroot package makefiles with BR2_EXTERNAL
  2022-03-08 10:19 ` Simon Doppler
@ 2022-03-08 22:58   ` Danilo
  2022-03-09 10:30     ` Simon Doppler
  0 siblings, 1 reply; 5+ messages in thread
From: Danilo @ 2022-03-08 22:58 UTC (permalink / raw)
  To: buildroot

Hi Simon

> I did expect that adding the dependency as you did would work but it
> failed: they show up when running `make arm-
> trusted-firmware-show-depends` but not in `make arm-trusted-
> firmware-show-build-order`. Does the same happen for you?

Yes, same issue for me. "make nginx-show-depends" includes "nginx-rtmp-module",
but "make nginx-show-build-order" does not.

Manually building the module before building nginx does work, but it would be
nice if there were a clean fix.

Danilo
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] Patching buildroot package makefiles with BR2_EXTERNAL
  2022-03-08 22:58   ` Danilo
@ 2022-03-09 10:30     ` Simon Doppler
  2022-03-09 20:10       ` Yann E. MORIN
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Doppler @ 2022-03-09 10:30 UTC (permalink / raw)
  To: buildroot

Hi Danilo,

> > I did expect that adding the dependency as you did would work but
> > it
> > failed: they show up when running `make arm-
> > trusted-firmware-show-depends` but not in `make arm-trusted-
> > firmware-show-build-order`. Does the same happen for you?
> 
> Yes, same issue for me. "make nginx-show-depends" includes "nginx-
> rtmp-module",
> but "make nginx-show-build-order" does not.
> 
> Manually building the module before building nginx does work, but it
> would be
> nice if there were a clean fix.

I submitted a bug report [1], with some extra info I found by digging
around today.

I will continue to dig around in the coming weeks but it will still not
be high on my priorities.

Simon

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] Patching buildroot package makefiles with BR2_EXTERNAL
  2022-03-09 10:30     ` Simon Doppler
@ 2022-03-09 20:10       ` Yann E. MORIN
  0 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2022-03-09 20:10 UTC (permalink / raw)
  To: Simon Doppler; +Cc: Danilo, buildroot

Simon, Danillo, All,

On 2022-03-09 11:30 +0100, Simon Doppler spake thusly:
> > > I did expect that adding the dependency as you did would work but
> > > it
> > > failed: they show up when running `make arm-
> > > trusted-firmware-show-depends` but not in `make arm-trusted-
> > > firmware-show-build-order`. Does the same happen for you?
> > 
> > Yes, same issue for me. "make nginx-show-depends" includes "nginx-
> > rtmp-module",
> > but "make nginx-show-build-order" does not.
> > 
> > Manually building the module before building nginx does work, but it
> > would be
> > nice if there were a clean fix.
> 
> I submitted a bug report [1], with some extra info I found by digging
> around today.
> 
> I will continue to dig around in the coming weeks but it will still not
> be high on my priorities.

The value of FOO_DEPENDENCIES are used to generate Makefile-level
dependencies, and that is done at the time a package infra is called.

I.e. when your foo.mk has:
    FOO_DPEENDENCIES = bar
    $(eval $(generic-pakcage))

This is turned into Makefile code like:
    foo: bar

Which means that, modifying FOO_DEPENDENCIES later on will have no
impact in the actual dependency chain.

br2-external trees are meant to add new packages, and it is not possible
to modify existing packages.

In the current state, you have no way but to modify nginx.mk in the
Buildroot tree.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-09 20:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-08  8:57 [Buildroot] Patching buildroot package makefiles with BR2_EXTERNAL Danilo
2022-03-08 10:19 ` Simon Doppler
2022-03-08 22:58   ` Danilo
2022-03-09 10:30     ` Simon Doppler
2022-03-09 20:10       ` Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.