Skip to content
Snippets Groups Projects
Commit 286be498 authored by Piotr Kubik's avatar Piotr Kubik Committed by Mikhail Kshevetskiy
Browse files

airoha: sysupgrade: Add u-boot-script

Add a script component in sysupgrade.itb file.

Script is intended to be executed by u-boot.
It is expected for the value of a script type property to be "script".
parent 003c32c0
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ define Build/iopsys-fit-upgrade-image
boot $(IMAGE_KERNEL) \
rootfs $(IMAGE_ROOTFS) \
u-boot-env $(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-env_dump_filtered.bin \
u-boot-script $(CURDIR)/u-boot-script \
$(if $(GPT_PRIMARY_ENTRY_OFFSET), \
gpt-primary-header $(dir $@)/$(DEVICE_IMG_PREFIX)-gpt.img.start \
gpt-primary-entry $(dir $@)/$(DEVICE_IMG_PREFIX)-gpt.img.entry \
......@@ -25,6 +26,7 @@ define Build/iopsys-fit-upgrade-image
boot \
rootfs \
u-boot-env \
u-boot-script \
$(if $(GPT_PRIMARY_ENTRY_OFFSET), \
gpt-primary-header \
gpt-primary-entry \
......@@ -33,6 +35,7 @@ define Build/iopsys-fit-upgrade-image
gpt-alternate-offset:$(GPT_ALTERNATE_OFFSET)) \
$(if $(CONFIG_TARGET_UPGRADE_BUNDLE),upgrade_bundle) \
)
$(if $(GPT_PRIMARY_ENTRY_OFFSET), $(call add_fit_sub_image_script_type, $@))
$(call iopsys-fit-upgrade-image-build, $@)
endef
......@@ -40,6 +43,17 @@ define Build/generate_gpt_entries
ptgen -a100 -v -g -b -o $(dir $@)/$(DEVICE_IMG_PREFIX)-gpt.img $(GPT_LAYOUT_STR)
endef
# Add type property to sub-image u-boot script
define add_fit_sub_image_script_type
echo -e '/ { \n\
images {\n\
u-boot-script {\n\
type = "script";\n\
};\n\
};\n\
};' >> $(1).its
endef
# Generate U-Boot RAM image
define generate-uboot-ram
@echo Generate fit-dtb image for $(DEVICE_NAME)
......
echo "Hello world!"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment