[okl4-developer] Hello world on arm926ejs....
Peter Howard
peterh at ok-labs.com
Thu Nov 13 08:52:05 EST 2008
On Wed, 2008-11-12 at 18:28 +0100, Hugues Balp wrote:
> Hello everybody,
>
Hello Hugues
> I first want to thank you for the good job that has been made around the
> OKL4 micro-kernel.
> I' ve just registered to this mailing list after having downloaded OKL4
> v3.0 and
> performed some installations and tests with the hello world example for
> arm926ejs targets...
>
> Nevertheless I encountered a number of problems during installation and
> compilation phases....
> So I have now a number of questions and hope you will help me to
> understand what happens
> on my system...
>
> The first target I wanted to test is called versatile ( with an
> arm926ejs processor ).
>
> So following the instructions of the OKL4 wiki, either in Prerequisite
> page as in the one
> dedicated to the release 3.0, I have downloaded first the precompiled
> SDK for arm926ejs
> target so as the arm-linux crosstool proposed in URL
> http://www.ertos.nicta.com.au/downloads/tools/arm-linux-3.4.4.tar.gz
>
This toolchain is out of date. You need to build your own toolchain via
crosstool as described on http://wiki.ok-labs.com/Release/3.0 (though I
gather from comments below that you have already done that).
> After some installation steps I got the following error when trying to
> compile as follow
> the singlecell example delivered within the sdk:
>
> cd $OKL4_SDK_ROOT/okl4/arm926ejs/examples/singlecell
> make clean
> make
>
> The complete listing of the error is joined to this mail.
> The error deals with* internal relocation errors* due to
> incompatibilities between binary libraries *ABI versions* as described below
>
> "ERROR: build.micro-debug/src/hello.o is compiled for EABI version 0,
> whereas build.micro-debug/bin/hello is compiled for version 4"
>
> What is amazing is to observe that ABI versions differ within the
> supplied precompiled sdk-arm926ejs itself, as illustrated by the
> following commands:
>
> cd $OKL4_SDK_ROOT
> find . -name "*.o" -exec ls {} \; -exec readelf -h {} \; | egrep
> "Flags|arm926ejs"
> ./kernel/arm926ejs/micro-debug/object/arm926ejs.o
> Flags: 0x200, GNU EABI, software FP
> ./kernel/arm926ejs/micro-debug/object/versatile.o
> Flags: 0x200, GNU EABI, software FP
> ./kernel/arm926ejs/micro-debug_no_console/object/arm926ejs.o
> Flags: 0x200, GNU EABI, software FP
> ./kernel/arm926ejs/micro-debug_no_console/object/versatile.o
> Flags: 0x200, GNU EABI, software FP
> ./kernel/arm926ejs/micro-benchmark/object/arm926ejs.o
> Flags: 0x200, GNU EABI, software FP
> ./kernel/arm926ejs/micro-benchmark/object/versatile.o
> Flags: 0x200, GNU EABI, software FP
> ./kernel/arm926ejs/micro-production/object/arm926ejs.o
> Flags: 0x200, GNU EABI, software FP
> ./kernel/arm926ejs/micro-production/object/versatile.o
> Flags: 0x200, GNU EABI, software FP
> ./kernel/arm926ejs/micro-tracebuffers/object/arm926ejs.o
> Flags: 0x200, GNU EABI, software FP
> ./kernel/arm926ejs/micro-tracebuffers/object/versatile.o
> Flags: 0x200, GNU EABI, software FP
> ./okl4/arm926ejs/micro-debug/libs/crt0.o
> Flags: 0x4000000, Version4 EABI
> ./okl4/arm926ejs/examples/singlecell/hello/build.micro-debug/src/hello.o
> Flags: 0x200, GNU EABI, software FP
> ./okl4/arm926ejs/micro-production/libs/crt0.o
> Flags: 0x4000000, Version4 EABI
> ./okl4/arm926ejs/nano-production/libs/crt0.o
> Flags: 0x4000000, Version4 EABI
> ./okl4/arm926ejs/nano-debug/libs/crt0.o
> Flags: 0x4000000, Version4 EABI
>
This is intentional. At this point in time the OKL4 kernel itself is
built to an older EABI standard, whereas the user-space code is built to
EABI-v4.
> Another thing that I don't understand in the above error message comes
> from the fact that
> the file build.micro-debug/src/hello.o is really a binary object file,
> as illustrated by the following "file" command output: ELF 32-bit
> LSB relocatable, ARM, version 1, not stripped
> whereas the item build.micro-debug/bin/hello isn't really a file.
> Indeed the only file that resides in directory
> $OKL4_SDK_ROOT/okl4/arm926ejs/examples/singlecell/hello/build.micro-debug/bin
> is an XML file named hello.xml.
> So I imagine there is a binary file generated from this XML file ? I
> that true ?....
>
> Another thing to add is that the error is the same either when I use the
> arm-linux toolchain referenced in the OKL4 wiki Prerequisite page
> or with a self compiled crosstool chain with support for eabi ( as
> documented in the mailin-list archive ).
Just to clarify - the toolchain you built is crosstool 0.43 with OKL's
EABI patch? Looking at your crosstool config file I think not, as it
shows you building with gcc 3.4.5 whereas it should be using gcc 4.2.4
The example builds with our "internal" toolchain. I'm doing a scratch
rebuild of crosstool from the wiki to confirm that we haven't stuffed
anything up there. I'll post a followup when it's built.
> You can also refer to the joined configuration file of this toolchain.
>
> To sum up I am just wondering me how I can get rid of this problem ?
>
> I will send to you later other questions around the compilation of OKL4
> itself and its required crosstool chains....
>
> Thanks in advance for your help,
>
Hoping my help helps.
--
Peter Howard <peterh at ok-labs.com>
More information about the Developer
mailing list