Difference between revisions of "DaVinci Initrd 1.0"

From eLinux.org
Jump to: navigation, search
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Create initrd Procedure (note change count to your required filesystem size):
+
See [http://wiki.davincidsp.com/index.php?title=Initrd initrd] article of [http://wiki.davincidsp.com/index.php?title=Main_Page official DaVinci wiki].
  
<code><pre>
+
[[Category:Development Boards]]
> dd if=/dev/zero of=uRamdisk.img bs=1k count=20480
+
> mkfs.ext2 -F -v -M0 uRamdisk.img
+
> mount -o loop uRamdisk.img <path to mount point>
+
</pre></code>
+
Now copy all the files needed for RAMDISK to the <path to mount point>.. that would be busybox and/or other apps and libs.
+
 
+
<code><pre>
+
> umount <path to mount point>
+
> gzip -9 < uRamdisk.img > uRamdisk
+
</pre></code>
+
Installing the Ramdisk (/tftpboot/uRamdisk) via u-boot
+
 
+
Copy the data into RAM then flash:
+
 
+
<code><pre>
+
UBOOT# install_ramdisk 'tftp 0x2200000 uRamdisk; era 0x2200000 +${filesize};cp.b 0x85000000 0x2200000 ${filesize}'
+
</pre></code>
+
Save the ramdisk size into an environmental variable:
+
 
+
<code><pre>
+
UBOOT# setenv ramdisksize 0x${filesize}; saveenv
+
</pre></code>
+
Update the boot parameters:
+
 
+
<code><pre>
+
UBOOT# setenv bootargs 'mem=120M console=ttyS0,115200n8 ip=dhcp root=/dev/ram0 rw initrd=0x85000000,8M'
+
UBOOT# setenv bootcmd 'cp.b 0x2200000 0x85000000 ${ramdisksize}; bootm'
+
</pre></code>
+

Latest revision as of 19:40, 10 February 2008

See initrd article of official DaVinci wiki.