Zaurus ARM Cross Compiler on OS X (Intel)

Andreas Junghans has an excellent tutorial on how to set up a Zaurus ARM cross compiler on OS X. However, there is one problem: It will only compile on PowerPC.
So, here is my patchset for compiling on Intel:

gcc-patches.tgz

Use this file instead of the one offered on his page and just follow his instructions.
The fix is really simple in nature: I’ve just added one file, namely xm-openstep.h in gcc/config/i386. This does the trick.

C3200 Tweak #2: Improving Samba performance

The preinstalled Samba server on both Cacko and standard Sharp ROM proves to be notoriously slow. This is mostly due to the strict syncing that’s enforced in the smb.conf – probably to avoid data loss. IMHO, it’s rather safe to disable this behavior and in turn get a nice speed bump. Here is how to do that:
On Cacko first delete the default link to the ROM copy of smb.conf:

sudo rm /etc/samba/smb.conf

Now, copy over from ROM and modify the copy:

sudo cp /usr/lib.rom/samba/smb.conf /etc/samba/smb.conf
sudo mcedit /etc/samba/smb.conf

Comment out lines

strict sync = yes
sync always = yes

Change the socket options line to

socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=131072 SO_SNDBUF=131072

Please remember to reconnect the mounted samba share on your desktop system.
In my case the transfer rate on my Buffalo 10Base-T CF-Card jumped from 350 KB/s to over 820 KB/s.

C3200 Tweak #1: FAT32 to Ext3

I don’t need the ZaurusDrive feature of the newer Zaurii for the internal harddrive. So, having ext3 on this drive instead of the regular FAT32 opens up some possibilities (read: Debian install :) ).
So, here is how to turn the biggest partition of the internal harddrive on a C3200 from vfat into ext3fs:

Edit /sbin/hddmount and /root/etc/rc.d/rc.rofilesys and change all occurences of

mount -t vfat -o noatime,quiet,umask=000,iocharset=utf8 /dev/${IDE1}3 /hdd3

into

mount -t $LINUXFMT -o noatime /dev/${IDE1}3 /hdd3

These instructions refer to Cacko ROM 1.23. They might be different for the original Sharp ROM.

Now, before reformatting /dev/hda3 with

mkext2fs -j -b 2048 /dev/hda3

Make sure to backup all content on this partition before doing so.

New Zaurus

So, I finally made the jump to the new C3x00 series. Bought myself a SL-C3200 at Pulster. And now I’m sitting here setting up everything and enjoying the new freedom (6 + 2 GB, that is). What a mean little machine! :)
The additional storage capacity is excellent compared to my C750, where the limited support of SD-Cards up to 1 GB has become a big drawback for me.
In normal use the machine itself is not necessarily faster than the C750. However, at everything multimedia it flies. DivX movies at 640×300 were slideshows previously, now they play back in smooth realtime – thanks to mplayer/bvdd/iwmmx. Also, battery-time is very much improved. I’ve actually tested MP3 playback the other day with the display turnt off and only XMMS and my Buffalo Ethernet card (very low-power) running. After round about 10 hours it was me that had to go to sleep. ;) So, no idea how long it would have had lasted, probably 3 hours (battery was at 30 % when I turnt the device off.).
Anyway, I’ll be posting some Zaurus-related stuff later. So keep an eye on that. :)

Ogg Vorbis Encoding Script for iTunes

Update: This has been renamed to iTunes Alternative Encoders. Get the new version here.

Lately I’ve been looking for a good way to re-encode my iTunes music files for use in my Zaurus. Since I don’t need to have 256 kbit/s MP3s or Apple Lossless files with those el cheapo headphones, the best way to go is with Vorbis and its excellent properties at 96 kbit/s. Compared with other formats, the quality is pretty nice.
There are already several attempts at creating iTunes scripts to re-encode to Ogg Vorbis or Lame. One of them is Lincoln Ramsay’sEncode with oggenc” iTunes script. It’s pretty neat already. However, it didn’t fully satisfy my special requirements. ;)

Continue reading “Ogg Vorbis Encoding Script for iTunes”

mksquashfs for OS X

Here is a patch for compiling the mksquashfs tool on OS X:

squashfs-tools2.2-r2-OSX.patch

The compiled binary is here in case you’re too lazy to compile it yourself :) :

mksquashfs2.2-r2-OSX.tar.gz

This is what I use to generate a SquashFS image for my patched Zaurus kernel:

# cd somedirectory_to_compress
# mksquashfs . /Volumes/Zaurus/compressedimage.squashfs -le -noappend

If you’re using the kernel included with Cacko ROM, you don’t have to patch anything as SquashFS support is already included.

Finally, here is how to mount the image on the Zaurus:

# mount -t squashfs -o loop /mnt/card/compressedimage.squashfs /mnt/mountedimage

Smooth… (Part 2: Tweaking DejaVu Sans for Zaurus)

I’ve been asked by Guylhem to try to improve the free DejaVu font for display in Qtopia.
After some tinkering in FontLab I have a pretty nice result. Here is a comparison of the various stages:

Illustration2Illustration3

As I see it, the main problem with the DejaVu font (and Bitstream Vera therefore) is the spacing between the glyphs which tends to be too wide. This is observable in Windows and Qtopia. Especially on a PDA screen this is not a pleasant view.
So, what I did was to create a tweaked version of the font, again using FontLab.
Lowering the left and right sidebearing of each glyph by 18% resulted in the “DejaVu Sans Compressed” version you can see on the screenshots.
Now, still finding the glyphs to be too big, I applied a 90% scaling to each. In my opinion the resulting version “DejaVu Sans Compressed Smaller” looks really nice and comes very close to the quality of the C*libri font.

I’ve made the fonts available here:
http://katastrophos.net/zaurus/fonts/helvetica-replacements/free/

You can find additional screenshots here:
http://katastrophos.net/zaurus/fonts/helvetica-replacements/

Smooth… (Part 1)

Ever since using my Zaurus I had this idea of having OS X style smooth fonts in Qtopia. While the Trebuchet font introduced with Cacko was already good, it still didn’t cut it.
Today and after tinkering a while with FontLab and makeqpf I finally came up with something very close to the font smoothness known from OS X.

Illustration

I removed the hinting from the font via FontLab, so the FreeType2 rasterizer in makeqpf could do the full antialiasing magic. The unhinted Trebuchet font seems to lose some of the crispness of the hinted version, however, the Zaurus screen with its higher contrast almost alleviates this effect. Clearly, special Cle*rType fonts like C*libri, C*ndara and C*ndel really live up to their promise as soon as hinting is removed – even without sub-pixel rendering they look superb on the CG Silicon screen. :)

Screenshots:
Screenshot Trebuchet (hinted) Screenshot Trebuchet (unhinted) Screenshot Calibri (unhinted)

Sadly, most font-related settings are hardcoded in Qtopia 1.5.x. The only sane way to change the font globally is to replace the standard “helvetica” font with a replacement font…

Update 3 (December, 9th 2005): Downloads of Trebuchet and C*libri fonts have been removed. Please use the open-source DejaVu font in Part 2 instead.

Update 2: You can find Part 2 here.

Update 1: I’ve made some additional font packs and the makeqpf tool available here.