Having Fun with Embedded Gentoo on the TS72xx SBC

Hi everyone!

Having left Kiel last week and after a week of being back in Montréal doing some hard work, I've gotten my toolchains, overlays and binary package repositories for the TS72xx board to a very stable state.

I'm now using dropbear, openvpn, jamvm-1.5.1, classpath-0.97.1, and qmerge, thanks to the ease of building binary packages using Gentoo/Portage, xmerge, etc. Here are a couple of screenshots that can hopefully do justice to all of the work I've done with the 'compatibility' toolchain. The compatibility toolchain and binaries have been tested to be fully compatible with the kernel, libc, and so on distributed by Technologic Systems.

The toolchains, overlays, and repositories are for both arm-unknown-linux-gnu and armv4tl-maverick-linux-gnueabi. I've also updated the documentation on the Gentoo-Wiki:

Gentoo for the TS72xx (Old Toolchain)
Gentoo for the TS72xx Single Board Computer (Full Distro)

I had to fix the __NR_waitpid definition (removed it) in the linux kernel headers which solved a lot of glibc related issues I was having.

Next, I compiled busybox, etc, etc, got qmerge working on the board, and I've also compiled jamvm-1.5.1 and the classpath-0.97.1 . There was a slight problem with cross-compiling the GNU classpath shown below in the classpath bug.

One really strange problem that I had was with portage-utils. The md5sum code comes directly out of the busybox source code. The md5sum comman works perfectly on my board, but as is, the md5 calculations that qmerge made were always wrong. I didn't really want to spend too much time fixing the source code, so instead, I just created a patch for qmerge so that it calls 'md5sum' through popen. That fixed the problem, although the overhead is obviously very high. I should probably put in a patch since Ned Ludd, the original portage-utils author has been so helpful to me on the gentoo-embedded list. Thanks again Ned ;-)

I also noticed that busybox wouldn't reboot the system (using the older toolchain) so I had to make a patch which used the busybox-1.0.0 code for 'reboot'.

I'm hoping that some autotools / libtool genius decides to fix the classpath bug below, because I really don't want to spend any more time on it than I have to. The autotools should really _not_ abandon supporting cross-toolchains. There should really be a regular check made whenever AC_CHECK_LIB or AC_SEARCH_LIBS are made to see if the library location pulled from the .la file actually reflects the location of the .so or .a library in question.

As always, see my overlays for all patches to the original source code.

Some bugs filed:
Gentoo Bug #213690
Classpath Bug #35684


The Cat Empire

I'm really digging The Cat Empire these days - they're an Australian band and they play sort of mixture of reggae, jazz, rock. Awesome! Sarah Neumann hooked me up with them.


Back in Montréal ! Happy St. Patrick's Day!

Wow, what a wild month this last one has been!

I guess my last post was just 2 weeks before when I started studying day and night for my DSP and Signals exams. Before then I was working a bunch on my most recent project for work, which has resulted in 2 main articles so far. Those are Gentoo for the TS72xx Single Board Computer (Full Distro), and Gentoo for the TS72xx (Old Toolchain). The first of the two links contains information on how to put the ARM EABI kernel and userland on your TS72xx board, for a 25 time speedup in floating point processing. The second link contains information on how to create a 'compatibility' toolchain for building software that is compatible with the existing programs and libraries on the board as it is shipped.

After I finish one small project for my company, I would like to write up some information on replacing glibc with uClibc, for added space savings.

Anyway, I just finished writing my two exams! I passed them both, although not by any means with outstanding grades. I suppose that has to do with several things: having less time to study than my classmates, having an actual engineering job (not some job as a lab assistant), moving from Germany to Canada the same week that the exams were being written, and just organizing things. So, needless to say, it has been a bit stressful.

In any event, I'm very happy to be back in Montréal! Erin and I have a new apartment too, with an excellent location right across the street from Parc LaFontaine. It's beautiful! Also, I can't begin to express how nice it is to see the sun again on a daily basis - Kiel gets nothing but cloud and rain in the winter. The snow is also a very welcome sight. I know that most of you in the area are pretty sick of snow, but believe me, if you had nothing but rain all winter, you would beg to have the piles of snow back, and you would be happy about it too!

Erin & I just came from the radiology department at St. Mary's hospital here in Montréal, and we got the 2nd round of ultrasounds for Julien. It was quite funny actually, I asked them if I could put the images on my USB memory stick instead of a CD and they said that was fine if I could figure it out (they have some custom made software which is a bit confusing). So I did it and showed them how to do it and they gave us the images free of charge! I'll put them up on something like Picassa soon enough.

Happy St. Patty's Day by the way! Dr. Shine, our obstetrician, is also from Ireland and I think that today he was pretty happy when we said happy St. Patrick's day to him too!

I also just figured out a problem I was having with linux-2.4.26 and glibc-2.3.2 trying to get the aforementioned compatibility toolchain working. The problem was quite simple - __NR_waitpid, which is a syscall constant, was being defined in the ARM/linux headers, but the function is actually unimplemented for the ARM and is replaced by wait4.

The effects of this bug were, for instance

  • Bash saying "wait_for(): Function not implemented
  • waitpid and popen not working, returning errno 83 (ENOSYS/Function not implemented)

The problem was easy to fix by simply removing the definition in include/asm-arm/unistd.h for __NR_waitpid. (see Gentoo bug 213690). It's not defined in the 2.6 kernel headers either, and I think it was probably put there by accident.