This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: load data from floppy
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: davidw at dedasys dot com (David N. Welton)
- Cc: eCos discussion <ecos-discuss at sources dot redhat dot com>
- Date: 06 Jul 2003 11:13:30 +0100
- Subject: Re: [ECOS] load data from floppy
- References: <87fzlkm263.fsf@dedasys.com>
davidw@dedasys.com (David N. Welton) writes:
> Hi,
>
> 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.
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 :-)
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss