Showing posts with label ctb. Show all posts
Showing posts with label ctb. Show all posts

Wednesday, September 29, 2010

Changing Firmware

I earlier posted how to create your environment to change ctb. In the mean time I learned a lot more and use different ways to build firmware components.
To prepare a component I execute the following commands:
export MACHINE_NAME=dr1000s
autoreconf --install
intltoolize
./configure --host=arm-poky-linux-gnueabi --sysconfdir=/etc --prefix=/usr
Make/copy cycles look as follows:
make install-strip DESTDIR=~/Development/4.0/Install/
scp ../../Install/usr/bin/sysd root@qemu:/media/mmcblk0p1/Programs/_mackxpatch/bin/
scp ../../Install/usr/bin/popupmenu root@qemu:/media/mmcblk0p1/Programs/_mackxpatch/bin/
scp ../../Install/usr/bin/ctb root@qemu:/media/mmcblk0p1/Programs/_mackxpatch/bin/
I included copy-examples for sysd, popupmenu and ctb.
I copy them first to some location in the qemu and from there to the final location /usr/bin, since direct copying is not possible, so execute the following:
ssh qemu
to log-in to the emulator and then:
cp /media/mmcblk0p1/Programs/_mackxpatch/bin/popupmenu /usr/bin/
cp /media/mmcblk0p1/Programs/_mackxpatch/bin/sysd /usr/bin/
cp /media/mmcblk0p1/Programs/_mackxpatch/bin/ctb /usr/bin/
to copy the binaries to the final position.
Other changed data generated during the build can be copied directly:
scp ../../Install/usr/share/ctb/settings/global.db root@qemu:/usr/share/ctb/settings/
scp ../../Install/usr/share/ctb/settings/lastapps.desktop root@qemu:/usr/share/ctb/settings/

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 :-)