Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Confusion on using bitbake under Angstrom for userspace app
PostPosted: Fri Mar 23, 2012 6:16 pm 
Offline

Joined: Fri Oct 28, 2011 7:25 pm
Posts: 57
I am setting up a bitbake recipe for a userspace application that I am using on a SAM9G25. I am using the Angstrom toolchain. I have previously compiled my application using the CodeSourcery toolchain with Eclipse and successfully ran the application on my dev board. However, I'm having issues compiling the application through bitbake with the new toolchain.

There are some kernel headers which I include that it looks like make is not finding. I assume there is someplace that I need to specify these include directories, but I have been unable to find the proper location. How do I tell bitbake the extra gcc options?


Top
 Profile  
 
 Post subject: Re: Confusion on using bitbake under Angstrom for userspace
PostPosted: Mon Mar 26, 2012 4:47 pm 
Offline

Joined: Fri Oct 28, 2011 7:25 pm
Posts: 57
First, let me back up. I discovered that I was following the wrong set of directions for building Angstrom for my SAM9G25 dev board. I was using the generic "Build for AT91" instructions (http://www.at91.com/linux4sam/bin/view/ ... m_for_AT91) instead of the "Build for SAM9x5" directions (http://www.at91.com/linux4sam/bin/view/ ... gstrom_9x5). These have different kernel versions, and there were parts that I needed from the more recent kernel.

Anyway, I'm in the process of building Angstrom for the 9x5 and I'm having problems when it's trying to build linux-nios2. The error I'm getting is as follows:

NOTE: Preparing runqueue
NOTE: Executing RunQueue Tasks
NOTE: Running task 5 of 5 (ID: 4, /media/sda3/stuff/openembedded/recipes/linux/linux-nios2_2.6.34.bb, do_configure)
NOTE: package linux-nios2-2.6.34-r0: task do_configure: Started
ERROR: Logfile of failure stored in: /media/sda3/stuff/tmp/work/at91sam9x5ek-angstrom-linux-gnueabi/linux-nios2-2.6.34-r0/temp/log.do_configure.17517
Log data follows:
| + do_configure
| + '[' -e /media/sda3/stuff/tmp/work/at91sam9x5ek-angstrom-linux-gnueabi/linux-nios2-2.6.34-r0/linux-2.6/scripts/unifdef.c ']'
| + echo ''
| + '[' -e /media/sda3/stuff/tmp/work/at91sam9x5ek-angstrom-linux-gnueabi/linux-nios2-2.6.34-r0/./logo_linux_clut224.ppm ']'
| + '[' linux-gnueabi = linux-gnueabi -o linux-gnueabi = linux-uclibceabi ']'
| + echo CONFIG_AEABI=y
| + '[' 0 = 1 ']'
| + echo '# CONFIG_OABI_COMPAT is not set'
| + '[' arm = thumb ']'
| + '[' Angstrom = Angstrom -a yes = yes ']'
| + sed -i -e /CONFIG_ARM_ERRATA_430973/d /media/sda3/stuff/tmp/work/at91sam9x5ek-angstrom-linux-gnueabi/linux-nios2-2.6.34-r0/defconfig
| sed: can't read /media/sda3/stuff/tmp/work/at91sam9x5ek-angstrom-linux-gnueabi/linux-nios2-2.6.34-r0/defconfig: No such file or directory
NOTE: package linux-nios2-2.6.34-r0: task do_configure: Failed
ERROR: Function 'do_configure' failed (see /media/sda3/stuff/tmp/work/at91sam9x5ek-angstrom-linux-gnueabi/linux-nios2-2.6.34-r0/temp/log.do_configure.17517 for further information)
ERROR: Task 4 (/media/sda3/stuff/openembedded/recipes/linux/linux-nios2_2.6.34.bb, do_configure) failed with exit code '1'
ERROR: '/media/sda3/stuff/openembedded/recipes/linux/linux-nios2_2.6.34.bb' failed

The defconfig file definitely does not exist where its looking for it. However, I have no idea how to fix this issue. I haven't seen a reasonable defconfig for linux-nios2. Anyone else have similar issues?


Top
 Profile  
 
 Post subject: Re: Confusion on using bitbake under Angstrom for userspace
PostPosted: Wed Mar 28, 2012 9:57 pm 
Offline

Joined: Fri Oct 28, 2011 7:25 pm
Posts: 57
After a few painful days I can now build the base-image without issue. I had a typo in the BBFILES variable under oe_at91sam/conf/local.conf and bitbake wasn't including the AT91 overlay. Once I got that fixed the build worked without issue.

Although, I'm now back to my original problem of building my userspace application. There are some system header files that I need to reference and the makefile isn't finding them. It looks like my bb script needs to tell my makefile the path to the staged Linux kernel. I can think of several ways to do this, but I'd like some opinions on the *proper* way to do this. What's the proper way in my Bitbake recipe to pass the staged Linux kernel path to make?

Thanks,
Bryan


Top
 Profile  
 
 Post subject: Re: Confusion on using bitbake under Angstrom for userspace
PostPosted: Thu Apr 05, 2012 2:11 pm 
Offline

Joined: Fri Oct 28, 2011 7:25 pm
Posts: 57
I just wanted to post my current results. What I did is copy the updated SAM9x5 kernel system header files from the staged kernel (under stuff/tmp/sysroots/at91sam9x5ek-angstrom-linux-gnueabi) to the sysroot for the Angstrom build (under stuff/tmp/sysroots/armv5te-angstrom-linux-gnueabi). I have a feeling this is not the suggested method of dealing with this issue, although I cannot find any other suggested method for cross-compiling userspace applications that need to reference updated system headers. If anyone has any suggestions, I'd like to hear them.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: