Sunday, May 22, 2011

Building on Angstrom on a BeagleBoard

Update: Anonymous says all I needed to do was:  opkg install task-native-sdk, thanks!

These are some quick notes that I intend to update when I have (a) time, and/or (b) a working build.

Tha Angstrom distribution doesn't include a native toolchain (it's meant to be light-weight, so that's OK).  It does, however, mean you need to use the opkg package manager a lot.

First try:
"opkg install gcc"... This works.
"gcc x.c"... command not found - what?

"opkg install gcc-symlinks"... Ah!  gcc now exists!

Here's part of today's bash history:
   87  opkg install gcc
   88  opkg install gcc
   93  opkg install binutils binutils-symlinks cpp cpp-symlinks 
   95  opkg install libc-6
   96  opkg install libc6-dev
  107  opkg install libmagic
  109  opkg install libmagic-dev
  110  opkg install file
  111  opkg install file-dev
  115  opkg install ccache
  117  opkg install install
  118  opkg install libtool-symlink
  119  opkg install libtool-symlinks
  121  opkg install coreutils
  128  opkg install freetype2-dev
  129  opkg install freetype-dbg
  131  opkg install freetype-dbg
  147  opkg install libjpeg-dev
  148  opkg install libpng-dev
  152  opkg install pkg-config
  154  opkg install pkg-config
  174  opkg install eval
  195  opkg install bash
  215  opkg install stl
  218  opkg install c++
  221  opkg install g++ g++-symlinks
  223  opkg install libstdc++-dev


Some worked, some didn't.  But I think the combination of all of them has given me enough programs and libraries to build ROLF without RISC OS compatibility.

I also had to set up these symbolic links for libraries:

ln -s libfreetype.so.6 /usr/lib/libfreetype.so
ln -s /lib/libgcc_s.so.1 /lib/libgcc_s.so

As the applications were supposed to be linked, there was a problem with libtool; the generated static libraries contained only the text "! < a r c h >" (without the spaces), which turned out to be because the /bin/sh link was to /bin/busybox, not /bin/bash (which was already installed).  For search engines: there were several lines like: "eval: 1: libtool_args+=: not found".

ln -sf bash /bin/sh

I've noticed you can get a tarball of rolf code using the following URL (which means you don't have to install SVN to build it):

http://ro-lf.svn.sourceforge.net/viewvc/ro-lf/ROLF/rolf/?view=tar

The code needs modifying to get it to build, including removing the agp specific code and also the compatibility library, for the time being.  The signal handlers in the compatibiity code need modifying to cope with ARM registers, rather than x86.  Also, run_arm_code, and similar routines should be replacable with a simple jump to the code - a kernel patch by Jan Rinze will provide a signal on non-Linux system calls, allowing the compatibilty library to handle RISC OS system calls in-process.

I'm really hoping we can get this to work!

4 Comments:

Blogger Unknown said...

There is a single package you can use to install. I don't recall if it is task-native-sdk or task-sdk-native. A bit of Googling turned up an interesting wiki page.

4:55 am, May 24, 2011  
Anonymous Anonymous said...

Your statement about angstrom not including a toolchain if false.

Firstly, you can go to http://narcissus.angstrom-distribution.org/ and generate a rootfs that contains one.

Secondly, if angstrom didn't include a native toolchain, you wouldn't be able to install it using opkg from the angstrom feeds.

And finally, 'opkg install task-native-sdk'

10:42 am, May 24, 2011  
Blogger Simon said...

OK, you're right. It's the demo image here that doesn't include a native toolchain (which, as I said, is OK, it being a lightweight distribution). I was complaining that it wasn't easy to get one running with opkg.

The opkg package management worked fine, but surely it doesn't need a toolchain to work, unless all downloads are of source and compiled locally?

> And finally, 'opkg install task-native-sdk'

That's almost certainly what I was looking for, thanks.

4:34 pm, May 24, 2011  
Blogger Simon said...

Me, again.

Re-reading your message it's clear that your second point was that if something is included in the angstrom opkg feed, it's part of the angstrom distribution.

Fair enough; it comes down to how you define a distribution, and I can't say mine's any better than yours.

10:23 pm, May 24, 2011  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home