Accessing GCC on BeagleBoard

684 views
Skip to first unread message

Roy Vanegas

unread,
Sep 22, 2009, 12:46:41 PM9/22/09
to Beagle Board, sc...@kildall.com
Hello,

I have a Revision C3 BeagleBoard. When I boot to the Angstrom Linux
image, I notice that, when I boot to the Linux OS, GCC is already
included (see below). However, I don't have access to the GCC
command, and I also don't see it in /bin, or anywhere else, for that
matter. How do I access GCC on the BeagleBoard?

Thanks in advance.

Roy

--------------------------------------------------------------------------------------------------------------------------------------------------

one, booting the kernel.
Linux version 2.6.28-omap1 (root@tiioss) (gcc version 4.2.1
(CodeSourcery Sourcery G++ Lite 2
007q3-51)) #2 Thu Feb 19 12:45:34 IST 2009
CPU: ARMv7 Processor [411fc083] revision 3 (ARMv7), cr=10c5387f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: OMAP3 Beagle Board

--------------------------------------------------------------------------------------------------------------------------------------------------

John Beetem

unread,
Sep 22, 2009, 2:42:12 PM9/22/09
to Beagle Board
Roy,

I think the GCC compiler referred to in the boot information:

> Linux version 2.6.28-omap1 (root@tiioss) (gcc version 4.2.1
> (CodeSourcery Sourcery G++ Lite 2
> 007q3-51)) #2 Thu Feb 19 12:45:34 IST 2009

is the GCC cross compiler used to create your Linux kernel. I think
it ran on somebody's Intel Architecture PC, probably under Linux
rather than Windows.

I have heard that a native GCC for the BeagleBoard is included in
recent versions of Ångström. Here's a recent thread on the topic:

http://groups.google.com/group/beagleboard/browse_thread/thread/b5e35ae43628170a#

Hope this helps,
John

Roy Vanegas

unread,
Sep 22, 2009, 5:56:40 PM9/22/09
to Beagle Board
thanks john.

i tried using opkg as root while connected to the internet, using the
following command

opkg install gcc

but that didn't work. the response from the beagleboard was:

An error ocurred, return value: -1090630732

when i do

opkg list

to list all the available installable commands for the beagleboard,
gcc doesn't show up. am i doing something wrong?

thanks,
roy
> http://groups.google.com/group/beagleboard/browse_thread/thread/b5e35...
>
> Hope this helps,
> John

Philip Balister

unread,
Sep 22, 2009, 6:20:40 PM9/22/09
to beagl...@googlegroups.com
On Tue, Sep 22, 2009 at 5:56 PM, Roy Vanegas <roy.v...@gmail.com> wrote:
>
> thanks john.
>
> i tried using opkg as root while connected to the internet, using the
> following command
>
>      opkg install gcc
>
> but that didn't work.  the response from the beagleboard was:
>
>      An error ocurred, return value: -1090630732

Try "opkg update" first.

Philip

janek

unread,
Sep 22, 2009, 8:01:02 PM9/22/09
to Beagle Board
try:

opkg update
opkg install task-native-sdk

hope this will help

Jan
> > John- Hide quoted text -
>
> - Show quoted text -

Roy Vanegas

unread,
Sep 28, 2009, 2:36:36 PM9/28/09
to Beagle Board
so, it turns out that i've been doing something quite stupid. i
thought connecting the beagleboard to a computer that is connected to
the internet meant that the beagleboard was also connected to the
internet. the fact that the command "opkg list" generates a list of
available packages didn't help my confusion, since i thought the lists
was being generated by an internet connection.

so, i downloaded gcc_4.3.3-r1.1_armv7a.ipk from
http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv7a/base/gcc_4.3.3-r1.1_armv7a.ipk,
and when i run the file on the beagleboard, with command "opkg install
gcc_4.3.3-r1.1_armv7a.ipk", i get a dependency issue:

Installing gcc (4.3.3-r1.1) to root...
Collected errors:
* ERROR: Cannot satisfy the following dependencies for gcc:
* libgcc1 (>= 4.3.3) * libc6 (>= 2.6.1) *

does anyone know where these dependencies reside on the internet? i
want to download the files onto my local computer (because my
beagleboard doesn't have internet connection), then copy them onto an
SD card that i'd use in the beagleboard.

thanks,
roy


On Sep 22, 8:01 pm, janek <jan.szyman...@eng.uts.edu.au> wrote:
> try:
>
> opkg update
> opkg install task-native-sdk
>
> hope this will help
>
> Jan
>
> On Sep 23, 7:56 am, Roy Vanegas <roy.vane...@gmail.com> wrote:
>
> > thanks john.
>
> > i tried using opkg as root while connected to the internet, using the
> > following command
>
> >       opkg installgcc
>
> > but that didn't work.  the response from the beagleboard was:
>
> >       An error ocurred, return value: -1090630732
>
> > when i do
>
> >       opkg list
>
> > to list all the available installable commands for the beagleboard,
> >gccdoesn't show up.  am i doing something wrong?
>
> > thanks,
> > roy
>
> > On Sep 22, 2:42 pm, John Beetem <johnbee...@yahoo.com> wrote:
>
> > > Roy,
>
> > > I think theGCCcompiler referred to in the boot information:
>
> > > > Linux version 2.6.28-omap1 (root@tiioss) (gccversion 4.2.1
> > > > (CodeSourcery Sourcery G++ Lite 2
> > > > 007q3-51)) #2 Thu Feb 19 12:45:34 IST 2009
>
> > > is theGCCcross compiler used to create your Linux kernel.  I think
> > > it ran on somebody's Intel Architecture PC, probably under Linux
> > > rather than Windows.
>
> > > I have heard that a nativeGCCfor the BeagleBoard is included in

Philip Balister

unread,
Sep 28, 2009, 3:11:46 PM9/28/09
to beagl...@googlegroups.com
On Mon, Sep 28, 2009 at 2:36 PM, Roy Vanegas <roy.v...@gmail.com> wrote:
>
> so, it turns out that i've been doing something quite stupid.  i
> thought connecting the beagleboard to a computer that is connected to
> the internet meant that the beagleboard was also connected to the
> internet.  the fact that the command "opkg list" generates a list of
> available packages didn't help my confusion, since i thought the lists
> was being generated by an internet connection.
>
> so, i downloaded gcc_4.3.3-r1.1_armv7a.ipk from
> http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv7a/base/gcc_4.3.3-r1.1_armv7a.ipk,
> and when i run the file on the beagleboard, with command "opkg install
> gcc_4.3.3-r1.1_armv7a.ipk", i get a dependency issue:
>
> Installing gcc (4.3.3-r1.1) to root...
> Collected errors:
>  * ERROR: Cannot satisfy the following dependencies for gcc:
>         *  libgcc1 (>= 4.3.3) *  libc6 (>= 2.6.1) *
>
> does anyone know where these dependencies reside on the internet?  i
> want to download the files onto my local computer (because my
> beagleboard doesn't have internet connection), then copy them onto an
> SD card that i'd use in the beagleboard.

Try opkg install task-native-sdk, the dependency you are missing may
be glibc-devel?

Philip

Roy Vanegas

unread,
Sep 28, 2009, 3:31:13 PM9/28/09
to beagl...@googlegroups.com
hi phillip,

thanks for your response.  opkg install task-native-sdk only works if my beagleboard is connected to the internet.  since i can't connect the beagleboard to the net, i need to download the dependencies onto an SD card.

Philip Balister

unread,
Sep 28, 2009, 3:36:33 PM9/28/09
to beagl...@googlegroups.com
On Mon, Sep 28, 2009 at 3:31 PM, Roy Vanegas <roy.v...@gmail.com> wrote:
> hi phillip,
>
> thanks for your response.  opkg install task-native-sdk only works if my
> beagleboard is connected to the internet.  since i can't connect the
> beagleboard to the net, i need to download the dependencies onto an SD card.

How did you create the card? Narciccus will let you add task-native-sdk

Philip

Roy Vanegas

unread,
Sep 28, 2009, 3:59:30 PM9/28/09
to beagl...@googlegroups.com
i created the card with the files located at section at http://code.google.com/p/beagleboard/wiki/BeagleboardRevCValidation

what is narcissus?

Philip Balister

unread,
Sep 28, 2009, 4:09:21 PM9/28/09
to beagl...@googlegroups.com
On Mon, Sep 28, 2009 at 3:59 PM, Roy Vanegas <roy.v...@gmail.com> wrote:
> i created the card with the files located at section at
> http://code.google.com/p/beagleboard/wiki/BeagleboardRevCValidation
>
> what is narcissus?

http://www.angstrom-distribution.org/narcissus/

Roy Vanegas

unread,
Oct 12, 2009, 1:32:44 PM10/12/09
to Beagle Board
I downloaded the file

arm-2007q3-macosx-20080828.tar.bz2

from the MacOS X/ x86 section found at http://elinux.org/BeagleBoardFAQ,
and then installed it on the SD card that I use with my BeagleBoard.
This new file creates a folder called "arm." The path is

/media/mmcblk0p1/arm

gcc is installed in a sub directory:

/media/mmcblk0p1/arm/arm-none-linux-gnueabi/bin/gcc

When I try to run gcc, by simply typing "gcc," I get

gcc: line 1: syntax error: newline unexpected

I also try to run gcc with "./gcc" -- same error message.

What am I doing wrong?



On Sep 28, 4:09 pm, Philip Balister <philip.balis...@gmail.com> wrote:
> On Mon, Sep 28, 2009 at 3:59 PM, Roy Vanegas <roy.vane...@gmail.com> wrote:
> > i created the card with the files located at section at
> >http://code.google.com/p/beagleboard/wiki/BeagleboardRevCValidation
>
> > what is narcissus?
>
> http://www.angstrom-distribution.org/narcissus/
>
> Philip
>
>
>
> > On Mon, Sep 28, 2009 at 3:36 PM, Philip Balister <philip.balis...@gmail.com>
> > wrote:
>
> >> On Mon, Sep 28, 2009 at 3:31 PM, Roy Vanegas <roy.vane...@gmail.com>
> >> wrote:
> >> > hi phillip,
>
> >> > thanks for your response.  opkg install task-native-sdk only works if my
> >> > beagleboard is connected to the internet.  since i can't connect the
> >> > beagleboard to the net, i need to download the dependencies onto an SD
> >> > card.
>
> >> How did you create the card? Narciccus will let you add task-native-sdk
>
> >> Philip
>
> >> > On Mon, Sep 28, 2009 at 3:11 PM, Philip Balister
> >> > <philip.balis...@gmail.com>
> >> > wrote:
>
> >> >> On Mon, Sep 28, 2009 at 2:36 PM, Roy Vanegas <roy.vane...@gmail.com>
> >> >> wrote:
>
> >> >> > so, it turns out that i've been doing something quite stupid.  i
> >> >> > thought connecting the beagleboard to a computer that is connected to
> >> >> > the internet meant that the beagleboard was also connected to the
> >> >> > internet.  the fact that the command "opkg list" generates a list of
> >> >> > available packages didn't help my confusion, since i thought the
> >> >> > lists
> >> >> > was being generated by an internet connection.
>
> >> >> > so, i downloaded gcc_4.3.3-r1.1_armv7a.ipk from
>
> >> >> >http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv7a/base...,
> >> >> > and when i run the file on the beagleboard, with command "opkg
> >> >> > install
> >> >> > gcc_4.3.3-r1.1_armv7a.ipk", i get a dependency issue:
>
> >> >> > Installinggcc(4.3.3-r1.1) to root...

Koen Kooi

unread,
Oct 12, 2009, 2:47:56 PM10/12/09
to beagl...@googlegroups.com
On Mon, Oct 12, 2009 at 7:32 PM, Roy Vanegas <roy.v...@gmail.com> wrote:

I downloaded the file

  arm-2007q3-macosx-20080828.tar.bz2

I feel compelled to repeat that using codesourcery when targetting angstrom is a *bad* idea. Your development toolchain should match the one the system was built with, as well as all the C and LD FLAGS. Unless you know what you're doing (hi mru!), you shouldn't be mixing toolchains.

regards,

Koen

Roy Vanegas

unread,
Oct 12, 2009, 3:04:06 PM10/12/09
to beagl...@googlegroups.com
I thought I was approaching a solution, since the link to arm-2007q3-macosx-20080828.tar.bz2 at http://elinux.org/BeagleBoardFAQ addresses the question, Can I use MacOS X as a development platform?  This last response has me totally confused.  I simply want to write C programs to run on the BeagleBoard.  I've never cross-compiled any C programs between different environments, and have always developed C executables in either Linux or Mac to run on their respective systems.  If the cross-compiling environment from the link mentioned above is a bad idea, what is the best method for developing a BeagleBoard executable in C?

Jesse

unread,
Oct 14, 2009, 1:41:44 PM10/14/09
to Beagle Board

you may want to look into cross compiling on a MAC
http://wiki.openembedded.net/index.php/OEandYourDistro#Using_OpenEmbedded_on_Mac_OS_X

-Jesse

On Oct 12, 12:04 pm, Roy Vanegas <roy.vane...@gmail.com> wrote:
> I thought I was approaching a solution, since the link
> to arm-2007q3-macosx-20080828.tar.bz2 athttp://elinux.org/BeagleBoardFAQaddressesthe question, Can I use
> MacOS X as a development platform?  This
> last response has me totally confused.  I simply want to write C programs to
> run on the BeagleBoard.  I've never cross-compiled any C programs between
> different environments, and have always developed C executables in either
> Linux or Mac to run on their respective systems.  If the cross-compiling
> environment from the link mentioned above is a bad idea, what is the best
> method for developing a BeagleBoard executable in C?
>
> On Mon, Oct 12, 2009 at 2:47 PM, Koen Kooi <k...@beagleboard.org> wrote:
Reply all
Reply to author
Forward
0 new messages