Help regarding the OKL4 port to the Qemu Emulator

9 messages Options
Embed this post
Permalink
Amrit_a

Help regarding the OKL4 port to the Qemu Emulator

Reply Threaded More More options
Print post
Permalink
Hi,

I have been facing certain problems while trying to build for the Qemu Emulator.

I am passing :

tools/build.py machine=androidsim project=examples example=hello PYFREEZE=False

The error I am getting is this :

...
...
...
> [AR] build/pistachio/lib/libplatform.a
> [LIB] build/pistachio/lib/libplatform.a
> [AR] build/pistachio/lib/libatomic_ops.a
> [LIB] build/pistachio/lib/libplatform.a
> [LINK] build/pistachio/bin/l4lernel

> /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_dvmd_lnx.o):
> In function `__div0':
 
/scratch/philipo/crosstool-0.43/src/gcc-4.2.4/gcc/config/arm/lib1funcs.asm:1000: 
undefined reference to `raise'

> /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_divdi3.o):(.ARM.exidx+0x0):
> undefined reference to `__aeabi_unwind_cpp_pr0'

> /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0):
>undefined reference to `__aeabi_unwind_cpp_pr0'

> scons: *** [build/pistachio/bin/l4kernel] Error 1
> scons: building terminated because of errors.

I am using the cross-compiler specified in the OK Labs wiki. Also, I came across another post in the developers forum where it was mentioned : "The kernel needs to be compiled with the old non EABI toolchain, while the rest of userland needs to be compiled with the EABI toolchain. To do that you state :

  TOOLCHAIN=gnu_arm_eabi_toolchain pistachio.TOOLCHAIN=gnu_arm_toolchain. "

I tried this also but I am still getting the same errors. Can I get any help on fixing this?

Regards,

Amrit Acharya



_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer
Gabi Voiculescu

Re: Help regarding the OKL4 port to the Qemu Emulator

Reply Threaded More More options
Print post
Permalink
Hello.

I am no expert, but I think this is a compiler issue.
I have not tried to use androidsim (it's not publicly avaialble), so I can't give you direct advices (these might not fix your problem).

As I see the compiler used to build the kernel seems to be able to build it's part of the job. So the problem relies in the toolchain used to build iguana/oklinux/cells ("gnu_arm_eabi_toolchain").

As I recall, for arm platforms, the toolchain used to build the cells on top of the kernel is available on the okl4 website as binary. You may want to check it out. There is a possibility that the toolchain you built using crosstools is broken.

Also, what's surprising from the output, is that this toolchain is not building okl4's c library but trying to use the compiler's library.

You may have changed something in the build script in tools/toolchains.py that your toolchain was not built for:
- the path for the toolchain specified in the declaration of  "gnu_arm_eabi_toolchain"
- argument set passed to the toolchain (maybe you imposed EABI version 0/ change the use of compiler's libgcc instead of okl4's libgcc).

To sum up I strongly sugest:
-  using the okl4 toolchain binary instead of the one you built using crosstools: http://wiki.ok-labs.com/downloads/release-3.0/arm-linux-gnueabi-4.2.4.tar.gz
- recheck the parameter set in the gnu_arm_eabi_toolchain variable in tools/toolchains.py in your okl4 dir vs the original one (libgcc related) .

Gabi Voiculescu

--- On Fri, 7/3/09, Amrit Acharya <[hidden email]> wrote:

From: Amrit Acharya <[hidden email]>
Subject: [okl4-developer] Help regarding the OKL4 port to the Qemu Emulator
To: [hidden email]
Date: Friday, July 3, 2009, 9:26 AM

Hi,

I have been facing certain problems while trying to build for the Qemu Emulator.

I am passing :

tools/build.py machine=androidsim project=examples example=hello PYFREEZE=False

The error I am getting is this :

...
...
...
> [AR] build/pistachio/lib/libplatform.a
> [LIB] build/pistachio/lib/libplatform.a
> [AR] build/pistachio/lib/libatomic_ops.a
> [LIB] build/pistachio/lib/libplatform.a
> [LINK] build/pistachio/bin/l4lernel

> /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_dvmd_lnx.o):
> In function `__div0':
 
/scratch/philipo/crosstool-0.43/src/gcc-4.2.4/gcc/config/arm/lib1funcs.asm:1000: 
undefined reference to `raise'

> /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_divdi3.o):(.ARM.exidx+0x0):
> undefined reference to `__aeabi_unwind_cpp_pr0'

> /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0):
>undefined reference to `__aeabi_unwind_cpp_pr0'

> scons: *** [build/pistachio/bin/l4kernel] Error 1
> scons: building terminated because of errors.

I am using the cross-compiler specified in the OK Labs wiki. Also, I came across another post in the developers forum where it was mentioned : "The kernel needs to be compiled with the old non EABI toolchain, while the rest of userland needs to be compiled with the EABI toolchain. To do that you state :

  TOOLCHAIN=gnu_arm_eabi_toolchain pistachio.TOOLCHAIN=gnu_arm_toolchain. "

I tried this also but I am still getting the same errors. Can I get any help on fixing this?

Regards,

Amrit Acharya



-----Inline Attachment Follows-----

_______________________________________________
Developer mailing list
Developer@...
https://lists.okl4.org/mailman/listinfo/developer


_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer
Nicholas FitzRoy-Dale

Re: Help regarding the OKL4 port to the Qemu Emulator

Reply Threaded More More options
Print post
Permalink
In reply to this post by Amrit_a
Hi Amrit,

This is a problem with the version of the compiler you're using to  
build Pistachio. Can you compile for any other targets. For example,  
can you compile for gumstix or versatile? If you can build for either  
of those targets you should be able to build for androidsim.

Nicholas

On 03/07/2009, at 4:26 PM, Amrit Acharya wrote:

> Hi,
>
> I have been facing certain problems while trying to build for the  
> Qemu Emulator.
>
> I am passing :
>
> tools/build.py machine=androidsim project=examples example=hello  
> PYFREEZE=False
>
> The error I am getting is this :
>
> ...
> ...
> ...
> > [AR] build/pistachio/lib/libplatform.a
> > [LIB] build/pistachio/lib/libplatform.a
> > [AR] build/pistachio/lib/libatomic_ops.a
> > [LIB] build/pistachio/lib/libplatform.a
> > [LINK] build/pistachio/bin/l4lernel
>
> > /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-
> unknown-linux-gnueabi/4.2.4/libgcc.a(_dvmd_lnx.o):
> > In function `__div0':
>
> /scratch/philipo/crosstool-0.43/src/gcc-4.2.4/gcc/config/arm/
> lib1funcs.asm:1000:
> undefined reference to `raise'
>
> > /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-
> unknown-linux-gnueabi/4.2.4/libgcc.a(_divdi3.o):(.ARM.exidx+0x0):
> > undefined reference to `__aeabi_unwind_cpp_pr0'
>
> > /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-
> unknown-linux-gnueabi/4.2.4/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0):
> >undefined reference to `__aeabi_unwind_cpp_pr0'
>
> > scons: *** [build/pistachio/bin/l4kernel] Error 1
> > scons: building terminated because of errors.
>
> I am using the cross-compiler specified in the OK Labs wiki. Also, I  
> came across another post in the developers forum where it was  
> mentioned : "The kernel needs to be compiled with the old non EABI  
> toolchain, while the rest of userland needs to be compiled with the  
> EABI toolchain. To do that you state :
>
>   TOOLCHAIN=gnu_arm_eabi_toolchain  
> pistachio.TOOLCHAIN=gnu_arm_toolchain. "
>
> I tried this also but I am still getting the same errors. Can I get  
> any help on fixing this?
>
> Regards,
>
> Amrit Acharya
>
>
> _______________________________________________
> Developer mailing list
> [hidden email]
> https://lists.okl4.org/mailman/listinfo/developer


_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer
Nicholas FitzRoy-Dale

Re: Help regarding the OKL4 port to the Qemu Emulator

Reply Threaded More More options
Print post
Permalink
In reply to this post by Gabi Voiculescu

On 03/07/2009, at 8:07 PM, Gabi Voiculescu wrote:

> I am no expert, but I think this is a compiler issue.
> I have not tried to use androidsim (it's not publicly avaialble),

Hi Gabi,

Thanks for the comments. I suspect there is a problem with the  
Pistachio compiler version, also.

You said that the androidsim target isn't publicly available.  
Actually, it's part of the OKL4 for HTC dream package, which is  
available here:

https://www.ertos.nicta.com.au/software/okl4htcdream/

Nicholas


_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer
Amrit_a

Re: Help regarding the OKL4 port to the Qemu Emulator

Reply Threaded More More options
Print post
Permalink
In reply to this post by Nicholas FitzRoy-Dale
Hi Nicholas,

I tried building it again for versatile but I am getting similar errors. If its a compiler issue, can you direct me to which versions I need to use? The toolchain I am using is the arm-unknown-linux-gnueabi downloaded from the OKlabs wiki.

I tried installing the toolchain again,

I am now getting the following error when i pass :

tools/build.py machine=androidsim project=examples example=hello TOOLCHAIN=gnu_arm_eabi_toolchain pistachio.TOOLCHAIN=gnu_arm_toolchain PYFREEZE=False

...
[CXX ] build/pistachio/l4kernel/object/src/asid.o
cc1plus: error: invalid parameter `large-function-growth'
scons: *** [build/pistachio/l4kernel/object/src/asid.o] Error 1
scons: building terminated because of errors.
...

However, if i just pass :

tools/build.py machine=androidsim project=examples example=hello PYFREEZE=False TOOLCHAIN=gnu_arm_eabi_toolchain,

I am still getting the same error which I got initially.

Amrit


On Fri, Jul 3, 2009 at 10:23 PM, Nicholas FitzRoy-Dale <[hidden email]> wrote:
Hi Amrit,

This is a problem with the version of the compiler you're using to build Pistachio. Can you compile for any other targets. For example, can you compile for gumstix or versatile? If you can build for either of those targets you should be able to build for androidsim.

Nicholas


On 03/07/2009, at 4:26 PM, Amrit Acharya wrote:

Hi,

I have been facing certain problems while trying to build for the Qemu Emulator.

I am passing :

tools/build.py machine=androidsim project=examples example=hello PYFREEZE=False

The error I am getting is this :

...
...
...
> [AR] build/pistachio/lib/libplatform.a
> [LIB] build/pistachio/lib/libplatform.a
> [AR] build/pistachio/lib/libatomic_ops.a
> [LIB] build/pistachio/lib/libplatform.a
> [LINK] build/pistachio/bin/l4lernel

> /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_dvmd_lnx.o):
> In function `__div0':

/scratch/philipo/crosstool-0.43/src/gcc-4.2.4/gcc/config/arm/lib1funcs.asm:1000:
undefined reference to `raise'

> /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_divdi3.o):(.ARM.exidx+0x0):
> undefined reference to `__aeabi_unwind_cpp_pr0'

> /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0):
>undefined reference to `__aeabi_unwind_cpp_pr0'

> scons: *** [build/pistachio/bin/l4kernel] Error 1
> scons: building terminated because of errors.

I am using the cross-compiler specified in the OK Labs wiki. Also, I came across another post in the developers forum where it was mentioned : "The kernel needs to be compiled with the old non EABI toolchain, while the rest of userland needs to be compiled with the EABI toolchain. To do that you state :

 TOOLCHAIN=gnu_arm_eabi_toolchain pistachio.TOOLCHAIN=gnu_arm_toolchain. "

I tried this also but I am still getting the same errors. Can I get any help on fixing this?

Regards,

Amrit Acharya


_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer



_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer
Nicholas FitzRoy-Dale

Re: Help regarding the OKL4 port to the Qemu Emulator

Reply Threaded More More options
Print post
Permalink
Hi Amrit,

Thanks for confirming that your build problem occurs for Versatile  
too. To definitely confirm that the problem is toolchain-related,  
could you please download the official OKL4 3.0 source from the OKL  
wiki and verify that you get the same problem building for Versatile?  
(I am assuming that you tested the Versatile build from the htcdream  
fork).

Doing this will confirm that there is a toolchain problem (if you get  
the same error) or allow me to narrow down the bug (if you don't get  
the same error).

Nicholas

On 07/07/2009, at 8:49 PM, Amrit Acharya wrote:

> Hi Nicholas,
>
> I tried building it again for versatile but I am getting similar  
> errors. If its a compiler issue, can you direct me to which versions  
> I need to use? The toolchain I am using is the arm-unknown-linux-
> gnueabi downloaded from the OKlabs wiki.
>
> I tried installing the toolchain again,
>
> I am now getting the following error when i pass :
>
> tools/build.py machine=androidsim project=examples example=hello  
> TOOLCHAIN=gnu_arm_eabi_toolchain  
> pistachio.TOOLCHAIN=gnu_arm_toolchain PYFREEZE=False
>
> ...
> [CXX ] build/pistachio/l4kernel/object/src/asid.o
> cc1plus: error: invalid parameter `large-function-growth'
> scons: *** [build/pistachio/l4kernel/object/src/asid.o] Error 1
> scons: building terminated because of errors.
> ...
>
> However, if i just pass :
>
> tools/build.py machine=androidsim project=examples example=hello  
> PYFREEZE=False TOOLCHAIN=gnu_arm_eabi_toolchain,
>
> I am still getting the same error which I got initially.
>
> Amrit
>
>
> On Fri, Jul 3, 2009 at 10:23 PM, Nicholas FitzRoy-Dale <[hidden email]
> > wrote:
> Hi Amrit,
>
> This is a problem with the version of the compiler you're using to  
> build Pistachio. Can you compile for any other targets. For example,  
> can you compile for gumstix or versatile? If you can build for  
> either of those targets you should be able to build for androidsim.
>
> Nicholas
>
>
> On 03/07/2009, at 4:26 PM, Amrit Acharya wrote:
>
> Hi,
>
> I have been facing certain problems while trying to build for the  
> Qemu Emulator.
>
> I am passing :
>
> tools/build.py machine=androidsim project=examples example=hello  
> PYFREEZE=False
>
> The error I am getting is this :
>
> ...
> ...
> ...
> > [AR] build/pistachio/lib/libplatform.a
> > [LIB] build/pistachio/lib/libplatform.a
> > [AR] build/pistachio/lib/libatomic_ops.a
> > [LIB] build/pistachio/lib/libplatform.a
> > [LINK] build/pistachio/bin/l4lernel
>
> > /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-
> unknown-linux-gnueabi/4.2.4/libgcc.a(_dvmd_lnx.o):
> > In function `__div0':
>
> /scratch/philipo/crosstool-0.43/src/gcc-4.2.4/gcc/config/arm/
> lib1funcs.asm:1000:
> undefined reference to `raise'
>
> > /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-
> unknown-linux-gnueabi/4.2.4/libgcc.a(_divdi3.o):(.ARM.exidx+0x0):
> > undefined reference to `__aeabi_unwind_cpp_pr0'
>
> > /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-
> unknown-linux-gnueabi/4.2.4/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0):
> >undefined reference to `__aeabi_unwind_cpp_pr0'
>
> > scons: *** [build/pistachio/bin/l4kernel] Error 1
> > scons: building terminated because of errors.
>
> I am using the cross-compiler specified in the OK Labs wiki. Also, I  
> came across another post in the developers forum where it was  
> mentioned : "The kernel needs to be compiled with the old non EABI  
> toolchain, while the rest of userland needs to be compiled with the  
> EABI toolchain. To do that you state :
>
>  TOOLCHAIN=gnu_arm_eabi_toolchain  
> pistachio.TOOLCHAIN=gnu_arm_toolchain. "
>
> I tried this also but I am still getting the same errors. Can I get  
> any help on fixing this?
>
> Regards,
>
> Amrit Acharya
>
>
> _______________________________________________
> Developer mailing list
> [hidden email]
> https://lists.okl4.org/mailman/listinfo/developer
>
>


_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer
Amrit_a

Re: Help regarding the OKL4 port to the Qemu Emulator

Reply Threaded More More options
Print post
Permalink
Hi Nicholas,

I downloaded the official OKL4 3.0 source from the wiki. I tried building for the versatile platform using :

 tools/build.py machine=versatile project=examples example=hello PYFREEZE=False TOOLCHAIN=gnu_arm_eabi_toolchain and i got the following error :

[CXX ] build/pistachio/l4kernel/object/src/init_script.o
cc1plus: warnings being treated as errors
pistachio/src/init_script.cc: In function 'void ki_assign_irq(space_t*, ki_assign_irq_t*)':
pistachio/src/init_script.cc:647: warning: type-punning to incomplete type might break strict-aliasing rules
scons: *** [build/pistachio/l4kernel/object/src/init_script.o] Error 1
scons: building terminated because of errors.

On trying with :
 tools/build.py machine=versatile project=examples example=hello PYFREEZE=False TOOLCHAIN=gnu_arm_eabi_toolchain pistachio.TOOLCHAIN=gnu_arm_toolchain , I get the following error:

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
[CXX ] build/pistachio/l4kernel/object/src/asid.o
cc1plus: error: invalid parameter `large-function-growth'
scons: *** [build/pistachio/l4kernel/object/src/asid.o] Error 1
scons: building terminated because of errors.

which is the same I was getting while using androidsim and the ported version of OKL4.

Amrit



On Tue, Jul 7, 2009 at 4:27 PM, Nicholas FitzRoy-Dale <[hidden email]> wrote:
Hi Amrit,

Thanks for confirming that your build problem occurs for Versatile too. To definitely confirm that the problem is toolchain-related, could you please download the official OKL4 3.0 source from the OKL wiki and verify that you get the same problem building for Versatile? (I am assuming that you tested the Versatile build from the htcdream fork).

Doing this will confirm that there is a toolchain problem (if you get the same error) or allow me to narrow down the bug (if you don't get the same error).

Nicholas


On 07/07/2009, at 8:49 PM, Amrit Acharya wrote:

Hi Nicholas,

I tried building it again for versatile but I am getting similar errors. If its a compiler issue, can you direct me to which versions I need to use? The toolchain I am using is the arm-unknown-linux-gnueabi downloaded from the OKlabs wiki.

I tried installing the toolchain again,

I am now getting the following error when i pass :

tools/build.py machine=androidsim project=examples example=hello TOOLCHAIN=gnu_arm_eabi_toolchain pistachio.TOOLCHAIN=gnu_arm_toolchain PYFREEZE=False

...
[CXX ] build/pistachio/l4kernel/object/src/asid.o
cc1plus: error: invalid parameter `large-function-growth'
scons: *** [build/pistachio/l4kernel/object/src/asid.o] Error 1
scons: building terminated because of errors.
...

However, if i just pass :

tools/build.py machine=androidsim project=examples example=hello PYFREEZE=False TOOLCHAIN=gnu_arm_eabi_toolchain,

I am still getting the same error which I got initially.

Amrit


On Fri, Jul 3, 2009 at 10:23 PM, Nicholas FitzRoy-Dale <[hidden email]> wrote:
Hi Amrit,

This is a problem with the version of the compiler you're using to build Pistachio. Can you compile for any other targets. For example, can you compile for gumstix or versatile? If you can build for either of those targets you should be able to build for androidsim.

Nicholas


On 03/07/2009, at 4:26 PM, Amrit Acharya wrote:

Hi,

I have been facing certain problems while trying to build for the Qemu Emulator.

I am passing :

tools/build.py machine=androidsim project=examples example=hello PYFREEZE=False

The error I am getting is this :

...
...
...
> [AR] build/pistachio/lib/libplatform.a
> [LIB] build/pistachio/lib/libplatform.a
> [AR] build/pistachio/lib/libatomic_ops.a
> [LIB] build/pistachio/lib/libplatform.a
> [LINK] build/pistachio/bin/l4lernel

> /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_dvmd_lnx.o):
> In function `__div0':

/scratch/philipo/crosstool-0.43/src/gcc-4.2.4/gcc/config/arm/lib1funcs.asm:1000:
undefined reference to `raise'

> /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_divdi3.o):(.ARM.exidx+0x0):
> undefined reference to `__aeabi_unwind_cpp_pr0'

> /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0):
>undefined reference to `__aeabi_unwind_cpp_pr0'

> scons: *** [build/pistachio/bin/l4kernel] Error 1
> scons: building terminated because of errors.

I am using the cross-compiler specified in the OK Labs wiki. Also, I came across another post in the developers forum where it was mentioned : "The kernel needs to be compiled with the old non EABI toolchain, while the rest of userland needs to be compiled with the EABI toolchain. To do that you state :

 TOOLCHAIN=gnu_arm_eabi_toolchain pistachio.TOOLCHAIN=gnu_arm_toolchain. "

I tried this also but I am still getting the same errors. Can I get any help on fixing this?

Regards,

Amrit Acharya


_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer





_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer
Amit Mahajan

Re: Help regarding the OKL4 port to the Qemu Emulator

Reply Threaded More More options
Print post
Permalink
Hi Amrit

I have not read the mails properly but i guess you are having problems while building OKL4.

SOme days back i tried building OKL4 and linux over OKL4 on my hardy ubuntu and ran it in qemu.

I have prepared a doc for the steps and requirements for the same, it may helpful. Please check the doc attached.

Thanks and Regards
Amit Mahajan


First they will ignore you, then they will laugh at you, then they will fight with  be helpful you, then you win.



On Wed, Jul 8, 2009 at 11:31 AM, Amrit Acharya <[hidden email]> wrote:
Hi Nicholas,

I downloaded the official OKL4 3.0 source from the wiki. I tried building for the versatile platform using :

 tools/build.py machine=versatile project=examples example=hello PYFREEZE=False TOOLCHAIN=gnu_arm_eabi_toolchain and i got the following error :

[CXX ] build/pistachio/l4kernel/object/src/init_script.o
cc1plus: warnings being treated as errors
pistachio/src/init_script.cc: In function 'void ki_assign_irq(space_t*, ki_assign_irq_t*)':
pistachio/src/init_script.cc:647: warning: type-punning to incomplete type might break strict-aliasing rules
scons: *** [build/pistachio/l4kernel/object/src/init_script.o] Error 1

scons: building terminated because of errors.

On trying with :
 tools/build.py machine=versatile project=examples example=hello PYFREEZE=False TOOLCHAIN=gnu_arm_eabi_toolchain pistachio.TOOLCHAIN=gnu_arm_toolchain , I get the following error:

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...

[CXX ] build/pistachio/l4kernel/object/src/asid.o
cc1plus: error: invalid parameter `large-function-growth'
scons: *** [build/pistachio/l4kernel/object/src/asid.o] Error 1
scons: building terminated because of errors.

which is the same I was getting while using androidsim and the ported version of OKL4.

Amrit




On Tue, Jul 7, 2009 at 4:27 PM, Nicholas FitzRoy-Dale <[hidden email]> wrote:
Hi Amrit,

Thanks for confirming that your build problem occurs for Versatile too. To definitely confirm that the problem is toolchain-related, could you please download the official OKL4 3.0 source from the OKL wiki and verify that you get the same problem building for Versatile? (I am assuming that you tested the Versatile build from the htcdream fork).

Doing this will confirm that there is a toolchain problem (if you get the same error) or allow me to narrow down the bug (if you don't get the same error).

Nicholas


On 07/07/2009, at 8:49 PM, Amrit Acharya wrote:

Hi Nicholas,

I tried building it again for versatile but I am getting similar errors. If its a compiler issue, can you direct me to which versions I need to use? The toolchain I am using is the arm-unknown-linux-gnueabi downloaded from the OKlabs wiki.

I tried installing the toolchain again,

I am now getting the following error when i pass :

tools/build.py machine=androidsim project=examples example=hello TOOLCHAIN=gnu_arm_eabi_toolchain pistachio.TOOLCHAIN=gnu_arm_toolchain PYFREEZE=False

...
[CXX ] build/pistachio/l4kernel/object/src/asid.o
cc1plus: error: invalid parameter `large-function-growth'
scons: *** [build/pistachio/l4kernel/object/src/asid.o] Error 1
scons: building terminated because of errors.
...

However, if i just pass :

tools/build.py machine=androidsim project=examples example=hello PYFREEZE=False TOOLCHAIN=gnu_arm_eabi_toolchain,

I am still getting the same error which I got initially.

Amrit


On Fri, Jul 3, 2009 at 10:23 PM, Nicholas FitzRoy-Dale <[hidden email]> wrote:
Hi Amrit,

This is a problem with the version of the compiler you're using to build Pistachio. Can you compile for any other targets. For example, can you compile for gumstix or versatile? If you can build for either of those targets you should be able to build for androidsim.

Nicholas


On 03/07/2009, at 4:26 PM, Amrit Acharya wrote:

Hi,

I have been facing certain problems while trying to build for the Qemu Emulator.

I am passing :

tools/build.py machine=androidsim project=examples example=hello PYFREEZE=False

The error I am getting is this :

...
...
...
> [AR] build/pistachio/lib/libplatform.a
> [LIB] build/pistachio/lib/libplatform.a
> [AR] build/pistachio/lib/libatomic_ops.a
> [LIB] build/pistachio/lib/libplatform.a
> [LINK] build/pistachio/bin/l4lernel

> /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_dvmd_lnx.o):
> In function `__div0':

/scratch/philipo/crosstool-0.43/src/gcc-4.2.4/gcc/config/arm/lib1funcs.asm:1000:
undefined reference to `raise'

> /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_divdi3.o):(.ARM.exidx+0x0):
> undefined reference to `__aeabi_unwind_cpp_pr0'

> /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0):
>undefined reference to `__aeabi_unwind_cpp_pr0'

> scons: *** [build/pistachio/bin/l4kernel] Error 1
> scons: building terminated because of errors.

I am using the cross-compiler specified in the OK Labs wiki. Also, I came across another post in the developers forum where it was mentioned : "The kernel needs to be compiled with the old non EABI toolchain, while the rest of userland needs to be compiled with the EABI toolchain. To do that you state :

 TOOLCHAIN=gnu_arm_eabi_toolchain pistachio.TOOLCHAIN=gnu_arm_toolchain. "

I tried this also but I am still getting the same errors. Can I get any help on fixing this?

Regards,

Amrit Acharya


_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer





_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer




_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer

building_okl4 (4K) Download Attachment
Amrit_a

Re: Help regarding the OKL4 port to the Qemu Emulator

Reply Threaded More More options
Print post
Permalink
In reply to this post by Amrit_a
Hello,

I downloaded a different version of the toolchain for the pistachio.Toolchain part after which things started working fine. Amit's suggestions were also very helpful.

Thanks a lot for the help everyone!

Regards,

Amrit

On Wed, Jul 8, 2009 at 4:28 PM, Gabi Voiculescu <[hidden email]> wrote:
Hello.

1. Just to make things perfectly clear for me, can I ask what is the source for the two toolchains you currently use:
- the one to build the kernel
- the one to build everything else (like this iguana example hello)

Are these built by you? Do you use the recommended binaries (presented below)?



2. Can you please try to build this example for gumstix ( not only for versatile) as well since I did gumstix builds in okl 3 using the tarball from the okl4 website recently, and I can confirm that there are no platform problems.
Please use the command:

 tools/build.py machine=gumstix project=examples example=hello PYFREEZE=False TOOLCHAIN=gnu_arm_eabi_toolchain pistachio.TOOLCHAIN=gnu_arm_toolchaini> BUILD_DIR=build2

BUILD_DIR overwrites the default build directory : build with whatever string you say after =, the goal for this is to ensure you do clean build for gumstix (no previous "build*" folder). I chose "build2", but you can change the string.




3. You should know the TOOLCHAIN= and pistachio.TOOOLCHAIN= arguments are mandatory for any succesfull okl4 3+ build, since the kernel was supposed to be compiled with a gcc-3.4.4 based toolchain, and everything else with a gcc-4.2.4 based toolchain.


Good luck,
Gabi Voiculescu

PS:  I, personally, have succesfully simulated for the gumstix platform using these two publicly available toolchain binaries:

- for the kernel: http://www.ertos.nicta.com.au/downloads/tools/arm-linux-3.4.4.tar.gz
- for everything as part of your particular example (wether it is this iguana example, drivers, oklinux): http://wiki.ok-labs.com/downloads/release-3.0/arm-linux-gnueabi-4.2.4.tar.gz

and the skyeye emulator (for gumstix skyeye is implicitly used to simulate by okl4 build scripts instead of qemu as the simulation environment since a while back ago): http://www.ertos.nicta.com.au/downloads/tools/skyeye-kenge-1.2.1n.tar.gz




--- On Wed, 7/8/09, Amrit Acharya <[hidden email]> wrote:

From: Amrit Acharya <[hidden email]>
Subject: Re: [okl4-developer] Help regarding the OKL4 port to the Qemu Emulator
To: "Nicholas FitzRoy-Dale" <[hidden email]>, [hidden email]
Date: Wednesday, July 8, 2009, 9:01 AM


Hi Nicholas,

I downloaded the official OKL4 3.0 source from the wiki. I tried building for the versatile platform using :

 tools/build.py machine=versatile project=examples example=hello PYFREEZE=False TOOLCHAIN=gnu_arm_eabi_toolchain and i got the following error :

[CXX ] build/pistachio/l4kernel/object/src/init_script.o
cc1plus: warnings being treated as errors
pistachio/src/init_script.cc: In function 'void ki_assign_irq(space_t*, ki_assign_irq_t*)':
pistachio/src/init_script.cc:647: warning: type-punning to incomplete type might break strict-aliasing rules
scons: *** [build/pistachio/l4kernel/object/src/init_script.o] Error 1
scons: building terminated because of errors.

On trying with :
 tools/build.py machine=versatile project=examples example=hello PYFREEZE=False TOOLCHAIN=gnu_arm_eabi_toolchain pistachio.TOOLCHAIN=gnu_arm_toolchain , I get the following error:

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
[CXX ] build/pistachio/l4kernel/object/src/asid.o
cc1plus: error: invalid parameter `large-function-growth'
scons: *** [build/pistachio/l4kernel/object/src/asid.o] Error 1
scons: building terminated because of errors.

which is the same I was getting while using androidsim and the ported version of OKL4.

Amrit



On Tue, Jul 7, 2009 at 4:27 PM, Nicholas FitzRoy-Dale <nfd@...> wrote:
Hi Amrit,

Thanks for confirming that your build problem occurs for Versatile too. To definitely confirm that the problem is toolchain-related, could you please download the official OKL4 3.0 source from the OKL wiki and verify that you get the same problem building for Versatile? (I am assuming that you tested the Versatile build from the htcdream fork).

Doing this will confirm that there is a toolchain problem (if you get the same error) or allow me to narrow down the bug (if you don't get the same error).

Nicholas


On 07/07/2009, at 8:49 PM, Amrit Acharya wrote:

Hi Nicholas,

I tried building it again for versatile but I am getting similar errors. If its a compiler issue, can you direct me to which versions I need to use? The toolchain I am using is the arm-unknown-linux-gnueabi downloaded from the OKlabs wiki.

I tried installing the toolchain again,

I am now getting the following error when i pass :

tools/build.py machine=androidsim project=examples example=hello TOOLCHAIN=gnu_arm_eabi_toolchain pistachio.TOOLCHAIN=gnu_arm_toolchain PYFREEZE=False

...
[CXX ] build/pistachio/l4kernel/object/src/asid.o
cc1plus: error: invalid parameter `large-function-growth'
scons: *** [build/pistachio/l4kernel/object/src/asid.o] Error 1
scons: building terminated because of errors.
...

However, if i just pass :

tools/build.py machine=androidsim project=examples example=hello PYFREEZE=False TOOLCHAIN=gnu_arm_eabi_toolchain,

I am still getting the same error which I got initially.

Amrit


On Fri, Jul 3, 2009 at 10:23 PM, Nicholas FitzRoy-Dale <nfd@...> wrote:
Hi Amrit,

This is a problem with the version of the compiler you're using to build Pistachio. Can you compile for any other targets. For example, can you compile for gumstix or versatile? If you can build for either of those targets you should be able to build for androidsim.

Nicholas


On 03/07/2009, at 4:26 PM, Amrit Acharya wrote:

Hi,

I have been facing certain problems while trying to build for the Qemu Emulator.

I am passing :

tools/build.py machine=androidsim project=examples example=hello PYFREEZE=False

The error I am getting is this :

...
...
...
> [AR] build/pistachio/lib/libplatform.a
> [LIB] build/pistachio/lib/libplatform.a
> [AR] build/pistachio/lib/libatomic_ops.a
> [LIB] build/pistachio/lib/libplatform.a
> [LINK] build/pistachio/bin/l4lernel

> /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_dvmd_lnx.o):
> In function `__div0':

/scratch/philipo/crosstool-0.43/src/gcc-4.2.4/gcc/config/arm/lib1funcs.asm:1000:
undefined reference to `raise'

> /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_divdi3.o):(.ARM.exidx+0x0):
> undefined reference to `__aeabi_unwind_cpp_pr0'

> /opt/crosstool/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0):
>undefined reference to `__aeabi_unwind_cpp_pr0'

> scons: *** [build/pistachio/bin/l4kernel] Error 1
> scons: building terminated because of errors.

I am using the cross-compiler specified in the OK Labs wiki. Also, I came across another post in the developers forum where it was mentioned : "The kernel needs to be compiled with the old non EABI toolchain, while the rest of userland needs to be compiled with the EABI toolchain. To do that you state :

 TOOLCHAIN=gnu_arm_eabi_toolchain pistachio.TOOLCHAIN=gnu_arm_toolchain. "

I tried this also but I am still getting the same errors. Can I get any help on fixing this?

Regards,

Amrit Acharya


_______________________________________________
Developer mailing list
Developer@...
https://lists.okl4.org/mailman/listinfo/developer





-----Inline Attachment Follows-----


_______________________________________________
Developer mailing list
Developer@...
https://lists.okl4.org/mailman/listinfo/developer



_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer