This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Re: HOWTO: eCos on QEMU PC emulator
On Thu, 24 Mar 2011, Sergei Gavrikov wrote:
> On Thu, 24 Mar 2011, Grant Edwards wrote:
>
> > On 2011-03-24, John Dallaway <jld@codeconfidence.com> wrote:
> > > Hi Grant
> > >
> > > Grant Edwards wrote:
> > >
> > >> It would be simpler if floppy-boot mode would work: there would be no
> > >> need to create an ISO image, which requires something like grub to
> > >> load the application. But, since I do have something that works, I
> > >> don't have a lot of motivation to figure out what's wrong with the
> > >> floppy startup mode. :)
> > >
> > > 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?
>
> Hm, my is 0x168000. I use 'dd' to create the floppy images
>
> What 1.44M Floppy is?
>
> $ tclsh
> % format {%1$d or %1$#x} [expr int(1024*1000*1.44)]
> 1474560 or 0x168000
> % exit
> $ _
>
> $ dd if=install/bin/redboot.bin of=redboot_pc_rltk8139.flp conv=notrunc,sync count=1 bs=$(( 1024*1440 ))
> 0+1 records in
> 1+0 records out
> 1474560 bytes (1.5 MB) copied, 0.00805096 s, 183 MB/s
> $ _
The below is ever more elegant
$ qemu-img create /tmp/floppy.img 1440k
Formatting '/tmp/floppy.img', fmt=raw size=1474560
$ dd if=/tmp/floppy.img of=/dev/null
2880+0 records in
2880+0 records out
1474560 bytes (1.5 MB) copied, 0.00541005 s, 273 MB/s
So, use 'qemu-img'.
Sergei
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss