This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: n00b PC booting questions


At 01:59 AM 2/9/2006, Nick Garnett wrote:
The main problem with the floppy boot code is that it renders the
floppy totally useless for any other purpose, since it overwrites all
the blocks that would contain the MBR and filesystem boot
sector. Doing the equivalent on a hard disk or a CompactFlash would
also render that device useless for any other purposes.

I hear what you're saying Nick but I don't exactly agree with it. My disagreement comes from your assertion that the device is "useless" for any other purpose. There is absolutely no reason at all that my code can't continue to use the device as a mass storage device, with a primitive file system of my own design.


Since in most embedded systems if you go to the effort of adding an
IDE device, you want to use it for something other than booting, what
we really require is a mechanism for booting eCos/Redboot out of a
filesystem.

And we have one: GRUB!

Yes, after poking around I saw that GRUB booting was supported (Grub Legacy or Grub 2.0 ?) Rhetorical question since I'm not interested in using GRUB if I can avoid it.


So let's back up for a minute. On my embedded system I get IDE devices "for free" as I'm simply leveraging an existing design rather than rolling my own. Further, I've got some firmware in that system, BIOS, which already knows how to start up programming from a device attached to the IDE bus.

I'm documentation challenged as I'm not part of the "Secret Society of PC Developers" so for whatever reason manufacturers are loathe to tell exactly how their hardware works or what it is expecting, but they do adhere to generally established conventions and standards. This at least allows me to get part of the way there.

Remember that at its heart, the disk on chip system is Flash, not disk, so treating it like a disk after I've booted is probably not the best idea (hence the plethora of flash file systems) further my system architecture is such that I have a "regular" disk for user data, and it will have a more standard file system, but the boot drive is really just for booting and initial software load.

Since my original email, I've created a boot sector that reads sectors 2-n (where 'n' is poked into the boot sector at install time) into memory using the int 13h call that BIOS provides. I'm currently looking at telling Redboot to expect "RAM" startup and making sure that place where I load it is where it expects to be. Is there a vector to the start address stored in the first address of Redboot?

--Chuck

(thanks again for the GRUB support, that is really good stuff and if the worst comes to pass I can use it as a workaround)


-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]