Blog

Pong

08.10.2010 at 18:51

Ok long time no post, the past few months were rather busy. In retrospect it turns out that it wouldn't have been necessary to spend that much time studying. Anyway I passed my exams quite comfortably.

Now I'm back working at a M$ centered company till November. By then I will have to go to military service for basic training. Superfluous to say that I'm rather sceptical and think it's a pointless and wasteful exercise. Anyway because of this obligatory gap year, I will 'lose' yet another year before I can start my computer science studies at ETHZ.

Random project status updates

I finally had some time to hack on my projects, released a new version of ciopfs which fixes some bugs. I was positively surprised (or scared?) that apparently perforce links to ciopfs in one of their knowledge base articles.

Furthermore I gave my Freerunner some long deserved attention and released a new version of qi-bootmenu. Sent some trivial patches upstream to the enlightenment folks and lost some more hairs while dealing with the mystery that is called configure scripts.

There is also a new dvtm release, which brings some usability improvements.

Random rumblings

Stumbled over this hilarious diagram which shows who is suing whom in the telecom business. This just perfectly illustrates how stupid the whole patent system has become, I can only hope that this is the beginning of a self-destruction process. Unfortunately what will likely happen is that the big players settle with patent cross licensing deals instead.

Some more links which I found interesting/useful and relate to my last programming activities (albeit work related ones)

And yes VBA is a pain and it still hurts.

So long,
Marc

» read more » comments

Boot Time Optimizations - Tslib static modules

05.01.2010 at 10:24

I am trying to speed up the boot process of my little initramfs.

It currently takes about 8.5 seconds from power to the graphical menu. I tested the different kernel compression methods with a patch from Albin Tonnerre which should hopefully end up in 2.6.33. My mesurements show that an LZO compressed kernel saves about 0.5-0.6 seconds.

In kernel land I need to read up on a few things like async/deferred initcalls.

On the userspace front I tried to link my boot application statically which should have 2 advantages.

One thing I need to try out is to link everything statically expect libc which is required by other stuff (kexec, dropbear, busybox). I *think* this should work with a few linker flags but I am not yet sure how it behaves in practice.

-Wl,-Bstatic -leina -lts ... -Wl,-Bdynamic -lc

Fortunately the modular design of the EFL which dlopen(3) modules at runtime also has an option to build said modules statically which means the code will be embedded into the main shared object. This can be enabled at compile time with

./configure --enable-$FOO=static

Unfortunately the same is not possible with stock tslib plugins which is why I wrote a patch to support it.

On a somewhat unrelated note the only thing I hate more than mailing list which are configured for member only posts are mailing lists with slow moderation for non member posts. Grumble.

Marc

» read more » comments

Qi Bootmenu Progress

28.11.2009 at 18:02

I now have a working initramfs generated by these build scripts that launches a bootmenu application which scans the available partitions and presents a list of bootable systems which can be loaded via kexec.

In the process I added uImage support to kexec which means it should work with the current distros out there like SHR which provide uImages for their kernels.

The kernel I am using is based on Lars om-gta02-2.6.31 branch with a few patches to show an openmoko boot logo and my printk verbosity patchset.

The next thing I'm going to do is patching Qi to load an alternative kernel upon AUX press instead of just skipping one.

Then I need to optimize the whole thing for speed. It currently takes between 12-14 seconds (depending on whether I also scan the flash partition, mounting a jffs2 filesystem is slow because of the initial inode scanning I should probably test with ubifs). This is with the debug board attached, I don't know if that makes a difference. The whole uncompressed initramfs content is about 3.4 Mb (this is with network support + dropbear). I should try to remove more unneeded stuff and maybe link a few things statically. And the kernel can probably also be optimized for speed. Using devtmpfs from 2.6.32 for example would make busybox's mdev obsolete (I don't want to use a static /dev).

Anyway the basic functionality is there and I should probably provide a pre built kernel which contains the initramfs for users to test. And gta01 support is also a TODO item of course. My progress can be followed on the distro-devel list.

Marc

» read more » comments

Status update - debug board - #1024-fix

29.10.2009 at 12:36

Ok short status update for the qi-bootmenu thiny which I am playing around with (although I haven't had much time recently). I reduced the image size by disabling/removing the following components:

The resulting image (without the kernel) compiled with -Os is about 4.5MB large. This could be reduced by some 500K if evas could be compiled with -Os but this caused my elementary test application to segfault. In fact any optimization resulted in a segfault only -O0 worked. I will have to update to latest enlightenment svn and see if the problem is still reproducible.

Because it turned out to be rather difficult to debug a network setup problem without a working network I decided to buy a debug board. A serial console is a handy thing. Fortunately Telepixel GmbH which is located in Bern had the debug board on stock which meant I could pick it up from there.

On the hardware front, someone organized a professional #1024-fix for Switzerland which I am interested in because it doubles battery life.

So my next steps will be to make the usb network work in my image for that I will need to integrate the kernel build (until now I have mainly just tested in a chroot environment). I also started with the bootmenu application but as I lack EFL knowledge I will have to spend some time changing that. And I should push my scripts + code to some public git repository.

On a completely unrelated note I got a few mails about dvtm recently. Someone suggested a keyboard multiplexing mode which could be used to control multiple applications at once for example ssh servers something like ssh-cluster but interactive. By now I have implemented it and should probably prepare a point release containing this new functionality.

Marc

» read more » comments

Cross Arch Remote Debugging with gdb and gdbserver

11.10.2009 at 23:31

To further debug a problem in my little initramfs system I recently added gdbserver to the build scripts. And since I have never done that before I might as well document how this works.

gdbserver which runs on the target basically just provides the 'debugging backend' and makes it available to a normal host gdb. This has the advantage that gdbserver is relatively easy to build for your embedded system of choice, it doesn't provide a user interface and therefore doesn't require readline/curses libraries.

So we cross compile gdbserver whose source can be found in the gdb tarball under gdb/gdbserver like this (replace $ARCH with your target architecture in my case it was armv4tl-unknown-linux-gnueabi):

cd gdb/gdbserver

./configure --build=`./config.guess` 
        --target=$ARCH 
        --host=$ARCH 
        --prefix=/usr 
        --program-prefix="" &&
make &&
make DESTDIR=$SOMEDIR install

Then you will need a host gdb which understands the instructions of your target architecture. Your distribution probably only enabled support for your native architecture which means you will have to build your host gdb from source. Note that this time we only set --target and build from the toplevel directory.

./configure --host=`./config.guess` 
        --build=`./config.guess` 
        --target=$ARCH &&
make &&
make DESTDIR=$SOMEDIR install

Now we can start our debugging session. On the target execute gdbserver and specify a port and your executable.

gdbserver :$SOME_PORT /path/to/file/you/want/to/debug

Back on the host connect to the listening gdbserver instance with your host gdb:

$ARCH-gdb
file /path/to/file/you/want/to/debug
target remote $IP_OF_TARGET:$SOME_PORT
set solib-absolute-prefix $ROOT_DIR
continue

The solib-absolute-prefix should point to the root directory of the target on your host. Confused? Well you probably have cross compiled all your stuff for the target and installed it into a directory on your host and this is what I mean with "the root directory of the target on your host". gdb will use the solib-absolute-prefix whenever it needs to load a shared library. What this means is that if the app you are debugging depends on a library gdb will load the library symbols from $ROOT_DIR/lib/libfoo.so instead of /lib/libfoo.so from the host system where it either has the wrong architecture or doesn't exists at all.

Hope this is useful for someone out there. At the very least I now know where to look should I have to do it again in the future when I have already forgotten how it actually works.

Marc

» read more » comments

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 >>