Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [Patch v2 1/1] Fix selection of bootloaders from $(BR2_EXTERNAL)
@ 2014-10-07 13:01 Eric Le Bihan
  2014-10-07 13:48 ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Le Bihan @ 2014-10-07 13:01 UTC (permalink / raw)
  To: buildroot

If a package is based on "generic-package", pkg-generic.mk will compute
the name of the Kconfig variable to use for checking if this package has
been selected by the user.

Unfortunately, this mechanism does not take into account the case where
a bootloader is declared in a $(BR2_EXTERNAL)/boot directory.

So, even if the bootloader has been selected, it will not be added to
$(TARGETS) and will not be built.

This patch fixes this issue, as well as handle toolchains.

Changes v1 -> v2:

  - use multiple patterns in filter (suggested by ThomasDS).
  - handle toolchains.

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
 package/pkg-generic.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index d04fd36..e201803 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -614,9 +614,9 @@ $$($(2)_TARGET_DIRCLEAN):		PKG=$(2)
 # kernel case, the bootloaders case, and the normal packages case.
 ifeq ($(1),linux)
 $(2)_KCONFIG_VAR = BR2_LINUX_KERNEL
-else ifneq ($$(filter boot/%,$(pkgdir)),)
+else ifneq ($$(filter boot/% $(BR2_EXTERNAL)/boot/%,$(pkgdir)),)
 $(2)_KCONFIG_VAR = BR2_TARGET_$(2)
-else ifneq ($$(filter toolchain/%,$(pkgdir)),)
+else ifneq ($$(filter toolchain/% $(BR2_EXTERNAL)/toolchain/%,$(pkgdir)),)
 $(2)_KCONFIG_VAR = BR2_$(2)
 else
 $(2)_KCONFIG_VAR = BR2_PACKAGE_$(2)
--
1.9.1

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

end of thread, other threads:[~2014-10-08  8:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-07 13:01 [Buildroot] [Patch v2 1/1] Fix selection of bootloaders from $(BR2_EXTERNAL) Eric Le Bihan
2014-10-07 13:48 ` Thomas Petazzoni
2014-10-07 21:29   ` Eric Le Bihan
2014-10-07 22:29     ` Yann E. MORIN
2014-10-08  8:09       ` Thomas Petazzoni
2014-10-08  8:50         ` Eric Le Bihan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox