New Arch Linux image for the Zipit Z2

2014-01-25 12:11
With all the recent activity around the Z2, I thought it might be worth it to create an up to date Arch Linux image for the Z2. Although it is theoretically possible to update my old image, it is quite some pain to actually do so. So what I did is take an official system image for an ARMv5 plattform from the ArchLinuxARM website and modify it to work with the Z2.
The most important thing is to replace the kernel with a kernel built for the Z2. I have built a 3.13.0 mainline kernel. I have not patched the kernel in any way. If you are interested in the kernel's config, check out /proc/config.gz. Other than that, I changed only a few other things, like adding a few systemd services to configure Z2 specific stuff like keyboard layout and LEDs.

Here is the download:

archlinuxarm-zipit-z2-wej-20140124.tar.xz (101 MB)
md5sum: 8a8f043b6ec1304e9a557bf19821c884

Simply extract the image (as root) onto an ext2 formatted miniSD card. It should then boot on any Z2 with u-boot installed. It takes about 330 MB on the card.

There is only the default root user with 'root' as its password. I have installed only a few additional packages to be able to use WiFi (wpa_supplicant, etc.).

I have enabled some zram swap, which allows me to use pacman for most smaller packages. The only thing that required a lot more RAM was a glibc update. It wasn't the glibc update itself, that needed that much RAM, but the regeneration of the installed locales. If you need more RAM for things like that, you might enable additional swap on the SD card. Beware though, that it is really slow and that it can shorten the SD card's life considerably.

That's it. Have fun with the image and feel free to leave a comment if you like it or if you have a question about it.

UPDATE: By default the system's root file system is mounted read-only. If you want to have it mounted read/write on boot, edit /etc/fstab and add the following line:
/dev/mmcblk0p1   /   ext2   rw,noatime   0   0
antonio (web) says:
2014-02-16 17:41:59
Thanks for the image. I have tested and it works very well. I updated the system and after reboot the wireless card produced a panic with something related with the firmware. The problem was that after the update the firmware was missing because it is a non-free. I copied the firmwares that were in the original image and now everything is ok.

The systemd tries to mount the microsd as ext4, I think that a good idea would be to have a ext2 partition with boot and the root in another partition with ext4.

The screen when is idle some minutes it turns white instead of black or dark.
The halt process works but does not turn off the zipit. I don't know if this is normal because of u-boot or the zipit, or it is something related with systemd.

I have a swap partition that I use when the pacman run out of memory. The zram priority is -1 and the swap -2. Maybe the zram should have a bigger priority than the swap in the micro-sd card, I have to try.

I have not installed any X-windows programs. Only screen and alpine (re-alpine) to use google's imap. It works without problems only I have problems with the ca-certificates, but not any problem with the ram.

It is really nice to have a complete distribution for this small computer. Archlinux is very fast and pacman doesn't need too much resources, for example Debian apt need more memory. The problem that I see, is that archlinux has not stable releases, so you have to update frequently and with 32M of ram the process is slow and you need swap that can damage your card. Also in these hardware without official support every update can come with new problems.

If the kernel can be compiled without patch, it can be used for other distributions. A good candidate could be Slackware. They have a miniroot ready for unsuported arm devices. This distribution have not systemd and they have stable releases. The package manager was not so ram hungry but I have been long time from the last time I used it.
wej (web) says:
2014-02-17 20:50:21
antonio: Thanks for your feedback. The issue with the screen turning all white when idle and not being able to turn the Z2 off is due to a few bits and pieces missing in the mainline kernel. anarsoul maintins his own Z2 kernel and has recently updated his tree to 3.13. Here is a pre-compiled kernel: .
The source can be found on github:
You can replace the kernel with that one. That fixes the display issue (will then turn off the backlight when idling for a while) and the power-off issue.
It is true that the rolling release style of Arch can sometimes be problematic. It is well worth it to try ARM Slackware on the Z2. It will probably work fine and it should be even less resource-hungry than Arch. Maybe I'll give it a try. :)
antonio (web) says:
2014-02-21 20:40:11
The Slackware rootfs just works. I have added your archlinux kernel with the modules and the firmware. You only have to modify the fstab. The keyboard works but not the alt keys. You have to add the I have put it in the root directory and with loadkeys I have the keyboard.
For the wireless there is not a nice tool like in archlinux, but you can edit it previously.

If you are familiarized with Slackware (not my case), this image it is ready to use.
David N. (web) says:
2014-05-24 11:59:07
Everything seems to work, except there's an update available for the package "linux-firmware-20140316.dec41bc-1" which is 64mb, and pacman runs out of memory every time I try to update it. What should I do?
wej (web) says:
2014-05-24 15:37:28
David N.: You could temporarily enable some swap on the sd card. It will be slow but should allow you to update the package. You do not need to create a swap partition. A swap file will be fine. You can create an empty file with "dd", then run "mkswap" on the empty file and then run "swapon" on the file.
David N. (web) says:
2014-05-24 16:32:40
wej: How much do you recommend? I tried doing the update with a 1MB swapfile and it still failed.
David N. (web) says:
2014-05-24 18:00:54
10MB was enough. The upgrade went smoothly. I'm still working out a few bugs (i.e. screensaver is white instead of black), but overall I'm very impressed. I'm glad to see the Zipit hasn't been forgotten.

Any idea if ALARM could be installed to internal memory (/dev/mtdblock*)? I don't have enough Mini-SD adapters.
wej (web) says:
2014-05-24 18:14:50
David N.: For the white screen issue, please read the comments above. It is a kernel issue, which can easily be fixed by replacing it with the one I mention above.
Matias (web) says:
2014-10-14 07:15:18
Hello Wej,
If you have some problems with audio, i think it is due to a "bug" in jackd2.
It is because for ARM BogoMips are no longer written in /proc/cpuinfo, so Jackd2 fails to start.
Solutions found in Google suggests to install from latest source.
I'm posting just to let everyone know =)
Bill Zimmerly (web) says:
2014-10-18 10:48:42

I first saw the Zipit Z2 in the October 2014 issue of Linux Journal. I was able to order one from Amazon. I am looking forward to playing around with your customized Arch Linux. Thank you so much for all of your hard work on it!

- Bill
Bill Zimmerly (web) says:
2014-10-28 05:01:35
Now that I have my Zipit Z2 ... how do I install u-boot? (I downloaded the u-boot file, but couldn't find any instrctions for installing it.)
Bill Zimmerly (web) says:
2014-10-28 05:10:19
Nevermind ... I found instructions here:
Eric (web) says:
2015-02-06 14:09:00
Is there a new location for the patched kernel? The dropbox link is dead now. Thanks
wej (web) says:
2015-02-09 08:37:00
Eric: I'll try to find the kernel archive and then put it on my server and post a link here.
wej (web) says:
2015-02-25 11:37:35
I couldn't find a copy of the kernel I have linked above and I currently do not have the time to build a new one, but Mozzwald has built a 3.17 kernel that should work fine with Arch:
Nathan (web) says:
2015-02-26 21:04:37
The kernel above works fine, but won't display any messages during boot.
wej (web) says:
2015-02-28 16:59:46
Nathan: That's probably due to the kernel's default configuration. My guess would be that it is configured to output the messages on the serial port instead of the display. It should be possible to adjust that through the uboot configuration.
joerango (web) says:
2015-02-28 21:50:35
Wej, I can't get Mozzwald's 3.17 kernel to work with your archLinux image. The kernel boots but is not able to find init,

I changed the uboot.script to use tty0 as the console and removed splash=silent quiet from the bootargs. Now I can see the error message: No working init found. I tried to add init=/usr/bin/init to the bootargs but this didn't help.

The kernel and the uboot script included in your image work fine though.

Nathan, have you used the same image with Mozzwald's 3.17 kernel?
joerango (web) says:
2015-02-28 22:59:06
Ok, I figured it out. I was extracting Mozzwald's kernel to the root of my card. This overwrote the /lib symlink and put the modules inside /lib/modules.

I moved /lib/modules/3.17.0+ /usr/lib/modules and created a new symlink /lib --> /usr/lib. I am not able to boot with the new kernel.

Hope this helps someone else! And thanks wej for your efforts with the Zipit!
joerango (web) says:
2015-02-28 22:59:40
correction. I am now* able...
deeice (web) says:
2015-03-08 15:00:04
I finally found some time to play with the archLinux image. It's a bit bloated compared to Openwrt, but package selection is broader, so I can see the appeal. Full system upgrade seems to have worked with a 64MB swap file. Make and gcc are also working well enough with the swap. I installed the SDL package (without it's depends) and it runs on fbcon with the ENV vars set. So I compiled gmu with mp3 support right on the zipit. Gmu uses about 60% cpu playing internet radio at 208MHz, but no skips. I like it.
wej (web) says:
2015-03-10 09:07:51
deeice: That's neat! :)
Sure, Arch is a little bloated for the Z2 and pretty much on the edge when it comes to memory usage on the Z2, but at least with swap it is pretty usable.
Using zram based swap in combination with disk based swap can speed things up a bit when giving the zram based swap priority over the disk based one.
splugi (web) says:
2016-05-20 23:41:13

I followed your instructions but unfortunately it doesn't load from the sd card. I have previously installed openwrt on my Z2, using z2uFlashstock v0.3 and I suspect that the uboot skips the sd card and goes straight into loading openwrt from the internal memory. Do you have any idea how I could solve this?
wej (web) says:
2016-05-26 07:01:33
splugi: If you can't not from any SD card, it might be a uboot problem. There are different versions of uboot for the Z2 with different configurations out there. So there might be one that is configured to boot only from the internal flash by default.

I'd say a more likely reason for the boot problem could be an incompatibility of the Z2 with the partciular SD card. The Z2 is quite picky when it comes to SD cards. Usually cards with 2 GB or lower are the most reliable. If possible, try with another card.

Leave a comment