+ installation via initramfs image is required.\n$\
+ Please adjust bootcmd in u-boot console:\n$\
+ setenv bootcmd \
+ 'setenv bootargs $$$${console} $$$${mtdparts} $$$${bootargs_root}; \
+ nand read.e 0x800000 0x100000 0x400000; bootm 0x00800000'\n$\
+ saveenv\n$\
+ or use OpenWrt shell:\n$\
+ fw_setenv bootcmd \
+ "setenv bootargs $$$${console} $$$${mtdparts} $$$${bootargs_root};\
+ nand read.e 0x800000 0x100000 0x400000; bootm 0x00800000"\n$\
+ and reinstall image with initramfs image. \
+ Please see original instructions for more details.
+endef
+
+define Device/kernel-size-migration-linksys
+ DEVICE_COMPAT_VERSION := 3.0
+ DEVICE_COMPAT_MESSAGE := \n$\
+ !The partitioning of the router has changed! \n$\
+ Partition design has changed compared to \
+ older versions (up to 23.05) due to kernel size restrictions. \n$\
+ Upgrade via sysupgrade mechanism is not possible, so u-boot args \
+ adjustment and new installation via factory style image is required. \n$\
+ Upgrade instructions: \n$\
+ 2. Run folowing commands in console (ssh or serial): \n$\
+ \t fw_printenv \n$\
+ \t fw_setenv nandboot \
+ "$$$$(fw_printenv nandboot | awk -F= '{sub(/^nandboot=/, "");print}' \
+ | sed 's/0x300000/0x400000/g')"\n$\
+ \t fw_setenv altnandboot \
+ "$$$$(fw_printenv altnandboot | awk -F= '{sub(/^altnandboot=/, "");print}' \
+ | sed 's/0x300000/0x400000/g')"\n$\
+ 3. Test if envs are ok by 'fw_printenv'. \
+ It should be the same except last argument of\
+ 'nand read.e' in 'nandboot' and 'altnandboot'.\n$\
+ 4. If envs are ok, please apply FACTORY image with command:\n$\
+ \t sysupgrade -F -n OPENWRT_FACTORY_IMAGE.bin \n$\
+ 5. System should start normally. If not, serial console will be required.