Showing posts from November, 2007

Starting your own init script in Ericsson W25

Update: In the SW version 1.3 you can simply put your init scripts to /rw/etc/init.d/rc.local and do not need this complicated method.

If we want our extra changes remain after restarting the Ericsson W25 we need to reapply them after restarting the router again. Normally this is done by a custom init script which makes the necessary changes for us.

In the W25 we need to do some special tricks to be able to start our own script as most of the /etc directory and the complete /etc/init.d is in a read only filesystem. However we are clever guys and we notice that the /etc/ppp/peers directory is in the rw filesystem and we know that for the pppd we can give a dialer program as a parameter. Let's use this for starting our own init script, when the unit first tries to connect to the 3G network.

We have to change the following line in /etc/ppp/peers/3g:

connect "/usr/sbin/chat -V -f /etc/ppp/chat/3g-connect"

to the following:

connect "/root/lchat -V -f /etc/ppp/chat/3g-connect&…

Software of the Ericsson W25

The Ericsson W25 is running an embebbed linux.

When you power on your device first the bootloader is started. The bootloader is responsible for loading in the complete operating system and start it up. In the Ericsson W25 there is a RedBoot bootloader, which has plenty of features. It is capable of booting from network, from serial devices, it has a telnet interface etc., but in our case it just selects the propper linux kernel and the propper root file system and starts up the linux operating system.

All the software to be loaded is stored in the built in ROM, in 9 partitons:

0x00000000-0x00080000 : "RedBoot"
0x00080000-0x001c0000 : "kernel_A"
0x001c0000-0x007a0000 : "rootfs_A"
0x007a0000-0x008e0000 : "kernel_B"
0x008e0000-0x00ec0000 : "rootfs_B"
0x00ec0000-0x00fa0000 : "rwfs"
0x00fa0000-0x00fe0000 : "test"
0x00fe0000-0x00fff000 : "FIS directory"
0x00fff000-0x01000000 : "RedBoot config"

As you can see the f…