Without further adieu from me to you, Das U-Boot for the Z2!
Z2 U-Boot
For the most part U-Boot works and can be flashed without much worry, unlike in the recent past. SDHC is now supported. There's still issues when trying to flash from a stock Zipit to U-Boot, so this guide is for a Zipit that has already been flashed to run the 2.6.29 kernel (ie you're already running z2buntu, rootnexus, sidetrack, debian, etc).
An item of note: After U-Boot is installed, there is no longer a way to "shutdown" the Zipit. It can only be suspended or rebooted. Install pm-utils (sudo apt-get install pm-utils) and run sudo pm-suspend to put the Zipit in suspend mode. There are some people working on getting the Zipit to enter "deep sleep" when you halt the system, but this is still in the testing phase.
First, here's a little U-Boot info. The full featured U-Boot bootloader replaces the original Z2's blob bootloader. With U-Boot, you can run scripts at boot time that check for and run applications, kernels, etc from locations in flash or an SD card. Geordy has already played around with the scripts to allow booting the sidetrack userland. U-Boot first tries to load it's environment from flash (0x40000-0x60000 a.k.a. mtdblock1). If there's no environment there or it's corrupted, it uses the default environment.
The default U-Boot environment first looks for an SD card with a FAT partition1 that contains "uboot.script" and runs it. If that is not available, it tries to boot whatever is in flash at 0x60000 (aka mtdblock2).
The environment I've included first looks for an SD card with an ext partition1 that contains "/boot/uboot.script" and runs it. If that is not available, it looks for the FAT partition1 containing "uboot.script". If neither are found, it resorts to booting from flash at 0x60000.
Now, on to the flashing process. Again, this will only work if you have flashed from the stock app to the 2.6.29 kernel.
U-Boot Loading If you would like to keep your current rootfs it's easiest to prepare it for uboot and flash from it. First, you should fix any errors on your current rootfs so it can boot properly. On a Linux PC, run fsck -y /dev/YOURDEVICE, where YOURDEVICE is the correct partition on your SD card. Next, download and extract the uflasher tarball on your Zipit. Next, download the 2.6.35 kernel to your Zipit. Extract the kernel tarball as root to the root directory of your Zipit.
tar -pxvf /path/to/z2-2.6.35-rc3_07162010_modular.tar.bz2 /
That puts the modules in /lib and puts the kernel and uboot.script in /boot. Now, make sure you are not running X, then move to the uflasher folder and run the flash.sh script as root. This walks you through the flashing process. After the flashing is complete, power down your Zipit (remove AC and battery). After you plugin your Zipit you should see the U-Boot console rotated 90 degrees. Support for splash screens is built into this version of U-Boot but I have not tested it. A splash screen would look much better than the rotated U-Boot console.
You can also flash to U-Boot by downloading my base z2buntu with u-boot flasher tarball or image file. This can be copied to an SD card and be booted from a 2.6.29 Zipit or a ubooted Zipit. It contains a VERY basic Ubuntu rootfs and the uflasher script. At the login prompt, enter user and ubuntu for the username/password, respectively. Then follow the motd instructions to start the flash script.
Linux Kernel
Thanks to Marex for porting and compiling U-Boot for the Z2, getting the Zipit code in the mainline kernel, and creating the flash script. Thanks to Marshall for hosting some files. Thanks to gpsfan for figuring out all the USB host goodness. Thanks to rkdavis for bricking one of his Z2's for the team and his overall help. Thanks to Geordy and ssieb for taking the plunge (shortly after me) to U-Boot.

Booting from USB
Hello,
I've been eyeballing getting one of these. I see that there is a hardware mod available to enable USB Host Mode. If I were to perform said hardware mod and install a small USB flash drive inside the case and soldier it to the USB pins, is it possible to modify u-boot to attempt to boot off the USB host instead of the SD card?
Booting from USB
I'm not sure there's enough room to get a USB Flash drive inside the zipit, but who knows, maybe it can be crammed in there somewhere. I'm sure there's a way to boot off USB, but I haven't tried. You might need to compile a kernel to put in flash that will load the filesystem off the USB drive.
It Works!
Thank U, for your hard work!
After getting "u-boot" installed audio finally works. On "my" zipit your "u-boot" upgrade/.img file would not load, however following the your "steps" to transfer and install U-boot to my debian 2.6.29 rootfs was fine.
Thank You again, for your fantastic work. Now I can experiment :)
PS
Took me a little frustration to track down the login for user/password for ubuntu with x.
Great!Aircrack would be great
Are there aircrackdrivers for this device?
Aircrack
It appears there are not aircrack drivers available for Marvell Chipsets.
http://www.aircrack-ng.org/doku.php?id=compatibility_drivers
AWESOME
hey thank you for the scripts and the instructions . The flash seemed to happen seamlessly. Thanks to the hard work of so many and an elite few like you noobs like me can enjoy this little device :)
WI-FI error
Hi I am getting the same errors as those described by sergio
also just after booting before login i get these
hub 1-0:1.0 USB hub found
hub 1-0:1.0 3 pots detected
usb 1-2: new full speed USB device using pxa27x-ohci
usb 1-2: device descriptor read/64 ,error -62
usb 1-2: device descriptor read/64 ,error -62
usb 1-2: new full speed USB device using pxa27x-ohci
usb 1-2: device descriptor read/64 ,error -62
usb 1-2: device descriptor read/64 ,error -62
libertas :00:50:43:02:fe:01 , fw 9.70.3p37 ,cap 0x0000
libertas : wlan0 :Marvell WLAN 802.11 adapter
usb 1-2: new full speed USB device using pxa27x-ohci
usb 1-2: device not accepting address 4 ,error -62
usb 1-2: new full speed USB device using pxa27x-ohci
usb 1-2: device not accepting address 5 ,error -62
hub 1-0:1.0: unable to enumerate USB device on port 2
Ubuntu 9.04 zipit-ubuntu tty1
zipit-ubuntu login:
-----------------------------------------------------------------------
also sudo setup-wifi is not working after the changes
for wlan0 were made in the script. COuld you point me towards what could be the issue. Thank you .
USB Errors and Wifi Setup
The USB errors are 'normal'. If you don't want to load USB at boot, remove the USB kernel modules from /lib/modules.
Can you go into more detail about what is not working with wifi? Does the script run? Do you get any kind of error messages? Are you able to manually connect to an access point from the command line?
I did try to connect
I did try to connect manually
these were the steps I follwd
#sudo ifconfig wlan0 up
#sudo iwlist wlan0 scanning (which did not yield any result )
#sudo iwlist wlan0 scanning essid MYESSIDID (this one did give me an huge output )
#sudo iwconfig wlan0 key XXXXXXXXXXXX
#sudo dhclient
this is whats fails
Listening on LPF/wlan0/00:50:43:02:fe:01
Sending on LPF/wlan0/00:50:43:02:fe:01
Sending on Socket/fallback
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
No DHCPOFFERS received.
No working leases in persistent database - sleeping
sudo iwlist wlan0 scanning is
sudo iwlist wlan0 scanning is showing results now.but the error of No dhcp offers received remains
runninf setup-wifi given the
runninf setup-wifi given the following error
line 20:Inavlid configuations line "Passphrase must be 8..63 characters'.
line 25:Inavlid configuations line "Passphrase must be 8..63 characters'.
Failed to read or parse configuration 'etc/wpa_supplicant.conf'
up- or downfrade?
hi,
when i replacedthe bootloader with u-boot, can i still up- or downgrade the kernel using the autoflasher-script?
gimmebottles
Upgrade
You don't need to flash your Zipit to upgrade the kernel, you only need to replace your old kernel. So, if your kernel resides on your ext partition at /boot, then just replace it and the modules at /lib/modules/kernelversion
If you want to upgrade U-Boot, you can run the "uflasher" script I've created or flash via U-Boot
uboot
i'd did your trick and its working :)
Like a charm.
Only a small question :
When booting up without an sd or a broke one, I can't turn it off.
When I push reset it just restarts and the power button give me no reaction.
Only thing I can do now is unplug the battery.
Or is there an other way ?
"Shutdown"
After U-Boot is installed, there is no longer a way to "shutdown" the Zipit. It can only be suspended or rebooted. Install pm-utils (sudo apt-get install pm-utils) and run sudo pm-suspend to put the Zipit in suspend mode. There are some people working on getting the Zipit to enter "deep sleep" when you halt the system, but this is still in the testing phase.
HELP! Cannot suspend for Wifi doesn't work
Hi,
Wifi used to work OK with rootnexus but now that I have Z2buntu it won't work anymore, setup-wifi keeps throwing errors at me, and the error messges flash so fast I can't write them down. Any idea?
TIA
Wifi issues
Did you flash U-Boot? If so, you could try my new image: http://mozzwald.com/node/72
Without more specific errors it's a bit hard to determine what the issue is.
No luck with new z2buntu
The Wifi configuration program does not find my Wifi network (only "Cancel N/A" is shown).
I can see the Wifi driver in the Libertas directory, so where did I go wrong?
Could it be because my network is neither wep- nor wpa-enabled?
Yes, I successfully flashed
Yes, I successfully flashed U-Boot. I'm gonna give your new image a try.
Hey Mozzwald how big is the
Hey Mozzwald how big is the minimal z2buntu rootfs image? I want to download it but I'm wondering because of my bandwidth cap
Size
about 370Mb