Accessing GCC on BeagleBoard

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

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

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

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

try:

opkg update
opkg install task-native-sdk

hope this will help

Jan

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

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

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.

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

i created the card with the files located at section at http://code.google.com/p/beagleboard/wiki/BeagleboardRevCValidation

what is narcissus?

i created the card with the files located at section at
Google Code Archive - Long-term storage for Google Code Project Hosting.

what is narcissus?

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

Philip

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?

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

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?

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