From patchwork Fri Sep 20 11:11:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Jarrige X-Patchwork-Id: 276286 X-Patchwork-Delegate: patrickdepinguin+buildroot@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 3DB722C0139 for ; Fri, 20 Sep 2013 21:00:04 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id EFC838C044; Fri, 20 Sep 2013 11:00:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D6EXuRrl_IzD; Fri, 20 Sep 2013 11:00:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 35F278BEB4; Fri, 20 Sep 2013 11:00:01 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id C80A61BF86C for ; Fri, 20 Sep 2013 11:00:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BE4888C39A for ; Fri, 20 Sep 2013 11:00:00 +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 htoCQNQ77qym for ; Fri, 20 Sep 2013 11:00:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mo2.mail-out.ovh.net (8.mo2.mail-out.ovh.net [188.165.52.147]) by whitealder.osuosl.org (Postfix) with ESMTP id 179818C083 for ; Fri, 20 Sep 2013 11:00:00 +0000 (UTC) Received: from mail406.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo2.mail-out.ovh.net (Postfix) with SMTP id 65639DCA97E for ; Fri, 20 Sep 2013 12:59:59 +0200 (CEST) Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 20 Sep 2013 13:03:12 +0200 Received: from bdi68-1-82-227-80-246.fbx.proxad.net (HELO shuttle2.etheralp.ch) (82.227.80.246) by ns0.ovh.net with SMTP; 20 Sep 2013 13:03:10 +0200 Received: from eric by shuttle2.etheralp.ch with local (Exim 4.72) (envelope-from ) id 1VMycr-0006N9-2b; Fri, 20 Sep 2013 13:11:53 +0200 From: Eric Jarrige To: buildroot@busybox.net X-Ovh-Mailout: 178.32.228.2 (mo2.mail-out.ovh.net) Date: Fri, 20 Sep 2013 13:11:16 +0200 Message-Id: <1379675476-24448-1-git-send-email-eric.jarrige@armadeus.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1379589006-28682-1-git-send-email-eric.jarrige@armadeus.org> References: <1379589006-28682-1-git-send-email-eric.jarrige@armadeus.org> X-Ovh-Tracer-Id: 3129438792813723094 X-Ovh-Remote: 82.227.80.246 (bdi68-1-82-227-80-246.fbx.proxad.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: 0 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeeiledrtddvucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecu X-Spam-Check: DONE|U 0.5/N X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeeiledrtddvucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecu Subject: [Buildroot] [PATCH v2 1/1] u-boot: allow to pass a custom configuration file X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 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-bounces@busybox.net Signed-off-by: Eric Jarrige --- Changes v1 -> v2: - Fix typo boot/uboot/Config.in | 18 ++++++++++++++++++ boot/uboot/uboot.mk | 3 +++ 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in index 1b98339..1db0339 100644 --- a/boot/uboot/Config.in +++ b/boot/uboot/Config.in @@ -71,6 +71,24 @@ config BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION endif choice + prompt "U-Boot configuration" + default BR2_TARGET_UBOOT_USE_DEFCONFIG + +config BR2_TARGET_UBOOT_USE_DEFCONFIG + bool "Using default board configuration file" + +config BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG + bool "Using a custom board configuration file" + +endchoice + +config BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE + string "Configuration file path" + depends on BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG + help + Path to the board configuration file + +choice prompt "U-Boot binary format" default BR2_TARGET_UBOOT_FORMAT_BIN diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index 631da6b..8bcf260 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -80,6 +80,9 @@ UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_CUSTOM_PATCHES endif define UBOOT_CONFIGURE_CMDS + $(if $(BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG), + cp -pf $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE)) \ + $(@D)/include/configs/$(UBOOT_BOARD_NAME).h) $(TARGET_CONFIGURE_OPTS) $(UBOOT_CONFIGURE_OPTS) \ $(MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \ $(UBOOT_BOARD_NAME)_config