[uClinux-dev] unable to use embedded initrd on MCF532x

Thomas Chou thomas at wytron.com.tw
Mon Nov 26 20:03:21 EST 2007


Wolfgang Wegner wrote:
> Hi Alberto,
>
> thank you for the hint, but it does not help.
>
> I just found out it must have something to do with the romfs I am
> using as the source for the initramfs.
> When I use the old initramfs-root-tree I used for the old uClinux-dist-test,
> the initramfs is correclty mounted.
>   
Hi Wolfgang,

Please check your linux-2.6.x/usr/.initramfs_data.cpio.gz.d, which 
should contain the list of files to be included in initramfs. If it does 
not contain correct files, then the initramfs should be regenerated.

We add a hook to target image in vendors/...arch../Makefile, like this, 
so that the kernel will regenerate initramfs from the latest romfs dir.

image:
    [ -d $(IMAGEDIR) ] || mkdir -p $(IMAGEDIR)
    -chmod -R +x $(ROMFSDIR)/bin
    -rm $(ROOTDIR)/$(LINUXDIR)/usr/initramfs_data.cpio.gz
    LDFLAGS="" $(MAKEARCH_KERNEL) -C $(ROOTDIR)/$(LINUXDIR) $(LINUXTARGET)
    cp $(ROOTDIR)/$(LINUXDIR)/arch/nios2nommu/boot/zImage $(KERNELZ)

You may brow our git server to find the details at 
http://sopc.et.ntust.edu.tw  , project uClinux-dist.git , branch nios2 .

BTW, you don't have to be root to include device inodes into initramfs. 
We use a file to list them.
CONFIG_INITRAMFS_SOURCE="../romfs ../vendors/Altera/nios2nommu/romfs_list"

We love initramfs because it takes a much smaller space than romfs. We 
can download the image to dram using jtag for debugging, which is faster 
than programming the flash every time you update the romfs. It is 
especially useful when we are developing custom boards, as there is no 
valid MTD yet.

- Thomas


More information about the uClinux-dev mailing list