layerscape: add dtb to sysupgrade
[openwrt/openwrt.git] / target / linux / layerscape / image / Makefile
index 8a38a2504121d39712a4e67a6e492a693a652834..08864b13160a6ae0332080b55df026c8cf18a1f7 100644 (file)
@@ -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))