What to put in bootable ramdisk?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
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

Re: What to put in bootable ramdisk?

Quoted text here. Click to load it

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).

Quoted text here. Click to load it

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

Quoted text here. Click to load it

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
Quoted text here. Click to load it


--
Alexander Popov                  ProSyst Bulgaria Inc.
RTOS Leader                      48 Vladajska Str.
We've slightly trimmed the long signature. Click to see the full one.
Re: What to put in bootable ramdisk?
Quoted text here. Click to load it

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.

Quoted text here. Click to load it
distro ( I use Monta
Quoted text here. Click to load it

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

Quoted text here. Click to load it
and cross compile
Quoted text here. Click to load it
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

Re: What to put in bootable ramdisk?

Quoted text here. Click to load it

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...

Quoted text here. Click to load it
distro ( I use Monta
Quoted text here. Click to load it

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


Quoted text here. Click to load it
toolchain and cross compile
Quoted text here. Click to load it
existing embedded distro...
Quoted text here. Click to load it

Try www.mvista.com - 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 )

Quoted text here. Click to load it

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

Quoted text here. Click to load it


--
Alexander Popov                  ProSyst Bulgaria Inc.
RTOS Leader                      48 Vladajska Str.
We've slightly trimmed the long signature. Click to see the full one.
Re: What to put in bootable ramdisk?
Quoted text here. Click to load it
and what apps do you
Quoted text here. Click to load it

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

-Michael

Re: What to put in bootable ramdisk?
Quoted text here. Click to load it
and what apps do you
Quoted text here. Click to load it

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

Site Timeline