Building Beagleboard apps under Windows...

72 views
Skip to first unread message

Dan Poirot

unread,
Sep 9, 2008, 8:46:45 AM9/9/08
to beagl...@googlegroups.com
Howdy all,

The OpenEmbedded framework, bitbake and the Angstrom distribution provide the embedded Linux developer with a very rich development environment and a full range of tested applications ready to roll up as needed into a file system..

Long gone are the days of rolling your own tool chain, rolling your own kernel and trying to build you own userland from tar files from all over the Internet.

This stuff is cool enough to look like magic!


...and still the whining users want more...

CodeSourcery builds GNU tool chains for both Linux and Windows based on their commercial products. They also build Linux libs and shared libs which have been tested with the compiler.

Is there a way to use OE/Angstrom to build a CodeSourcery based kernel and userland?

That way the REALLY hard headed developers could use the freely available Windows version of the compiler and shared libs to build apps.

I have had limited success with apps built with the 2007q3 CS release under Windows but seem to be running into collisions with the shared libraries. Swapping out the libs per the CS documentation results in panics as the shared libs are different versions.


Any ideas?

best regards,
- dan

Koen Kooi

unread,
Sep 9, 2008, 9:22:38 AM9/9/08
to Beagle Board
On 9 sep, 14:46, "Dan Poirot" <dtpoi...@gmail.com> wrote:
> Howdy all,
>
> The OpenEmbedded framework, bitbake and the Angstrom distribution provide
> the embedded Linux developer with a very rich development environment and a
> full range of tested applications ready to roll up as needed into a file
> system..
>
> Long gone are the days of rolling your own tool chain, rolling your own
> kernel and trying to build you own userland from tar files from all over the
> Internet.
>
> This stuff is cool enough to look like magic!
>
> ...and still the whining users want more...
>
> CodeSourcery builds GNU tool chains for both Linux and Windows based on
> their commercial products. They also build Linux libs and shared libs which
> have been tested with the compiler.
>
> Is there a way to use OE/Angstrom to build a CodeSourcery based kernel and
> userland?

The kernel is already built with 2007q3-53, but I can't get a
userspace that doesn't randomly segfault when using CSL compilers :(

But if you want to try:

conf/distro/angstrom-2008.1.conf
93 #ANGSTROM_GCC_VERSION_armv7a = "4.2.1+csl-arm-2007q3-53"
94 ANGSTROM_GCC_VERSION_armv7a = "4.3.1"

Switch the comment and do a complete rebuild.

Note that the CSL businessmodel hinges on given away almost-working-
but-not-quite stuff for free and charging $$$$ for the fixes.

regards,

Koen

Måns Rullgård

unread,
Sep 9, 2008, 9:46:10 AM9/9/08
to beagl...@googlegroups.com

Koen Kooi wrote:
>
> On 9 sep, 14:46, "Dan Poirot" <dtpoi...@gmail.com> wrote:
>> Howdy all,
>>
>> The OpenEmbedded framework, bitbake and the Angstrom distribution provide
>> the embedded Linux developer with a very rich development environment and a
>> full range of tested applications ready to roll up as needed into a file
>> system..
>>
>> Long gone are the days of rolling your own tool chain, rolling your own
>> kernel and trying to build you own userland from tar files from all over the
>> Internet.
>>
>> This stuff is cool enough to look like magic!
>>
>> ...and still the whining users want more...
>>
>> CodeSourcery builds GNU tool chains for both Linux and Windows based on
>> their commercial products. They also build Linux libs and shared libs which
>> have been tested with the compiler.
>>
>> Is there a way to use OE/Angstrom to build a CodeSourcery based kernel and
>> userland?
>
> The kernel is already built with 2007q3-53, but I can't get a
> userspace that doesn't randomly segfault when using CSL compilers :(

My entire system is built with csl 2007q3-53 and vanilla binutils, and
I've had no problems with random crashes.

> But if you want to try:
>
> conf/distro/angstrom-2008.1.conf
> 93 #ANGSTROM_GCC_VERSION_armv7a = "4.2.1+csl-arm-2007q3-53"
> 94 ANGSTROM_GCC_VERSION_armv7a = "4.3.1"
>
> Switch the comment and do a complete rebuild.
>
> Note that the CSL businessmodel hinges on given away almost-working-
> but-not-quite stuff for free and charging $$$$ for the fixes.

I was of the impression that the compilers are the same (the GPL would
require them to release source), the paid-for versions only being
different by including some nasty "IDE" (that I'd pay to *not* get) and
so-called support.

--
Måns Rullgård
ma...@mansr.com

Vladimir Pantelic

unread,
Sep 9, 2008, 9:59:48 AM9/9/08
to beagl...@googlegroups.com
Måns Rullgård wrote:

>> Note that the CSL businessmodel hinges on given away almost-working-
>> but-not-quite stuff for free and charging $$$$ for the fixes.
>
> I was of the impression that the compilers are the same (the GPL would
> require them to release source), the paid-for versions only being
> different by including some nasty "IDE" (that I'd pay to *not* get) and
> so-called support.

Still it requires somebody who actually *paid* to ask for the source and publish it, CSL is not obliged to put the
latest and greatest for download to everybody. I had the case were people were afraid to give me GPL code (from another
embedded tool provider) because of the "license" they signed not allowing it...


Daniel Poirot

unread,
Sep 9, 2008, 10:36:34 AM9/9/08
to beagl...@googlegroups.com
> The kernel is already built with 2007q3-53, but I can't get a
> userspace that doesn't randomly segfault when using CSL compilers :(
>
> But if you want to try:
>
> conf/distro/angstrom-2008.1.conf
> 93 #ANGSTROM_GCC_VERSION_armv7a = "4.2.1+csl-arm-2007q3-53"
> 94 ANGSTROM_GCC_VERSION_armv7a = "4.3.1"
>
> Switch the comment and do a complete rebuild.


Hum... I have seen some WAY scary CFLAGS compiler directives out there such
as:
-march=armv7-a -mtune=cortex-a8 -mfpu=vfp -mfloat-abi=softfp
-fexpensive-optimizations -ftree-vectorize -fomit-frame-pointer -O4
-ffast-math

...instead of maybe just:
-march=armv7-a

...and I understand to stay away from '-Os'. That problem has been around
with ARM for a LONG time.


Is it possible to set CFLAGS for userland? I have a two CPU machine with
nothing for it to do but build and test 'base-image' all day long...


Thanks for the help!
- dan


P.S. By the way, I am also using OE/Angstrom on the ZipIt Z2 wireless
instant messaging device. It is available at target.com and bestbuy.com for
$50! See: http://linux.zipitwireless.com/

Måns Rullgård

unread,
Sep 9, 2008, 10:47:58 AM9/9/08
to beagl...@googlegroups.com

Daniel Poirot wrote:
>
>> The kernel is already built with 2007q3-53, but I can't get a
>> userspace that doesn't randomly segfault when using CSL compilers :(
>>
>> But if you want to try:
>>
>> conf/distro/angstrom-2008.1.conf
>> 93 #ANGSTROM_GCC_VERSION_armv7a = "4.2.1+csl-arm-2007q3-53"
>> 94 ANGSTROM_GCC_VERSION_armv7a = "4.3.1"
>>
>> Switch the comment and do a complete rebuild.
>
>
> Hum... I have seen some WAY scary CFLAGS compiler directives out there such
> as:
> -march=armv7-a -mtune=cortex-a8 -mfpu=vfp -mfloat-abi=softfp
> -fexpensive-optimizations -ftree-vectorize -fomit-frame-pointer -O4
> -ffast-math
>
> ...instead of maybe just:
> -march=armv7-a

I use -mcpu=cortex-a8 -mfpu=neon -float-abi=softfp -fomit-frame-pointer -O3
for most things. When I know it's safe, I add -ffast-math.

-mcpu=cortex-a8 implies -march=armv7-a, so there is no need to specify it
explicitly. With gcc, -On with n > 3 is equivalent to -O3.
-fexpensive-optimizations should only be used after benchmarks have shown
an improvement. It is just as likely to slow things down.

--
Måns Rullgård
ma...@mansr.com

John Beetem

unread,
Sep 9, 2008, 12:11:56 PM9/9/08
to Beagle Board
I have been building Ångström X Windows apps using Windows 2000 and
Cygwin for a while now. It required fooling CodeSourcery in various
interesting ways.

First, to compile X Windows applications I needed to make the X11R6
include files available to CodeSourcery. It turned out the easiest
way to do that was simply to copy Cygwin's /usr/X11R6/include/X11
directory to CodeSourcery's .../arm-none-linux-gnueabi/include
directory. X11R6 is extremely stable (the politically-correct
euphemism for "obsolete") so I don't need to worry about my include
files becoming inconsistent. The compile command I use right now in
gnu make is:

cc = arm-none-linux-gnueabi-gcc -O -Wunused -march=armv7-a
%.o: %.c
$(cc) -o $@ -c $<

(I don't use floating point at this time so haven't added those
options.)

Linking is much more interesting. It's important to link to the
correct libraries. So what I did was to untar the Ångström demo root
file system on my PC, and then tell CodeSourcery to link to the
Ångström demo's libraries. All or most of these are dynamic shared
libraries (.so). Here are my gnu make commands:

# Beagle run-time directory containing libX11.so, etc.
RTdir = /cygdrive/c/John/Beagle/AngstromDemo/usr/lib

GXC_OBJS = <list of object code files .o generated by $(cc)>

# Beagle: need to specify RTdir both for -L and -rpath options.
gboot: $(GXC_OBJS)
$(cc) -o $@ $(GXC_OBJS) -L$(RTdir) \
-Xlinker -rpath -Xlinker $(RTdir) -lX11 -lm

The "-rpath" linker option tells the linker to look in $(RTdir)
for .so files. The "-Xlinker" option tells gcc to pass the next
string to the linker: "-Xlinker -rpath -Xlinker $(RTdir)" passes "-
rpath $(RTdir)".

After linking I end up with a reasonably small executable that
contains references to dynamic shared object libraries. When I copy
the executable and run under Ångström, Ångström very nicely finds the
same .so files I used to link my programs, loads the library modules,
and cheerfully runs my program.

[Note: I'm using CodeSourcery GNU/Linux for Windows 2007q3-51. Also,
there is some more information about this in the BeagleBoard FAQ list
http://elinux.org/BeagleBoardFAQ#Windows.2FCygwin_.232]

Robert Hibberdine

unread,
Sep 9, 2008, 3:44:33 PM9/9/08
to beagl...@googlegroups.com
Hi all.

Can anyone help me locate a binary u-boot_v2.bin ?

TIA

Bob

Robert Hibberdine

unread,
Sep 9, 2008, 5:07:22 PM9/9/08
to beagl...@googlegroups.com
A thousand apologies for unintentional hijacking your thread. I hope
this fixes it..
Bob
Reply all
Reply to author
Forward
0 new messages