OpenWrt Forum Archive

Topic: Flashing my F*n - fis/fi memory addresses don't match the Wiki!?

The content of this topic has been archived on 2 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all,

Hopefully this is a simple problem with a simple answer that will avoid me turning my new toy into a paperweight.

I've patched the router with out.hex and can reboot and telnet in as often as I like. I'm a bit weary of the fi and fis commands as they look like they'll blow away the Redboot access - is this correct or am I reasonably safe?

I'm up to the part of the flashing guide that reads like so:

RedBoot> lo -r -b %{FREEMEMLO} openwrt-atheros-2.6-vmlinux.lzma
Using default protocol (TFTP)
Raw file loaded 0x80041000-0x800f0fff, assumed entry at 0x80041000

Except mine reads:

RedBoot> lo -r -b %{FREEMEMLO} openwrt-atheros-2.6-vmlinux.lzma
Using default protocol (TFTP)
Raw file loaded 0x80040800-0x801007ff, assumed entry at 0x80040800

Am I right in thinking that I need to replace the references to 0x80041000 in the next line with the location of where the file is loaded on my router, 0x80040800 ? From what I can see the -e and -r setting for fi are telling it where in ram to read the data from - I am quite possibly wrong though?

Thanks in advance! smile

I spent two nights on irc talking with forum2006_ and I finally managed to flash openwrt kamikaze 7.07 on LaFonera, take a look at my tutorial: http://sid77.livejournal.com/2007/09/12/

wiki page needs an absolute cleanup, unfortunately I haven't much free time now (I haven't STILL configured openwrt, but I can telnet into it, so I can assure you it's working ;-) )

ciao

Ah - the write up on your page makes sense to me!

Thanks for writing it all down and sharing smile

x-wrt wiki page describe the very same instructions reported on openwrt wiki and those will NOT work if you're trying to flash a previously dd-wrt flashed LaFonera (see my blog post).
I think it's because dd-wrt instructs you to create a nvram block in RedBoot, causing some problems when computing the free space.

That worked a treat - now all I need to do is get eth0 thinking it's a firewalled WAN port and wifi0 up and running with WPA - yay!

I've got LAN and WIFI up and can SSH into either - which is nice, but I'm struggling with config to match a standard consumer wifi router style widget.

What I ideally want is as follows:

Lappy w/ wifi -> f*n*r* wifi (with DCHP) -> WAN (with firewall, still inside the f*n*r* at this stage) > cable modem (with own that passes on dhcp stuff from ISP).

So from what I can see I need to change the /etc/config/network to be something like:

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

config interface wan
        option ifname   eth0
        option dhcp
        
config interface lan
        option type     bridge
        option proto    static
        option ipaddr   192.168.1.1
        option netmask  255.255.255.0

But I'm really not sure as I can't find a f*n*r* specific example. :\

I've just discovered, thanks to another night in irc and Bartman2007 support, that I haven't properly setup the jffs2 mtd partition with my instructions.
This way, every time LaFonera is rebooted, every modification is lost.
Which howto do you follow? mine or x-wrt?
If it was mine it would be interesting to discover if you have this issue too, if it was x-wrt one and your openwrt is working propwerly, the "magick" should lay behind the "fis init" command issued before starting creating mtd partitions, as it's the only command missing from openwrt wiki flashing instructions.

I've just this morning found that my settings aren't being saved either - which is a bit of a drag - but at least I can reliably screw things up and get it going again. smile

ok, at least it's not an heisenbug ;-)
this w-e I'll be very busy, however I'm going to experiment a bit in the near future. In the meanwhile you could try out x-wrt wiki instructions as I'm more and more confident that official wiki error is just that missing init.
(or you could just go with dd-wrt as long as there's no working flashing method)

ciao

The x-wrt flashing method works - and settings are retained. And redboot is still there obediently waiting for 10secs incase there is a telnet connection.

I still can't fathom the networking setup. smile

splame wrote:

The x-wrt flashing method works

good!

splame wrote:

Okay - so I followed this post - http://forum.openwrt.org/viewtopic.php?id=11553 - but that bricked the fon, so back to redboot to reflash the rootfs.

uhmm they look to me just as generic network configurations, I can hardly trust that the fonera was bricked, maybe it was just on a different network than your own ;-)

splame wrote:

Then I tried http://forum.openwrt.org/viewtopic.php?id=12352 - Which did give me a DHCP assigned address on eth0 and I can SSH in - but there is no DHCP server for the wifi connections - and manual connections don't want to work.

:\

I'll join you in the "configuration quest" from monday ;-)
I hope to set up this ap fast and do some wiki cleanup.

ciao

...I can hardly trust that the fonera was bricked, maybe it was just on a different network than your own ;-)

I did a pretty extensive IP scan to find it - but yeah bricked in the sense that it's doing it's own thing and isn't letting SSH in, rather than bricked in the sense that I need to go and get a serial cable. smile

some quick comments:
the parts that MUST be the same when flashing are the load address/entry point for the kernel (0x80041000, as written) and the name "rootfs" for the root filesystem, which openwrt searches for when mounting root. everything else can be up to you. if people actually read the readboot docs before doing this most of the problems wouldn't occur.
the install guide for openwrt on the wiki is one of the better I have seen, since it calculates the size of the rootfs partition based on the free space after flashing the kernel, instead of using random hardcoded numbers like every other posted guide I have seen. this requires some sanity checks on your part though.  if your partition table already has entries in it (you already have rootfs), fis free would obviously not report any free space, or very little. my recommendation is to do fis init before flashing openwrt for the first time, which will also get rid of any stray "nvram" partitions and allow the most efficient usage of space.
normal procedure for my devices:
load -r -b 0x80041000 openwrt-vmlinuxblah
fis create linux
load -r -b %{FREEMEMLO} openwrt-rootfsblah
fis create [-l 0xLENGTH] rootfs (-l if not overwriting an old partition)

Interesting thanks Kevin.

The Redboot docs are a little intimidating given their size and the amount of useful stuff Redboot can do. smile

I'm stuck at the same point :-/
It would be nice to get some more documentation

The discussion might have continued from here.