This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: load data from floppy
- From: davidw at dedasys dot com (David N. Welton)
- To: Nick Garnett <nickg at ecoscentric dot com>
- Cc: eCos discussion <ecos-discuss at sources dot redhat dot com>
- Date: 07 Jul 2003 11:38:37 +0200
- Subject: Re: [ECOS] load data from floppy
- References: <87fzlkm263.fsf@dedasys.com> <m3d6govu7p.fsf@miso.calivar.com>
Nick Garnett <nickg@ecoscentric.com> writes:
> > I am in the midst of writing an article on eCos, and of course I
> > wanted to create a neat hack to write the article about!
> > To make a long story short, I have a bunch of data that I would
> > like to load up off the raw floppy image. Probably up until the
> > end of the floppy if possible.
> > Loading the data as a .h file doesn't seem to work as it makes the
> > disk image too big (I get errors when linking). So I was trying
> > to determine the best way to get the data in memory. I
> > experimented a bit with making the load not stop at _edata, but
> > I'm not sure exactly where the payload might end up being stashed
> > if I do that. Maybe another pair of routines instead of endload
> > that keep reading from the disk to a known good location? Other
> > thoughts?
> The linking problem is probably due to the limited size allowed for
> FLOPPY startup images. Since we use BIOS traps to read the floppy,
> we can only effectively use the bottom 640k of memory. We cannot
> load above the 1M mark without doing a lot of extra messing about.
Exactly what sort of messing about would be needed? Some sort of
floppy driver? How does GRUB manage it?:-) A cursory glance at the
code seems to indicate that they have a generic, layered system in
place. A little bit more complex for those like me who don't grok PC
hardware at the expert level.
> Your best bet might be to use GRUB -- which I added support for some
> time ago. In addition to loading the executable directly to memory
> above the 1M mark, it also allows you to load extra binary files
> anywhere in memory.
> Of course if the purpose of your article is to describe the neat way
> in which you solved this problem then just writing "Err, I used
> GRUB" is probably not going to get it published :-)
No, the article is really just an introduction to eCos. I was
thinking along the lines of showing how it's smaller than Linux by
squeezing a bunch of stuff (jpegs, in this case) onto a floppy.
It might be nice to be able to do this sort of thing in general, as
the pc-floppy target makes for a good demo platform.
Thankyou,
--
David N. Welton
Consulting: http://www.dedasys.com/
Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
Apache Tcl: http://tcl.apache.org/
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss