Ath79 image builder problem for wr842n/v1

Using snapshot I am having an issue with ath79 builds creating invalid image. (Target tplink wr842n/v1
Originally noted here https://forum.openwrt.org/t/porting-guide-ar71xx-to-ath79/13013/889?u=greybeard

The uploaded image file does not contain a supported format. Make sure that you choose the generic image format for your platform. 

The same error is reported for the prebuilt snapshot image as for a self created imagebuilder image.

Observation:
For the same target on a ar71xxx snapshot imagebuilder the build o/p has the following in it:

Building images...
Unable to open feeds configuration at /home/re/openwrt-imagebuilder-ar71xx-generic.Linux-x86_64/scripts/feeds line 48.
25+1 records in
26+0 records out
1703936 bytes (1.7 MB, 1.6 MiB) copied, 0.00195437 s, 872 MB/s
Image Name:   MIPS OpenWrt Linux-4.14.96
Created:      Wed Jan 30 13:57:40 2019
Image Type:   MIPS Linux Kernel Image (lzma compressed)
Data Size:    1683422 Bytes = 1643.97 KiB = 1.61 MiB
Load Address: 80060000
Entry Point:  80060000
Parallel mksquashfs: Using 1 processor
Creating 4.0 filesystem on /home/re/openwrt-imagebuilder-ar71xx-generic.Linux-x86_64/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/root.squashfs, block size 262144.
Pseudo file "/dev" exists in source filesystem "/home/re/openwrt-imagebuilder-ar71xx-generic.Linux-x86_64/build_dir/target-mips_24kc_musl/root-ar71xx/dev".
Ignoring, exclude it (-e/-ef) to override.
[=================================================================================================|] 883/883 100%

For the ath79 generic build for the same target:

Building images...
Unable to open feeds configuration at /home/re/openwrt-imagebuilder-ath79-generic.Linux-x86_64/scripts/feeds line 48.
Parallel mksquashfs: Using 1 processor
Creating 4.0 filesystem on /home/re/openwrt-imagebuilder-ath79-generic.Linux-x86_64/build_dir/target-mips_24kc_musl/linux-ath79_generic/root.squashfs, block size 262144.
Pseudo file "/dev" exists in source filesystem "/home/re/openwrt-imagebuilder-ath79-generic.Linux-x86_64/build_dir/target-mips_24kc_musl/root-ath79/dev".
Ignoring, exclude it (-e/-ef) to override.
[=================================================================================================|] 873/873 100%

The kernel image appears to be missing from the ath79 build.

Have you tried flashing via TFTP already?

No, why should I need to?
a tiny snapshot image for ath79 on a wr703n sysupgraded ok.
I've been using imagebuilder updates for a couple of years now and this is the first time i've come across this.

This suggests that the current firmware is for a TL-MR3020, which is on the "tiny" target for ath79 on master, not a TL-WR842N. Do you recall where the image that is presently on the device came from?

Edit: It also appears to be an "old" image on the device, as the current ath79 device is tplink_mr3020-v1

The device currently has a ar71xxx 18.06.1 image I built using imagebuilder.

cat /etc/openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='18.06.1'
DISTRIB_REVISION='r7258-5eb055306f'
DISTRIB_TARGET='ar71xx/generic'
DISTRIB_ARCH='mips_24kc'
DISTRIB_DESCRIPTION='OpenWrt 18.06.1 r7258-5eb055306f'
DISTRIB_TAINTS=''

The device is definitely a wr842n/v1.
The ath79 image is from a local imagebuilder image I compiled.

What does head -n5 /etc/board.json give?

 head -n5 /etc/board.json
{
        "model": {
                "id": "tl-mr3420",
                "name": "TP-Link TL-WR842N\/ND v1"
        },

When I create an image with imagebuider I use the following command line

make image PROFILE="tl-wr842n-v1" PACKAGES= ....list of packages

That is the only change I make, ie no file changes to the downloaded imagebuilder package. Is this incorrect?

For some reason, it seems to have put the wrong "id" in for the device. If you can replicate that, I believe it is a bug and I would report it.

(I use the full build system, so I'm not very familiar with how the image builder operates.)

bingo!

in file openwrt-imagebuilder-18.06.1-ar71xx-generic.Linux-x86_64/target/linux/ar71xx/image/generic-tp-link.mk

define Device/tl-wr842n-v1
  $(Device/tplink-8m)
  DEVICE_TITLE := TP-LINK TL-WR842N/ND v1
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
  **BOARDNAME := TL-MR3420**
  DEVICE_PROFILE := TLWR842
  TPLINK_HWID := 0x08420001
endef
TARGET_DEVICES += tl-wr842n-v1

edit: Tried to raise a bug but managed to get 404 error from flyspray each time I tried to save it. will try later.

1 Like

fwiw sysupgrade -F worked fine.

Force option is needed because the device line changed.