This is the mail archive of the ecos-discuss@sources.redhat.com 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: load data from floppy


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


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