diff options
author | 2017-06-21 23:41:42 +0200 | |
---|---|---|
committer | 2017-06-22 13:02:47 +0200 | |
commit | c40e673c5c8f580bb6066c5dcf69aea3c4d9de63 (patch) | |
tree | a56e7fbaed176313427da481dc1a0dda194b5175 /boot/uboot/uboot.mk | |
parent | 6309a6cc7ccd29e36acff4825a70ffd17297e97a (diff) | |
download | buildroot-c40e673c5c8f580bb6066c5dcf69aea3c4d9de63.tar.gz buildroot-c40e673c5c8f580bb6066c5dcf69aea3c4d9de63.tar.bz2 |
uboot: add support for generating U-Boot boot scripts
More and more of our defconfigs need to generate a U-Boot boot
script. It's a simple call to mkimage, but we already have 12
instances of this logic in board/, and there are patch series waiting
in patchwork adding 3 more boards that need this.
So let's add an option in the U-Boot package to generate such a boot
script image easily.
Note that we assume a single script needs to be generated, and the
output file name is boot.scr. The only platform for which it seems to
not be the case are the Boundary Devices platforms: they generate two
boot scripts, 6x_bootscript and 6x_upgrade, but they are anyway
installed inside TARGET_DIR, not BINARIES_DIR.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'boot/uboot/uboot.mk')
-rw-r--r-- | boot/uboot/uboot.mk | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index 904d45a404..0f423a8210 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -235,6 +235,10 @@ define UBOOT_INSTALL_IMAGES_CMDS $(if $(BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT),-r) \ $(if $(filter BIG,$(BR2_ENDIAN)),-b) \ -o $(BINARIES_DIR)/uboot-env.bin -) + $(if $(BR2_TARGET_UBOOT_BOOT_SCRIPT), + $(HOST_DIR)/usr/bin/mkimage -C none -A $(MKIMAGE_ARCH) -T script \ + -d $(call qstrip,$(BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE)) \ + $(BINARIES_DIR)/boot.scr) endef define UBOOT_INSTALL_OMAP_IFT_IMAGE @@ -298,6 +302,15 @@ endif UBOOT_DEPENDENCIES += host-uboot-tools endif +ifeq ($(BR2_TARGET_UBOOT_BOOT_SCRIPT),y) +ifeq ($(BR_BUILDING),y) +ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE)),) +$(error Please define a source file for Uboot boot script (BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE setting)) +endif +endif +UBOOT_DEPENDENCIES += host-uboot-tools +endif + ifeq ($(BR2_TARGET_UBOOT)$(BR_BUILDING),yy) # |