Friday, July 2, 2010

Compiling ctb

1) First setup your environment:
source /usr/local/poky/eabi-glibc/arm/environment-setup

2) Pick your machine
export MACHINE_NAME=dr1000s
or
export MACHINE_NAME=dr800sw

3) Then prepare for configure:
autoreconf --install
intltoolize

4) For configure you need to use the following options:
./configure --host=arm-poky-linux-gnueabi --sysconfdir=/etc --prefix=/usr

5) Then build it:
make

6) and copy to target:
scp src/ctb root@qemu:~/

7) To reduce the size of the ctb binary use:
arm-poky-linux-gnueabi-strip src/ctb
which will reduce the binary from anout 300K to 90K. (copy again)
8) login to the emulator
ssh qemu

9) and copy it to the correct place (it is not possible to do this directly via scp)
(Note that this only copies the ctb-binary and assumes that all files it depends on are already on the emulator, which is true if you did not do any strange things)
cp /usr/bin/ctb ~/ctb.org <-- only do this once :-) cp ~/ctb /usr/bin/

10) Now restart the qemu
shutdown now
and then restart via Anjuta (or any other way)
11) By pressing Ctrl-Alt-3 you can see the system logging of qemu, use Ctrl-Alt-1 to go back.

And by now you have spend a lot of time and changed nothing :-)

Hello World 2

Since (I think it was) R1.6 an extra step is needed to build the hello-world example.
Before the first configure of any of the irex components (like hello-world) a call to intltoolize is needed.