Harald Welte's blog
   

RSS

Categories

Archives

Harald's Web
gnumonks.org
hmw-consulting.com
dunkelromantik.org

Projects
netfilter/iptables
ulogd
asis
gspc
opentom.org
librfid
openmrtd
gpl-devices.org
gpl-violations.org
OpenPCD
OpenBeacon
OpenMoKo

Other Bloggers
Rusty Russell
David Miller
Martin Pool
Lawrence Lessig
Sirtaj Singh Kang
Jeremy Kerr
Atul Chitnis
Frank Rosengart (German)
Tim Pritlove
fukami
Michael Lauer
Stefan Schmidt
Kalyan Varma

Aggregators
kernelplanet.org
planet.netfilter.org
planet.openezx.org
planet.openmoko.org
planet.foss.in

Creative Commons License
Articles on this blog/journal are licensed under a Creative Commons Attribution-NoDerivs 2.5 License.


blosxom

       
Sun, 30 Apr 2006
More of Curitiba and surroundings

The last two days I had a rental car. First I visited "Vila Velha"

Vila Velha really is both beatufil and impressive. Took lots of pictures of those unique rock formations dating back from the ice age.

On the next day (after some OpenEZX hacking) I first drove to Santa Felicidade to visit the cemetery there. Took a couple of pictures, since it is quite unique in that it is a very urban cemetery. Multiple storeys (!) and all concrete floors. Obviously, people can only put urns there, no dead bodies...

Next I drove to the Graciosa road, which I still remembered from my trip to Morretes five years ago. The Graciosa road is the old connection between Curitiba and the harbour. It leads through the few 3% of remaining "mata atlantica", south Brazils version of the rain forest. It's a small, extremely curvy road with lots of viewpoints to the surrounding mountains. Also did a short walk into the forest, tried to take a couple of pictures of an amazing ant trail which must have been multiple hundreds of meter long.

[ /personal | permanent link ]

Sat, 29 Apr 2006
A780/E680: SPI driver using hardware SPI controllers working

So apparently there is no obvious reason for Motorola's driver using bit-banging rather than the controllers inside the PXA270. I now have a modified Motorola driver on 2.6.16.5 running that uses the SPI controller for the bus to PCAP2. Getting my own driver running should therefore be quite fast now.

I've also hacked a bit on the keyboard side, although it's not working yet.

[ /linux/a780 | permanent link ]

Thu, 27 Apr 2006
Working on new SPI/SSP drivers for OpenEZX kernel

One of the fundamental interfaces on the Motorola EZX phones is SPI, which interconnects (among others) the PCAP2 peripheral with the PXA270. Motorola ships their 2.4.20 kernel with some ugly piece of spaghetti code driver for it. Apparently they've had difficulties driving the PXA27x SPI controller, and in the end decided to just 'bit-bang' the signals over GPIO. Obviously that's inefficient and CPU-intensive. I hope there is no real hardware problem preventing the use of the embedded SPI controllers.

First I started writing a driver against arch/arm/mach-pxa/ssp.c, only to discover later that this code actually predates (and therefore doesn't use) the generic drivers/spi/ interface. Since I'm a fan of generic interfaces, I chose to write a PXA generic driver for the drivers/spi interface, plus some EZX specific glue code for it.

One of the interesting bits is that the PCAP2 can interrupt the PXA, and it then acts as an external interrupt controller, whose registers you can access over SPI. So a PCAP2 interrupt can mean that some touch-screen event happened, that the headphone, USB or microphone jack state has changed, etc. All those various real interrupt sources need to be fed to individual distinct drivers (audio, touch-screen, USB). The Motorola kernel uses an ugly kludge of callback functions that those drivers can register with the SSP/SPI driver.

So in my new driver, I choose to actually model that bit of PCAP2 functionality as an external interrupt controller. This way the actual sound/touch-screen driver can just do request_interrupt() like they usually do. However, this means that I need to access SPI from within hardirq context, which again doesn't mix well with the architecture of the drivers/spi code (which is asynchronous and queues requests). So I need to implement a couple of synchronous SPI functions in addition to that.

This is now a lot of code, and I'm about to test and debug it, which is expected to be time-consuming and boring. I'll post a status update as soon as there's more information.

[ /linux/a780 | permanent link ]

Mon, 24 Apr 2006
Travelling by bus to Curitiba

Tomorrow I'll be on a 11 hour bus ride from Porto Alegre to Curitiba. I'm voluntarily using the bus rather than the plane. Since everybody thinks I must be crazy for doing so: First, I don't really have any idea how the landscape/countryside in that area looks like. Second, I haven't really spent all too much time outside of the big Brazilian cities yet. Third, I have the time to do it (and two laptop batteries). Fourth, it's more friendly to the environment... my intercontinental flights consume way too much kerosine anyway.

[ /personal | permanent link ]

Sun, 23 Apr 2006
O pizza doce numa pizzaria com sistema rodizio

One of the things that I've always missed the most, ever since leaving Brasil in 2001: "pizza doce" (sweet pizza). You can have it with chocolate, coconut, banana/cinnamon, caramel, ice cream, etc.

Yesterday I just had to make use of the opportunity and have lots of it in one of the nice all-you-can-eat pizza places that are common in Brazil. There also was the opportunity to introduce some of the other foreign speakers to this Brazilian interpretation of Italian food :)

[ /personal | permanent link ]

Sat, 22 Apr 2006
OpenEZX: USB Ethernet support working

After lots of hacking at FISL 7.0 in Porto Alegre, I've managed to get the PXA27x USB device controller to work in USB Ethernet emulation to work. I can now actually ping and telnet to the 2.6.16.5-running E680, using a debootstrapped Debian/ARM on SD-Card.

I'll publish the patches in one or two days, when everything has stabilized a bit, and the debugging code has been removed.

Also, at the event here, I've managed to convince quite a number of Free Software people that those Linux smartphones are actually quite interesting toys. Most notably, Keith Packard of Xorg fame has indicated he would probably be getting one and working on a lightweight UI. This motivates me even more to have a stable and fully working kernel environment finished soon.

[ /linux/a780 | permanent link ]

Tue, 18 Apr 2006
Back to Brazil after 4.5 years

So finally it's happening: I'm currently sitting in an airplane, already deep into .br airspace. Ever since I left Conectiva/Curitiba/Brazil in quite a hurry in late summer of 2001, I intended to come back. My original plan then was to take Elisabeth with me and show her what I've experienced in those six months of Brazil. Also, due to my way-earlier-than-planned departure from this fascinating country, I missed many of the things I had planned originally - such as travelling to the northeast and the amazon region.

But just like that never worked out the way it was planned, I now find myself in an accidental symmetry: I left Brazil to live with Elisabeth - and just after that has ended now, I get back to Brazil. No, not moving back - but at least two weeks of visiting ex-colleagues, (ex-?)friends and places I have known and loved.

At a time of such fundamental change in my life, I feel excited about any kind of new adventures, possibilities, etc.

Due to time restrictions, this is unfortunately not the time when I will be doing all the travel that I originally intended. I'm really too much involved with my many non-profit projects, and besides that I somehow have to earn a bit of money, too ;)

But I'm quite sure that at some point I'll come back. Talvez um pouco mais preparado, depois de ter aulas de portugues. Acho que e muito dificil no Brasil sem falar a lingua nativa.

[ /personal | permanent link ]

The most relaxing flight of my life

The day started early for me. Taking the local train to the airport at 4:09am. Then some annoying KLM ground staff who told me to only bring one piece of hand luggage next time. If you know me, then you certainly know that I find nothing more annoying than people with large carry-on luggage. All I had was a laptop bag and a very small camera bag. No backpack, no trolley. I started a discussion with that staff member, indicating to him that he should read his own regulations before trying to lecture me. Neither laptops nor cameras are allowed in the checked-in baggage, and usually they do not even count as 'piece of hand baggage' but are allowed in addition to that piece. I'll make sure to re-check with KLMs current regulations and file a complaint with KLM. Given my last trouble with the KLM flight to Bangalore last December, I have good contacts to their customer care department now.

Anyway, the situation drastically improved in the Amsterdam - Sao Paulo flight. A Boeing 777-200 with the latest in-flight entertainment system: 111 full-length cinema movies, lots of TV shows (not that I care about them) plus individual music playlists.

It comes even better: I had a whole three seat row for my own. After watching "Memoirs of a Geisha" (I already knew the two Bollywood movies they had), I had a very comfortable sleep. Next time I woke up was already in Brazilian airspace. The only time I had that much space was when going to Israel, but that flight was short enough to not care about that extra comfort.

So in the end it wasn't of much use that I just bought a second battery for my notebook computer ;) Anyway, I'm sure my next, less relaxing long-haul flight will not be too distant.

[ /personal | permanent link ]

Mon, 17 Apr 2006
State of OpenEZX 2.6.x kernel development

During my two days of EZX phone hacking, I've made significant progress. Probably the most important discovery was how to get a serial console on the USB plug, enabling other people to do further kernel development without physically modifying the phone - but it's still a long way to go.

A current list of TODO's:

  • find out why kernel doesn't boot with CONFIG_IWMMXT
  • find out why E680 SD/MMC works, but not A780 TransFlash
  • debug and fix pxa27x_udc in order to provide usbnet (nfsroot!)
  • debug and fix mtd support in order to be able to access system flash
  • port and cleanup video and sound drivers
  • port Motorola-specific SSP/SPI drivers into 2.6.x generic SPI stack
  • port all the driver specific dpm bits from Motorola's 2.4.20 to 2.6.x
  • clean up the already working keypad drivers
  • finish re-implementation of mux_cli and grpsv modules
  • look into re-implementing the proprietary flash fs drivers, though I don't think that is particularly important, we could run our code 100% on SD/TransFlash
  • create a modified bootloader that allows for multi-boot configurations. It could actually include SD/TF support for booting kernels from there.
  • check how the other (later) Motorola Linux smartphones differ and merge their device-specific code into our 2.6.x kernel tree
  • last, but not least, we need to do something about userspace. I'm not a GUI guy at all, and I haven't yet thoroughly investigated all the existing projects like OPIE, etc. I'm sure once the hardware support is there, some more GUI-savvy people will do something in that area, though.

So why am I stating this here? Because it's up to _you_ to help and take care of one of these tasks if we want to see the dream of having a fully-free software E680/A780 before they get phased out ;)

[ /linux/a780 | permanent link ]

2.6.16.5 boots on EZX phones

I've finally managed to get a 2.6.x kernel running on the Motorola A780 and E680. Apparently the problems I encountered are part of 2.6.14 (which was current mainline when I started the port). After merging my patches into 2.6.16.5, everything suddenly worked fine ;)

So what I've got now:

  • kernel 2.6.16.5 booting on both A780 and E680
  • USB host controller towards Neptune BP working
  • USB device controller partially working
  • MTD support for all flash partitions
  • SD/MMC support on E680 (TransFlash on A780 not working yet)
  • Framebuffer working on both models, with nice 4x6 tiny font

The main obstacle now is that TransFlash on the A780 is not working yet. The A780 is actually more important than the E680. For some strange reason, all the response bytes from the TF card appear to be zero (at least that's what the response FIFO of the PXA27x embedded SD/MMC controller reports). I've already tried a lot, but am a bit clueless after many hours of trial and error :(

[ /linux/a780 | permanent link ]

Sun, 16 Apr 2006
Running a serial console on the A780

After about half a day of trial and error (which was related to a totally different problem, as it turned out), I now have a 2.4.20-based kernel with working serial console for my A780. Unfortunately the console requires soldering four wires onto test pads of the PCB - something that I achieved with 0.1mm diameter magnet wire (Kupferlackdraht for you Germans). The magnet wires are thin enough to get them through the TransFlash slot to the outside, without having to modify the case.

If you're interested in a bootup log captured from the STUART, check this one.

The rest of the day was spent debugging why my (still 2.6.14 based) kernel doesn't want to boot on the machine. As it turns out, booting stops somewhere in the early initialization after head.S has called decompress_kernel(). Debugging this problem has also caused me to actually write some ARM assembly code. For years I'm reading and debugging ARM code, but I've never actually written ARM asm from scratch. So my assembly code now prints one character for every stage of the booting process (ABCDEFGHI) and then stops. At the time the C code should print its first character, the device is already gone. So maybe something with the setup of the registers according to C calling convention, or setup of stack/heap is erroneous.

Interestingly, that startup code has not really changed all that much from 2.4.20 (which runs) and my 2.6.14 based kernel.

It's not unlikely that I'm [again] hunting a totally different problem. I'll probably merge my patches into 2.6.17-rc1 and see whether that works...

[ /linux/a780 | permanent link ]

Fri, 14 Apr 2006
Virtualization and IPv6

I am seriously disappointed by both vserver and OpenVZ to not support IPv6 networking. What kind of attitude is this? This is the year 2006. Projects like the netfilter.org/gnumonks.org servers have native IPv6 connectivity at their hosting provider for a number of years now.

Now I'm investigating consolidation of some of the machines, and none of the ever-so-hyped lightweight virtualization solutions even supports it.

My journey into virtualization therefore ends before it even has begun.

Now you might wonder: Why is he complaining so loudly, rather than implementing it on his own? Because I think it's an almost unforgivable design mistake if you develop any new networking solution that is limited to IPv4 only. Also, OpenVZ is backed by a number of companies, and considering the amount of media fuzz they create, there should be a ton of developers working on it.

Now you might ask: Why not use Xen? Because I don't want simulated virtual machines, but rather some separation of privileges and namespaces. Simulating a whole machine seems a bit odd to me for that purpose.

I'll look at virtualization again when they support virtual Ethernet devices. Capable of running IPv4, IPv6, 802.2LLC and all the other nice protocols that we have in the Linux network stack.

[ /linux | permanent link ]

Thu, 13 Apr 2006
SD Card Association releases 'Simplified specification'

If you're reading this blog for a while, attended one of my recent presentations or are dealing with SD Card support in GPL licensed Free Software, then you probably know about the never-ending issues around that subject.

For considerable time, the SD Card Association appeared to have regulations in place that basically prevented any SD card driver to be GPL licensed, because of NDA's and other stuff. I can only imagine that this was because of their DRM scheme [which I've never seen anyone using, btw]. Instead of creating separate standards, one openly documented for the basics, and one for the crypto function, the NDA covered all of it.

Nonetheless, various projects have meanwhile developed their own GPL licensed SD card support, since it is reasonably close to MMC (which is publicly documented), and the many proprietary drivers that can be re-engineered.

Very recently (it seems April 03, 2006), the SD Card Association has published a set of "Simplified" standards. You can get the documents from their homepage. There's one for SD Card Physical Layer, one for the SD Card Host Controller, and two related to SDIO. Obviously this publication is a couple of years too late. But let's try to be positive and look forward and not to the past.

So it seems their policy seems to change at least a bit. A very welcome move, although for my taste there is still one document missing: One that describes the actual commands on top of the physical layer.

[ /linux | permanent link ]

Tue, 11 Apr 2006
Obtaining Asian Motorola EZX phones in Europe

A couple of days ago, I was looking for a way to obtain Motorola Linux Smartphones in Europe, i.e. those plenty of models that are not officially sold anywhere but China and other areas of Asia.

I've now found a suitable importer specialized in importing Asian phones into the European market. In case you're interested, feel free to contact me for more details. The phones range between EUR 180 and EUR 300, but there's a minimum order of five phones. I'll probably be ordering around early may.

[ /linux/a780 | permanent link ]

Returning from OSCON Vienna

I've just returned from my tree day trip to OSCON Vienna. LINBIT took great care of me during my stay, and I enjoyed it quite a lot.

The most obscure thing encountered during that trip was the word Liftkarmiesen. Austrians have all these (to us Germans) ancient and strange words in their variant of German. Anyway, it even took three native Austrians until somebody actually knew what it was ;) If you're now curious, try to research it on your own. It's related to curtains ;)

[ /linux/conferences | permanent link ]

Photography at Vienna central cemetery

Apart from OSCON/LINBIT related stuff, I've also actually taken a couple of hundred pictures (both digital and analog b/w) at Vienna's central cemetery, Europe's largest cemetery with more than 3 million people being buried there.

I yet have to develop the films, and look into the 3+GB digital data. However, I'm very confident that given the good light conditions and the amount of time I spent at the cemetery, there should definitely be some really good pics...

[ /photography | permanent link ]

Sat, 08 Apr 2006
Looking for Motorola Linux phones

Since right now I only have E680i and A780, I would be interested in a way to obtain E896, A1200, A910, A768, A760, A732, A728 as well as ROKR E2. Most of them seem to be mainly sold in China / Taiwan.

If anybody knows a good source (importer in Europe) or some other way how to get these phones in the western half of the world, let me know.

Direct import would also be possible, but I'd need to know a serious exporter in .cn/.tw in order to do so. Any suggestions welcome.

[ /linux/a780 | permanent link ]

planet.openezx.org launched

In the tradition of my main project netfilter (which has a planet.netfilter.org, I've now also opened a planet site for the OpenEZX project at planet.openezx.org.

This should give users the ability to stay up to date with current developments in the Motorola Linux smartphone hacking community.

If you know of any feeds that I should add to this planet, please let me know

[ /linux/a780 | permanent link ]

Fri, 07 Apr 2006
Booting kernels on A780 / E680

It's a bit strange that I still have so much difficulty running my own kernel on the phone. As it appears, there are some subtle hardware (or bootloader?) version differences that made me struggle for so long.

Two out of my three A780, and my one E680 don't boot any self-compiled kernels but rather just crash. The third A780 however boots them just fine.

Obviously, as Murphy's law indicates, the phone it works on is my 'production' phone, i.e. the one I use for my day-by-day phone needs.

We really have to get to the bottom of what's going on here. Also, if there really are differences, then Motorola has to publish the kernel source for both versions under the obligations of the GPL. So far they have only released a single version.

[ /linux/a780 | permanent link ]

Half a day in the darkroom

I've spent the better part of this day first setting up my darkroom (in the bathroom), and then working in it. It's been quite some time (must be almost two years) since I last found time to produce my own b/w prints, but now the time has come. Used about 50 sheets of 24x30cm PE paper only today ;)

I'll probably continue with some more (postcard sized) prints tomorrow and later next week. There's certainly a backlog of a couple of hundred images that I have on film but not on paper yet.

[ /photography | permanent link ]

Tue, 04 Apr 2006
netfilter.org downtime - moving and updating servers

I've spent the whole Monday in the hosting center where netfilter.org, gnumonks.org and most of my other projects are hosted. The main reasons for this visit were:

  • do kernel updates on two boxes that are known to be difficult with new kernels
  • move all five machines to a new rack, the old one is too crowded (no space for new machines, too hot)
  • add yet another new box (parvati.gnumonks.org), which makes the number of machines now six

As usual, Murphy's law applied, so about everything that could go wrong went wrong. And, confirming Murphy's law, the most important machine (vishnu.netfilter.org) had the longest downtime, something close to 9 hours.

This was mainly due to the last Gentoo update overriding my custom-modified yaboot boot script (for using the serial port, this is a headless XServe cluster node) with the default one, which wants to use the non-existent framebuffer.

That combined with the fact that KDUMP-capable kernels can't be booted from OpenFirmware (why isn't this indicated in the menuconfig help???) and thus the new default boot kernel couldn't be booted from yaboot.

That day I've tried about anything, from attaching a powerbook with bootable cd in firewire target mode to booting yaboot via tftp (which fails to load yaboot.conf via tftp *sigh*).

Now I've learned my lesson: chattr +i on yaboot.conf and the modified boot script for serial console.

[ /linux/netfilter | permanent link ]

Mon, 03 Apr 2006
Meeting up with Armijn Hemel

During my short trip to Amsterdam, I had a chance to meet with Armijn for a couple of hours. It's always good to meet people face-to-face when you're working with them a lot, especially on delicate issues such as GPL enforcement.

We've decided on how to optimize our work-flow and how to improve internal documentation of the individual cases. The usual thing when you're used to working on something alone (i.e. knowing everything off your head) as opposed to other people getting involved, etc.

Anyway, I'm extremely pleased that somebody is helping me out. There's also another friend of mine who's starting to get involved in the project, mainly on technical issues such as verification of the source code offered by the various (formerly?) infringing entities.

[ /linux/gpl-violations | permanent link ]

Sat, 01 Apr 2006
NLUUG Linux meet

During my short visit to Amsterdam, I was invited to speak at a small NLUUG event. I presented on recent, current and future netfilter/iptables development, and the presentation was very well received. Unfortunately I didn't have time to listen to the other two lectures, since I had a meeting scheduled with Armijn Hemel, the person who's currently helping me the most with gpl-violations.org.

[ /linux/conferences | permanent link ]