Found a U-boot from TP-Link WR841ND made for AR7240, with a correct 4 mb flash, 32 mb ram
After flashing, used TPL to stop, and flashed firmware as before:
ar7240> tftpboot 0x80000000 FACTORY-TO-DDWRT.bin
Bytes transferred = 3932160 (3c0000 hex)
ar7240> erase 0x9f020000 +0x3c0000
ar7240> cp.b 0x80000000 0x9f020000 0x3c0000
ar7240> bootm 0x9f020000
Router now rebooted, and started doing something different:
U-Boot 1.1.4 (Sep 3 2010 - 12:28:13)
AP91 (ar7240) U-boot
DRAM:
sri
#### TAP VALUE 1 = a, 2 = b
32 MB
id read 0x100000ff
flash size 4194304, sector count = 64
Flash: 4 MB
Using default environment
BOARD IS NOT CALIBRATED!!!
In: serial
Out: serial
Err: serial
Net: ag7240_enet_initialize...
No valid address in Flash. Using fixed address
: cfg1 0xf cfg2 0x7014
eth0: 00:03:7f:09:0b:ad
eth0 up
No valid address in Flash. Using fixed address
: cfg1 0xf cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
ATHRS26: resetting s26
ATHRS26: s26 reset done
eth1 up
eth0, eth1
Autobooting in 1 seconds
## Booting image at 9f020000 ...
Uncompressing Kernel Image ... OK
Starting kernel ...
OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Decompressing kernel...
done!
Starting kernel...
[ 0.000000] flash_size passed from bootloader = 1731
[ 0.000000] bootconsole [early0] enabled
AR7240
PT, I-cache aliases, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Linux version 3.5.7 (root@dd-wrt) (gcc version 4.7.3 20121205 (prerelease) (Linaro GCC 4.7-2012.12) ) #6148 Mon Mar 25 08:58:25 CET 2013
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
[ 0.000000] Kernel command line: console=ttyS0,115200 root=1f02 rootfstype=squashfs noinitrd init=/sbin/init
[ 0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] __ex_table already sorted, skipping sort
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] Memory: 29472k/32768k available (2120k kernel code, 3296k reserved, 411k data, 164k init, 0k highmem)
[ 0.000000] NR_IRQS:80
[ 0.000000] Calibrating delay loop... 232.24 BogoMIPS (lpj=1161216)
[ 0.080000] pid_max: default: 32768 minimum: 301
[ 0.080000] Mount-cache hash table entries: 512
[ 0.090000] NET: Registered protocol family 16
[ 0.380000] registering PCI controller with io_map_base unset
[ 0.400000] bio: create slab <bio-0> at 0
[ 0.400000] PCI host bridge to bus 0000:00
[ 0.410000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[ 0.410000] pci_bus 0000:00: root bus resource [io 0x0000]
[ 0.420000] pci 0000:00:00.0: invalid calibration data
[ 0.420000] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff 64bit]
[ 0.430000] PCI: mapping irq 72 to pin1@0000:00:00.0
[ 0.430000] Switching to clocksource MIPS
[ 0.440000] NET: Registered protocol family 2
[ 0.440000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.450000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.460000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.460000] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.470000] TCP: reno registered
[ 0.470000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.480000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.490000] NET: Registered protocol family 1
[ 0.490000] gpio_proc: module loaded and /proc/gpio/ created
[ 0.500000] fixup WR741 Switch LED's
[ 0.500000] wl0gpio_proc: module loaded and /proc/wl0gpio/ created
[ 0.510000] squashfs: version 3.0 (2006/03/15) Phillip Lougher
[ 0.510000] msgmni has been set to 57
[ 0.520000] io scheduler noop registered (default)
[ 0.520000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[ 0.550000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[ 0.560000] console [ttyS0] enabled, bootconsole disabled
[ 0.560000] console [ttyS0] enabled, bootconsole disabled
[ 0.570000] guessed flashsize = 4M
[ 0.580000] scanning for root partition
[ 0.580000] tplink uboot detected
[ 0.580000] guessed bootloader size = 20000
[ 0.590000]
[ 0.590000] found squashfs at 110000
[ 0.600000] Creating 8 MTD partitions on "ar7240-nor0":
[ 0.600000] 0x000000000000-0x000000020000 : "RedBoot"
[ 0.610000] 0x000000020000-0x0000003e0000 : "linux"
[ 0.610000] 0x000000110000-0x0000003e0000 : "rootfs"
[ 0.620000] mtd: partition "rootfs" set to be root filesystem
[ 0.630000] 0x0000003e0000-0x000000400000 : "ddwrt"
[ 0.630000] 0x0000003e0000-0x0000003f0000 : "nvram"
[ 0.640000] 0x0000003f0000-0x000000400000 : "board_config"
[ 0.650000] 0x000000000000-0x000000400000 : "fullflash"
[ 0.660000] 0x000000000000-0x000000020000 : "fullboot"
[ 1.060000] PPP generic driver version 2.4.2
[ 1.070000] PPP BSD Compression module registered
[ 1.070000] PPP Deflate Compression module registered
[ 1.080000] PPP MPPE Compression module registered
[ 1.080000] NET: Registered protocol family 24
[ 1.110000] u32 classifier
[ 1.110000] Performance counters on
[ 1.110000] input device check on
[ 1.120000] Actions configured
[ 1.120000] Netfilter messages via NETLINK v0.30.
[ 1.120000] nf_conntrack version 0.5.0 (460 buckets, 1840 max)
[ 1.130000] nf_conntrack_rtsp v0.6.21 loading
[ 1.140000] nf_nat_rtsp v0.6.21 loading
[ 1.140000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 1.150000] IPP2P v0.8.2 loading
[ 1.150000] TCP: westwood registered
[ 1.150000] TCP: hybla registered
[ 1.160000] TCP: vegas registered
[ 1.160000] NET: Registered protocol family 17
[ 1.160000] Bridge firewalling registered
[ 1.170000] 8021q: 802.1Q VLAN Support v1.8
[ 1.170000] searching for nvram
[ 1.180000] nvram size = 0
[ 1.210000] Broken NVRAM found, recovering it (Magic FFFFFFFF)
[ 1.220000] Atheros AR71xx hardware watchdog driver version 0.1.0
[ 1.220000] ar71xx-wdt: timeout=15 secs (max=24) ref freq=175000000
[ 1.230000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[ 1.240000] Freeing unused kernel memory: 164k freed
start service
starting Architecture code for wr741
starting hotplug
Jan 1 00:00:03 udevtrigger[238]: parse_config_file: can't open '/etc/udev/udev.conf' as config file: No such file or directory
done
load ATH Ethernet Driver
[ 4.540000] ag71xx_mdio: probed
[ 4.540000] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[ 5.130000] ag71xx ag71xx.0: eth0: connected to PHY at ag71xx-mdio.0:04 [uid=004dd041, driver=Generic PHY]
[ 5.140000] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[ 5.710000] eth1: Found an AR7240/AR9330 built-in switch
configure eth0 to f8:d1:11:21:1a:d6
configure eth1 to F8:D1:11:21:1A:D7
/bin/sh: can't create /sys/class/leds/generic_13/port_mask: nonexistent directory
/bin/sh: can't create /sys/class/leds/generic_14/port_mask: nonexistent directory
/bin/sh: can't create /sys/class/leds/generic_15/port_mask: nonexistent directory
/bin/sh: can't create /sys/class/leds/generic_16/port_mask: nonexistent directory
load ATH 802.11 a/b/g Driver
load ATH9K 802.11n Driver
[ 9.150000] Compat-drivers backport release: compat-drivers-2013-01-21-1
[ 9.150000] Backport based on wireless-testing.git master-2013-02-22
[ 9.160000] compat.git: wireless-testing.git
[ 9.370000] cfg80211: Calling CRDA to update world regulatory domain
[ 9.370000] cfg80211: World regulatory domain updated:
[ 9.380000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 9.390000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 9.390000] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 9.400000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 9.410000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 9.420000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 10.180000] eth0: link up (100Mbps/Full duplex)
[ 12.420000] eth0: link down
[ 12.490000] device eth0 entered promiscuous mode
[ 14.600000] device eth1 entered promiscuous mode
[ 15.280000] eth0: link up (100Mbps/Full duplex)
[ 15.600000] br0: port 1(eth0) entered forwarding state
[ 15.600000] br0: port 1(eth0) entered forwarding state
br0: No such process
SIOCGIFFLAGS: No such device
erase[0]erase[65536]
Sending SIGTERM to all processes[ 17.490000] ar71xx-wdt: device closed unexpectedly, watchdog timer will not stop!
[ 17.600000] br0: port 1(eth0) entered forwarding state
[ 19.000000] nf_conntrack: automatic helper assignment is deprecated and it will be removed soon. Use the iptables CT target to attach helpers instead.
Sending SIGKILL to all processes
[ 25.530000] Restarting system.
Tried to load using a same procedure firmware written for TP-Link TL-WR841ND (that is where U-boot came from),
however I got exactly the same result !
Can someone explain from above what went wrong here ?