The internals of a firmware package for Ericsson W25

By analysing the /bin/swinst script it become clear, that the firmware package is a simple tar file, containing the software components to be upgraded. Usually it contains the following elements:


  • metainfo - detailed information and MD5 summs of the components to be installed

  • preinstall.sh - script to be executed before installing

  • postinstall.sh - script to be executed after installation

  • zImage - linux kernel

  • rootfs.squahfs - root file system

  • wanbl - wan module boatloader

  • wanfw - wan module firmware

The swinst script is quite complex, but basicly it download the firmware form the internet to the TMP directory, checks the checksums, checks the SW versions and if the upgrade is needed, the upgrades first the main firmware, then the WAN bootloader and then the WAN firmware. When installing the main firmware it increases the number used by RedBoot boot loader, this way it is garanteed, that on restart the new version will boot. On the other hand, if the installation is interrupted, the old Sw will start.

Comments

Anonymous said…
How can i extract the squashfs file? I've tried very hard for some time now. The standard methods for dealing with squashfs aren't working. I want to get the wget binary out of one of the old packages.
Lacó said…
I haven't heard about anyone who managed to extract it, because it is somehow special.

You may try to mount the backup partition in the unit and then just copy from there or you may trai to copy the squashfs file to an usb stick and loop mount it on the device (I have not done any of these).

Popular posts from this blog

Setting ethernet interface speed in /etc/network/interfaces