[openfirmware] Fwd: [ARM] [Qemu] Cannot build OpenFirmware for ARM using make
Mitch Bradley
wmb at firmworks.com
Tue Oct 25 02:04:19 CEST 2016
a) Unless you happen to have an MMP2 development board from Marvell, you
should not use the mmp2/ build directory. The best build directory for
ARM QEMU is cpu/arm/versatilepb/build . The mmp2/, mmp3/, and olpc/
directories are full of Marvell-specific stuff which is very unlikely to
work on any other platform, and which is unsupported by QEMU.
b) cpu/arm/versatilepb/qemubase.bth has instructions at the top for how
to invoke qemu.
c) Please switch from the subversion repository to this one:
https://github.com/MitchBradley/openfirmware.git
My future development for non-OLPC platforms will be done there.
It already has a bug fix for the QEMU build above. The svn repo
is already in "archival" status; no new work is going there.
d) I strongly suggest that, unless you really need Open Firmware
features and understand Open Firmware well, you should build
qemuforth.rom instead of qemubase.rom . The latest
cpu/arm/versatilepb/build/Makefile has instructions at the top
for how to build qemuforth.rom . The Open Firmware features
take up a lot of space and add complexity that most embedded
apps do not use.
On 10/24/2016 12:44 AM, John Fisherman wrote:
> Hello Mitch,
> Thanks for your answer, I successfully built the OpenFirmware's ROM by
> trying older subversion's revisions (thanks to Marcin). Now that I have
> the ROM, I am stuck on loading the ROM using Qemu.
>
> Forgot to respond to the whole mailing list, here is the latest update
> of my issue :
>
> ||
> ||
> V
>
> Hello Marcin,
>
> Thanks again for your help, it solved the issue in a way. Tried several
> older revisions: r3500, r3000, r2500, and finally r2000. Only the
> revision 2000 successfully built the ARM rom called ofw.rom. This
> revision is from 2010-10-08 02:39:55, when the documentation is from
> 2010-08-11, 18:45.
>
> Here’s the output :
> /
> jacky at debiannos:~/openfirmware-r2000/cpu/arm/mmp2/build$ make/
>
> /make[1]: Entering directory '/home/jacky/openfirmware-r2000/cpu/x86/Linux'/
>
> /cc -c -O -g -m32 -DTARGET_X86 ../../../forth/wrapper/wrapper.c -o
> wrapper.o/
>
> /cc -c -O -g -m32 -DTARGET_X86 ../../../forth/wrapper/logger.c -o logger.o/
>
> /cc -c -O -g -m32 -DTARGET_X86 -I../../../forth/wrapper/zip
> ../../../forth/wrapper/zip/zipmem.c -o zipmem.o/
>
> /cc -c -O -g -m32 -DTARGET_X86 -I../../../forth/wrapper/zip
> ../../../forth/wrapper/zip/deflate.c -o deflate.o/
>
> /cc -c -O -g -m32 -DTARGET_X86 -I../../../forth/wrapper/zip
> ../../../forth/wrapper/zip/trees.c -o trees.o/
>
> /cc -c -O -g -m32 -DTARGET_X86 -I../../../forth/wrapper/zip
> ../../../forth/wrapper/zip/bits.c -o bits.o/
>
> /cc -c -O -g -m32 -DTARGET_X86 -I../../../forth/wrapper/zip
> ../../../forth/wrapper/zip/util.c -o util.o/
>
> /cc -c -m32 -Wall -fno-stack-protector -ffreestanding
> -D_FORTIFY_SOURCE=0 -DNEED_BCOPY -O3 -fpic
> ../../../forth/wrapper/zip/inflate.c -o inflate.lo/
>
> /ld -T inflate.ld inflate.lo -o inflate.o/
>
> /cc -m32 -o forth wrapper.o logger.o zipmem.o deflate.o trees.o bits.o
> util.o inflate.o /
>
> //usr/bin/ld: error in inflate.o(.eh_frame); no .eh_frame_hdr table will
> be created./
>
> /make[1]: Leaving directory '/home/jacky/openfirmware-r2000/cpu/x86/Linux'/
>
> /./build ofw.rom/
>
> /--- Rebuilding sp.img/
>
> /--- Cmd: ${HOSTDIR}/forth ${HOSTDIR}/../build/builder.dic ../sp.bth/
>
> /--- Rebuilding kernel.dic/
>
> /--- Cmd: ${HOSTDIR}/forth ${HOSTDIR}/../build/builder.dic ../kernel.bth/
>
> /context: forth forth re-heads root current: forth /
>
> /--- Saving kernel.dic ---/
>
> / /
>
> /--- Rebuilding tools.dic/
>
> /--- Cmd: ${HOSTDIR}/armforth ${BP}/cpu/arm/build/kernel.dic ../tools.bth/
>
> /--- Saving tools.dic --- /
>
> /--- Rebuilding basefw.dic/
>
> /--- Cmd: ${HOSTDIR}/armforth ${BP}/cpu/arm/build/tools.dic ../basefw.bth/
>
> /--- Saving basefw.dic --- /
>
> /--- Rebuilding fw.img/
>
> /--- Cmd: ${HOSTDIR}/armforth ${BP}/cpu/arm/build/basefw.dic ../fw.bth/
>
> /(end-extra) isn't unique /
>
> /${BP}/ofw/gui/iconmenu.fth:183: expand-rect ?/
>
> /--- Saving fw.dic .../
>
> /--- Saving fw.img --- /
>
> /--- Rebuilding ofw.rom/
>
> /--- Cmd: ${HOSTDIR}/forth ${HOSTDIR}/../build/builder.dic ../ofw.bth/
>
> /jacky at debiannos:~/openfirmware-r2000/cpu/arm/mmp2/build$ /
>
>
> Only the following line still warns us of a potential issue :
> /${BP}/ofw/gui/iconmenu.fth:183: expand-rect ?/
> It seems to concern an icon, so it should not be a problem; the ROM is
> built, and this is what I wanted.
>
> As it is explained in the documentation, the last step should be to
> launch qemu : /qemu -L . -bios ofw.rom -hda fat:.
> /Here’s the output :
>
>
> /jacky at debiannos:~$ qemu-system-arm -L . -bios ofw.rom -hda fat:./
>
> /No machine specified, and there is no default./
>
> /Use -machine help to list supported machines!/
>
> /jacky at debiannos:~$/
>
> //
>
> Let’s specify the machine :
>
>
> /jacky at debiannos:~$ qemu-system-arm -L . -bios ofw.rom -hda fat:.
> –machine none/
>
> This time, a Qemu window pops, with the following text:
>
> /compat_monitor0 console/
>
> /QEMU 2.1.2 monitor – type ‘help’ for more information/
>
> /(qemu) $/
>
>
>
> That’s just the Qemu console, correct me if i’m wrong, the bios is not
> executed.
>
> So I tried some other machines:
>
> /jacky at debiannos:~$ qemu-system-arm -L . -bios
> ~/openfirmware-r2000/cpu/arm/mmp2/build/ofw.rom –cpu cortex-m3 -machine
> lm3s811evb -hda fat:./
>
> /vvfat . chs 1024,16,63/
>
> /Guest image must be specified (using -kernel)/
>
>
>
> And:
>
> /jacky at debiannos:~$ qemu-system-arm -L . -bios
> ~/openfirmware-r2000/cpu/arm/mmp2/build/ofw.rom -machine connex -hda fat:./
>
> /vvfat . chs 1024,16,63/
>
> /A flash image must be given with the 'pflash' parameter/
>
> /jacky at debiannos:~$/
>
>
> Also tried with almost all the ones listed thanks to the command
> /qemu-system-arm –machine help./
> Why would a flash or a kernel be required when it was not, using Qemu
> for x86 ?
>
> Which kernel and flash should I use in order to run OpenFirmware? I
> suppose this question is partly getting off topic, as the base issue has
> been solved, maybe you want me to open another topic ?
>
> Again, thanks a lot.
>
> Regards,
> - John
>
>
>
>
>
More information about the openfirmware
mailing list