[openfirmware] [OpenFirmware] [ARM] [Qemu] Cannot build OpenFirmware for ARM using make

John Fisherman iam.john.fisherman at gmail.com
Wed Oct 19 17:22:38 CEST 2016


Hello all,

I am currently facing an issue to build OpenFirmware for ARM. Let’s start
with some explanations :
My goal is to have a Forth interpreter running on a barebone ARM device.
I’ve tried some, like ForthOS (which runs on x86 only) and another one
designed for the Raspberry Pi which is far for being complete.
So, I’ve been following two of your official tutorials :

 - https://www.openfirmware.info/Building_OFW_for_QEMU
-  https://www.openfirmware.info/Building_OFW_for_ARM

Got to say the first one worked well, except it is not stated that
“subversion” is required, but we can easily find it out by ourselves. At
the end, I got OpenFirmware running and have been able to type some Forth
commands on the interpreter.

Then, I tried to reproduce this with ARM Qemu. Fell on the second tutorial,
which is somewhat less detailed than the first one, but optionnal
configuration on the first one should also be viable for the ARM’s one.
Well, my issue comes when executing the “make” command inside
“openfirmware/cpu/x86/pc/emu/build”.
Here is what I get :

*jacky at debiannos:~/openfirmware/cpu/arm/mmp2/build$ make*

*./build ofw.rom*

*--- Rebuilding sp.img*

*--- Cmd: ${HOSTDIR}/forth ${HOSTDIR}/../build/builder.dic ../sp.bth*

*--- Rebuilding fw.img*

*--- Cmd: ${HOSTDIR}/armforth ${BP}/cpu/arm/build/basefw.dic ../fw.bth*

*sh: 1: /home/jacky/openfirmware/cpu/x86/Linux/armforth: not found*

*Makefile:22: recipe for target 'ofw.rom' failed*

*make: *** [ofw.rom] Error 1*


*jacky at debiannos:~/openfirmware/cpu/arm/mmp2/build$ *


At first I tought it was due to script’s or environment’s variable like
${HOSTDIR} as this was the line causing the error. It seemed those
variables were correctly replaced in the script itself, as a previous line
is well executed using this same variable. Next, I’ve been looking for
openfirmware/cpu/x86/Linux/armforth file. As the error states, this file is
not present in the cpu/x86/Linux folder. In fact, there is a file named
like this, but it has an extension .qemu (the complete file name is
armforth.qemu. So I tough about a simple mistake, and renamed it (in fact,
I copied it to avoid other errors) into armforth.

Once renamed, I did “make clean”, and relaunched a “make”. The previous
error disappeared, the script went farther, but still did not complete :



*jacky at debiannos:~/openfirmware/cpu/arm/mmp2/build$ make*

*./build ofw.rom*

*--- Rebuilding sp.img*

*--- Cmd: ${HOSTDIR}/forth ${HOSTDIR}/../build/builder.dic ../sp.bth*

*--- Rebuilding fw.img*

*--- Cmd: ${HOSTDIR}/armforth ${BP}/cpu/arm/build/basefw.dic ../fw.bth*

*${BP}/cpu/arm/mmp2/rootnode.fth:32: io2-va ?*

*${BP}/cpu/arm/mmp2/rootnode.fth:36: io-va ?*

*${BP}/cpu/arm/mmp2/mmuon.fth:12: fw-mem-va ?*

*${BP}/cpu/arm/mmp2/mmuon.fth:12: page-table-offset ?*

*${BP}/cpu/arm/mmp2/mmuon.fth:13: page-table-va ?*

*Makefile:22: recipe for target 'ofw.rom' failed*

*make: *** [ofw.rom] Error 1*

*jacky at debiannos:~/openfirmware/cpu/arm/mmp2/build$*



These errors appears to be forth-related, as if some words were not
defined. Maybe is it due to the *basefw.dic *dictionnary… To be honest, I
can’t think about any other solutions. Maybe I will dig into these forth
files but I am afraid it will be a loss of time as I am a real beginner to
Forth.

Here’s what I tried :

-          Executing make as root. Same issue.

-          Executing it on another distro (Ubuntu 14.x). Same issue.

-          Tried different Qemu versions (don’t ask me why… I tried the 4.7
one on the official website, and the maintained one on github’s Qemu repo.

Forgot to mention this has been has been tested on both a clean Ubuntu and
a clean Debian VM using VMWare. Yes, I am emulating an emulator. ;)

Also, I'd be glad if you have any other solutions to run a Forth
interpreter on a bare-metal ARM machine, either emulated or not.
Thanks in advance, for your work, for your help, and for reading this.

Regards,
- John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/openfirmware/attachments/20161019/98f1abce/attachment.html>


More information about the openfirmware mailing list