Saturday, August 13, 2011


Got Linux booting on my rx3715. Problem was in wrong serial port number. I thought that serial port brought to external connector is ttySAC0, but it's ttySAC1 on rx3715. Just changed some values in kernel config - and voila - it boots. Will try to get touch screen, buttons, udc and ASIC3 working a bit later.

Btw, now I have serial cable for iPAQs and JTAG adapter (Olimex). So I hope debugging will be easier now. :)

My little Zoo :)

Monday, July 11, 2011

New item to my collection

Today I owned iPAQ rx3715. Joystick does not work well, battery does not work at all, but it's s3c2440 based, and I'm going to push upstream everything for it :)

Monday, May 30, 2011

May report

This month I did not do much hacking, as I was pretty busy with repairing in my house. But here's list what I did:

  • Tried to run opie on Zipit Z2. It's pretty stable (but damn slow, maybe due to rotation?), opie understands kernel keymap, just don't use sticky modifiers, it does not understand them. Battery support is not working yet in opie.
  • Made my own mouse emulator, it's simple and configurable. Going to use it with my distro for Zipit Z2
  • Hacking on something jlime-like (Xfbdev + matchbox-desktop + echinus + dzen2), and not oe- but buildroot-based. It's not ready yet.
  • Added proper rotation support to qemu, now it's easier to test different Zipit stuff (especially, Xfbdev rotation)
Also I'm going to buy iPAQ rx3715 to hack Linux kernel for it.

Sunday, April 10, 2011

NetSurf on Zipit Z2

Yesterday I prepared netsurf recipes for buildroot, you can get them here. You'll also need fonts and config, you can get them here. Recipes include some patches for netsurf, basically, zipit-specific (add zipit kbd layout, etc), but there's a bug fix aswell :) Also you'll need some mouse emulator, I'm using z2mouse mouse-emul.

To clear inputbox (i.e. for address) you can use ESC key.

Here're some screenshots:

I'm pretty happy with netsurf, it's a very nice browser, and it works smoothly even on complex pages :)

Update: no more extra fonts necessary, netsurf uses liberation fonts from buildroot. I updated recipes and netsurf-stuff archive.

Saturday, April 2, 2011

USB on Zipit Z2

Today I finished my z2-usb-switch driver, so now it's possible to switch between device and host modes in software. By default, device mode is activated. To change mode invoke:

echo device >/sys/devices/platform/z2-usb-switch/usb_mode
echo host >/sys/devices/platform/z2-usb-switch/usb_mode

All changes are in my tree, branch pxa27x-devel. You can get precompiled binaries here.

Tuesday, March 29, 2011

Finaly got new LCD for my h1940! Now I have two h1940, one lacks battery, but I plan to order one from ebay :)

Monday, March 28, 2011

More work on Zipit Z2

Month past since I last time posted to my blog, and many things happened, many stuff I was hacking on :)


CPUFreq is working!

I got cpufreq working on Zipit Z2. For some reason it's unstable when fastbus bit of CCLKCFG is set, so solution is to keep fastbus disabled. Here's patch. Now it works pretty well with ondemand and conservative governors (I'm using later). But I suggest to keep regulator support disabled - for some reason it adds some instability (even without cpufreq).

linux-anarsoul-2.6 tree was set up :)

I published my linux-2.6 git repo at github, for now it contains only zipit-related patches (in branch pxa27x-dev), but I plan to make a branch with h1940 and rx1950 patches (however, pretty all h1940/rx1950 patches are merged into mainline kernel)


I submitted pack of patches for Zipit Z2, so they'll appear in 2.6.39 :) Also looks like Ben Dooks sent pull request for next-samsung tree, so rx1950 and h1940 patches should get into Linus' tree aswell

USB on Zipit Z2

Also I got udc working on Zipit Z2. Wiring is pretty simple, use this pinout, connect D+ to pin 14, D- to pin 13, GND to pin 19, Vcc to pin 9. You'll also need this patch to make it work, but it disables usb host functionality, so you have to choose what you need - usbc or usbh. I'll add support for switching from host to device and backwards a bit later. Also I'll publish schematic of my own version of host cable.


As I said earlier, I plan to work on driver which will switch usb pins on Z2 from host to device mode and vice versa, also I'm going to finish my host cable - it can supply usb device with 3.3v (well, actually only 3v :)), and it has protection against putting 5v on Vcc pin of USB (my powered hub does it. It sucks, I know). One more Z2 fix is pending - I want to add rfkill support to libertas driver, so one can switch WiFi power off. Also I'm working on Angstrom console-image for Z2, it's still unfinished because of lacking udc cable - I want to boot Z2 from nfs over udc cable, as it's much easier to test rootfs images like that.

That's all. Stay tuned to get latest news! :)

Tuesday, February 15, 2011

qemu with Z2 support

I spent some days getting qemu to emulate some Z2 hardware, and got some results :)
Almost all hw is emulated, it lacks only voltage regulator and WiFi, but it's not easy to implement Marvell's WiFi chip, because there's no datasheet, and anyway it makes no sense. Also screen rotation is not supported (yet).

Stock bootloader - blob - (with slight modification) and stock kernel works. Blob puts Z2 into deepsleep on reset, so I hacked it not to do this.

How to compile qemu:

So, how to hack blob:
  • put your blob image (first 64kb of NOR) somewhere
  • convert it to hex representation with xxd: xxd mtdblock1.bin >mtdblock1.hex
  • apply patch onto mtdblock1.hex
  • convert hex back to bin: mv mtdblock1.bin mtdblock1.bin.bak; xxd -r mtdblock1.hex >mtdblock1.bin
I don't put modified nor original blob binary anywhere, as I doubt it's legal.

How to run stock sw:
  • cd qemu-z2; mkdir z2; wget
  • Combine mtdblocks into one flash image: cat mtdblock1.bin >z2_flash; cat mtdblock2.bin >>z2_flash; cat mtdblock3.bin >>z2_flash
  • So, z2 directory contains following files:, z2_flash
  • Now just start script
How to run latest kernel:
  • Use same z2_flash and files from z2 directory
  • You'll also need kernel image - zImage (not uImage!)
  • Start as follows: ./ -kernel zImage -append console=tty0
You can also use SD card image, just specify -sd image.filename as argument to script

Update (2013-Nov-27): link to blob patch is updated!

Saturday, February 5, 2011

pxa270 powersaving

Some days ago I made a driver (named pxa270-voltage) to set cpu core voltage according to its frequency, it should improve battery life (but I did not perform testing). freq-voltage table was taken from cpufreq-2xx driver. If anyone can test and report if it really improves battery life - it would be nice.

Here's new patchset, precompiled binaries can be taken here, patches still should be applied ontop of Marex's tree

Also new patchset fixes race condition in pxa2xx-spi suspend handler.

P.S. This driver is just temporary solution until someone fix cpufreq on pxa270.

Thursday, February 3, 2011

Zipit Z2 kernel

Recently I did some stuff for Z2 kernel:
  • fixed bug in libertas (already submitted patches upstream)
  • added proper suspend/resume support for libertas
  • fixed wrong coefficient to convert adc value to battery voltage
  • fixed bug in Z2 ASoC driver (with detecting Z2 soundcard)
  • make Z2 resume only on power button and AC plug
Patches agains Marex's tree you can find here. cpufreq and cpu voltage regulator do not work, so don't enable them in kernel config.

PXA27x overlay in mplayer

Last week I was busy getting PXA27x overlay working, as it was pretty broken in mainline kernel. There were two problems: overlay driver somehow corrupted memory on second access to it, and actually it does not work. So I got following messages on dmesg, and of course no visible overlay plane:

[ 93.679574] overlay1fb_disable: timeout disabling overlay1
[ 95.601537] BUG: Bad page state in process sh pfn:a1b60
[ 95.601645] page:c0456c00 count:0 mapcount:0 mapping: (null) index:0x0
[ 95.601698] page flags: 0x200(arch_1)

First bug was successfully fixed by Russel King, here you can find his patch. It fixed memory corruption, but overlay still did not work.

Problem was in selecting planes Z-ordering in wrong time, so overlay was under main plane, and main plane has no transparency bit (rgb565 colorspace), so there was no way to make it visible. I fixed this issue, added some cosmetical fixes, and produced patch.

To use 2nd overlay (one with yuv colospace available) I created mplayer vo driver, here you can find patch for mplayer-1.0rc2, however it's easy to port it to newer mplayer versions (but I was not able to crosscompile mplayer-1.0rc3 nor mplayer-1.0rc4, did not investigate issues yet)

As result Zipit Z2@208mhz is now able to play mpeg4 video with qvga resolution without problems :) Of course, without scaler (so you can't down/up scale your video) - scaler from mplayer is _really_ slow.

Next point is getting some powersaving stuff working on Z2.

Saturday, January 15, 2011

Zipit Z2

At last! Got my Zipit Z2, here you can find some photos. Get ready Zipit world, hackers are coming! (just a joke :))

Thursday, January 6, 2011