Skip to main content

Ubuntu on the Zipit Z2

UPDATE: Marshall at retroactive.be was kind enough to lend me some bandwidth for the z2buntu image. There some pretty cool stuff on his site. My personal fave is the Multari handheld Atari system.

Ubuntu is now available for the Zipit Z2! For the most part, the Ubuntu rootfs is the same as Debian, but Ubuntu repos contain the necessary programs for compiling. This means you can compile directly on your Zipit! I successfully compiled a hello-world.c program. If you want to make your own rootfs, follow the instructions at https://wiki.ubuntu.com/ARM/RootfsFromScratch, or you can download mine. It has to run Ubuntu Jaunty which supports ArmV5. Karmic and Lucid support newer Arm processors. If you create your own rootfs using rootstock, before you boot it, rename /etc/init.d/ondemand to something else. This script will cause the zipit to freeze shortly after bootup.

On a linux system as root, use dd to copy the 1Gb ext3 image to your SD card (change sdx to your SD card).

dd if=zubuntu-jaunty-basic-rc1_05172010.img of=/dev/sdx

You can increase the size of the partition with gparted. There's no need for a swap partition as I have created a 128Mb swap file. Also, you will need to copy your wifi firmware to /lib/firmware/libertas. If you can't find your wifi firmware, these are available for download. They must be named gspi8686.bin and gspi8686_hlp.bin

Login with the following:

Username: user
Password: ubuntu

Use sudo (or sudo su) for root access.

Startup programs:
Lid Power Management - /etc/z2pwr.sh
Wifi reset/reload - /etc/wificfg.sh
Rkdavis keymap - loadkeys /etc/keymap.map
Alsa
sshd

Other Programs:
Set backlight brightness with "keys" and "lcd" commands. Options are max, high, med, low, or a number. (run as root)
example: sudo lcd med

Rkdavis' Easy Wifi Configurator script (run as root)
/home/user/setup-wifi.sh

If you stick with blob then

If you stick with blob then you'll be sticking with the 2.6.29 kernel. The kernel modules (aka drivers) for the z2 hardware need to be available on the filesystem that you are booting. These are found in /lib/modules. Just copy them from your current rootfs to the new rootfs after you extract it to your sd card.

It's been so long since I used blob, I don't remember the partition setup requirements. My z2buntu u-boot image contains a fat fx15 partition first, then an ext partition with the rootfs. This may or not work for blob. You can download the tarball instead and setup the partitions correctly yourself then extract it.

Thanks!

This is the only place I've found out about Ubuntu on the Zipit Z2. Many thanks for the instruction links and thank for sharing your own results.

great info

This is really helpful. It's very applicable to our current project.

SSH

I cannot get ssh server running on z2ubuntu. I see that you already installed it, but I cannot connect to it. I even tried from the ZipIt "ssh user@localhost" and it still doesn't work. Please help!

SSH

What error are you getting? Make sure that dropbear is running.


sudo /etc/init.d/dropbear start
ps aux | grep dropbear

ssh still not working for me

thanks for all the work on this!!!

I am hoping to build a wifi-to-serial adapter using these. Got your image flashed and was able to login and setup wireless, but no ssh. I tried the other poster's suggestion of removing openssh-server and reinstalling it with apt-get, but still no-go. I tried running "sudo /usr/bin/sshd" but it gives a segmentation fault.

Any ideas?

ssh reinstall

try "sudo apt-get purge openssh-server"

still no dice on ssh

thanks for that tip. I did the purge, and then did an apt-get install openssh-server after that. Still no-go. I got a bunch of errors about the date being too far out (I hadn't set the clock yet) and I know sometimes the keys can have trouble with wrong clocks. Tried resetting the date and time to be correct, re-purging, and re-installing. Still no-go. trying to ssh to localhost gives connection refused, and I'm confident the sshd process isn't running.

Trying to run /usr/sbin/sshd now gives "Input/output error". And my dmesg output has TONS of "attempt to access beyond of end of device" for mmcblk0p1.

Is my card not the right size or something? Or corrupted in some way?

Thanks for your help.

FG

I finally got it running. I

I finally got it running.

I ran "apt-get remove openssh-server" then reinstalled it and now ssh works fine. Maybe it was something with your config file...

I'm still trying to get X working, but I always get errors installing xserver-xorg. I tried following your guide, but I still get errors with xserver-xorg. What do you suggest?

xorg

I had xorg running at one point, but chose to get rid of it because it's too heavy for the zipit. I recommend installing xserver-xfbdev which is a little lighter. You could also try my newer release here that has X running already.

Does this newer distro

Does this newer distro require U-boot? If so, how do you flash the ZipIt to U-Boot?

z2buntu & u-boot

The z2buntu I designed for u-boot should work fine on the older kernel, but you will need to put the 2.6.29 kernel modules on the rootfs. If you want to upgrade to u-boot, follow my instructions here.

I think I will just stick

I think I will just stick with blob.

By "you will need to put the 2.6.29 kernel modules on the rootfs" do you mean the files in the z2boot partition?

Sorry about my questions. I know quite a bit about linux but I have a hard time on these embedded systems.

Thank you very much

Kernel Modules

If you stick with blob then you'll be sticking with the 2.6.29 kernel. The kernel modules (aka drivers) for the z2 hardware need to be available on the filesystem that you are booting. These are found in /lib/modules. Just copy them from your current rootfs to the new rootfs after you extract it to your sd card.

It's been so long since I used blob, I don't remember the partition setup requirements. My z2buntu u-boot image contains a fat partition first, then an ext partition with the rootfs. This may or not work for blob. You can download the tarball instead and setup the partitions correctly yourself then extract it.

I understand that a little

I understand that a little more, but I still have a question. Do I copy the /lib/modules from your old blob z2ubuntu image and copy it to the newer z2ubuntu image at /lib/modules after I have written it? Or does it go somewhere else?

Thank you,
Adam

That should do it.

That should do it.

I cannot get it to boot at

I cannot get it to boot at all...

zipit hacks

well doubt this will help n im sure the program is nice but i would just like someone to help me with the hackin of the zipit i purchase 3 of them 2 bricked up i emailed atleast 6 people even people on utube nobody writes back i left my email can sum1 help me cuz im tired of spending 50.00 trying this

Jump on the irc.freenode.net

Jump on the irc.freenode.net #zipit-dev channel. You will get plenty of help there and some assistance unbricking your Zipits. Sweetlilmre just did a fresh, up to date post on recovering a bricked Zipit via jtag right here http://sweetlilmre.blogspot.com/2010/08/zipit-z2-jtag.html

sudo not fount

hi, when i try the command sudo it says:

-bash: sudo: command not found

any ideas?

it seems that my whole

it seems that my whole /usr/bin-directory is empty, apt-get is also not found.

/usr/bin

That's definitely a problem. Either run fsck on your sd card from a linux computer or re-image it.

hi, i did a total re-image

hi,

i did a total re-image and now it runs. i don't know what was the problem.

gimmebottles

z2pwr.sh

Can you share the code for this (or point to the original source)? I've been in-place customizing my Z2 for so long, and have some of my own power scripts, etc... in place, but would love to integrate some more refined features. Thanks!

z2pwr.sh

you can get the script here. This is a modified version of the script that came with rootnexus.

Thanks!

Thanks!

Problems with alsa

Hello!

Firstly, let me thank you for this:
your image is the cleanest I've come across, and I can see the appeal of the lack of an x server, on a device this constrained X almost seems like overkill.

I've tried the rootnexus image and the side-track image, but I think I like yours best.

However, on every image i've tried, I cannot get alsa to work at all.
I keep getting "Device does not exist" errors. I was going to check to see if it was a conf file that was misconfigured, but the output of 'cat /proc/asound/cards'
tells me I have no sound card, though I can plainly see the sound devices in the /dev/ directory.
I was wondering if you knew how I could fix this? Is there some audio firmware I need to load?
I keep hearing people mention audio/video playback on the zipit and I've no idea how they did it.
It's not so much that I need audio or video, but I was going to use your image as something of a jumping off point for my own experiments and I'm afraid without a working alsa device I may run into dependancy issues.

Anyway, I'd appreciate any help you can offer, even if it's just a google link I've overlooked.

Thank you!

Alsa

I'm glad you like Ubuntu on the Zipit.

Make sure that the modules are loading by typing "lsmod". You should have a list that contains these:
i2c-core
i2c-algo-bit
i2c-pxa
soundcore
snd
snd-page-alloc
snd-timer
snd-mixer-oss
snd-pcm
snd-pcm-oss
snd-soc-core
snd-soc-pxa2xx
snd-soc-pxa2xx-i2s
snd-soc-wm8750
snd-soc-z2

If any are missing, the sound will probably work. Make sure they are listed in /etc/modules. If not, add them, reboot, and check to see if they've loaded again. If they have not loaded still, you may need to manually load each one with "sudo insmod /path/to/snd-module-name". If loading them manually works, you can add the insmod lines to rc.local and they will be loaded at startup.

Unfortunately, I cannot test this myself as I have upgraded to U-Boot and a newer kernel, but I would like to know if you get it working so I can post some info. If you continue to have trouble, pop into the #zipit channel on irc.freenode.net and maybe we can figure something out.

Alsa, still.

Here are my commands, and their output:

lsmod | more

libertas_spi
libertas
snd_soc_pxa2xx_i2s
snd_soc_pxa2xx
snd_pxa2xx_lib
snd_soc_lib
snd_soc_core
snd_pcm_oss
snd_timer
snd_page_alloc
snd
soundcore
uinput
1ib80211
pxa27x_udc
evdev

As you can see, a few appear to be missing,

my /etc/modules file is as follows:

#libertas_spi
#libertas
uinput
#evdev
i2c-core
i2c-algo-bit
i2c-pxa
soundcore
snd
snd-page-alloc
snd-timer
snd-mixer-oss
snd-pcm
snd-pcm-oss
snd-soc-core
snd-soc-pxa2xx
snd-soc-pxa2xx-i2s
snd-soc-wm8750
snd-soc-z2

Right now, my zipit, or, more likely, it's cable, seems to have a short in it, so, once I can actually get it to charge, and stay charged, I'll work on attempting to load the missing modules on-device.

Right now, a look in /lib/modules/2.6.29/kernel/sound/ seems to verify the needed modules are all there, save for "i2c-core, i2c-algo-bit, i2c-pxa",

i2c-algo-bit seems to live in /lib/modules/2.6.29/kernel/drivers/i2c/algo/

(You already knew that, but I figure maybe someone else may have trouble finding them)
Though I haven't yet found the remaining two "i2c" modules.

Assuming my cable decides to behave I should have more information for you soon, one way or the other. If I still can't figure it out I'll swing by the irc room.
Strange to think there's a link to said room on nearly every zipit-related blog in the 'verse and I've never thought to swing by >.>

I think I remember reading a tutorial somewhere about upgrading the zipits kernel, I should probably look into that again.
Thanks for your help. Take care!

alsa, continued.

Hey mozzwald.
Finally got around to fixing the zipit's power adapter. Actually I just scrapped it and made the male port connector into an adapter for those 5v cellphone backup chargers. Works decent. Anyway, I reflashed with uboot and the 2.6.35-rc3+ kernel and now alsa works on all the userlands I've tried thus far. I couldn't be more happy-happy. I tried your new z2buntu with X, as well. that's going in an exciting direction, quake runs surprisingly nicely. Nicely enough to get me brutally murdered by monsters in glorious 320x240, anyway. But, I digress. The reason I'm irritating you at this moment is I wanted to ask if you had posted your source modifications or a deb for lxlauncher anywhere yet? I really dig the way z2buntu is developing and lxlauncher is a really nice fit for the zipit, that was A Good Thing you did.

Take care.

LXLauncher Source code

Frankie,

Glad to hear you got your Zipit back up and running, and now with U-Boot. I have previously posted about getting the deb installers for lxlauncher (and it's required packages) here.

Thanks for reminding me though to get off my butt and package up my modified source code that enables keyboard support. All 3 modifications (commented) were done to lxlauncher.c.

http://www.mozzwald.com/zipit/lxlauncher/lxlauncher_+keysupport_src.tar.bz2

After Login

OK, I'm a noob and unlike D2D need someone to hold my hand.
I got the userland to load, but was unable to get to the desktop. I couldn't log in using user/ubuntu so I sudo passwd and no-go. Tried startx, but there's no x-window.
Any help would be appreciated.

V/r,
Lux Aeternus

Login

It should boot to a console/text based login prompt. Type in user for the username and ubuntu for the password. This should get you to a command line. Unfortunately, X is not installed in this image so typing startx will do nothing. Hopefully I will release a working userland with X soon.

help me..

well after I login with user and pass ubuntu it continues in the command line, how do i get to the desktop? whats the command to get to the desktop?prompt. Type in user for the username and ubuntu for the password. This should get you to a command line. Un

http://mozzwald.com/node/51

Torrent available

I created a torrent for people to download this Ubuntu distro here on my page: http://www.notanon.com/zipit/mozzwalds-ubuntu-for-zipit-rc1-torrent/2010... Please help me seed it and share it. This distro has has lot of potential. Can't wait to see RC2.

Ubuntu on the ZipIt

Can I load a gui?

Is this preconfigured for a given desktop?

Sorry, newbie, I tried to load lxde and got this
http://doortodoorgeek.posterous.com/18956894

sideways screen with no mouse/keyboard

GUI

I did mess with a gui, but not on the image I have for download. I wanted to get things working well before I released an image with gui. The mouse emulator is located at /bin/z2mouse-option, the X11 keymap is located at /etc/xkeymap.map which both need to be loaded before you start lxde. You'll need to install the package x11-xserver-utils which has xmodmap that allows you to load the keymap. Also, the screen needs to be setup to rotate. Copy the following into /etc/X11/xorg.conf

Section "Device"
Identifier "Card0"
Driver "fbdev"
Option "fbdev" "/dev/fb0"
VendorName "Unknown"
BoardName "Unknown"
Option "Rotate" "CCW"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
SubSection "Display"
Modes "240x320"
EndSubSection
EndSection

I hope that gets you running.

ahhh

Thanks for the info, at work, will try

btw, great site

closer

Hello Mozzwald

Thanks for the help, te screen trick did work, after login it did have a FAM error, I was able to tab through and hit enter (so the keyboard seems to be working) but I can not seem to get the mouse activated/working, I did use the file from http://aliosa27.net/projects/zipit2/z2mouse-history/

Obviously I am missing something/a step

Please do not feel the need to hold my hand any more, I will just patiently wait for a rev with a desktop, I was just curious