[FS#3251] No fat image built for DLINK DIR-825 B1 after ar71xx to ath79 migration

OpenWrt Bugs openwrt-bugs at lists.openwrt.org
Thu Jul 30 08:23:54 EDT 2020


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#3251 - No fat image built for DLINK DIR-825 B1 after ar71xx to ath79 migration
User who did this - Adrian Schmutzler (adrianschmutzler)

----------
Based on my research, it appears the "fat" image was the result of a hack to make use of the entire flash for this device, since the vendor put the caldata at 0x660000 and therefore limited the size of the firmware image.

cameo_ap94_mtdlayout=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,6208k(firmware),64k(caldata)ro,1600k(unknown)ro,64k at 0x7f0000(caldata_copy)
cameo_ap94_mtdlayout_fat=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,7808k(firmware),64k(caldata)ro,64k at 0x660000(caldata_orig),6208k at 0x50000(firmware_orig)

This was accompanied by providing a whole set of images to flash from one variant to another, which was dropped again here:
https://github.com/openwrt/openwrt/commit/9a11f882d765a8ca31b151f6d9e20c8062b115cf

>From my perspective, this is an ugly hack that has been abandoned when adding this device to ath79 for a good reason, where only the "correct" vendor partitioning was implemented.

Since the copied caldata of the previous "fat" image appears to be in the read-only region of the flash for the new image, it should be relatively simple to migrate to ath79:
1. flash the ath79 image
2. install kmod-mtd-rw via opkg (or built it into the image directly)
3. enable kmod-mtd-rw
4. remove ro for the "real" caldata partition and copy the contents from the previously copied partition at 0x7f0000 back to their proper location
5. reboot the device, put ro back, and remove kmod-mtd-rw

Regarding the factory image:
I took a quick dive into that terribly image/legacy.mk code, and as it appears, the factory image is created by just appending "00AP94-AR7161-RT-080619-00" to the sysupgrade image after padding:

			( \
				dd if=$(call sysupname,$(1),$(2)) bs=4096k conv=sync; \
				echo -n "$(7)"; \
			) > $(call factoryname,$(1),$(2)); \

$(7) should be the string given above here.

For ath79, I can tell that no factory image has been set up in the first place. If that's required for factory flashing, somebody would need to add it, though that might be relatively trivial based on the information above.
----------

More information can be found at the following URL:
https://bugs.openwrt.org/index.php?do=details&task_id=3251#comment8605

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.



More information about the openwrt-bugs mailing list