From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j3baY-0003Hf-Iv for ptxdist@pengutronix.de; Mon, 17 Feb 2020 09:17:10 +0100 Received: by mail-wr1-x444.google.com with SMTP id z7so18434861wrl.13 for ; Mon, 17 Feb 2020 00:17:10 -0800 (PST) From: =?UTF-8?q?Guillermo=20Rodr=C3=ADguez?= Date: Mon, 17 Feb 2020 09:17:05 +0100 Message-Id: <20200217081705.6773-1-guille.rodriguez@gmail.com> In-Reply-To: <20200215090740.GA21732@pengutronix.de> References: <20200215090740.GA21732@pengutronix.de> MIME-Version: 1.0 Subject: [ptxdist] [PATCH v2] u-boot: Add support for custom make options List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: =?UTF-8?q?Guillermo=20Rodr=C3=ADguez?= For some platforms (e.g. stm32mp1) the official way to build U-boot with a device tree other than the board's default requires passing additional make options such as DEVICE_TREE=xxx or EXT_DTB=xxx. Instead of adding each possible option as a parameter in the .in file, add a generic mechanism to allow passing custom make options to U-boot. A similar approach has been adopted by buildroot. Signed-off-by: Guillermo Rodriguez --- v2: Rewrite commit message including rationale platforms/u-boot.in | 7 +++++++ rules/u-boot.make | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/platforms/u-boot.in b/platforms/u-boot.in index 50fb008a3..491faed60 100644 --- a/platforms/u-boot.in +++ b/platforms/u-boot.in @@ -71,6 +71,13 @@ config U_BOOT_CONFIG endif +config U_BOOT_CUSTOM_MAKE_OPTS + prompt "Custom make options" + string + help + List of custom make options passed at build time. Can be + used for example to pass a DEVICE_TREE= value. + choice prompt "Generate environment image" default U_BOOT_ENV_IMAGE_NONE diff --git a/rules/u-boot.make b/rules/u-boot.make index 0c6bccc71..e386dc4d2 100644 --- a/rules/u-boot.make +++ b/rules/u-boot.make @@ -55,7 +55,8 @@ U_BOOT_WRAPPER_BLACKLIST := \ U_BOOT_CONF_OPT := \ -C $(U_BOOT_DIR) \ O=$(U_BOOT_BUILD_DIR) \ - V=$(PTXDIST_VERBOSE) + V=$(PTXDIST_VERBOSE) \ + $(call remove_quotes,$(PTXCONF_U_BOOT_CUSTOM_MAKE_OPTS)) U_BOOT_MAKE_ENV := \ CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \ -- 2.21.0 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de