From patchwork Sun Jul 12 17:27:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 494159 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id EBF6B1402BC for ; Mon, 13 Jul 2015 03:27:33 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 33DBF95068; Sun, 12 Jul 2015 17:27:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bopRfP-cALPZ; Sun, 12 Jul 2015 17:27:31 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 7B5A094EA8; Sun, 12 Jul 2015 17:27:31 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 152B81BFE00 for ; Sun, 12 Jul 2015 17:27:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 119D394E5A for ; Sun, 12 Jul 2015 17:27:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dIeL7bn1rh4o for ; Sun, 12 Jul 2015 17:27:30 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from exchange.essensium.com (220.77.144.195.ipv4.evonet.be [195.144.77.220]) by hemlock.osuosl.org (Postfix) with ESMTPS id B8A6D9505C for ; Sun, 12 Jul 2015 17:27:28 +0000 (UTC) Received: from vandecaa-laptop.home (10.8.0.10) by beleexch01.local.ess-mail.com (10.3.7.8) with Microsoft SMTP Server (TLS) id 15.0.847.32; Sun, 12 Jul 2015 19:27:02 +0200 From: "Arnout Vandecappelle (Essensium/Mind)" To: Date: Sun, 12 Jul 2015 19:27:01 +0200 Message-ID: <1436722021-6478-1-git-send-email-arnout@mind.be> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1411667269-8347-1-git-send-email-eric.le.bihan.dev@free.fr> References: <1411667269-8347-1-git-send-email-eric.le.bihan.dev@free.fr> MIME-Version: 1.0 X-Originating-IP: [10.8.0.10] X-ClientProxiedBy: beleexch01.local.ess-mail.com (10.3.7.8) To beleexch01.local.ess-mail.com (10.3.7.8) Cc: Eric Le Bihan , Thomas De Schampheleire Subject: [Buildroot] [PATCH] Fix selection of bootloaders from $(BR2_EXTERNAL) X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Eric Le Bihan 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. [Arnout: use single filter line, also apply this to toolchain] Signed-off-by: Eric Le Bihan Cc: Thomas De Schampheleire Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Reviewed-by: Thomas De Schampheleire --- v2: [Arnout] - Use a single filter line instead of copying it for BR2_EXTERNAL (Suggested by Thomas DS) - Add the same feature to toolchain (Suggested by Thomas DS) --- 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 7000975..84c76e9 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -642,9 +642,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)