Skip to main content.
Navigation:
DENX
>
DULG
>
HowToIncreaseSizeOfRamdisk
Translations:
Edit
|
Attach
|
Raw
|
Ref-By
|
Printable
|
More
DULG
Sections of this site:
DENX Home
|
DULG
|
ELDK-5
|
Know
|
Training
|
U-Boot
|
U-Bootdoc
Topics
DULG Home
BoardSelect
Manual
FAQ
Application Notes
Changes
Index
List of pages in DULG
Search
%SECTION0{name=SELFHotToIncreaseRamdiskSize}% How to Increase the Size of the Ramdisk 1 Extract compressed ramdisk image (ramdisk.gz) from U-Boot image: <verbatim> bash$ dd if=uRamdisk bs=64 skip=1 of=ramdisk.gz 21876+1 records in 21876+1 records out </verbatim> 1 Uncompress ramdisk image <verbatim> bash$ gunzip -v ramdisk.gz ramdisk.gz: 66.6% -- replaced with ramdisk </verbatim> 1 Mount ramdisk image <br>As root: <verbatim> bash# mkdir -p /mnt/tmp bash# mount -o loop ramdisk /mnt/tmp </verbatim> 1 Create new ramdisk image, say 8 <nop>MB big: <verbatim> bash$ dd if=/dev/zero of=new_ramdisk bs=1024k count=8 bash$ /sbin/mke2fs -F -m0 new_ramdisk bash$ /sbin/tune2fs -c 0 -i 0 new_ramdisk </verbatim> As root: <verbatim> bash# mkdir -p /mnt/new bash# mount -o loop new_ramdisk /mnt/new </verbatim> 1 Copy files from old ramdisk to new ramdisk: <br>As root: <verbatim> bash# cd /mnt/tmp bash# find . -depth -print | cpio -VBpdum /mnt/new </verbatim> Now you can add, remove, or modify files in the /mnt/new directory. If you are done, you can re-pack the ramdisk into a U-Boot image: 1 Unmount ramdisk images: <br>As root: <verbatim> bash# umount /mnt/tmp bash# umount /mnt/new </verbatim> 1 Compress new ramdisk image <verbatim> bash$ gzip -v9 new_ramdisk ramdisk: 66.6% -- replaced with new_ramdisk.gz </verbatim> 1 Create new U-Boot image (new-uRamdisk) <verbatim> bash$ mkimage -T ramdisk -C gzip -n 'New Simple Embedded Linux Framework' \ > -d new_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 </verbatim> %T% Remember that Linux by default supports only ramdisks up to a size of 4 MB. For bigger ramdisks, you have to either modify your LInux kernel configuration (parameter =CONFIG_BLK_DEV_RAM_SIZE= in the "Block devices" menue), or pass a ="ramdisk_size="= boot argument to the Linux kernel.
14.4.1. How to Add Files to a SELF Ramdisk
1. Abstract
14.5. RTAI
Prev
Home
Next