From patchwork Thu Sep 19 11:10:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Jarrige X-Patchwork-Id: 275945 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id C5AAF2C011D for ; Thu, 19 Sep 2013 22:03:24 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BA9508C70B; Thu, 19 Sep 2013 12:03:22 +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 AnI8F5LwOTDT; Thu, 19 Sep 2013 12:03:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 0C6FE8C71B; Thu, 19 Sep 2013 12:03:22 +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 E30231BFA01 for ; Thu, 19 Sep 2013 12:03:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D83E38C71B for ; Thu, 19 Sep 2013 12:03:20 +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 iKcBfJQAA5lW for ; Thu, 19 Sep 2013 12:03:17 +0000 (UTC) X-Greylist: delayed 00:50:02 by SQLgrey-1.7.6 Received: from mo2.mail-out.ovh.net (6.mo2.mail-out.ovh.net [87.98.165.38]) by whitealder.osuosl.org (Postfix) with ESMTP id A3AAD8C6F7 for ; Thu, 19 Sep 2013 12:03:17 +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 A38A8DC8730 for ; Thu, 19 Sep 2013 13:00:01 +0200 (CEST) Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 19 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; 19 Sep 2013 13:03:12 +0200 Received: from eric by shuttle2.etheralp.ch with local (Exim 4.72) (envelope-from ) id 1VMc9C-0007Xk-Is; Thu, 19 Sep 2013 13:11:46 +0200 From: Eric Jarrige To: buildroot@busybox.net X-Ovh-Mailout: 178.32.228.2 (mo2.mail-out.ovh.net) Date: Thu, 19 Sep 2013 13:10:06 +0200 Message-Id: <1379589006-28682-1-git-send-email-eric.jarrige@armadeus.org> X-Mailer: git-send-email 1.7.2.5 X-Ovh-Tracer-Id: 15704051902068440534 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: gggruggvucftvghtrhhoucdtuddrfeeiledrtdduucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecu X-Spam-Check: DONE|U 0.5/N X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeeiledrtdduucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecu Subject: [Buildroot] [PATCH 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 --- 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..1358f4a 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 configuration" + +config BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG + bool "Using a custom 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 customized U-Boot 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