[U-Boot-Users] Booting from ext2 partition

Wolfgang Denk wd at denx.de
Tue Mar 16 23:14:26 CET 2004


In message <603BA0CFF3788E46A0DB0918D9AA95100A09CA3D at sj580004wcom.int.lantronix.com> you wrote:
> I've seen the fsload command for jffs2 and fat filesystems.  

I still think that under normal conditions you should avoid loading a
kernel from a filesystem. Use a dedicated partition instead.

Acceptable exceptions are:

* Use of JFFS2 on NAND flash based systems, where you don't have many
  other options.

* Use of FAT filesystems  for  changable  media  where  the  customer
  insists that the storage device must be written on windoze systems.
  Yes, there are such situations :-(

> Recently a few of the folks on my team have asked me to implement a
> loader that can load the kernel from an ext2 partition.  They say they

What good would that do to you, except for blowing up the size of U-Boot?

> want this because they claim it would be easier to "upgrade" the kernel
> from a linux app - although I don't see much of a difference between

C'me on. Where is the difference between the following two commands:

	cp /tmp/uImage /any/directory/you/like/uImage
or
	cp /tmp/uImage /dev/mtdblock1

I can see NO different complexity here. Zero. Null.

> copy the kernel image.  The other reason given is that they do not want
> to dedicate a block on the CompactFlash IDE drive to a "raw" partition

And may I please ask why not? Instead theey want to waste  a  lot  of
much  more  expensive  memory  on  the  on-board  flash  just to hold
filesystem code which is redundand (as al;ready present in the  Linux
kernel) and ill-suited for a boot loader?

> (creating an ext2 partition, and then write over it with the kernel make
> the ext2 partition unusable for anything but uboot).  Again - I don't

This is wrong. You can read and write any  partition  wth  plain  old
standard  tools.  "cp  from /dev/mtdblock1" or "cp /dev/mtdblock1 to"
are as simple as with any file in a filesystem of any type.

> see the issue, it's not like you are wasting space on the drive.  

How much is 1 MB on a CompactFlash card?
How much is an additional 100 kB on the on-board flash?
Which of these is growing faster than you can buy them?

> In any case, I need to get an idea of how much time such a modification
> would take.  Has anyone attempted such a mod (I scanned the archives and
> did not find anything).

We're talking about yet another way to waste developer's time.


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
The light at the end of the tunnel is usually a "No Exit" sign.




More information about the U-Boot mailing list