Question

As I entitled, I want to manipulate the root file system of my uClinux. It is based on initramfs.

I know /usr has most of the files which related to make root file system.

├── .built-in.o.cmd
├── .gen_init_cpio.cmd
├── .gitignore
├── .initramfs_data.cpio.gz.cmd
├── .initramfs_data.cpio.gz.d
├── .initramfs_data.o.cmd
├── Kconfig
├── Makefile
├── built-in.o
├── gen_init_cpio
├── gen_init_cpio.c
├── initramfs_data.S
└── initramfs_data.cpio.gz

This is it.

And there is a directory, ../romfs, which seems to be used as the root file system. There is a directory ../romfs/mnt/ And I want to make a directory ../romfs/mnt/flash But mkdir ../romfs/mnt/flash doesn't help. Downloaded image doesn't include ../romfs/mnt/flash And actually ../romfs/mnt/flash is removed right after the compilation.

How can I add or remove any directory to my root file system?

Thank you very much..

Was it helpful?

Solution 2

Let me post my solution to this problem of mine. I am posting this as an answer because it has volume too big to be put to comments to other's answer or my question.

First I searched for fstab under the top directory of my project.

find -name "fstab"

The result is shown below.

./vendors/{vendorname}/{modelname}/fstab
./vendors/{vendorname}/{modelname}/fstab
./vendors/{vendorname}/{modelname}/fstab
./vendors/{vendorname}/{modelname}/fstab
./vendors/{vendorname}/{modelname}/fstab
./romfs/etc/fstab

./romfs/etc/fstab is copied from one of the fstab s under ./vendors/{vendorname}/{modelname}/ s.

BINGO! ./vendors/{vendorname}/{modelname}/ includes everything I need.

looking up ./vendors/{vendorname}/{modelname}/Makefile explains everything.

I hope someone who found this question and answers can get useful information here!!

Thanks.

OTHER TIPS

How is your kernel/initramfs build ? Is it Buildroot or ptxdist or similar tool ?

You need to know what is done during the compilation/build phase, maybe there is a skeleton elsewhere and you need to add your flash dir into this skeleton.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top