diff options
author | Guillermo RodrÃguez <guille.rodriguez@gmail.com> | 2020-02-17 09:17:05 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2020-02-20 06:46:08 +0100 |
commit | c3f5c1a2c1ecc9b36fcc81fe149db2e3ce1eacdf (patch) | |
tree | 10474f4d72674001fd05ff8f26c95502f04265f7 | |
parent | 06dd912ba18517c2381e173ffb8b8cd3e2b80b8d (diff) | |
download | ptxdist-c3f5c1a2c1ecc9b36fcc81fe149db2e3ce1eacdf.tar.gz ptxdist-c3f5c1a2c1ecc9b36fcc81fe149db2e3ce1eacdf.tar.xz |
u-boot: Add support for custom make options
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 <guille.rodriguez@gmail.com>
Message-Id: <20200217081705.6773-1-guille.rodriguez@gmail.com>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | platforms/u-boot.in | 7 | ||||
-rw-r--r-- | rules/u-boot.make | 3 |
2 files changed, 9 insertions, 1 deletions
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) \ |