DIR-859: The uploaded image file does not contain a supported format

I have a DIR-859 which has been running
OpenWrt 21.02-SNAPSHOT r16248-089efd61e9 / LuCI openwrt-21.02 branch git-21.202.77408-1dd9ca3
very reliably, but I'd like to upgrade to the latest stable version.
The label says it is hardware version A3, but LuCI says A1, and syslog says
kern.info kernel: [ 0.000000] MIPS: machine is D-Link DIR-859 A1
website says
Comment installation:
A3 works with A1 images, see forum for issues

If I attempt to upgrade to
https://downloads.openwrt.org/releases/24.10.0/targets/ath79/tiny/openwrt-24.10.0-ath79-tiny-dlink_dir-859-a3-squashfs-sysupgrade.bin
using LuCI, I get this popup:

Flash image?

The flash image was uploaded. Below is the checksum and file size listed, compare them with the original file to ensure data integrity.
Click 'Continue' below to start the flash procedure.

Size: 6.00 MB
MD5: 2332eb795c5bfdb4d814299bcf51d6f1
SHA256: d2dd1929775b85800396506dccde88198e8eee56f557e44941229c97cc325d55

Keep settings and retain the current configuration
Tue Jun 17 18:13:39 EDT 2025 upgrade: Device dlink,dir-859-a1 not supported by this image Tue Jun 17 18:13:39 EDT 2025 upgrade: Supported devices: dlink,dir-859-a3 Image check failed.
The uploaded image file does not contain a supported format. Make sure that you choose the generic image format for your platform.
Force upgrade: Select 'Force upgrade' to flash the image even if the image format check fails. Use only if you are sure that the firmware is correct and meant for your device!

(I lost my other router in failed upgrade, bricked hard, no recovery, so I'm feeling extra cautious.)

How should I proceed?

Try upgrading to 23.05 first, then 24.10. Do not keep settings during the upgrades -- this will allow the device to reset to defaults. This is necessary because the upgrade process (while preserving settings) is only tested and known to work for (n-1) -> n versions, and the syntax may well be incompatible and cause major issues.

Feel free to make a backup, but don't restore it... instead, you can use it as a human readable reference for recreating your settings.

1 Like

If after following @psherman's instructions to step through 23.05 first, you are still having issues with a mismatch between device and supported devices, you may need to change the board_name on the device. This assumes you are absolutely sure that it is an A3 model, which it seems is the case.

The above "device" value comes from the file /tmp/sysinfo/board_name [see note].

The above "supported devices" value comes from inside the image (where there may be several names of supported devices, but here it looks like this image only has one).

When sysupgrade runs, it compares the board_name value with what's contained in the image. If no match can be found, it reports the error you're seeing and aborts.

If you are absolutely sure that the image is the correct one, simply edit /tmp/sysinfo/board_name and change the 1 to 3, so it reads

dlink,dir-859-a3

and then sysupgrade will find the image acceptable.


Note - I'm lying above, the board name really comes from the binary DTS info on most devices. But, that doesn't matter because all the OpenWrt tooling --including sysupgrade-- looks for it in that tmp file, so it works for our purposes here. Also, if you edit /tmp/sysinfo/board_name and reboot, that file will be reverted to its "true" value.

1 Like

Thank's for your advice so far.
I tried to upgrade to
downloads.openwrt.org/releases/23.05.5/targets/ath79/generic/openwrt-23.05.5-ath79-generic-dlink_dir-859-a3-squashfs-sysupgrade.bin
and got same popup, "file does not contain a supported format".
Is that the right bin to try? or should v23 be a1?
Is un-checking the box to "keep settings" enough, or what procedure should I use?
I'm not "absolutely sure" about anything: the only evidence I have that it's an a3 is the label, that's all.
Is the next step vi /tmp/sysinfo/board_name
or try another bin?

What I suspect happened is this:

  1. Device was released as a1 version, and support added to OpenWrt
  2. New versions were released, a3 and so on
  3. Someone tested a1 code on the new a3, saw that it worked and left things as-is
  4. In some subsequent release (looks like 23.05), someone noticed that a3 has some differences or extra capabilities or whatever, so branched the dts to handle a1 and a3 differently
  5. This leaves all the a3-devices that have an a1-image installed thinking they need the a1 code, when in fact they could/should have a3

So, if your label says it's really an a3, I'd do the edit on the board_name file and carry on with the 23.05 install.

(Some might say, "Just use sysupgrade --force", but I prefer editing board name as it's much more surgical and only addresses the specific error we're seeing here; using --force might ignore other errors, too, as it's sort of a hammer instead of a scalpel.)

1 Like

After editing board_name,
openwrt-23.05.5-ath79-generic-dlink_dir-859-a3-squashfs-sysupgrade.bin
installed without any error or warning, and booted, but not in an entirely healthy way.
For example, the controls for specifying router's address and dhcp address range are absent.

Does this help?

[    0.347811] spi-nor spi0.0: w25q128 (16384 Kbytes)
[    0.352864] 6 fixed-partitions partitions found on MTD device spi0.0
[    0.359519] OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions
[    0.366401] OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions
[    0.373714] OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions 
[    0.380641] OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions 
[    0.387797] OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions
[    0.394661] OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions
[    0.401743] OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions
[    0.408642] OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions
[    0.415964] Creating 6 MTD partitions on "spi0.0":
[    0.420931] 0x000000000000-0x000000040000 : "bootloader"
[    0.432636] 0x000000040000-0x000000050000 : "bdcfg"
[    0.438503] 0x000000050000-0x000000060000 : "devdata"
[    0.446191] OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions
[    0.453301] 0x000000060000-0x000000070000 : "devconf"
[    0.460603] 0x000000070000-0x000000ff0000 : "firmware"
[    0.467091] 2 seama-fw partitions found on MTD device firmware
[    0.473136] Creating 2 MTD partitions on "firmware":
[    0.478307] 0x000000000040-0x000000240000 : "kernel"
[    0.483436] mtd: partition "kernel" doesn't start on an erase/write block boundary -- force read-only
[    0.495422] 0x000000240000-0x000000f80000 : "rootfs"
[    0.501528] mtd: setting mtd6 (rootfs) as root device
[    0.507698] 1 squashfs-split partitions found on MTD device rootfs
[    0.514108] 0x000000620000-0x000000f80000 : "rootfs_data"
[    0.520709] 0x000000ff0000-0x000001000000 : "art"
[    0.538519] ag71xx 19000000.eth: invalid MAC address, using random address

None of those error messages appeared previously.

Yeah, that does not look good, but I know nothing about that device or if any of those messages are errors or just info/warnings. Hopefully someone with some expertise here can chime in...

https://downloads.openwrt.org/releases/24.10.1/targets/ath79/tiny/openwrt-24.10.1-ath79-tiny-dlink_dir-859-a3-squashfs-sysupgrade.bin

has been running for a couple days now, doing what I need it to do, so thanks y'all

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.