[ECOS] Re: HOWTO: eCos on QEMU PC emulator

Grant Edwards grant.b.edwards@gmail.com
Fri Mar 25 14:10:00 GMT 2011

On 2011-03-24, John Dallaway <jld@codeconfidence.com> wrote:

>>> I have always found it necessary to pad the disk image to 1440KiB when
>>> using CYG_HAL_STARTUP == "FLOPPY" with QEMU. Ref:
>>>   http://www.codeconfidence.com/technote-0002.shtml
>> I see you pad to 0x16b000 (1452K) where does that number come from?
> The parameter is an address, not a file length. This is discussed a
> little later in the technical note.

Got it.

If instead of redboot.elf you start with redboot.bin (which seems to
be built by default for FLOPPY startup), then you don't have to worry
about offsetting the pad-to value with the input file's LMA:

  objcopy -I binary -O binary --pad-to=$((1440*1024)) redboot.bin floppy.bin

Likewise a two-pass approach (one to convert to binary, a second to
pad), eliminates the need to know the original LMA.
Floppy startup is quicker and simpler, but like you note on your page
it does limit the amount of RAM available.

Floppy startup has 84KB available:

  RAM: 0x00000000-0x000a0000 [0x0008b490-0x000a0000 available]

Grub startup has 15MB available:

 Grub:  RAM: 0x00100000-0x040ffc00 [0x00190290-0x01000000 available]

(If you enable CYGHWR_HAL_I386_PC_LOAD_HIGH, it drops by 1MB.)
Grant Edwards               grant.b.edwards        Yow! Somewhere in DOWNTOWN
                                  at               BURBANK a prostitute is
                              gmail.com            OVERCOOKING a LAMB CHOP!!

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

More information about the Ecos-discuss mailing list