From patchwork Wed May 18 19:25:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Williams X-Patchwork-Id: 623704 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]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3r941T5ckgz9t6Y for ; Thu, 19 May 2016 05:26:05 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CFEC295908; Wed, 18 May 2016 19:26:03 +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 J4Q1rL+zBSiJ; Wed, 18 May 2016 19:26:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 2283B958BE; Wed, 18 May 2016 19:26:02 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id B74891C0975 for ; Wed, 18 May 2016 19:25:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B35CA91DEE for ; Wed, 18 May 2016 19:25:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id m3jR9ZjOXfDp for ; Wed, 18 May 2016 19:25:46 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sender163-mail.zoho.com (sender163-mail.zoho.com [74.201.84.163]) by whitealder.osuosl.org (Postfix) with ESMTPS id 84D8591DDD for ; Wed, 18 May 2016 19:25:46 +0000 (UTC) Received: from localhost (32.97.110.52 [32.97.110.52]) by mx.zohomail.com with SMTPS id 1463599539963103.71020582611277; Wed, 18 May 2016 12:25:39 -0700 (PDT) From: Patrick Williams To: buildroot@busybox.net Date: Wed, 18 May 2016 14:25:25 -0500 Message-Id: <1463599530-28752-2-git-send-email-patrick@stwcx.xyz> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1463599530-28752-1-git-send-email-patrick@stwcx.xyz> References: <1463599530-28752-1-git-send-email-patrick@stwcx.xyz> Subject: [Buildroot] [PATCH 1/6] Makefile: Support merged defconfigs 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: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Sam Bobroff Within the Linux kernel, and several other packages, it's currently possible to maintain defconfigs as diffs (fragments) against other configs but this is not possible with buildroot itself. This patch adds the capability, although using a slightly different implementation. Files may be added in the normal config directories ($TOPDIR/configs or $BR2_EXTERNAL/configs) with the format "xxx_defconfig.merge" that contain, one per line, the files to be passed to merge_config.sh to create the matching xxx_defconfig file (the first line should contain the base config followed by the fragments). The generated defconfig file is then handled as it would normally be. Signed-off-by: Sam Bobroff Tested-by: Samuel Mendoza-Jonas --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile b/Makefile index ffbacfc..035d0ab 100644 --- a/Makefile +++ b/Makefile @@ -848,6 +848,16 @@ defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(BR2_EXTERNAL)/configs/$@ \ $< --defconfig=$(BR2_EXTERNAL)/configs/$@ $(CONFIG_CONFIG_IN) +%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig.merge outputmakefile + @cd $(TOPDIR)/configs && xargs -a $@.merge -x -P 1 $(TOPDIR)/support/kconfig/merge_config.sh -m -O $(CONFIG_DIR) + @$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(CONFIG_DIR)/.config \ + $< --defconfig=$(CONFIG_DIR)/.config $(CONFIG_CONFIG_IN) + +%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(BR2_EXTERNAL)/configs/%_defconfig.merge outputmakefile + @cd $(BR2_EXTERNAL)/configs && xargs -a $@.merge -x -P 1 $(TOPDIR)/support/kconfig/merge_config.sh -m -O $(CONFIG_DIR) + @$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(CONFIG_DIR)/.config \ + $< --defconfig=$(CONFIG_DIR)/.config $(CONFIG_CONFIG_IN) + savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @$(COMMON_CONFIG_ENV) $< \ --savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \