OpenWrt Forum Archive

Topic: U-Boot mod for routers with AR9331/AR9344

The content of this topic has been archived between 3 Apr 2015 and 7 May 2018. Unfortunately there are posts – most likely complete pages – missing.

dony71 wrote:
pepe2k wrote:
dony71 wrote:

[...]however after flashing to my router, networking not work, neither in u-boot or in root[...]

You need to add a proper network driver in U-Boot.
Network is initialized in U-boot, not again/later in OpenWrt.

pepe2k,
wrt400n is based on AR8236 switch
i thought driver already defined in include/configs/ap94.h
................
#define CFG_ATHRS26_PHY                         1
#define CFG_AG7100_NMACS                        2
................
Am I understanding wrongly?

It's probably not enough, look into Makefiles and make sure that proper driver code is compiled.

pepe2k wrote:
dony71 wrote:
pepe2k wrote:

You need to add a proper network driver in U-Boot.
Network is initialized in U-boot, not again/later in OpenWrt.

pepe2k,
wrt400n is based on AR8236 switch
i thought driver already defined in include/configs/ap94.h
................
#define CFG_ATHRS26_PHY                         1
#define CFG_AG7100_NMACS                        2
................
Am I understanding wrongly?

It's probably not enough, look into Makefiles and make sure that proper driver code is compiled.

Which other driver are you referring to?
I focus on LAN port so I take a look there are only 2 drivers are important for this, athrs26 and ag7100. I check u-boot.map also shows those driver in address mapping.  Also mii info can read AR8236 ID which I think nothing wrong with
the driver. I suspect athrs26_phy.c has something wrong, but I'm not familiar with the code.
Will you help take a look on the code if you have time?

(Last edited by dony71 on 13 Apr 2014, 04:50)

dony71 wrote:

Will you help take a look on the code if you have time?

I will, post somewhere your code. Does your code base on my modification?

pepe2k wrote:
dony71 wrote:

Will you help take a look on the code if you have time?

I will, post somewhere your code. Does your code base on my modification?

pepe2k,
there are several source code and i check appears to have similar code
i guess might come from same source gemtek manufactured oem for linksys (wrt400n), vizio (xwr100)
and wr703n-uboot-with-web-failsafe 
i didn't change any of the code, just compile from package
i even try u-boot.bin which already compiled from the package, and network already fails
i guess distributed gpl has already bugs
below are website links for getting the source
for wr703n-uboot-with-web-failsafe, need to replace makefile from wrt400n or xwr100
since wr703n makefile for AP121 platform instead of AP94
thank for your time to look at this
let me know any code which you suspect for fixing this bug and i will try on my side
since i have this router to test

WRT400N GPL
http://sourceforge.net/projects/officia … rt400n/v1/

Vizio GPL
http://store.vizio.com/xwr100-routercodes

wr703n-uboot-with-web-failsafe
https://code.google.com/p/wr703n-uboot- … e/checkout

(Last edited by dony71 on 14 Apr 2014, 05:54)

Hi
I am new to OpenWrt but I want to use TL WR710n for my project. I need help and I found that this thread is very active.
I flash "openwrt-ar71xx-generic-tl-wa701n-v1-squashfs-factory.bin" to my wr710 via TL Link web page.
Then I can set new password via telnet. But I cannot SSH or other activity like checking ip address, network setting.
Probably I dno't know proper command line to view these info. I stuck at 'root@OpenWrt"/#'
Anyway I want to flash pepe2k uboot_mod firmware but I don't know what command line to use.
I know how to flash from TP Link firmware to uboot_mod because pepe2k stated in his post.
Yes, I have created tftp server.
Can someone help to get it done? I know that it is like spoon feeding, but I am a baby in terms of this tech knowledge.

Thanks advance.

Hi
I attached the boot log of my wr710. Maybe someone can say something from the log sheet.
I know only that 32RAM and 8MB Flash.

U-Boot 1.1.4 (Apr 19 2013 - 15:56:20)

AP121 (ar9330) U-boot

DRAM:  32 MB
led turning on for 1s...
id read 0x100000ff
flash size 8388608, sector count = 128
Flash:  8 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag7240_enet_initialize...
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
: cfg1 0x5 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
ag7240_phy_setup
eth0 up
: cfg1 0xf cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
athrs26_reg_init_lan
ATHRS26: resetting s26
ATHRS26: s26 reset done
ag7240_phy_setup
eth1 up
eth0, eth1
Autobooting in 1 seconds
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... OK

Starting kernel ...

[    0.000000] Linux version 3.10.34 (openwrt@gb-13) (gcc version 4.8.3 (OpenWrt
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9330 rev 1
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.00
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x01ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x01ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pag
[    0.000000] Kernel command line:  board=TL-WR710N console=ttyATH0,115200 root
[    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] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 28652k/32768k available (2334k kernel code, 4116k reserve
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.090000] NET: Registered protocol family 16
[    0.100000] MIPS: machine is TP-LINK TL-WR710N v1
[    0.550000] bio: create slab <bio-0> at 0
[    0.560000] Switching to clocksource MIPS
[    0.560000] NET: Registered protocol family 2
[    0.570000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.570000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    0.570000] TCP: Hash tables configured (established 512 bind 512)
[    0.580000] TCP: reno registered
[    0.580000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.590000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.600000] NET: Registered protocol family 1
[    0.620000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.620000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORIT
[    0.630000] msgmni has been set to 55
[    0.640000] io scheduler noop registered
[    0.640000] io scheduler deadline registered (default)
[    0.650000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.660000] ar933x-uart: ttyATH0 at MMIO 0x18020000 (irq = 11) is a AR933X UA
[    0.660000] console [ttyATH0] enabled, bootconsole disabled
[    0.660000] console [ttyATH0] enabled, bootconsole disabled
[    0.680000] ath79-spi ath79-spi: master is unqueued, this is deprecated
[    0.680000] m25p80 spi0.0: found s25fl064k, expected m25p80
[    0.690000] m25p80 spi0.0: s25fl064k (8192 Kbytes)
[    0.690000] 5 tp-link partitions found on MTD device spi0.0
[    0.700000] Creating 5 MTD partitions on "spi0.0":
[    0.700000] 0x000000000000-0x000000020000 : "u-boot"
[    0.710000] 0x000000020000-0x000000127574 : "kernel"
[    0.710000] mtd: partition "kernel" must either start or end on erase block b
[    0.730000] 0x000000127574-0x0000007f0000 : "rootfs"
[    0.730000] mtd: partition "rootfs" must either start or end on erase block b
[    0.750000] mtd: device 2 (rootfs) set to be root filesystem
[    0.750000] 1 squashfs-split partitions found on MTD device rootfs
[    0.760000] 0x0000002f0000-0x0000007f0000 : "rootfs_data"
[    0.760000] 0x0000007f0000-0x000000800000 : "art"
[    0.770000] 0x000000020000-0x0000007f0000 : "firmware"
[    0.790000] libphy: ag71xx_mdio: probed
[    1.340000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd0
[    1.350000] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[    1.910000] ag71xx-mdio.1: Found an AR7240/AR9330 built-in switch
[    2.940000] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    2.940000] TCP: cubic registered
[    2.950000] NET: Registered protocol family 17
[    2.950000] Bridge firewalling registered
[    2.950000] 8021q: 802.1Q VLAN Support v1.8
[    2.970000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    2.970000] Freeing unused kernel memory: 248K (80342000 - 80380000)
procd: Console is alive
procd: - watchdog -
procd: - preinit -
[    6.360000] usbcore: registered new interface driver usbfs
[    6.360000] usbcore: registered new interface driver hub
[    6.380000] usbcore: registered new device driver usb
[    6.390000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.390000] ehci-platform: EHCI generic platform driver
[    6.400000] ehci-platform ehci-platform: EHCI Host Controller
[    6.400000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    6.410000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    6.440000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    6.440000] hub 1-0:1.0: USB hub found
[    6.440000] hub 1-0:1.0: 1 port detected
[    6.450000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
jffs2 is ready
[    9.770000] jffs2: notice: (327) jffs2_build_xattr_subsystem: complete building xattr subsystem, 2 of xdatum (0 unchecked, 1 orphan) and 28 of xref (0 dead, 16 orphan) found.
switching to jffs2
procd: - early -
procd: - watchdog -
procd: - ubus -
procd: - init -
Please press Enter to activate this console.
[   11.490000] NET: Registered protocol family 10
[   11.510000] nf_conntrack version 0.5.0 (451 buckets, 1804 max)
[   11.520000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   11.550000] Loading modules backported from Linux version master-2014-03-31-1-0-g5c109d2
[   11.560000] Backport generated by backports.git backports-20140221-0-g8e94650
[   11.570000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.620000] xt_time: kernel timezone is -0000
[   11.650000] cfg80211: Calling CRDA to update world regulatory domain
[   11.650000] cfg80211: World regulatory domain updated:
[   11.660000] cfg80211:  DFS Master region: unset
[   11.660000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   11.670000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   11.680000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   11.690000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   11.690000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   11.700000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   11.710000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[   11.770000] PPP generic driver version 2.4.2
[   11.790000] NET: Registered protocol family 24
[   11.890000] cfg80211: Calling CRDA for country: US
[   11.900000] cfg80211: Regulatory domain changed to country: US
[   11.900000] cfg80211:  DFS Master region: FCC
[   11.900000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   11.910000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm), (N/A)
[   11.920000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 1700 mBm), (N/A)
[   11.930000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz), (N/A, 2300 mBm), (0 s)
[   11.940000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)
[   11.950000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
[   11.950000] ieee80211 phy0: Atheros AR9330 Rev:1 mem=0xb8100000, irq=2
procd: - init complete -
[   21.020000] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   21.020000] device eth1 entered promiscuous mode
[   21.030000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   21.030000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

These are the info from my serial connection.
Any comments are welcome.

BusyBox v1.19.4 (2014-04-12 10:51:33 UTC) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 BARRIER BREAKER (Bleeding Edge, r40462)
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------
root@OpenWrt:/# cat/etc/config/system
/bin/ash: cat/etc/config/system: not found
root@OpenWrt:/# cat/proc/mtd
/bin/ash: cat/proc/mtd: not found
root@OpenWrt:/# cat/proc/cpuinfo
/bin/ash: cat/proc/cpuinfo: not found
root@OpenWrt:/#
wnat wrote:

root@OpenWrt:/# cat/etc/config/system
/bin/ash: cat/etc/config/system: not found
root@OpenWrt:/# cat/proc/mtd
/bin/ash: cat/proc/mtd: not found
root@OpenWrt:/# cat/proc/cpuinfo
/bin/ash: cat/proc/cpuinfo: not found
root@OpenWrt:/#

you need to put space in between cat
run opkg update then install ssh
check where is partition name for your u-boot by doing cat  /proc/mtd
then flash u-boot mtd -e <mtd0> write u-boot.bin <mtd0>
(assuming mtd0 is your u-boot partition)

it's not that easy, you need to keep safe your second 64KB of mtd0, you cannot flash the whole uboot like that!

read carefully first post AND LINKS in there..


anyway "install ssh" it's really funny xD

(Last edited by nebbia88 on 15 Apr 2014, 17:51)

What's more... at this moment there is no way to update U-Boot from official OpenWrt images!
MTD partition with U-Boot is read only.

pepe2k wrote:

What's more... at this moment there is no way to update U-Boot from official OpenWrt images!
MTD partition with U-Boot is read only.

how about if add mask_flags     = MTD_WRITEABLE in u-boot partition structure for openwrt ?

Remove, not add - you have there "mask_flags".

nebbia88 wrote:

it's not that easy, you need to keep safe your second 64KB of mtd0, you cannot flash the whole uboot like that!

i'm not familiar with tplink router, but after i read pepe2k at 1st post,
i understand that u-boot only located the first 64K
in this case, need to dump the whole mtd0 using dd then
replace the first 64k with new u-boot then can flash whole mtd0
also like pepe2k said, need to remove mask_flags in openwrt u-boot partition stucture

...and recompile openwrt obviously... easy for a noob ^^

maybe it's simpler to flash dd-wrt, update uboot, then back to openwrt wink

Thanks Gentlemen for your advice.
Now I can check CPU info and MTD info
Then I try to run opkg and another problem pop up.

 
root@OpenWrt:/# opkg update
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz.
wget: bad address 'downloads.openwrt.org'
Collected errors:
 * opkg_download: Failed to download http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz, wget returned 1.
root@OpenWrt:/#
 

I think I need to change the path but I don't know how.
I read opkg manager but it is for intermediate and expert level.
Advice need is how to change path and which package has to be update.
Thanks in advance.

wnat wrote:

Thanks Gentlemen for your advice.
Now I can check CPU info and MTD info
Then I try to run opkg and another problem pop up.

 
root@OpenWrt:/# opkg update
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz.
wget: bad address 'downloads.openwrt.org'
Collected errors:
 * opkg_download: Failed to download http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz, wget returned 1.
root@OpenWrt:/#
 

I think I need to change the path but I don't know how.
I read opkg manager but it is for intermediate and expert level.
Advice need is how to change path and which package has to be update.
Thanks in advance.

opkg config in /etc/opkg.conf
however your opkg address is correct
just try in web browser http://downloads.openwrt.org/snapshots/ … ackages.gz
something wrong with your network connection

Hi dony71
You are right. Something wrong with network connection.
I need to explain what I have done so far, so that people can guide me and answer me proper answer rather than general answer. I am less than beginner.
I have wr710n and flash with "openwrt-ar71xx-generic-tl-wr710n-v1-squashfs-factory.bin"

I cannot set new ip address using 'set' command; set ipaddr 192.168.1.3
When I check newwork config, it did not change, show original address 192.168.1.1
Below are available commands and my activity.

root@OpenWrt:/# help
Built-in commands:
------------------
        . : [ [[ alias bg break cd chdir command continue echo eval exec
        exit export false fg getopts hash help jobs kill let local printf
        pwd read readonly return set shift source test times trap true
        type ulimit umask unalias unset wait

root@OpenWrt:/# set ipaddr 192.168.1.3
root@OpenWrt:/# cat /etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd61:77c0:ab41::/48'

config interface 'lan'
        option ifname 'eth1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth0'
        option proto 'dhcp'

config interface 'wan6'
        option ifname '@wan'
        option proto 'dhcpv6'

root@OpenWrt:/#
  

I notice that option gateway did not show, even if I connect wr71 lan port to my home router which gateway address is 192.168.1.254

I think that is the reason that I cannot run opkg.
Any suggestion?

Thanks MBS.
I have gone through both and it doesn't solve my problem.
I used all possible commands and it did not work.

Both site give guide only, not detail enough for beginner like me.

@wnat could you please move your discussion/questions to another topic? This topic is about "U-Boot modification", not about UCI configuration and basics of OpenWrt. Thanks in advance!

I was posted few weeks ago problem with "ïmage too big"
it was solved changing the toolchain from Openwrt to  Sourcery CodeBench Lite Edition for MIPS GNU/Linux

pepe2k wrote:
dony71 wrote:

Will you help take a look on the code if you have time?

I will, post somewhere your code. Does your code base on my modification?

hi pepe2k,

have you got a chance to take a look at source code?
today i compile another u-boot with DEBUGOUT enable in athrs26_phy.h
i'm very puzzle because i don't see anything wrong on DEBUGOUT print below,
but ping still unsuccessful

=============================================================
U-Boot 1.1.4 (Apr 16 2014 - 16:51:50)

AP94 (ar7100) U-boot 0.0.12
DRAM:  b8050000: 0xc0140180
32 MB
Top of RAM usable for U-Boot at: 82000000
Reserving 224k for U-Boot at: 81fc4000
Reserving 192k for malloc() at: 81f94000
Reserving 44 Bytes for Board Info at: 81f93fd4
Reserving 36 Bytes for Global Data at: 81f93fb0
Reserving 128k for boot params() at: 81f73fb0
Stack Pointer at: 81f73f98
Now running in RAM - U-Boot at: 81fc4000
id read 0x100000ff
flash size 8MB, sector count = 128
Flash:  8 MB
In:    serial
Out:   serial
Err:   serial
Net:   ag7100_enet_initialize...
No valid address in Flash. Using fixed address
start auto negogiation on each phy
PHY Base: 0x0 PHY Addr: 0x0
PHY Base: 0x0 PHY Addr: 0x1
PHY Base: 0x0 PHY Addr: 0x2
PHY Base: 0x0 PHY Addr: 0x3
associated PHY
Port 0, Neg Success
Port 1, Neg Success
Port 2, Neg Success
Port 3, Neg Success
Initialize software status
eth0: Phy Specific Status=0010
eth0: Phy Specific Status=0010
eth0: Phy Specific Status=0010
eth0: Phy Specific Status=0010;
                               eth0: 00:03:7f:09:0b:ad
eth0 up
No valid address in Flash. Using fixed address
start auto negogiation on each phy
PHY Base: 0x0 PHY Addr: 0x4
associated PHY
Port 4, Neg Success
Initialize software status
eth1: Phy Specific Status=0010
eth1: 00:03:7f:09:0b:ad
eth1 up
eth0, eth1
Hit any key to stop autoboot:  0
ar7100> ping 192.168.1.5

enet0 port0 up
Using eth0 device
sending ARP for c0a80105
ARP broadcast 1
ARP broadcast 2
ping failed; host 192.168.1.5 is not alive

(Last edited by dony71 on 22 Apr 2014, 19:49)

Hi

I have the MR3020 and I am going to do a 16meg flash upgrade. I have ordered the W25Q128 that I will use for the upgrade.
Now I have read your thread (most of it smile) and I wonder if any of you could verify my upgrade procedure?

I will first try the method without a SPI programmer.

This is what I have done so fare:

1. Backup mtd0 (128k) and ART
2. Today I downloaded u-boot_mod from GIT and built it using Sourcery CodeBench Lite Edition for MIPS GNU/Linux.
(Btw. Building using the OpenWrt Toolchain did not work. It gave me a file greater then 64k and I also got a error from build system)
3. I merged the 64k u-boot_mod I got from the build with the last 64k from the org mtd0 dump. (I have now a 128k u-boot_mod file that include my MAC and PIN etc)


This is what I will do when I get the flash:

1. Boot router into u-boot using serial cable.

2. Download u-boot_mod (128k) to RAM using TFTP

3. Do CS switch from 4mb FLASH to 16mb FLASH

4. Erase FLASH

5. Write u-boot_mod (128k) from RAM to start of 16mb FLASH

3. Start the new u-boot_mod and from web gui I should be able to upload my ART data?

If I understood the u-boot_mod correctly then I should be able to write to ART section from web gui?

Will this work so far? If not then I am a bit lost atm. There are so much to read about this. smile

At this point I should be able to upload the OpenWrt flash file to my new 16mb FLASH chip.
Can I just get the 12.09 image from here: http://downloads.openwrt.org/attitude_a … actory.bin
and upload it or do I need to get a new image that have the rootfs and rootfs_data file system increased to support the 16mb FLASH chip?

Hope some can help me out.

Regards

1)Backup the art partition
2)Write down the MAC Address
3)Flash the uboot on the SPI
4)Solder on
5)Hook up a serial USB console
6)Boot
7)Interrupt Boot to go into uboot env
8)Use the Set Mac Address save and reboot
9)Interrupt Boot to go into uboot env
10)Start mini httpd server
11)Computer connect to router set ip address
12)Choose upload ART
13)Upload ART
14)Choose upload Image
15)Upload OpenWRT Image
16)Reboot
17)Done

(Last edited by alphasparc on 27 Apr 2014, 01:55)

dony71 wrote:

have you got a chance to take a look at source code?

Sorry, not yet.

nedoskiv wrote:

I was posted few weeks ago problem with "ïmage too big"
it was solved changing the toolchain from Openwrt to  Sourcery CodeBench Lite Edition for MIPS GNU/Linux

Context.EAX wrote:

[...] 2. Today I downloaded u-boot_mod from GIT and built it using Sourcery CodeBench Lite Edition for MIPS GNU/Linux.
(Btw. Building using the OpenWrt Toolchain did not work. It gave me a file greater then 64k and I also got a error from build system)[...]

I know that problem. I will try to reduce final image a little.

Context.EAX wrote:

[...]3. Start the new u-boot_mod and from web gui I should be able to upload my ART data?[...]

Yes, using "art.html" page.

Context.EAX wrote:

[...]At this point I should be able to upload the OpenWrt flash file to my new 16mb FLASH chip.
Can I just get the 12.09 image from here: http://downloads.openwrt.org/attitude_a … actory.bin
and upload it or do I need to get a new image that have the rootfs and rootfs_data file system increased to support the 16mb FLASH chip?[...]

You can use any OpenWrt image (not older than AA).
FLASH size and type for TP-Link devices is recognized automatically.

Hi,

I would try to flash the u-boot of my new wr703n (V1.7).

I have found this "Howto flash u-boot" : http://zhujunsan.net/index.php/2013/08/ … or-wr703n/

I have some comprehension problem. It is right, with the method I must not use a serial connection?

My questions:
1) Shell script:
Can I juste copy paste in a file "ubootflash.sh"? And change with the name "uboot_for_tl-wr703n.bin" and the now MD5 (b1f1b7a14c28ea71ffac4f5d944c66cd)? (last release on 19.06.2013?)

---------------------------------------
- ubootflash.sh -------------------
---------------------------------------
#! /bin/sh
#high chance need have a change ...
UBOOT_NAME=uboot_for_tl-wr703n.bin
MD5SUM_SHOULD_BE="1f1b7a14c28ea71ffac4f5d944c66cd"
#need check the md5sum,any one byte in bootloader shoud right ...
CURRENT_MD5SUM_VAL=$( md5sum $UBOOT_NAME |awk '{print $1 }' )
echo "$UBOOT_NAME md5sum : $CURRENT_MD5SUM_VAL"
if [ $MD5SUM_SHOULD_BE = $CURRENT_MD5SUM_VAL ]; then
echo "$UBOOT_NAME md5sum check pass"
else
echo "###############$UBOOT_NAME md5sum check fail###############"
exit
fi
RAW_UBOOT_LEN=`wc -c $UBOOT_NAME | awk '{print $1 }'`
NEED_PAD_LEN=$((0x1fc00-$RAW_UBOOT_LEN))
#Generate a file used as pad ...
dd if=/dev/zero of=pad.bin bs=1 count=$NEED_PAD_LEN
cat $UBOOT_NAME pad.bin >tuboot_0x1fc00.bin
echo "Backup some config first,just like MAC address ..."
dd if=/dev/mtd0 of=./config.bin bs=1 skip=$((0x1fc00))
cat ./tuboot_0x1fc00.bin ./config.bin >uboot_0x20000.bin
---------------------------------------

2) Use Telnet:
I can first setup my 703n with a static address and I can connect on my local network or direct with my PC?

How can I download the *.bin file on RAM? I have read the RAM start address is 0x80000000, how can I do? ( "wget http:/my_local_PC_IP_adress/uboot_for_tl-wr703n.bin 0x80000000" or what else (name directory)?

I must also change the right access? "su chmod 777 uboot_for_tl-wr703n.bin"


3)
The script file can I also download on my wr703n with the same method (on RAM)? Or I can execute on my PC?

I execute juste with the command "sh ./ubootflash.sh" on which side (PC or wr703n?)


Thanks a lot for your help!
Best regards,
Xavier

PS: Sorry for my bad english!

(Last edited by xavtronic on 28 Apr 2014, 08:58)