Message ID | 20190822185911.12336-8-tomek_n@o2.pl |
---|---|
State | Superseded |
Headers | show |
Series | ath79: fixes for devices with RedBoot bootloader | expand |
Hi, > -----Original Message----- > From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org] > On Behalf Of Tomasz Maciej Nowak > Sent: Donnerstag, 22. August 2019 20:59 > To: openwrt-devel@lists.openwrt.org > Cc: Matt Merhar <mattmerhar@protonmail.com> > Subject: [OpenWrt-Devel] [PATCH 7/7] ath79: image: disable sysupgrade > images for routerstations and ja76pf2 > ... > - IMAGES += factory.bin > + IMAGES := factory.bin I just wonder: If we remove support for sysupgrade, wouldn't it be tidier to remove the IMAGE/sysupgrade entries, too (and those commented lines ...)? One could still get them back by just reverting the patch or using git blame... Best Adrian
diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk index c696aac3a8..fd61261193 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -208,7 +208,7 @@ define Device/ubnt_routerstation_common DEVICE_VENDOR := Ubiquiti ATH_SOC := ar7161 IMAGE_SIZE := 16128k - IMAGES += factory.bin + IMAGES := factory.bin IMAGE/factory.bin := append-rootfs | pad-rootfs | mkubntimage | check-size $$$$(IMAGE_SIZE) IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | combined-image | append-metadata | check-size $$$$(IMAGE_SIZE) # IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index b4e709de3e..437265a707 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -643,6 +643,9 @@ define Device/jjplus_ja76pf2 DEVICE_VENDOR := jjPlus DEVICE_MODEL := JA76PF2 DEVICE_PACKAGES += -kmod-ath9k -swconfig -wpad-mini -uboot-envtools fconfig + IMAGES := kernel.bin rootfs.bin + IMAGE/kernel.bin := append-kernel + IMAGE/rootfs.bin := append-rootfs | pad-rootfs IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | combined-image | append-metadata | check-size $$$$(IMAGE_SIZE) # IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE)
Because a bug in handling partial erase blocks in 4.19 kernel, using sysupgrade images will hard brick devices that use RedBoot bootloader and have "FIS directory" with "RedBoot config" on the same erase block. Since flashing the devices from bootloader is safe, and to not cause a situation where external chip programmer or JTAG is needed, disable sysupgrade images for affected boards while creating kernel.bin and rootfs.bin for jjPlus JA76PF2 board, which doesn't have factory image. To set up the JA76PF2 board follow "Installation" instructions in b3a0c97 ("ath79: add support for jjPlus JA76PF2") except the part of loading initramfs image and using sysupgrade image for flashing (point 6 and 7). Enter following commands to flash the board from bootloader: fis init load -r -b 0x80060000 <openwrt_kernel_image_name> fis create linux load -r -b %{FREEMEMLO} <openwrt_rootfs_image_name> fis create rootfs fis load -l linux exec -c "" For RouterStations use TFTP recovery procedure. Ref: FS#2428 Cc: Matt Merhar <mattmerhar@protonmail.com> Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl> --- target/linux/ath79/image/generic-ubnt.mk | 2 +- target/linux/ath79/image/generic.mk | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)