What to put in bootable ramdisk?

Oct 01, 2003 5 Replies

Hi all,



I have vmlinux running on target. I have only successfully prepared a dummy ramdisk (with /bin folders but nothing inside). Surely, Linux isn't usable this way yet. I kind of heard that busybox is needed, and need to put something in /lib and /sbin etc. May I know:



- what should I put in the ramdisk?



- where can I get them? (from my linux PC, or ...)



- the box is MIPS/BE. Should I need to build all neccessary lib/app etc for this specific architecture?


- Paul


do you have any flash in this device? If yes, you can only put /lib/modules and the /etc dir just to be able to mount the flash filesystem and it can contain all the rest. If not then your ramdisk should contain all the rest ( the busybox tree, the libraries that you intend to use (uClibc for example), /etc, /dev, /lib/modules, your apps).

There are many prebuilt binaries for the MIPS/BE platform - just choose the distro ( I use Monta Vista Linux but there are many others )...

If you decide to compile them from source - yes. Get the proper GNU toolchain and cross compile them. If you don't want to cross-compile you can use the binaries from any existing embedded distro...

Regards, Sasho

Alexander Popov ProSyst Bulgaria Inc. RTOS Leader 48 Vladajska Str. RTOS and JVM Sofia 1606, Bulgaria Phone: +359 2 952 35 81/203 http://www.prosyst.com Mobile: +359 87 663 193 OSGi Technology Leaders

There is flash. But the stuff in flash is something else that I don't want. Currently I am only playing with image in RAM. So my question is: what files should I put in my ramdisk root filesystem for successful booting till busybox prompt.

distro ( I use Monta

BTW, what is the meaning of distro in embedded context? Sorry, newbie still...

and cross compile

embedded distro...

I have my toolchain built successfully, but need to put everything together on ramdisk. Sorry, where can I get them, what keyword I should search?

What do I need to compiled for the root filesystem if I choose to build myself? Thanks!

- Paul

Asuming that you don't use a flash filesystem:

  1. the kernel modules
  2. the /dev tree
  3. the /etc tree ( in fstab decribe /tmp and /var as tmpfs filesystems )
  4. glibc or uclibc ( depends on how much space you can afford for the C libs and what apps do you use )
  5. busybox

that's (I think) all you need...

distro ( I use Monta

The Embedded distributions usually contain the following things:

- Fully functional development environment for the host ( usually x86 machine )

- Cross toolchains for the supported target platforms (gcc, glibc and binutils)

- Binaries for the target ( kernel, libraries, most common applications )

- (Optional - except for the kernel) the source code of the target binaries

toolchain and cross compile

existing embedded distro...

Try

formatting link
- the preview kit download section... Just choose your target and fill in the form - they will send you the proper url for your target and pass for the iso image ( it's encripted )

the kernel, (any) C lib and busybox, then just create or use an already created /etc and /dev

Alexander Popov ProSyst Bulgaria Inc. RTOS Leader 48 Vladajska Str. RTOS and JVM Sofia 1606, Bulgaria Phone: +359 2 952 35 81/203 http://www.prosyst.com Mobile: +359 87 663 193 OSGi Technology Leaders

and what apps do you

If busybox is the only program used, a statically linked busybox would make glibc unnecessary and reduce space used.

-Michael

and what apps do you

Thanks. My Busybox is running statically on target now. I just need /dev /etc with fstab, and bin/busybox. However, for more complicated applications, how should I prepare the glibc in /lib?

Should I grab it from the glibc toolchain that I compiled earlier? What files do I need? (libc.so only ?)

The files are quite large size? How could I get smaller files, for the

4MB flash?

- Paul

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required