Specifications

Extract compressed ramdisk image (ramdisk.gz)
bash$ dd if=uRamdisk bs=64 skip=1 of=ramdisk.gz
21876+1 records in
21876+1 records out
1.
Uncompress ramdisk image (if it was a compressed one)
bash$ gunzip -v ramdisk.gz
ramdisk.gz: 66.6% -- replaced with ramdisk
2.
Mount ramdisk image
bash# mount -o loop ramdisk /mnt/tmp
3.
Now you can add, remove, or modify files in the /mnt/tmp directory. If you are done, you can re-pack the
ramdisk into a U-Boot image:
Unmount ramdisk image:
bash# umount /mnt/tmp
1.
Compress ramdisk image
bash$ gzip -v9 ramdisk
ramdisk: 66.6% -- replaced with ramdisk.gz
2.
Create new U-Boot image (new-uRamdisk)
bash$ mkimage -T ramdisk -C gzip -n 'Simple Embedded Linux Framework' \
> -d ramdisk.gz new-uRamdisk
Image Name: Simple Embedded Linux Framework
Created: Sun May 4 13:23:48 2003
Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
Data Size: 1400121 Bytes = 1367.31 kB = 1.34 MB
Load Address: 0x00000000
Entry Point: 0x00000000
3.
Instead of re-packing into a U-boot ramdisk image you can of course also just extract the contents of the
SELF image and re-use it as base of a (known to be working) root filesystem.
For example, you can create a JFFS2 filesystem using the mkfs.jffs2 command that comes with
the MTD Tools:
bash# mkfs.jffs2 -r /mnt/tmp -e 0x10000 -o image.jffs2
Or you can create a CramFS filesystem with mkcramfs:
bash# mkcramfs -r /mnt/tmp image.cramfs
Swapping filesystem endian-ness
...
Everything: 1656 kilobytes
Super block: 76 bytes
CRC: 7f34cae4
14.4.2. How to Increase the Size of the Ramdisk
Extract compressed ramdisk image (ramdisk.gz) from U-Boot image:
bash$ dd if=uRamdisk bs=64 skip=1 of=ramdisk.gz
21876+1 records in
21876+1 records out
1.
14.4.2. How to Increase the Size of the Ramdisk 199