Actually, the maker of the Z2 was kind enough and provided some patches and some hardware information (can be found here). I'm a little suspicious whether the patches and what's in the device correspond, but whatever. Unlike Palm Inc. (whose behavior towards Linux community is very disgusting and rude), the Z2 maker is very open to cooperation with Linux community and very supportive.
Anyway, just recently, I started hacking on a new bootloader for Z2 as the one the device is shipping with is total crap (details left out for the sake of mentally weaker readers). The bootloader of choice was u-boot again. In it's current state, the only problem with replacing BLOB (the original bootloader) with u-boot is that with u-boot, the LCD doesn't work even later in Linux, it just stays blank white. The rest of the hardware works (you can even boot kernel from MMC card, serial console is OK, Flash memory is supported etc.). I suspect the problem with LCD is some GPIO setup problem or PMIC setup problem and will need further investigation. Here's a simple howto to get an u-boot binary for your Z2:
- Clone U-Boot-ARM sources: git clone git://git.denx.de/u-boot-arm.git
- Download patch here and apply it to the sources
- Run the following commands to compile U-Boot for Z2:
- make CROSS_COMPILE=arm-linux-gnueabi- clean
- make CROSS_COMPILE=arm-linux-gnueabi- zipitz2_config
- make CROSS_COMPILE=arm-linux-gnueabi-
BEWARE: THIS PROCEDURE IS DANGEROUS AND MAY PUT YOUR DEVICE TO UNUSABLE STATE (BRICK IT)! THE AUTHOR IS NOT LIABLE FOR ANY DAMAGE CAUSED BY APPLYING THE FOLLOWING PROCEDURE!
Ok, so if you are still brave enough, here's the procedure.
- Run minicom terminal emulator on your PC, set serial port configuration to 115200Bd 8N1 (^A-o).
- Power up Z2, press Enter repeatedly to interrupt autoboot ... you will get bootloader prompt (blob>).
- On your PC, prepare two files from u-boot.bin by issuing the following commands:
- dd if=u-boot.bin of=u-boot.bin.1 bs=64k count=1
- dd if=u-boot.bin of=u-boot.bin.2 bs=64k skip=1
- Now you have to send the files to the device. In the BLOB command prompt type "xdownload blob" without quotes and press ^A-s, select xmodem and navigate to the u-boot.bin.1 file. Send that one.
- Once the above procedure succeeded, continue to sending second part of u-boot. In the BLOB prompt, type "xdownload kernel", do the same sequence as before, that is ^A-s, select xmodem, but this time send u-boot.bin.2 file.
- Now finally you can flash the u-boot into the device. That is done by issuing the following two commands in BLOB prompt (this is the unsafe part, anything to this point was safe): "flash kernel" "flash blob". Once those complete, type "reboot" and you should get an u-boot prompt.
Just a final note to this patch, it needs cleaning up and fixing the LCD problem.