boot/uboot: allow to build multiple Uboot images
PATCH v2 1/1 boot/uboot: allow to build multiple Uboot images
Sometimes it is desired to build multiple U-boot images. E.g. one to save into flash memory and one for serial load. So far this was not possible.
This change allows to select any combination of the target formats. They are all copied to the image folder.
--- boot/uboot/Config.in | 19 +++++----- boot/uboot/uboot.mk | 98 +++++++++++++++++++++++++++++++++------------------- 2 files changed, 73 insertions(+), 44 deletions(-)
boot/uboot/Config.in +10 -9
@@ -137,9 +137,7 @@ config BR2_TARGET_UBOOT_NEEDS_DTC Select this option if your U-Boot board configuration requires the Device Tree compiler to be available. -choice - prompt "U-Boot binary format" - default BR2_TARGET_UBOOT_FORMAT_BIN +menu "U-Boot binary format" config BR2_TARGET_UBOOT_FORMAT_AIS bool "u-boot.ais"
@@ -150,6 +148,7 @@ config BR2_TARGET_UBOOT_FORMAT_AIS config BR2_TARGET_UBOOT_FORMAT_BIN bool "u-boot.bin" + default y config BR2_TARGET_UBOOT_FORMAT_DTB_IMG bool "u-boot-dtb.img"
@@ -252,19 +251,21 @@ config BR2_TARGET_UBOOT_FORMAT_CUSTOM help On some platforms, the standard U-Boot binary is not called u-boot.bin, but u-boot<something>.bin. If this is your case, - you should select this option and specify the correct name + you should select this option and specify the correct name(s) in BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME. -endchoice - config BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME - string "U-Boot binary format: custom name" + string "U-Boot binary format: custom names" depends on BR2_TARGET_UBOOT_FORMAT_CUSTOM help - Specify the correct name of the output binary created by - U-Boot, if it is not one of the default names. For example: + In case the U-Boot binary for the target platform is not among + the default names, one or more custom names can be listed here. + Use space to separate multiple names. + Example: u-boot_magic.bin +endmenu + config BR2_TARGET_UBOOT_OMAP_IFT depends on BR2_TARGET_UBOOT_FORMAT_BIN depends on BR2_arm || BR2_armeb
boot/uboot/uboot.mk +63 -35
119 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v2 1/1 boot/uboot: allow to build multiple Uboot images
Hello,
Quoted 11 lines · Petr Kulhavy
Sometimes it is desired to build multiple U-boot images. E.g. one to save into flash memory and one for serial load. So far this was not possible.
This change allows to select any combination of the target formats. They are all copied to the image folder.
Signed-off-by Petr Kulhavy <[email protected]>--- boot/uboot/Config.in | 19 +++++----- boot/uboot/uboot.mk | 98 +++++++++++++++++++++++++++++++++------------------- 2 files changed, 73 insertions(+), 44 deletions(-)
I've applied your patch, with the following changes:
[Thomas:
- Handle the BR2_TARGET_UBOOT_FORMAT_BIN, which wasn't handled, and therefore u-boot.bin was not copied when BR2_TARGET_UBOOT_FORMAT_BIN=y.
- Rename UBOOT_BIN to UBOOT_BINS, since it can now contain multiple values.]
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com