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
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).