OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Vaclav Juza - 27.07.2020
Last edited by Adrian Schmutzler - 30.07.2020

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

Rationale: build image with more features (WPA enterprise, openvpn) - fat image is the only possibility

Device problem occurs on:


Software versions of OpenWrt/LEDE release, packages, etc:

For 18.06.8 (and earlier) target ar71xx the following images were build:
For 19.07.3 target ar71xx:
  the *-factory.bin image is missing from openwrt download page but still built using image builder
For ath79 (both 19.07.3 and current snapshot):
  Only dlink_dir-825-b1-squashfs-sysupgrade.bin is built

Steps to reproduce:

 make image PROFILE=dlink_dir-825-b1 # for ath79
 # make image PROFILE=DIR825B1 # for ar71xx

Closed by  Adrian Schmutzler
30.07.2020 12:25
Reason for closing:  Won't implement
Additional comments about closing:  

The hack to increase firmware partition won't be ported into ath79. A manual option to repair an existing "fat" installation is available.
For the missing factory image, a separate report should be opened, as that's a separate issue.

Project Manager
Adrian Schmutzler commented on 30.07.2020 12:23

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.


This was accompanied by providing a whole set of images to flash from one variant to another, which was dropped again here:

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/ 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.

DarkCraz commented on 05.05.2021 19:33

"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."

Without this "ugly" hack, the stock image is useless because it is impossible to install the minimum required packages to go to extroot or extoverlay. Extoverlay minimum instalation require such packets as block-mount, e2fsprogs, kmod-fs-ext4, kmod-usb-storage. Free space ends already after the installation of e2fsprogs&kmod-fs-ext4. Thats why this hack need to be reimplemented. Stock flash layot Is suitable for use with stock firmware, but not with openwrt.


Available keyboard shortcuts


Task Details

Task Editing