From 3605eff88190af9cc2905ba750252c1643a1bc7d Mon Sep 17 00:00:00 2001 From: Pawel Dembicki Date: Wed, 19 Aug 2020 12:13:26 +0200 Subject: layerscape: add dtb to sysupgrade At this moment sysupgrade replaces only kernel and rootfs. This patch add dtb part to sysupgrade images to avoid situation when old dtb make system broken. Is possible to sysupgrade older images for NOR devices: 1. Firmware partition in bootargs need to be updated to: "49m@0xf00000(firmware)". Env should be saved after changes. 2. After step one, "sysupgrade -F" will work. Run tested: LS1046A-RDB Reviewed-by: Yangbo Lu Signed-off-by: Pawel Dembicki [bump PKG_RELEASE for uboot-layerscape] Signed-off-by: Adrian Schmutzler --- target/linux/layerscape/image/Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'target/linux/layerscape/image/Makefile') diff --git a/target/linux/layerscape/image/Makefile b/target/linux/layerscape/image/Makefile index 8a38a25041..08864b1316 100644 --- a/target/linux/layerscape/image/Makefile +++ b/target/linux/layerscape/image/Makefile @@ -11,8 +11,8 @@ LS_SD_ROOTFSPART_OFFSET = 64 LS_SD_IMAGE_SIZE = $(shell echo $$((($(LS_SD_ROOTFSPART_OFFSET) + \ $(CONFIG_TARGET_ROOTFS_PARTSIZE)) * 1024 * 1024))) -# The limitation of flash sysupgrade.bin is 16MB kernel + 32MB rootfs -LS_SYSUPGRADE_IMAGE_SIZE = 48m +# The limitation of flash sysupgrade.bin is 1MB dtb + 16MB kernel + 32MB rootfs +LS_SYSUPGRADE_IMAGE_SIZE = 49m define Build/ls-clean rm -f $@ @@ -46,6 +46,13 @@ define Build/traverse-fit @mv -f $@.new $@ endef +define Device/fix-sysupgrade + DEVICE_COMPAT_VERSION := 2.0 + DEVICE_COMPAT_MESSAGE := DTB was added to sysupgrade. Image format is different. \ + To use sysupgrade You need to change firmware partition in bootargs to "49m@0xf00000(firmware)" and saveenv. \ + After that, You can use "sysupgrade -F". +endef + include $(SUBTARGET).mk $(eval $(call BuildImage)) -- cgit v1.2.3