Skip to contentSkip to conversation

Is ramdisk a must or not?

U-Boot-Users Sam Song 3 participants 4 messages Feb 2, 2004

lore
Share & tools
lore

Sam Song

author
#0 lore raw

Hi,

I cannot figure out some basic questions on ramdisk by reading ramdisk & initrd documents in linux tree and linux-ppc maillist.For the sake of more detailed explanation on ramdisk from DULG and this maillist,I post the topic here for some help.Sorry for bothering you all.

1.Is ramdisk a must or not for embedded application?In URL
http://www.redhat.com/docs/manuals/linux/RHL-7.3-Manual/custom-guide/s1-custom-kernel-initrd.html

and some web pages,they say an initrd image is needed for loading your SCSI module at boot time.So if I didn't use SCSI module,I would save the initrd image.Is that so?

2.What advantage does ramdisk have?In which situation should we use it?

3.After programming SELF 8xx image(from ftp.denx.de) to flash on lite_dw,u-boot+kernel+ramdisk worked fine on LCD panel(Thanks wolfgang providing such a workable ramdisk).It displayed "Application running".What does application refer to?Busybox or ramdisk itself?If I want to make my added application in ramdisk run automatically,how should I do?

Any advice is appreciated!

Best regards,

Sam

_________________________________________________________
Do You Yahoo!?
??????????????????60???????
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.mail.yahoo.com

#1 lore raw
Quoted 1 line · Sam Song

1.Is ramdisk a must or not for embedded application?

No, you don't need a RAM-disk. U-Boot can directly boot from a flash partition (for example a cramfs or JFFS2 partition).

Quoted 4 lines

and some web pages,they say an initrd image is needed for loading your SCSI module at boot time.So if I didn't use SCSI module,I would save the initrd image.Is that so?

In embedded applications you normally _know_ which hardware you have, so either compile it directly into the kernel or load your module from a script while starting.

Quoted 2 lines

2.What advantage does ramdisk have?In which situation should we use it?

Initrds were invented for distributors; they normally don't know which hardware the user boots on, but have to supply drivers for every possible device.

Robert

Signature · 5 lines
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hornemannstra?e 12,  31137 Hildesheim, Germany
    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4
author
#2 lore raw

Hello,Robert Schwebel,

Quoted 3 lines · You

No, you don't need a RAM-disk. U-Boot can directly boot from a flash
partition (for example a cramfs or JFFS2 partition).

Thank you a lot.That's really what I want to do next.

Quoted 4 lines

Initrds were invented for distributors; they normally don't know which hardware the user boots on, but have to supply drivers for every possible device.

So magic. But for the sake of saving flash,I have to remove it from my application.

Best regards,

Sam

_________________________________________________________
Do You Yahoo!?
??????????????????60???????
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.mail.yahoo.com

#3 lore raw
In reply to Sam Song
Quoted 2 lines · In message <[email protected]> you wrote:

1.Is ramdisk a must or not for embedded application?In

It is definitely NOT a must. There are many ways where to put the root filesystem. The ramdisk may be one of the most simple ways to get started, but there are very few projects whereit is the optimal solution.

In general, using a ramdisk is NOT optimal.

Quoted 4 lines

and some web pages,they say an initrd image is needed for loading your SCSI module at boot time.So if I didn't use SCSI module,I would save the initrd image.Is that so?

Please don't compare things that have nothing to do with each other. Booting a general purpose system is one thing (here you have one generic kernel image which will have to work on many, many different hardware configurations, and extensive use of driver modules is a must), while an embedded system is a completely different story (here you have one fix hardware configuration and normally you don't use any modules at all).

Quoted 2 lines

2.What advantage does ramdisk have?In which situation should we use it?

It is easy to build and to test.

I cannot think of a situation where a ramdisk image is the best way to go for embedded systems.

Quoted 2 lines

ramdisk).It displayed "Application running".What does application refer to?Busybox or ramdisk itself?If I

Application refers to the "/bin/application" script.

Quoted 2 lines

want to make my added application in ramdisk run automatically,how should I do?

Add it, and make sure it gets started (like by editing /etc/inittab).

Best regards,

Wolfgang Denk

Signature · 3 lines
See us @ Embedded World, Nuremberg, Feb 17 - 19,  Hall 12.0 Booth 440
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Stupidity, like virtue, is its own reward.