Updated Software for the Zipit Z2

Back in February anarsoul ported Linux 4.4 for the Zipit Z2 which added device tree support and some other bits. Around the same time I started working on getting OpenWrt trunk to build for the Zipit. In January, OpenWrt decided to remove pxa support because of a lack of maintenance. The OpenWrt build system allows for installing feeds so I created a new pxa target feed that can be built with openwrt trunk. In addition to the new kernel and new OpenWrt, we also have an updated u-boot with some fancy new features.

I’ll start with the new u-boot features. There is font support in u-boot and we now have a smaller font available to see more text on the screen. The background is now black with white text which makes it easier to read. And finally, there is usb host support so you can actually boot the Zipit from a usb storage device. You can build it from anarsoul’s github repo or use my binary.

The new linux kernel can be built from anarsoul’s repo or my fork of his repo. There is no difference between the two github repos for branch v4.4-z2, but the OpenWrt kernel has an additional patch to change the flash partition layouts. Update: I have a fix for card detection in my github sources. In addition to building the kernel you also need to make it a uImage (for u-boot) and add the dtb file (device tree). After the kernel and dtb is built, you can use the following script to make a bootable kernel:


cat arch/arm/boot/zImage arch/arm/boot/dts/zipit-z2.dtb >zImage-dtb

mkimage -A Arm -O linux -C none -T kernel -a 0xA0008000 -e 0xA0008000 -n uImage -d zImage-dtb uImage

Some of the major differences in the new kernel are:

I have a new OpenWrt repo setup called “bleeding_edge” built from openwrt-trunk with the pxa-target and zipit-packages feeds. Not all of the packages are working yet but there is a good base to start playing with. See the README in the bleeding edge directory for instructions on installing. If you would like to help out with updating packages or build your own bleeding edge, the instructions are in the github readme for openwrt-pxa-target. My goal is to get a good set of packages working and have a reproducible build from the OpenWrt tree. The base build should fit in the internal 8Mb flash with a squashfs (read only) and jffs2 (writable) partition. To keep the squashfs as minimal as possible I have disabled some of the typical OpenWrt packages like procd and other bits that are required by the base-files package. I created a new zipit-base-files package which attempts to emulate the original OpenWrt base-files. Basically, I try to use busybox apps for things like inittab, init.d and module loading. This is a problem for some packages that have procd init scripts such as dropbear (which I’ve already fixed in zipit-base-files). Perhaps there’s a way to emulate procd? So far, the only change I’ve needed in the official openwrt tree is for module installation (patch). There is a patches directory in openwrt-pxa-target that should be applied to the openwrt and openwrt-packages trees as described in the README.

Update: I pushed all the bleeding edge stuff to the OpenWrt-zipit github. You can build bleeding edge by following the instructions in the openwrt-pxa-target repo there. I have also created a general wiki for bleeding edge on github.

There is a new ‘testing’ branch that I’m using for the openwrt-zipit-packages feed. Any new package updates are being pushed there. At some point I would like to get all this wrapped up into the openwrt-zipit organization github so all the members can push changes.

Gmenu2x needed some fixes to build with the new musl libc. I also decided to pull out all the extra launcher and icon files from the default gmenu2x theme to save a little space. I’m in the process of moving those icons and launchers to separate packages in the form of ‘gmenu2x-(package)’. So, if you want to install the new FreeDoom game and have a slick icon in gmenu2x, just run ‘opkg install gmenu2x-freedoom1’ or ‘opkg install gmenu2x-freedoom2’. The new Gmenu2X code is also up on github in my testing branch.

Here’s a list of some packages known to be broken:

  • Links (in graphics mode) browser crashes when scrolling right
  • Netsurf also crashes scrolling right
  • GMU Segfaults
  • Netsurf fails to render most sites

Another new feature in bleeding edge is the ability to load the wifi mac address from the u-boot environment. You can set the macaddr u-boot variable from the u-boot prompt with the command (the real mac address is printed on the sticker in the battery compartment):

setenv macaddr 01:02:03:04:05:06

Alternatively, you can set the u-boot environment variable from OpenWrt by installing the uboot-envtools package and use the command:

fw_setenv macaddr 01:02:03:04:05:06

Update: The mac address is now set automatically using the Maxim DS28CM00 Device ID ROM which will give each Zipit a unique mac address.


Included in the bleeding edge repo is my new ebindkeys+bldaemon. Previously we’ve been using the two programs as separate daemons. I combined the two into one program and added some configuration features (see /etc/ebindkeysrc).

  • Keyboard input is disabled when lid closed to prevent pocket typing
  • Backlights off/on when lid closed/open
  • Backlight timeouts when on battery can be defined in config file
  • Backlight bright/dim settings for AC/Battery in config file
  • Power button press is scriptable (defaults to run suspend script)
  • Mouse emulation, hold CTRL (“…” on Zipit) and use dpad to move, Stop is left-click
  • Standard ebindkeys definitions

Archives By Month