I am trying to replace superWRt by a proper OpenWrt image.
I can upload (using the superwrt boot web page) a squashfs image
I can access the device (AP143 platform) from UART
It looks like it boot at a weird address : 9f020000 instead of usual 9f050000 . I can not really change that (the superWrt loader seems locked)
Below the boot sequence
Any help welcome
SuperWRT Boot 1.3.10-g6a239a72-dirty (Sep 4 2018 - 18:15:21)
QCA953x - Honey Bee 2.0
DRAM: 64 MB
Flash: 8 MB (ef4017)
Using default environment
Frequency: CPU 650MHz / RAM 597MHz / AHB 216MHz
Bootstrap Config: 0x00000020
SuperWRT Board Info(0x9f01c000):
CPE2G-9531/terra@superwrt.com/2017-12-21
WLAN0 info: cal:0x9fff1000, mac:0x9fff1002
Device UID: 6000cdb938e66d552c303249b03ee06b
GPIO: reset(17/L), system(13/L)
In: serial
Out: serial
Err: serial
Net: (84:40:00:00:17:0c) S27phy S27 eth0, eth1
Set 0x181162c0 = 0x5dbba100
Hit 'c' or 'Ctrl+c' to stop autoboot: 1
Net Command waiting: 2
Try eth1 first.
eth1 link down
dup 1 speed 100
config: Config magic check error!
config2: Config magic check error!
## Booting image at 9f020000 ...
## Booting image at 9f020000 ...
Magic: 68737173
Bad Magic Number
Failed to boot.
Starting httpd to update firmware...
Try eth1 first.
eth1 link down
starting httpd server eth0 192.168.17.1
You need to find or make a build that matches that board. Many TP-Link models have a 128k bootloader and thus boot to that address. In the ath79 system it is relatively easy to change the dts file to set the partition locations.
The "AP143" is suggested hardware design by Atheros, but manufacturers make slight changes with memory locations, LEDs, ports, etc.
ath79 is a new approach to AR71xx chips, so far it is found only in trunk and has not been ported to all the models in ar71xx but should be used when possible.
I'd make that even stronger, as, at least as far as I understand it, no submissions are being accepted for new ar71xx devices and the ar71xx platform will be deprecated at the next release with no further updates.
"Build that matches" the board means (among other things) that you've got the right devices on the chip enabled and attached to the proper lines, and drivers to match. That the partitioning is correct, cal data, MACs, and the like are properly extracted from the proper places, the kernel location, compression, and entry point all match the bootloader, and that bootloader args are ignored or modified when needed.
Then you either need a matching, functional mach file for ar71xx, or to port it to ath79. If you're going to take the time to do that, you might as well do it on ath79.
"AP143" is just an OEM reference design. Each manufacturer can and often does change it to meet their needs, both in hardware and in firmware. In some cases, the reference design itself is non-bootable.
Be advised, the OP's device has not yet been ported to OpenWrt: AP143 firmware spkg
This was covered in the previous thread. The OP doesn't [seem to] understand that a firmware has to be developed for OpenWrt; and despite this, will continue to insist you instruct on how to flash/boot it anyways.
It seems as if the OP believes you can just piecemeal a working image together from the /boot and root folder of another firmware. In the last thread, the OP insisted that I make a firmware; but never even provided information on the files. Perhaps you should ask the OP if they think this is possible; and if yes, why haven't those steps been undertaken themselves already.
@lleachii : your attitude is totally insane, please do not talk to me anymore
@ otehr : I finally managed to boot the device on AP143
Here the error I get from the boot log regarding the eth port:
[ 0.837285] switch0: Atheros AR8229 rev. 1 switch registered on mdio-bus.0
[ 0.889987] ag71xx 19000000.eth: invalid MAC address, using random address
[ 1.229950] ag71xx 19000000.eth: Could not find valid phy node
[ 1.236346] ag71xx 1a000000.eth: invalid MAC address, using random address
[ 1.580555] ag71xx 1a000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]