PDA

Bekijk de volledige versie : Is it possible to get contents of root filesystem on sl500?



vl409
29-09-2005, 18:13
I`d like to get contents of root filesystem on sl500.

it is using cramfs as i understood, and when i looked into
firmware binary file it looks like it has inside cramfs image,
but i don`t know how to get it.

Is there a way to add some custom software to asus sl500? i`d like
to add some progs, re-create firmware and load it into system.

Styno
29-09-2005, 20:18
Please use search on 'cramfs'. This gives you lots of interesting topics about hacking around in the firmware.

igor_n
30-09-2005, 13:30
There are cramfs tools. Unfortunately cramfsck.c doesn't allow to extract CRAMFS with different endianess, but I wrote a fix and SL ROM was extracted. I can share patched source and compiled cygwin version.

vl409
30-09-2005, 22:36
There are cramfs tools. Unfortunately cramfsck.c doesn't allow to extract CRAMFS with different endianess, but I wrote a fix and SL ROM was extracted. I can share patched source and compiled cygwin version.

currently i found that cramfs in firmware has big endianess and that linux kernel on pc only understands cramfs with litle endian. also i found some patches for 2.4 to enable work with big endian cramfs:

http://www.ussg.iu.edu/hypermail/linux/kernel/0202.3/0365.html

Also, i found this util in debian: http://packages.debian.org/unstable/utils/cramfsswap

I tried it , and on 1st time it failed here:

/* I'm not sure about the changes between v1 and v2. So for now
don't support v1. */
if ( (flags & 0x1) == 0 )
{
fprintf(stderr,"Error: Not cramfs version 2!\n");
exit(1);
}

I commented this part and tried... it converted some part of file and segfaulted, but i was able to mount image and see files:

bin dev firewall.cfg home lib mnt proc root tmp var
cpu1 etc flash0 jffs2 log opt ramfs sbin usr vmlinux


If you have/know other tools to convert cramfs image to litle endian, please post.

igor_n
05-10-2005, 14:07
http://www.palmoid.com/cramfsck.c was modified to compile under cygwin with gcc -I. cramfsck.c -lz . Headers cramfs_fs.h, cramfs_fs_sb.h, fs.h were put under linux subdir. There were two dirty hacks into code:
- reading big endian fs on little endian processor
- changing symlinks and special devices to plain files with .l and .s prefixes.


http://www.palmoid.com/cramfsck.exe require cygwin dlls to run