/home/karthik/blog

Modifying the cramfs image

Posted in Linux, Programming by Karthik Murugesan on December 31, 2007

1. Mount the cramfs file system image as a loop device. This will be read-only image.

2. Create a new directory (e.g $HOME/initrd-new) which will be used for modifying the image (RW mode)

3. Go to the mounted cramfs image directory and get the list of files using the following command

    find / > /tmp/filelist.txt

4. Use cpio to copy the contents from the mounted directory to the new directory

    cat /tmp/filelist.txt | cpio -pdm /$HOME/initrd-new

5. modify the contents in the new directory as required.

6. Once the changes are done, use mkcramfs to create the cramfs image again.

    mkcramfs /tmp/new-initrd new-initrd

Useful References – Android Internals

Posted in Linux, Mobile Frameworks, Programming by Karthik Murugesan on December 31, 2007

Useful References – Linux ELF format

Posted in Linux, Programming by Karthik Murugesan on December 31, 2007

Linux: Dynamic Library interposition in *nix Operating system

Posted in Linux, Programming by Karthik Murugesan on November 26, 2006

Articles on Dynamic library interposition using LD_PRELOAD path which can be used for tuning performance, collecting runtime statistics, or debugging applications etc. Check it out @

http://developers.sun.com/solaris/articles/lib_interposers.html for Solaris

http://www.linuxjournal.com/article/7795 for Linux