From patchwork Wed Feb 4 22:29:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rg_Krause?= X-Patchwork-Id: 436499 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 C7B2B140218 for ; Thu, 5 Feb 2015 09:30:31 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 674188A066; Wed, 4 Feb 2015 22:30:30 +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 CdPTfTIMHdEL; Wed, 4 Feb 2015 22:30:25 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 44AB1A1094; Wed, 4 Feb 2015 22:30: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 6BB211C15FE for ; Wed, 4 Feb 2015 22:30:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 675888D1CB for ; Wed, 4 Feb 2015 22:30:19 +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 ht7t6fjj--h4 for ; Wed, 4 Feb 2015 22:30:18 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx02.posteo.de (mx02.posteo.de [89.146.194.165]) by whitealder.osuosl.org (Postfix) with ESMTPS id 1F3708D15B for ; Wed, 4 Feb 2015 22:30:18 +0000 (UTC) Received: from dovecot03.posteo.de (unknown [185.67.36.28]) by mx02.posteo.de (Postfix) with ESMTPS id 2D6CB25A211B for ; Wed, 4 Feb 2015 23:30:16 +0100 (CET) Received: from mail.posteo.de (localhost [127.0.0.1]) by dovecot03.posteo.de (Postfix) with ESMTPSA id 3kcyJR6mBHz5vMp for ; Wed, 4 Feb 2015 23:30:15 +0100 (CET) Received: from nzxt.fritz.box (nzxt.fritz.box [192.168.178.46]) (Authenticated sender: joerg.krause@embedded.rocks) by embedded.rocks (Postfix) with ESMTPSA id 76F0E9814AA; Wed, 4 Feb 2015 23:30:15 +0100 (CET) From: =?UTF-8?q?J=C3=B6rg=20Krause?= To: buildroot@buildroot.org Date: Wed, 4 Feb 2015 23:29:41 +0100 Message-Id: <1423088981-13255-3-git-send-email-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.2.2 In-Reply-To: <1423088981-13255-1-git-send-email-joerg.krause@embedded.rocks> References: <1423088981-13255-1-git-send-email-joerg.krause@embedded.rocks> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v3 3/3] boot/uboot: Add uboot-menuconfig and friends 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" Add uboot-menuconfig, uboot-spl/menuconfig, uboot-tpl/menuconfig and their friends as make targets. The Kconfig configuration in U-Boot is different from Linux. The biggest difference is that U-Boot has to configure multiple boot images per board: Normal, SPL, TPL. The Kconfig functions are expanded for U-Boot to handle multiple images. menuconfig and friends are used to configure Normal and create (or modify) the .config file. For SPL configuration, the configutation targets are prefixed with "spl/", for example "make spl/config", "make spl/menuconfig", etc. Those targets create or modify the spl/.config file. Likewise, run "make tpl/config", "make tpl/menuconfig", etc. for TPL. The target "_defconfig" is used to create the .config, spl/.config (if CONFIG_SPL is defined) and tpl/.config (if CONFIG_TPL is defined) based on the file configs/_defconfig. savedefconfig creates a minimal set of config based on the .config and saves it into the "defconfig" file. If CONFIG_SPL (and CONFIG_TPL) is defined, the common lines among .config, spl/.config (and tpl/.config) are coalesced together with a special syntax where each line has a ":" prefix. Signed-off-by: Jörg Krause --- Changes v2 -> v3: - Add spl/menuconfig and tpl/menuconfig and their friends - Rewrite commit log Changes v1 -> v2: - Retain backward compatibility (Thomas) --- boot/uboot/uboot.mk | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index 2ea9c86..2c39435 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -185,6 +185,26 @@ endif $(eval $(generic-package)) ifeq ($(BR2_TARGET_UBOOT),y) +ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG),y) +uboot-menuconfig uboot-xconfig uboot-gconfig uboot-nconfig: uboot-configure + $(TARGET_MAKE_ENV) $(MAKE) $(UBOOT_MAKE_OPTS) -C $(UBOOT_DIR) $(subst uboot-,,$@) + rm -f $(UBOOT_DIR)/.stamp_{built,target_installed,images_installed} +uboot-spl/menuconfig uboot-spl/xconfig uboot-spl/gconfig uboot-spl/nconfig: uboot-configure + $(TARGET_MAKE_ENV) $(MAKE) $(UBOOT_MAKE_OPTS) -C $(UBOOT_DIR) $(subst uboot-,,$@) + rm -f $(UBOOT_DIR)/.stamp_{built,target_installed,images_installed} +uboot-tpl/menuconfig uboot-tpl/xconfig uboot-tpl/gconfig uboot-tpl/nconfig: uboot-configure + $(TARGET_MAKE_ENV) $(MAKE) $(UBOOT_MAKE_OPTS) -C $(UBOOT_DIR) $(subst uboot-,,$@) + rm -f $(UBOOT_DIR)/.stamp_{built,target_installed,images_installed} +uboot-savedefconfig: uboot-configure + $(TARGET_MAKE_ENV) $(MAKE) $(UBOOT_MAKE_OPTS) -C $(UBOOT_DIR) $(subst uboot-,,$@) +ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG_USE_CUSTOM_DEFCONFIG),y) +uboot-update-defconfig: uboot-savedefconfig + cp -f $(UBOOT_DIR)/defconfig $(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG_CUSTOM_DEFCONFIG_FILE) +else +uboot-update-defconfig: ; +endif # BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG_USE_CUSTOM_CONFIG +endif # BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG + # we NEED a board name unless we're at make source ifeq ($(filter source,$(MAKECMDGOALS)),)