Computers 'n Stuff: Read se515 firmware root_fs using cramfs

I here share the resolutions for my Linux problems so they might safe somebody some time.

Sunday, March 26, 2006 parmanent link to this post

Read se515 firmware root_fs using cramfs

The firmware of the SE515 can be decomposed with the SE515 tools. resulting in kernel, hader and root_fs files of which root_fs is the root file system of the embedded linux running on the SE515. A brief howto is found at the SE515 forum.

root_fs is big endian (big value on low adress) cramfs compressed. opening this file on a little endian host (little value on low adress) like intel ix86 PC results in following error message:

# cramfsck: superblock magic not found

So cramfsswap can be used to convert from big endian to little endian.

cramfsswap
found at http://labs.fqdn.org/page/cramfsswap swaps file from big endian (mips, se515) to little endian (iX86, Linux)

After swapping endianess cramfsck generates new error message
# cramfsck: memory access error

Yet, after
#modprobe cramfs

(works for suse 9.1 where cramfs support seems to be supported as a module) the SE515 root_fs can be mounted:

#mount -o loop -t cramfs image_file /mount/point

Though, the file structure can be accessed the files can not be opened. They seem to be empty. This is problably due to LZMA compression of the root_fs.

I turned out that we have to use patched cramfs.tools patched by the broadcom sourceforge project to extract the root_fs of the firmware. The patched version of cramfsck can detect and swap endianess on the fly. Moreover it supports LZMA compression wich is used by the SE515 but not implemented in the official cramfs.tools.


Related Post:
TOS bit manipulation on the Siemens Gigaset SE515

Links:
Broadcom 6345 Linux distribution - Open source firmware project for routers with Broadcom 6345 chipset like the SE515
broadcom router kernel cross-compilation - introduction to cross compilation of kernel and firmware for the broadcom based routers
MIPS toolchain RPMs - precompiled cross compile tools for mips architecture
SE515 forum lots of useful information and downloads concerning the SE515 router
SE515 Wake on Lan - thread on wake on lan for SE515
Download SE515 firmware source code source code download for the Siemens SE515
Darkman firmware release Darkmans inofficial firmware release for the SE515
HPH Firmware releaseHeins Peter Hippenstiels inofficial firmware release. Contains also a firmware archieve with all old and up to date official SE515 firmwares, source codes.

Techorati Tags:
| | | | |

Labels: , ,