OpenWrt Forum Archive

Topic: Wrt160nl?

The content of this topic has been archived between 9 Mar 2018 and 6 May 2018. Unfortunately there are posts – most likely complete pages – missing.

HuTPaT wrote:

It's written exactly and clearly ...

WRT160NL v6 Works from trunk r33556, and http://downloads.openwrt.org/backfire/1 … actory.bin maybe will not work (depends on the version of U-Boot (this is bootloader that boots router's firmware))!
So to be sure ... If you have WRT160NL v6, do not try 10.03.1! Build image from trunk and then try to install.


The problem is, that i'm not familiar with all those trunks... Do not know there to get it and how to build r33556 or above (and what does r33556  even means... because in downloads i find no reference....)

I do not know the basics of any of this, with basics i think i could continue by my self, but now i do not even know where to start...

so my steps...:
1) go to http://wiki.openwrt.org/doc/howto/build

Prerequisites
Install OpenWrt Buildroot and its prerequisites on your OS.

Updating Sources
Update sources:

svn update

OpenWrt sources change frequently. It is recommended that you work with the latest sources.

2) go to http://wiki.openwrt.org/doc/howto/buildroot.exigence

Procedure
Install subversion (short: svn), to conveniently download the OpenWrt source code, and build tools to assist with the compilation process:

sudo apt-get update
sudo apt-get install subversion build-essential

Where do i enter that commands? "svn update; sudo .... " ?? what and from where do i have to download where i could enter those commands? what i miss? (i'm windows user (my bad) so maybe that's why i do not understand?)

Sorry for being a noob, but i want to learn and progress... smile

You need to work from the terminal program inside the Linux OS.  You do have a Linux OS to work from right?  Using terminal in Linux is same as being at the Command Prompt in Windows.  We used to lovingly call it the DOS prompt.  If you don't have a Linux installation to work from you need to get that set up first.  You can either set up your computer as dual boot or set up a virtual pc within Windows to install it on.  Seems like most here use VMware for the virtual pc. I'm using Virtual Box with Ubuntu 12 which works very well for me.  Crafty Googling will lead you to the software you need.

slaptunas wrote:

Where do i enter that commands? "svn update; sudo .... " ?? what and from where do i have to download where i could enter those commands? what i miss? (i'm windows user (my bad) so maybe that's why i do not understand?)

Sorry for being a noob, but i want to learn and progress... smile

As jimfree said ...
OpenWRT is Linux distribution for MIPS devices. To compile your own image you also need Linux distribution installed ot your computer (or another computer). All these commands written in OpenWRT wiki page you need to run from linux terminal. OpenWRT also have the same terminal you can do all the thing from there (for example to configure wireless).
On Windows you can't compile (except Cygwin - www.cygwin.com, but I have not tested it).
If you want, send me your email on private message and I can send you compiled image r33743 with some explanation how you can add yourself Luci (web gui).
I`m owner of WRT160NL v1.0, and now have that revision on my router

HuTPaT wrote:

I`m owner of WRT160NL v1.0, and now have that revision on my router

Hi Fellas,
I also got WRT160NL v1.0 and am a bit confused which build will run on my device, can anyone help with download link, thanks!

p.s. been using DD-WRT but seems it's less compatible with multiple USB purpose usage.

(Last edited by mrmef on 28 Oct 2012, 15:18)

I have a strange issue with my WRT160nl:

It very seldomly connect to my internet gateway a mikrotik routerboard SXT G-5HnD.
My old netgear WGR614 v5 gets an ip within seconds and so does my laptop (DHCP).
The wrt160nl will almost never connect.

connecting via seliar gives me this repeatedly:
AG7100: unit 1 phy is up...RMii 100Mbps full duplex
AG7100: pll reg 0x18050018: 0x1f000000  AG7100: cfg_1: 0x7ff0000
AG7100: cfg_2: 0xfff
AG7100: cfg_3: 0x780008
AG7100: cfg_4: 0xffff
AG7100: cfg_5: 0x7efef
AG7100: done cfg2 0x7115 ifctl 0x10000 miictrl 0x11
AG7100: unit 1: phy not up carrier 1
AG7100: unit 1 phy is up...RMii 100Mbps full duplex
AG7100: pll reg 0x18050018: 0x1f000000  AG7100: cfg_1: 0x7ff0000
AG7100: cfg_2: 0xfff
AG7100: cfg_3: 0x780008
AG7100: cfg_4: 0xffff
AG7100: cfg_5: 0x7efef
AG7100: done cfg2 0x7115 ifctl 0x10000 miictrl 0x11
AG7100: unit 1: phy not up carrier 1
AG7100: unit 1 phy is up...RMii 100Mbps full duplex
AG7100: pll reg 0x18050018: 0x1f000000  AG7100: cfg_1: 0x7ff0000
AG7100: cfg_2: 0xfff
AG7100: cfg_3: 0x780008
AG7100: cfg_4: 0xffff
AG7100: cfg_5: 0x7efef
AG7100: done cfg2 0x7115 ifctl 0x10000 miictrl 0x11
AG7100: unit 1: phy not up carrier 1
AG7100: unit 1 phy is up...RMii 100Mbps full duplex

I have tried stock firmware, OpenWRT and DD-WRT, all the same results.
Am I looking at hardware failure?

Port is flapping, perhaps failing to auto-negotiate? Try setting both ports in the connection to 100Fdx or something instead of auto and see if that works.

Tnx v.90

I'll give it a try and report back here.

Curiously, last night it worked like a charm when I installed the latest beta2 of attitude adjustment.
Then installed usb support and the connection was gone again....not sure if that's related.

Corrected my cat5 cable and now works like a charm @10mbit.
So it was a bad crimp.

Thanx

Layer-1 to blame! Glad you got that sorted out.

HuTPaT wrote:

It's written exactly and clearly ...

WRT160NL v6 Works from trunk r33556, and http://downloads.openwrt.org/backfire/1 … actory.bin maybe will not work (depends on the version of U-Boot (this is bootloader that boots router's firmware))!
So to be sure ... If you have WRT160NL v6, do not try 10.03.1! Build image from trunk and then try to install.

Hi,

I have installed an OpenWRT image built from backfire trunk (currently r34202) on WRT160NL with U-Boot 1.0.5 using the stock LinkSys firmware for years now, but I'm not able to do so anymore with latest devices running U-Boot 1.0.6. Installing the firmware using tftp/upgrade in U-Boot still works, but when installing from within the LinkSys firmware I get checksum errors when booting.
------------ Update ------------
Ok, has been solved: I could flash again with latest developer release "attitude adjustment".

Great that it works again. Thanks to the OpenWRT developer community, you are really awesome, guys!

(Last edited by R1D2 on 16 Nov 2012, 15:14)

R1D2 wrote:
HuTPaT wrote:

It's written exactly and clearly ...

WRT160NL v6 Works from trunk r33556, and http://downloads.openwrt.org/backfire/1 … actory.bin maybe will not work (depends on the version of U-Boot (this is bootloader that boots router's firmware))!
So to be sure ... If you have WRT160NL v6, do not try 10.03.1! Build image from trunk and then try to install.

Hi,

I have installed an OpenWRT image built from backfire trunk (currently r34202) on WRT160NL with U-Boot 1.0.5 using the stock LinkSys firmware for years now, but I'm not able to do so anymore with latest devices running U-Boot 1.0.6. Installing the firmware using tftp/upgrade in U-Boot still works, but when installing from within the LinkSys firmware I get checksum errors when booting.
------------ Update ------------
Ok, has been solved: I could flash again with latest developer release "attitude adjustment".

Great that it works again. Thanks to the OpenWRT developer community, you are really awesome, guys!

BTW following your advice I upgraded with latest attitude via web my first revision wrt160nl and it's bricked and I can't find my serial cable but will post an update once I manage to get to console.

Ref. http://downloads.openwrt.org/attitude_a … actory.bin

Edit: Just received the new USB to UART coverter and found out that my U-Boot is:

U-Boot 1.1.6 (Apr 14 2010 - 14:02:36)

AP81 (ar7100) U-boot
sri
32 MB
WRT160NL u-boot version: 1.0.0


Any suggestions which build of OpenWrt will work?

EDIT 2: I was finally able to install OpenWRT using serial cable and RC1 build.

OpenWrt Attitude Adjustment 12.09-rc1 / LuCI 0.11 Branch (0.11+svn9425)

p.s. Not sure why nobody wanted to answer my first post asking about best build, that would have saved me weeks of trouble.

(Last edited by mrmef on 11 Dec 2012, 16:06)

In the interest of keeping all WRT160NL info in one place, let me share my success story:
A few pages back several people asked about VLAN support. If, like me, the config is a bit unusual (I'm now successfully running 8 different SSID's on 8 different VLANs, I'm not using the box as a NAT box, just as access-point-on-steroids), then perhaps these notes help.

If you look at the block diagram, you will note that eth0 is connected to a switch (the LAN ports), but eth1 is directly connected to the WAN port. Indeed, if one configures eth1.666 then you will see 802.1Q-tagged packets coming out of eth1, the WAN port.

So, I defined 8 VLANs on eth1 (say, eth1.100, eth1.200 till eth1.800), bridged them to 8 new wireless SSIDs (bridging them to eth1.100 etc), and just use the WAN port as ethernet and all is well. If you don't define an IP on these VLAN interfaces then wireless clients cannot access the management interface through the wifi - everything is well separated (and you can still run WPA-enterprise with RADIUS over another VLAN, used for management).

In one test-setup where I actually did need NAT-functionality afterwards I subsequently defined eth0 (LAN) to be used as WAN-port, essentially installing the whole box backwards. This also worked. You are well advised to correctly re-label the box after this ;-)

Hope this helps,

Geert Jan

GeertJan wrote:

In the interest of keeping all WRT160NL info in one place, let me share my success story:
A few pages back several people asked about VLAN support. If, like me, the config is a bit unusual (I'm now successfully running 8 different SSID's on 8 different VLANs, I'm not using the box as a NAT box, just as access-point-on-steroids), then perhaps these notes help.

If you look at the block diagram, you will note that eth0 is connected to a switch (the LAN ports), but eth1 is directly connected to the WAN port. Indeed, if one configures eth1.666 then you will see 802.1Q-tagged packets coming out of eth1, the WAN port.

So, I defined 8 VLANs on eth1 (say, eth1.100, eth1.200 till eth1.800), bridged them to 8 new wireless SSIDs (bridging them to eth1.100 etc), and just use the WAN port as ethernet and all is well. If you don't define an IP on these VLAN interfaces then wireless clients cannot access the management interface through the wifi - everything is well separated (and you can still run WPA-enterprise with RADIUS over another VLAN, used for management).

In one test-setup where I actually did need NAT-functionality afterwards I subsequently defined eth0 (LAN) to be used as WAN-port, essentially installing the whole box backwards. This also worked. You are well advised to correctly re-label the box after this ;-)

Hope this helps,

Geert Jan

Great! I am running a similar setup with 5 vlans and 2 ssids. Works like a charm as well, may I ask what is the purpose of having 8 wifi networks stemming from the same source? Are you simply experimenting or is this a legitimate scenario?

Great! I am running a similar setup with 5 vlans and 2 ssids. Works like a charm as well, may I ask what is the purpose of having 8 wifi networks stemming from the same source? Are you simply experimenting or is this a legitimate scenario?

Protocol-testing of wireless devices where it is useful to have a separate, dedicated subnet for each.
Note that these VLANs don't receive IP-connectivity on the OpenWRT box; IP, DHCP, DNS etc are handled elsewhere.

Geert Jan

Hiiii I'm looking for a stable router with a USB that I can use with a usb cellular 3g modem and that it will have an easy custom firmware installation.

Do you think this will do? Can anyone say whether USB modems work on this thing, please?

Hi, I am having trouble booting any OpenWRT image on WRT160NL (CUR01).

I have serial console (a former Nokia 2600 data cable - it has a PL2303HX chip) access and I am trying to check the image works before flashing it (the router is online and I don't have an equivalent backup machine) so I have been trying ramdisk images.

I tried http://downloads.openwrt.org/backfire/1 … e-gzip.bin and it panics.
I also tried a similar image built via ImageBuilder from the trunk from yesterday and had a little more success.

The kernel boots, but serial console is unusable after the moment the kernel tries to setup the serial console itself.

Hit any key to stop autoboot:  0 
ar7100> setenv serverip 10.0.0.1; setenv ipaddr 10.0.0.2
ar7100> setenv bootargs 'board=WRT160NL'
ar7100> tftpboot 0x81000000 ram.bin
 check link duplex:Full/speed:100
dup 1 speed 100
Using eth0 device
TFTP from server 10.0.0.1; our IP address is 10.0.0.2
Filename 'ram.bin'.
Load address: 0x81000000
Loading: send option "timeout 5"
Got OACK: timeout 5
#################################################################
         #################################################################
         #################################################################
         #################################################################
         ##################
done
Bytes transferred = 1421508 (15b0c4 hex)
ar7100> bootm
## Booting image at 81000000 ...
   Image Name:   MIPS OpenWrt Linux-3.7.5
   Created:      2013-01-31  21:55:21 UTC
   Image Type:   MIPS Linux Kernel Image (gzip compressed)
   Data Size:    1421444 Bytes =  1.4 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
kernel: org len = 1421444, new len = 1441792
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 33554432

Starting kernel ...

[    0.000000] Linux version 3.7.5 (openwrt@OpenWRTBuild) (gcc version 4.6.4 20121210 (prerelease) (Linaro GCC 4.6-2012.12) ) #1 Wed Jan 30 083
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9130 rev 2
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:5.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] User-defined 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 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=WRT160NL fsoffset=0x160000 mem=32M rootfstype=squashfs,jffs2 noinitrd
[    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: 28788k/32768k available (2231k kernel code, 3980k reserved, 586k data, 252k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, 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 Linksys WRT160NL
[    0.610000] bio: create slab <bio-0> at 0
[    0.620000] Switching to clocksource MIPS
[    0.630000] NET: Registered protocol family 2
[    0.630000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.630000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.640000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.640000] TCP: reno registered
[    0.650000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.650000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.660000] NET: Registered protocol family 1
[    0.680000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.690000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.700000] msgmni has been set to 56
[    0.700000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.710000] io scheduler noop registered
[    0.710000] io scheduler deadline registered (default)
[    0.720000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
    0.750000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A

I know the kernel works because I suspected the console is not set correctly, and I tried to see if it responds with lower speed settings, which it did (of course, with garbage). I don't think the cable length is at fault, since it works fine in all of the other cases.


I would really appreaciate some help on this. As I said before, I don't want to risk flashing directly, I want to make sure the system boots properly with OpenWRT, before doing that, hence the usage of the ram image.


Thanks.

(Last edited by eddyp on 1 Feb 2013, 00:07)

Hi Guys,

I have a retired Samknows "whitebox" which is a CUR01 version of the WRT160NL. I do know that it is openwrt based, and being an early version, has been locked down somewhat - to protect Samknows commercial advantage in the early days I believe - so as a result I haven't been able to root the device to be able to reflash it.

Here is what I've tried so far:

1. Entered failsafe mode (WPS flashing quickly) which answers ping at 192.168.1.1, but telnet refuses connection.
2. Tried to "Debrick" via tftp on device boot which fails with a timeout and the router fully boots.

echo -e "binary\nrexmt 1\ntimeout 60\ntrace\nput code.bin\n" | tftp 192.168.1.1

The above was from this thread and the Wiki

I have ordered a serial cable but that won't arrive until next week, so I was wondering if anyone had had any success in re purposing a Samknows WRT160NL via lan?

Does anyone know if there is a trick using netcat to monitor and interact with the boot process? I don't even know which version of U-Boot is being used, so I'm assuming it must be custom to have blocked my attempts so far.

If anyone can give me any pointers on what to do next (particularly if someone from Samknows reads this) I would be very grateful.

Please note; This is a retired "Whitebox", and I was instructed to dispose of it responsibly when I received my updated replacement if anyone was wondering.

eddyp wrote:

Hi, I am having trouble booting any OpenWRT image on WRT160NL (CUR01).

I have serial console (a former Nokia 2600 data cable - it has a PL2303HX chip) access and I am trying to check the image works before flashing it (the router is online and I don't have an equivalent backup machine) so I have been trying ramdisk images.

I tried http://downloads.openwrt.org/backfire/1 … e-gzip.bin and it panics.
I also tried a similar image built via ImageBuilder from the trunk from yesterday and had a little more success.

The kernel boots, but serial console is unusable after the moment the kernel tries to setup the serial console itself.

Hit any key to stop autoboot:  0 
ar7100> setenv serverip 10.0.0.1; setenv ipaddr 10.0.0.2
ar7100> setenv bootargs 'board=WRT160NL'
ar7100> tftpboot 0x81000000 ram.bin
 check link duplex:Full/speed:100
dup 1 speed 100
Using eth0 device
TFTP from server 10.0.0.1; our IP address is 10.0.0.2
Filename 'ram.bin'.
Load address: 0x81000000
Loading: send option "timeout 5"
Got OACK: timeout 5
#################################################################
         #################################################################
         #################################################################
         #################################################################
         ##################
done
Bytes transferred = 1421508 (15b0c4 hex)
ar7100> bootm
## Booting image at 81000000 ...
   Image Name:   MIPS OpenWrt Linux-3.7.5
   Created:      2013-01-31  21:55:21 UTC
   Image Type:   MIPS Linux Kernel Image (gzip compressed)
   Data Size:    1421444 Bytes =  1.4 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
kernel: org len = 1421444, new len = 1441792
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 33554432

Starting kernel ...

[    0.000000] Linux version 3.7.5 (openwrt@OpenWRTBuild) (gcc version 4.6.4 20121210 (prerelease) (Linaro GCC 4.6-2012.12) ) #1 Wed Jan 30 083
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9130 rev 2
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:5.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] User-defined 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 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=WRT160NL fsoffset=0x160000 mem=32M rootfstype=squashfs,jffs2 noinitrd
[    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: 28788k/32768k available (2231k kernel code, 3980k reserved, 586k data, 252k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, 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 Linksys WRT160NL
[    0.610000] bio: create slab <bio-0> at 0
[    0.620000] Switching to clocksource MIPS
[    0.630000] NET: Registered protocol family 2
[    0.630000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.630000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.640000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.640000] TCP: reno registered
[    0.650000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.650000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.660000] NET: Registered protocol family 1
[    0.680000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.690000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.700000] msgmni has been set to 56
[    0.700000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.710000] io scheduler noop registered
[    0.710000] io scheduler deadline registered (default)
[    0.720000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
    0.750000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A

I know the kernel works because I suspected the console is not set correctly, and I tried to see if it responds with lower speed settings, which it did (of course, with garbage). I don't think the cable length is at fault, since it works fine in all of the other cases.


I would really appreaciate some help on this. As I said before, I don't want to risk flashing directly, I want to make sure the system boots properly with OpenWRT, before doing that, hence the usage of the ram image.


Thanks.


I've managed to go past that point after realising the serial console might not be set correctly in the uImage.
I am still stuck because the uImage does not seem to have a rootfs, so it fails to boot:

ar7100> setenv serverip 10.0.0.1; setenv ipaddr 10.0.0.2
ar7100> setenv bootargs 'console=ttyS0,115200 board=WRT160NL'
ar7100> tftpboot 0x81000000 ram.bin
 check link duplex:Full/speed:100
Using eth0 device
TFTP from server 10.0.0.1; our IP address is 10.0.0.2
Filename 'ram.bin'.
Load address: 0x81000000
Loading: send option "timeout 5"
Got OACK: timeout 5
#################################################################
         #################################################################
         #################################################################
         ################################################################
done
Bytes transferred = 1322849 (142f61 hex)
ar7100> bootm
## Booting image at 81000000 ...
   Image Name:   MIPS OpenWrt Linux-3.3.8
   Created:      2012-11-18   4:32:33 UTC
   Image Type:   MIPS Linux Kernel Image (gzip compressed)
   Data Size:    1322785 Bytes =  1.3 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
kernel: org len = 1322785, new len = 1376256
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 33554432

Starting kernel ...

[    0.000000] Linux version 3.3.8 (blogic@Debian-60-squeeze-64-minimal) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #2
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9130 rev 2
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:5.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00002000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00002000
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  console=ttyS0,115200 board=WRT160NL fsoffset=0x150000 mem=32M rootfstype=squashfs,jffs2 noinitrd
[    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] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 29008k/32768k available (2209k kernel code, 3760k reserved, 412k data, 212k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, 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.090000] gpiochip_add: registered GPIOs 0 to 21 on device: ath79
[    0.100000] MIPS: machine is Linksys WRT160NL
[    0.610000] bio: create slab <bio-0> at 0
[    0.620000] Switching to clocksource MIPS
[    0.630000] NET: Registered protocol family 2
[    0.630000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.630000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.640000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.640000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.650000] TCP reno registered
[    0.650000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.660000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.670000] NET: Registered protocol family 1
[    0.690000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.690000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.700000] msgmni has been set to 56
[    0.710000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[    0.720000] io scheduler noop registered
[    0.720000] io scheduler deadline registered (default)
[    0.720000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.760000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    0.760000] console [ttyS0] enabled, bootconsole disabled
[    0.760000] console [ttyS0] enabled, bootconsole disabled
[    0.780000] m25p80 spi0.0: found en25p64, expected m25p80
[    0.780000] m25p80 spi0.0: en25p64 (8192 Kbytes)
[    0.790000] 6 wrt160nl partitions found on MTD device spi0.0
[    0.790000] Creating 6 MTD partitions on "spi0.0":
[    0.800000] 0x000000000000-0x000000040000 : "u-boot"
[    0.810000] 0x000000040000-0x000000040020 : "kernel"
[    0.810000] 0x000000040020-0x0000007e0000 : "rootfs"
[    0.820000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.830000] mtd: partition "rootfs" set to be root filesystem
[    0.840000] split_squashfs: no squashfs found in "spi0.0"
[    0.840000] 0x0000007e0000-0x0000007f0000 : "nvram"
[    0.850000] 0x0000007f0000-0x000000800000 : "art"
[    0.860000] 0x000000040000-0x0000007e0000 : "firmware"
[    0.870000] ag71xx_mdio: probed
[    0.880000] eth0: Atheros AG71xx at 0xb9000000, irq 4
[    1.190000] Registering RTL8306SD switch with Chip ID: 0x5988, version: 0x0000
[    1.200000] ag71xx ag71xx.0: eth0: connected to PHY at ag71xx-mdio.0:00 [uid=00008306, driver=Realtek RTL8306S]
[    1.210000] eth1: Atheros AG71xx at 0xba000000, irq 5
[    1.520000] ag71xx ag71xx.1: eth1: connected to PHY at ag71xx-mdio.0:04 [uid=00008306, driver=Realtek RTL8306S]
[    1.530000] TCP cubic registered
[    1.530000] NET: Registered protocol family 17
[    1.540000] Bridge firewalling registered
[    1.540000] 8021q: 802.1Q VLAN Support v1.8
[    1.550000] jffs2: Flash size not aligned to erasesize, reducing to 7744KiB
[    1.550000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x4844 instead
[    1.560000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x0080 instead
[    1.570000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0x55f9 instead
[    1.580000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0x1c00 instead
[    1.590000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0x2705 instead
[    1.600000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020: 0x8f58 instead
[    1.610000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024: 0x4dc6 instead
[    1.620000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000028: 0x000d instead
[    1.620000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000002c: 0x8000 instead
[    1.630000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000030: 0x801d instead
[    1.640000] Further such events for this erase block will not be printed
[    1.680000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010000: 0x7c86 instead
[    1.690000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010004: 0x08f7 instead
[    1.700000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010008: 0x5d7f instead
[    1.710000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0001000c: 0x4cac instead
[    1.720000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010010: 0xaf5b instead
[    1.730000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010014: 0x98d7 instead
[    1.740000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010018: 0x1b39 instead
[    1.750000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0001001c: 0x8bd4 instead
[    1.750000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010020: 0xfb42 instead
[    1.760000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010024: 0x7537 instead
[    1.770000] Further such events for this erase block will not be printed
[    1.810000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020000: 0x228f instead
[    1.820000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020004: 0x0a0e instead
[    1.830000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020008: 0x53bf instead
[    1.840000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0002000c: 0x7316 instead
[    1.850000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020010: 0x865f instead
[    1.860000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020014: 0x7b61 instead
[    1.870000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020018: 0x5973 instead
[    1.870000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0002001c: 0xcf6e instead
[    1.880000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020020: 0x6276 instead
[    1.890000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020024: 0x6bc4 instead
[    1.900000] Further such events for this erase block will not be printed
[    1.940000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030000: 0x2d56 instead
[    1.950000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030004: 0x6c6a instead
[    1.960000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030008: 0xcc99 instead
[    1.970000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0003000c: 0x1d47 instead
[    1.980000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030010: 0x1f57 instead
[    1.990000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030014: 0xcbb2 instead
[    2.000000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030018: 0xb463 instead
[    2.000000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0003001c: 0x6672 instead
[    2.010000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030020: 0xf80b instead
[    2.020000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030024: 0xe06c instead
[    2.030000] Further such events for this erase block will not be printed
[    2.070000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040000: 0x7c1a instead
[    2.080000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040004: 0x3add instead
[    2.090000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040008: 0x7835 instead
[    2.100000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0004000c: 0xed63 instead
[    2.110000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040010: 0xd587 instead
[    2.120000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040014: 0xb31f instead
[    2.120000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040018: 0x764a instead
[    2.130000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0004001c: 0xbcfb instead
[    2.140000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040020: 0xaa33 instead
[    2.150000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040024: 0xc497 instead
[    2.160000] Further such events for this erase block will not be printed
....
[   13.870000] Old JFFS2 bitmask found at 0x005d3184
[   13.870000] You cannot use older JFFS2 filesystems with newer kernels
[   13.910000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005e0000: 0x040e instead
[   13.920000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005e0004: 0x9ab9 instead
[   13.920000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005e0008: 0x21e7 instead
[   13.930000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005e000c: 0xeb2e instead
[   13.940000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005e0010: 0x3a67 instead
[   13.950000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005e0014: 0x9075 instead
[   13.960000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005e0018: 0x0ba6 instead
[   13.970000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005e001c: 0x09a8 instead
[   13.980000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005e0020: 0xbe5f instead
[   13.990000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005e0024: 0x2c5c instead
[   14.000000] Further such events for this erase block will not be printed
[   14.020000] Old JFFS2 bitmask found at 0x005e678c
[   14.020000] You cannot use older JFFS2 filesystems with newer kernels
[   14.050000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005f0000: 0x42fb instead
[   14.060000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005f0004: 0x95dc instead
[   14.070000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005f0008: 0x5f09 instead
[   14.070000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005f000c: 0x299d instead
[   14.080000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005f0010: 0x1483 instead
[   14.090000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005f0014: 0x15be instead
[   14.100000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005f0018: 0x5ba6 instead
[   14.110000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005f001c: 0x0ce7 instead
[   14.120000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005f0020: 0x3ee9 instead
[   14.130000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005f0024: 0xb737 instead
[   14.140000] Further such events for this erase block will not be printed
[   14.180000] Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
[   14.190000] empty_blocks 25, bad_blocks 0, c->nr_blocks 121
[   14.190000] VFS: Cannot open root device "(null)" or unknown-block(31,2)
[   14.200000] Please append a correct "root=" boot option; here are the available partitions:
[   14.210000] 1f00             256 mtdblock0  (driver?)
[   14.210000] 1f02            7807 mtdblock2  (driver?)
[   14.220000] 1f03              64 mtdblock3  (driver?)
[   14.220000] 1f04              64 mtdblock4  (driver?)
[   14.230000] 1f05            7808 mtdblock5  (driver?)
[   14.230000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)

I looked at the uImage and it seems it only contains the kernel:

heidi:/tmp/uimage# mkimage -l openwrt-ar71xx-generic-uImage-gzip.bin 
Image Name:   MIPS OpenWrt Linux-3.3.8
Created:      Sat Mar 23 18:49:58 2013
Image Type:   MIPS Linux Kernel Image (gzip compressed)
Data Size:    1324390 Bytes = 1293.35 kB = 1.26 MB
Load Address: 80060000
Entry Point:  80060000

So I am still confused. Shouldn't the generic uImage contain also a minimalistic rootfs so it can boot?

Maybe juhosg can help with some pointers?

GeertJan wrote:

In one test-setup where I actually did need NAT-functionality afterwards I subsequently defined eth0 (LAN) to be used as WAN-port, essentially installing the whole box backwards. This also worked. You are well advised to correctly re-label the box after this ;-)

Hope this helps,

Geert Jan

could you help me with this please? i think my wan port is dead and i'm woul like to move wan functionality to lan4 port.
here is the thread https://forum.openwrt.org/viewtopic.php?id=45419

thank you

The discussion might have continued from here.