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/

Emulator Tip

One of the most used key-combinations that I use on qemu is Ctrl-Alt-1 and Ctrl-Alt-3 to switch between the UI and the stdout/stderr. Specially when changing firmware.