Flashing the Neo 1973
This describes how to update your Neo1973 to the latest software. We'll update the kernel, the root filesystem and optionally u-boot.
|WARNING: If you're updating u-boot and don't have a Debug Board, you might render your unit unusable if the flashing procedure is interrupted|
|WARNING: If you upload a rootfs image that is smaller than the previous one it won't work - you need to attach to bootloader, erase NAND and then upload your rootfs first|
Files to download
The rootfs & kernel images you download need to match. The loadable modules for the kernel are in /lib/modules/ on the rootfs partition - if you get the wrong combination, you will get some error messages during bootup that it cannot access /lib/modules/x.y.z-moko123 - in this case swap either the kernel or the rootfs to match the other's version. Unfortunately the rootfs filename does not seem to tell what kernel version it is compatible with, you just have to try a few. NOTE: At least some combinations seem to boot up fine even if the module versions mismatch so be sure to check the console while it's booting after flashing.
The "moko123" in the error message example above indicates the openmoko patchset version.
Necessary files are at:
- http://chooseopen.com/openmoko/build/ (Unofficial, temporary location of more current builds.)
Changelogs can be found at:
- dfu-util (the precompiled binary on http://buildhost.openmoko.org is for Linux/i386)
- (this is the part that runs on the PC, that pushes the files across the USB to the phone)
- for phase 0 (Bv03) phones:
- Tested by a few people:
- Tested by hrw:
- Tested by a few people:
- for phase 1 phones, uboot update should not be necessary.
Preparing the device for DFU mode
You'll need to boot your openmoko into uboot menu. To do this:
- Unplug all usb devices from the host.
- Hold the phone's AUX button and then press the phone's POWER button.
- You'll need to hold the POWER button for about 4 seconds before the device will turn on. Otherwise the screen will only flash white for a second and the phone won't power up.
- The u-boot menu should appear.
- Plug Neo1973 into host with supplied USB cable. (Plug the phone directly into the host not via a hub.)
Note: If the bootloader remains inactive for about 30 seconds, that is no keypresses or no use of the serial console, the device will automatically power down. You can prevent this by just pressing the AUX button every 30 seconds or so or by telling the bootloader to not exhibit this behaviour. To do so, please connect to the bootloader:
cu -l /dev/ttyACM0 GTA01Bv4 # setenv boot_menu_timeout 65000 GTA01Bv4 # saveenv
No further navigation is needed in u-boot - the device will automatically start flashing the images when told to do so by dfu-util below. After flashing all the files, you can choose the "Boot" option to boot the newly flashed stuff.
Actually flashing things into the device
Double check that u-boot matches your hardware version. You'll probably only want to update u-boot on phase0 phones.
Note: It may be necessary to run the application as root (at least in ubuntu).
Note: In case there are more than one available usb devices use -d 0x1457:0x5119 option.
To update u-boot:
Warning: Do not update u-boot unless you have debug board or are really sure about what you are doing. Flashing a wrong u-boot image will brick your device! Note especially that image below is for GTA01B_v03, not GTA01B_v04
./dfu-util -a u-boot -R -D u-boot-gta01bv3-r8_70124c2602ae2d4c5d3dba05b482d91548242de8_0_2040.bin
To update the kernel:
./dfu-util -a kernel -R -D ./uImage-188.8.131.52-moko10-r0_0_1883_0-fic-gta01.bin
To update the root filesystem:
./dfu-util -a rootfs -R -D ./openmoko-devel-image-fic-gta01-20070501054014.rootfs.jffs2
Notice that it's not normally necessary to update the modules anymore. It's just for people with special needs.
...now, you'll end up with system that boots, but does not see audio/SD card. You'll need to download corresponding modules.tgz and copy them over to openmoko. - UPDATE: GTA01 phones appear to not need this step, as long as you have installed a kernel that matches the version of the modules contained in the root image ('uname -r' will show the kernel version, and 'ls /lib/modules/' will show the modules that are present).
VERY IMPORTANT NOTE (I would consider that as a design flaw - either dfu-util should do it automatically): If you upload rootfs image that is smaller that previous one it won't work - you need to attach to the u-boot bootloader, erase NAND and then upload your rootfs first:
cu -l /dev/ttyACM0 GTA01Bv3 # nand erase rootfs
Old versions of u-boot are buggy: You may have to press the AUX button every 25 seconds or so to prevent the phone from going to sleep while being flashed. It also does not erase rootfs before flashing it... to do that, do minicom /dev/ttyACM0, then nand erase clean rootfs.
Where to go from here
So, now you have one of the more recent kernel and rootfs images, or one of the (semi)official ones, whats next?
You probably want to set up USB_Networking and then configure your Neo1973 some more.
Do not forget to update your Neo1973 using
ipkg update && ipkg upgrade
and have a look at additional ipkg repositories.
If you're facing errors in seemingly random places during the flashing of images, most likely the USB hub or cable through which your Neo1973 is connected is of too poor quality. It is recommended that you always connect the phone directly to the host when using dfu-util.If dfu-util reports a message like the following, before it starts flashing:
Resetting USB... not at least 2 device changes found ?!? Lost device after RESET?just retry the command - it should work on a second run.
This message can also occur if you connect the usb cable before you are in the bootloader menu. You must carefully follow the sequence described at the beginning of this article and not connect the USB cable too early.
dfu-util does not seem to be able to download files if run from linux running under VMWare on a Windows OS host.
See other notes on Dfu-util page.