PDA

View Full Version : New Firmware tftp


cmolson
01-30-2009, 03:50 AM
Hi, I have a few questions about getting the openwrt software on the Router Station (i know it ships with it, but i would like to try my own builds)

I downloaded the openwrt-ar71xx-ubnt-rs-squashfs.bin file from the daily snapshots of openwrt.

I used tftp to put the firmware on the device, it did not give me any errors.

When I restart the device the lights flash a bit, then the WLAN light goes on (I have no wlan cards in it yet) then it goes off and the two LAN lights go one for a second or so. This process repeats and I am unable to ping the device.

So I guess my questions are:
1) Is there a way to know if the device is booting without using the rs232 port?

2) I am new to building firmware images and once I can get the openwrt one working I would like to try my own. I have compiled the latest source and have a bunch of files, but I am not sure how to use mkfwimage to make the firmware file.

3) How long should flashing take? tftp reports it sent the file in about 2-3 seconds, how much longer does it take after this? I have seen some people post about an error after the firmware file was successfully sent with tftp, they noticed it using redboot from the serial port, maybe I am having the same issue.

4) Are the lights supposed to blink or is there any notification as to when the firmware is flashed (after sending the file with tftp)?



If any of this is explained elsewhere (currently there is not much info regarding this device yet) please let me know as I would be happy to read as much as I can about this.


Thank you for your time,

Christian

lqbweb
02-01-2009, 09:12 AM
it happens the same for me, please how can we fix it... do we have to rename the file from openwrt site to any special name? are there any way to access RedBoot console by ethernet?

cmolson
02-01-2009, 10:14 AM
I noticed something weird.. doesn't exactly make sense to me why it would fail without it but here it goes:

When using mkfwimage make sure you set the -v option to something, without it I kept getting the Error -2 invalid firmware... but when I copied the OpenWrt string and used: -v "RSx.ar7100.OpenWrt" it now loads fine...

So to make the fwimage I did this:


root@OpenWrt:/# cmolson@cbuntu:~/kamikaze-trunk/bin$ ../build_dir/host/firmware-utils/bin/mkfwimage2 -p x00c0000:0x80060000:0x80060000:openwrt-ar71xx-vmlinux.lzma -p rootfs:0x000:0x00300000:0x00000000:0x00000000:openwrt-ar71xx-root.squashfs -v "RSx.ar7100.OpenWrt"

Firmware version : 'RSx.ar7100.OpenWrt'
Output file : 'firmware-image.bin'
Part count : 2
kernel: bfc10000 000c0000 80060000 80060000 786432 bytes (free: 0)
rootfs: bfcd0000 00300000 00000000 00000000 1572864 bytes (free: 1572864)



This has my values, some of which are specific to my build, the -v is the important part.

Good Luck!

cmolson
02-01-2009, 11:16 AM
Few more tips for debugging your Router Station:

Using RedBoot:
Redboot from what I can tell is ONLY available through the serial port. i suggest the first thing you do is wire up serial cable to the port. Keep in mind the signal is 3.3V I believe, so you will need a level shifter such as the max232 to hook up directly to a PC serial port.

Reboot works at 115200 Baud, No Parity, 8Bits, 1 Stop Bit, No Flow Control.

Redboot will go into console mode automatically if there is a problem finding the kernel. Otherwise press ctrl-c repeatedly when first powering on the unit (this is all done through the serial terminal).

I know I read somewhere that ubnt will be updating the wiki with info such as this, but hopefully it will save a few people some time while experimenting with their Router Station.

afterburn
02-01-2009, 11:23 AM
RedBoot is accessible via the WAN port at boot. It is only there for a few seconds so you have to be quick to execute the ^C for it to top loading. Look up tutorials on how to access redbot for devices like the LaFonera for reference. Usually you have to telnet to the IP on port 9000 and quickly hit ctrl-C. Since the device defaults to 192.168.1.20 you would perform telnet 192.168.1.20 9000 and then start hitting ctrl-c as fast as you can (once connected). I suggest the netcat util. This is stuff that can be found on the OpenWRT website.

When I upgraded I used the ubnt one and that one continually failed for me. Upon switching to the regular build and editing the redboot config (as discussed in another thread), I was able to boot the image. Most likely the device is stuck at redboot due to a complication with the filesystem (SPI driver is the culprit)

lqbweb
02-01-2009, 11:28 AM
RedBoot is accessible via the WAN port at boot. It is only there for a few seconds so you have to be quick to execute the ^C for it to top loading. Look up tutorials on how to access redbot for devices like the LaFonera for reference. Usually you have to telnet to the IP on port 9000 and quickly hit ctrl-C. Since the device defaults to 192.168.1.20 you would perform telnet 192.168.1.20 9000 and then start hitting ctrl-c as fast as you can (once connected). I suggest the netcat util. This is stuff that can be found on the OpenWRT website.

When I upgraded I used the ubnt one and that one continually failed for me. Upon switching to the regular build and editing the redboot config (as discussed in another thread), I was able to boot the image. Most likely the device is stuck at redboot due to a complication with the filesystem (SPI driver is the culprit)

are you sure you are speaking about routerstation? I have already tried to get access by telnet on port 9000 in 192.168.1.20 and no success. How exactly did you do? how I did was just pinging and when its answering press enter on putty and connect in.

afterburn
02-01-2009, 11:32 AM
I am speaking of the RouterStation. I am a Linux user so I did things a bit different.

First I set a manual IP of 192.168.1.42 and enabled my ethernet port to 10Mbit Half-Duplex. I set up wireshark and watched for the ARP packets to announce themselves. Once that occurred I executed the following line which is a trick stolen from flashing Fons:

nc 192.168.1.20 9000 < breakSeq.bin; nc -tvv 192.168.1.20 9000

This sends the break sequence to the RouterStation as soon as it hits RedBoot and then TelNets into it. I just repeated the process now to confirm that this indeed does work contrary to popular belief.

cmolson
02-01-2009, 11:33 AM
Thanks a lot for the info!

I managed to get a build working and using mkfwimage2 to create a firmware image...

My only small issue now is that it fails to load the file system as you said, I can get it to work fine if I go to redboot first and do:


fis load -d -e kernel
exec -c "board=UBNT-RS"


(as mentioned in another thread on this forum)

After that it works great.

afterburn
02-01-2009, 11:34 AM
My only small issue now is that it fails to load the file system as you said, I can get it to work fine if I go to redboot first and do:


fis load -d -e kernel
exec -c "board=UBNT-RS"



If you run fconfig you can edit this script such that this becomes the default boot procedure.


Now if only I can figure out the VLAN set up so that the other LAN port will start working...

cmolson
02-01-2009, 11:38 AM
lol I just edited the script thanks, works perfectly.. Yeah I am having that issue too, only the WAN port brings up any messages when plugged in / unplugged

afterburn
02-01-2009, 11:44 AM
The LAN port closest to the WAN port works for me. I've also had issues with needing a crossover cable when plugging it into a switch. Not sure who is to blame there so I will try some other switches first. The WAN comes up as eth0 and the LAN as eth1. You need to create a bridge on the LAN interface to bring the wifi and all in.

lqbweb
02-01-2009, 11:49 AM
afternburn, do you know if to get access to redboot console it works with wan and lan port?

cmolson
02-01-2009, 11:54 AM
When I do an ifconfig from openwrt I only get:

br-lan
eth0
lo


in dmesg the board seems to detect:


ar71xx: using random MAC address for eth0
ar71xx: using random MAC address for eth1
eth0: Atheros AG71xx at 0xb9000000, irq 4
eth0: connected to PHY at 0:14 [uid=00000000, driver=Generic PHY]
eth1: Atheros AG71xx at 0xba000000, irq5
eth1: connected to 4 PHYs
...

afterburn
02-01-2009, 02:27 PM
afternburn, do you know if to get access to redboot console it works with wan and lan port?

I know for a fact it came up on the WAN, don't know about the LAN, I was having trouble with that and so I avoided using it. I will post if I can get that up and running.

afterburn
02-01-2009, 02:29 PM
When I do an ifconfig from openwrt I only get:

br-lan
eth0
lo


in dmesg the board seems to detect:


ar71xx: using random MAC address for eth0
ar71xx: using random MAC address for eth1
eth0: Atheros AG71xx at 0xb9000000, irq 4
eth0: connected to PHY at 0:14 [uid=00000000, driver=Generic PHY]
eth1: Atheros AG71xx at 0xba000000, irq5
eth1: connected to 4 PHYs
...



eth0 and eth1 are the physical connections to the SoC if i'm not mistaken. eth0 is the WAN while eth1 is suppose to go to the LAN switch. This is where the VLAN comes in. They have eth1 connected to two ports and you're support to put each on a VLAN. That is how other routers do it at least. I haven't had time to poke around with it and experiment yet but will when I do.

lqbweb
02-01-2009, 05:21 PM
afternburn, do you know if to get access to redboot console it works with wan and lan port?

I know for a fact it came up on the WAN, don't know about the LAN, I was having trouble with that and so I avoided using it. I will post if I can get that up and running.

man, i have been trying it several times in a different ways following your tips and no success.

I have tried starting in rescue mode by pressing the button on the board and without, the result seem to be the same in wireshark, just 5 or 6 arp request from the board and if you dont press the button the board disconnect and goes automatically to normal mode.

I have tried with putty in windows and by nc in linux, even doing the script in the way you told before but no success. I cant see anything on the request.

I'm going by the WAN port against the IP: 192.168.1.20 in the port 9000. It isn't neccesary to have running any tftp server or anything else? Please could you tell us the exact steps did you follow :( I'm now with dd-wrt demo and it will expire tomorrow and i dont have any idea (just wait and buy the circuit for rs232)

Thank you man very much
PD: if anyone else could try that to confirm its working in all boards :S Ive done that a lot of times in foneras but its not working in this device.

UBNT-Mike.Taylor
02-04-2009, 02:50 AM
For ADM6996FC datasheet, check datasheetsite.com

http://www.datasheetsite.com/datasheet/ADM6996F

Look at section 3.18 and page 51 of Samurai_6FC_FCX_FHX_VAD_DS_Rev1.4.pdf for the "Basic Control Register 0". Look at bits 13:10 and 4, in particular, having read section 3.18 to hopefully make sense of it.

It would be cool to get OpenWRT treating the ADM6996FC the way it handles broadcom (see the /etc/config/network "switch" directive). Both WAN/LAN ports could either be tagged, untagged or tagged with the same value. Seems like that would be the most flexible, (although slightly more complicated) solution.

- Mike

CzechEnglishFrenchGermanItalianPolishPortugueseRussianSpanish
Translations delivered by vBET 3.5.4