[openwrt/openwrt] qoriq: use FIT uImage for Firebox M300 kernel

LEDE Commits lede-commits at lists.infradead.org
Tue Jun 14 03:02:01 PDT 2022


stintel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/c4b499bc03ab0e2eea643c46d1d781ab64e78931

commit c4b499bc03ab0e2eea643c46d1d781ab64e78931
Author: Stijn Tintel <stijn at linux-ipv6.be>
AuthorDate: Tue Apr 26 18:21:11 2022 +0300

    qoriq: use FIT uImage for Firebox M300 kernel
    
    This requires U-Boot environment changes:
    
      setenv OpenWrt_kernel watchguard_firebox-m300-fit-uImage.itb
      setenv loadaddr 0x20000000
      setenv wgBootSysA 'setenv bootargs root=/dev/mmcblk0p2 rw rootdelay=2 console=$consoledev,$baudrate fsl_dpaa_fman.fsl_fm_max_frm=1530; mmc dev 0; ext2load mmc 0:1 $loadaddr $OpenWrt_kernel; bootm $loadaddr'
    
    Trying to sysupgrade an image containing this change on an M300 already
    running OpenWrt will fail with the following error:
    
      Tue Jun 14 12:06:21 EEST 2022 upgrade: The device is supported, but the config is incompatible to the new image (1.0->1.1). Please upgrade without keeping config (sysupgrade -n).
      Tue Jun 14 12:06:21 EEST 2022 upgrade: Kernel switched to FIT uImage. Update U-Boot environment.
      Tue Jun 14 12:06:21 EEST 2022 upgrade: Reading partition table from bootdisk...
      Tue Jun 14 12:06:21 EEST 2022 upgrade: Extract boot sector from the image
      Tue Jun 14 12:06:21 EEST 2022 upgrade: Reading partition table from image...
      Image check failed.
    
    This is to prevent rendering your device unbootable. Make the U-Boot
    environment changes as instruced above, and then flash the image using
    sysupgrade -F. The config can be kept, there is no need to use -n.
    
    After the new image booted successfully, you can increase the compat_version:
    
      uci set system. at system[0].compat_version='1.1'
      uci commit
    
    Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 target/linux/qoriq/image/generic.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/target/linux/qoriq/image/generic.mk b/target/linux/qoriq/image/generic.mk
index 0d7f5e4c10..b8ffc69ba0 100644
--- a/target/linux/qoriq/image/generic.mk
+++ b/target/linux/qoriq/image/generic.mk
@@ -1,10 +1,14 @@
 define Device/watchguard_firebox-m300
   DEVICE_VENDOR := WatchGuard
   DEVICE_MODEL := Firebox M300
+  DEVICE_COMPAT_MESSAGE := \
+	Kernel switched to FIT uImage. Update U-Boot environment.
+  DEVICE_COMPAT_VERSION := 1.1
   DEVICE_DTS_DIR := $(DTS_DIR)/fsl
   DEVICE_PACKAGES := \
 	kmod-hwmon-w83793 kmod-ptp-qoriq kmod-rtc-rs5c372a kmod-tpm-i2c-atmel
-  KERNEL := kernel-bin | gzip | uImage gzip
+  KERNEL := kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
+  KERNEL_SUFFIX := -fit-uImage.itb
   IMAGES := sdcard.img.gz sysupgrade.img.gz
   IMAGE/sysupgrade.img.gz :=  sdcard-img | gzip | append-metadata
   IMAGE/sdcard.img.gz := sdcard-img | gzip




More information about the lede-commits mailing list