From: Matej Kupljen Date: Wed, 02 Jun 2004 09:01:51 +0200 Subject: [U-Boot-Users] Special Procedure to prepare own Ramdisk for U-boot ?!! In-Reply-To: <1086156876.18747.9.camel@Gargouille.comodoindia> References: <20040601144057.EC6E7C109F@atlas.denx.de> <1086156876.18747.9.camel@Gargouille.comodoindia> Message-ID: <1086159710.3796.120.camel@mbmatejdebian.ultra.si> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi > Thanks for ur reply. i want to know is there any special > procedure to create my own RAMDISK. I create my RAMDISK using loop back device, like this: # dd if=/dev/zero of=initrd.img bs=1k count=4096 # mkfs.ext2 -F -v -M0 initrd.img # mount -o loop initrd.img Now copy all the files needed for RAMDISK to the Also create the linuxrc script on the /, which will get started when the initrd is mounted. # umount # gzip -9 < initrd.img > initrd.bin Use initrd.bin as the image for the RAMDISK. > root=/dev/ram0 rw console=ttyS0,115200 > > I dont know ..where u-boot load the RAMDISK n pass the address to > Kernel. i tried this one also ... > > root=/dev/ram0 rw initrd=0x00800000,4M console=ttyS0,115200 I use this cmd line: ip=bootp; root=/dev/hda2 rw initrd=0xa1200000,0x400000 console=ttyS00,115200n8 I use my RAMDISK to set up the CF card, which has the rootfs on the second partition. I checked the Linux source code and if you are using the initrd, the linuxrc on the initrd will automatically be called, so there is no need to explicitly state the the root is /dev/ram0. Check the prepare_namespace in the init/do_mounts.c When initrd is loaded it calls handle_initrd which then creates the kernel thread, do_linuxrc, which executes the linuxrc script on the /. Hope that helps. Regards, Matej