Categories
embedded systems English articles Openmoko OpenWrt Tech

OpenWrt on the Openmoko Freerunner – some updates…

Long time no news regarding OpenWrt <-> the Openmoko Neo devices; but it
happened much!

It now reached a state where I think it’s justified to announce a ready-to-work(/debug?) OpenWrt-Image for the Openmoko Freerunner.

This should be a short overview of what happened

– kernel 2.6.30.1 is running
all neo-specific patches were extracted from the OM-kernel-tree and
created an atomic and maintainable patchset for the Neo (thanks to Lars !!)

– clean, stable and accelerated graphics system
thanks to the gorgeous work of the xf86-video-glamo developers (especially Lars (again)), finally
there’s no need for <Xglamo> anymore – acceleration is done from within
an usual <Xorg> with the glamo-driver used. The infamous WSOD (white screen of death) should be
ultimately purged out.

– GPS works
the amazing application <tangoGPS> is also available as an
OpenWrt-package now

– performance tuned
due to it’s architecture itself, fixed bugs and found ways for
optimizations through all layers, OpenWrt now boots in less than 1
minute into illume (very first boot excluded)

– software added/upgraded
besides lot’s of just OpenWrt-related improvements, also typical
OM-community-used packages were added and upgraded to recent versions
(e.g. tangogps, enlightenment/the whole efl-suite, paroli, fso, connman,
etc.)

– a beautiful bootsplash
real beauty can’t be described by words ๐Ÿ˜›

– phone calls are still possible
thanks to paroli, the basic phone stuff is (still) working (phone calls,
messages, contacts, etc.)

== Images / environment

Images can be found here: http://nanl.de/files/openwrt/openmoko/
Mind – that, as usual for OpenWrt – the default IP of your device will
be “192.168.1.1” and the only running service will be <telnet> on port
23.
After logging in and setting a password, <telnetd> is getting replaced
through <sshd> (port 22).
The mentioned files/images have the prefix “20090706_r16709_1”, based on
svn-revision 16709.

Suggestions / critism is welcome… ๐Ÿ™‚

The original announcement on the mailinglists can be found here (http://kerneltrap.org/mailarchive/openmoko-devel/2009/7/6/6147903)

Categories
embedded systems English articles OpenWrt Tech

asserts in python may not work as expected

While getting the phone suite “paroli” (http://paroli-project.org) working on OpenWrt, I got some thrown exceptions in the OpenWrt-environment which I didn’t get in the official OM-builds.
I tried to figure out what exactly is causing the exception on the OpenWrt-target and created a minimal program which raises it:

You don’t have to know what’s <tichy> and its <Item> class, nor what <issubclass> is doing exactly – just mind the return values.

root@OpenWrt:/# DISPLAY=:0 python
Python 2.6.1 (r261:67515, Junย  8 2009, 09:18:20)
[GCC 4.1.2] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> from tichy.item import Item
>>> issubclass(bool, Item)
False
>>> assert issubclass(bool, Item)
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
AssertionError

Ah, ok. On the OpenWrt-target the assert throws an exception, because <issubclass> returns <False>

So, logically, within the Openmoko-environment, the <issubclass>-statement must return <True> to not get assert raising an exception – but that’s not the case:

root@om-gta02:~# DISPLAY=:0 python
Python 2.6.2 (r262:71600, May 31 2009, 00:18:54)
[GCC 4.1.2] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> from tichy.item import Item
>>> issubclass(bool, Item)
False
>>> assert issubclass(bool, Item)
>>>

Huh – ok, let’s take a closer look here:

<issubclass (bool, Item)> is returning False, but <assert issubclass(bool, Item)> is not throwing an exception – that’s weird and caused me to do test the assert-statement in a very simple way:

root@om-gta02:~# DISPLAY=:0 python
Python 2.6.2 (r262:71600, May 31 2009, 00:18:54)
[GCC 4.1.2] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> assert False
>>>

That’s definitely not the expected result of assert.

So, why is that happening? Why python’s assert is just doing nothing?

Some research about that got me into this statement:

“[..]The current code generator emits no code for an assert statement when optimization is requested at compile time. Note that it is unnecessary to include the source code for the expression that failed in the error message; it will be displayed as part of the stack trace.[..]” – http://docs.python.org/reference/simple_stmts.html#grammar-token-assert_stmt

Let’s check that with a regular python-installation:

$ python
Python 2.5.4 (r254:67916, Feb 18 2009, 03:00:47)
[GCC 4.3.3] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> assert False
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
AssertionError
>>>
$ python -O # enable optimizations
Python 2.5.4 (r254:67916, Feb 18 2009, 03:00:47)
[GCC 4.3.3] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> assert False
>>>

Conclusion:
– some distributions are shipping their python-package configured for executing python-scripts with optimizations enabled
– asserts may not act as expected, means, they may don’t do anything when above is true
– i’m not using asserts anymore when my app is relying on asserts and I don’t know for sure which target/distribution my scripts are running on

Categories
embedded systems English articles fun OpenWrt Tech

some updates of what’s going on :)

Besides the ongoing work related to the Openmoko Freerunner <-> OpenWrt integration, I decided to focus on multimedia application ports for OpenWrt.

The Xbox Multimedia Center (xbmc -> http://www.xbmc.org), which I’m using (and lovin’) for several years on my Xbox now, was starting getting ported to Linux quite some time ago.
The port looks really promising, so I decided to start get it working within OpenWrt.

I already started porting some basic needed dependencies, including <(lib)boost> (http://www.boost.org), a apparently widely used c++ library set.
Because this project – ehrm – really resists all normal tries getting cross-compiled and staged (it does use an alternative to make called <bjam> which is better because of… – I really have no clue), I took a look how the OpenEmbedded-project got it done – and it helped! – technically as well as morally.

Besides giving me some hints how to workaround some of their (really weird) stuff, I “discovered” a comment in the middle of the file (http://cgit.openembedded.net/cgit.cgi?url=openembedded/tree/recipes/boost/boost.inc) which I like to quote:

[..]
80 # Oh yippee, a new build system, it’s sooo cooool I could eat my own
81 # foot. inlining=on lets the compiler choose, I think. At least this
82 # stuff is documented…
83 # NOTE: if you leave on then in a debug build the build sys
84 # objcopy will be invoked, and that won’t work. Building debug apparently
85 # requires hacking gcc-tools.jam
86 #
87 # Sometimes I wake up screaming. Famous figures are gathered in the nightmare,
88 # Steve Bourne, Larry Wall, the whole of the ANSI C committee. They’re just
89 # standing there, waiting, but the truely terrifying thing is what they carry
90 # in their hands. At first sight each seems to bear the same thing, but it is
91 # not so for the forms in their grasp are ever so slightly different one from
92 # the other. Each is twisted in some grotesque way from the other to make each
93 # an unspeakable perversion impossible to perceive without the onset of madness.
94 # True insanity awaits anyone who perceives all of these horrors together.
95 #
96 # Quotation marks, there might be an easier way to do this, but I can’t find
97 # it. The problem is that the user.hpp configuration file must receive a
98 # pre-processor macro defined as the appropriate string – complete with “‘s
99 # around it. (<> is a possibility here but the danger to that is that the
100 # failure case interprets the < and > as shell redirections, creating
101 # random files in the source tree.)
[..]

Reading this really made my day ๐Ÿ™‚

Anyway – boost is ported and working on OpenWrt now, but that’s only the head of the list of dependencies for getting xbmc compiled and running –
any help here – packaging requirements for xbmc for OpenWrt – is highly appreciated!

Categories
Brussels (Belgium) English articles fun My life

nerds ‘r cookin’…

Still at fosdem, still hearing really good talks and still meeting nice people.

So right now just a little insight (how we’re surviving) ๐Ÿ˜‰ :

Categories
Brussels (Belgium) embedded systems English articles German articles misc Tech Trips Uncategorized

FOSDEM

Me and most of the other OpenWrt-guys are going to FOSDEM – the Free And Open Software Developement Meeting in Brussels.

See you there! ๐Ÿ™‚

Categories
embedded systems English articles Openmoko OpenWrt Tech

OpenWrt is supporting the Openmoko GTA02 “Freerunner”!

It’s done – the Openmoko GTA02 “Freerunner” is running OpenWrt!

There’s lot’s of stuff to do but let’s see what I spent most of my time the last few months for:

– kernel (2.6.28) is building and booting (merging the Openmoko and OpenWrt patchsets, whereof one (and that’s not ours ;)) consists of either over 620 little non-atomic patches or one 10MB patchblob [kudos to git!], is no picnic (thanks to the work of Michael “mb” Buesch at this point!)
– D-Bus and the freesmartphone.org reference implementation (they import the libc.so.6 via ctypes – I was really puzzled when python told me it can’t find my libc, because I was using the uclibc)
– Xglamo with acceleration (in the beginning Xglamo just crashed, even JTAG wasn’t available anymore; it took us weeks to figure out that a compiler bug was the cause (thanks to Felix Fietkau, Holger Freyther and Lars Clausen) – Lars btw. is currently making good progress to get glamo acceleration working within Xorg)
– the EFL (enlightenment foundation libraries) and enlightenment including illume (needs some more love to make it really fit into the OpenWrt-environment – currently <edje_cc> and <eet> are required as pre-installed host tools)
– paroli phone application suite (in case it’s working ;))

A few days ago we established the first OpenWrt<->OpenWrt phone call which worked out of the box after flashing our devices!

Hurray! ๐Ÿ™‚

Categories
English articles Taipei (Taiwan) Trips

Prepare to flight! :)

I was invited by a good friend who decided to move to Taiwan and live in Taipei to visit him – and – I aggreed ๐Ÿ™‚

On 21th of August the flight will start and I’m really, really curious about whether I can do comparison between Dalian / China and Taipei / Taiwan.

Let’s see ๐Ÿ™‚

Categories
English articles misc

changesโ€ฆ

Hey,

now I set up wordpress again and invested a lot of time for merging all posts from previous blogs / cm-systems.

I also recategorized them, added a new lightweight design and decided to start writing some of the future posts (like this) in English, ’cause this blog is mainly tech-oriented and – at least – these posts should also be readable by non-german-speaking visitors.

But this decision is associated with a huge disadvantage: you have to read my fucking bad English ๐Ÿ˜‰