summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boot/uboot/Config.in16
-rw-r--r--boot/uboot/uboot.mk13
2 files changed, 29 insertions, 0 deletions
diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index 547822d0a9..52f3a326c6 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -407,6 +407,22 @@ config BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT
endif # BR2_TARGET_UBOOT_ENVIMAGE
+config BR2_TARGET_UBOOT_BOOT_SCRIPT
+ bool "Generate a U-Boot boot script"
+ help
+ Generate a U-Boot boot script, given a file listing U-Boot
+ commands to be executed at boot time. The generated boot
+ script will be called 'boot.scr'.
+
+if BR2_TARGET_UBOOT_BOOT_SCRIPT
+
+config BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE
+ string "U-Boot boot script source"
+ help
+ Source file to generate the U-Boot boot script.
+
+endif
+
if BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
config BR2_TARGET_UBOOT_CUSTOM_DTS_PATH
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)
#
OpenPOWER on IntegriCloud