Flashing the Neo 1973
From Openmoko
English • العربية • Български • Česky • Dansk • Deutsch • Esperanto • Eesti • Español • فارسی • Suomi • Français • עברית • Magyar • Italiano • 한국어 • Nederlands • Norsk (bokmål) • Polski • Português • Română • Русский • Svenska • Slovenčina • Українська • 中文(中国大陆) • 中文(台灣) • Euskara • Català
This describes how to update your Neo1973 to the latest software. We'll update the kernel, the root filesystem and optionally u-boot partitions in the internal flash memory.
- MacOS X users: please refer to MacOS X.
- Users without Linux please refer to No Linux for the moment.
You may prefer to read directly :
Contents
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.
A list of download locations can be found at Download.
Changelogs can be found at:
Get:
- dfu-util
- (this is the part that runs on the PC, that pushes the files across the USB to the phone)
- openmoko-devel-image-fic-gta01-2007********.rootfs.jffs2
- uImage-2.6.21.*-moko*-r*_0_****_0-fic-gta01.bin
- for phase 0 (Bv03) phones:
- Tested by a few people:
u-boot-gta01bv3-r8_70124c2602ae2d4c5d3dba05b482d91548242de8_0_2040.bin
MD5SUM: 60c5aeba1bd6642b05b3a5e6f2dafe83 - Tested by hrw:
u-boot-gta01bv3-r8_70124c2602ae2d4c5d3dba05b482d91548242de8_0_2062.bin
MD5SUM: 716f1eba9b0f2be4a0a3be4a56724935
- 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:
U-Boot .. === BOOT MENU === BOOT Set console to USB Set console to serial Power off Boot from SD Factory reset Press [AUX] to select, [POWER] to execute.
- Plug Neo1973 into host with supplied USB cable. (Plug the phone directly into the host not via a hub.)
Note: If the U-Boot 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 U-Boot to not exhibit this behaviour. To do so, please connect to the U-Boot bootloader:
cu -l /dev/ttyACM0 GTA01Bv4 # setenv boot_menu_timeout 65000 GTA01Bv4 # saveenv
For those that are unfamiliar with cu, to exit you need to press "~."
(You may have to install the uucp package to have access to cu, and maybe also "chown uucp:uucp /dev/ttyACM0
" as root before it will work)
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. First determine what hardware revision you have finding hardware revision, so that you can download and install the correct U-Boot.
You'll probably only want to update u-boot if you have the debug board for fixing failed u-boot updates. You can also check the current partitions.
Note: It may be necessary to run the application as root (at least in Ubuntu and Debian).
Note: In case there are more than one available USB devices use -d 0x1457:0x5119 option.
To update u-boot:
If you own a FreeRunner don't be too scared, though: Unlike nearly any other device on the market the FreeRunner contains a second bootloader on a write protected chip - that is still there, even if flashing the original bootloader goes horribly wrong. You can always make the phone use this bootloader instead by pressing the power button whilst pressing the Aux button - and get a second and any successive try to flash the u-boot loader the right way. In theory it should therefore be impossible to brick your phone completely enough by flashing the bootloader that a debug board is needed to unbrick it.
- Download the newest u-boot binary from http://downloads.openmoko.org/distro/releases/Om2008.12
- start the cellular phone by pressing power whilst pressing the aux button.
- Run the following command, but Note especially that the image used in the line below is for GTA02_v5.
dfu-util -a u-boot -R -D uboot-gta02v5-latest.bin
The u-boot of a GTA01B_v03 (And only of a GTA01B_V03, not for example a GTA01B_v04) can be flashed with the following image: ./dfu-util -a u-boot -R -D u-boot-gta01bv3-latest.bin
- The device is now flashed:
dfu-util - (C) 2007 by Openmoko Inc. This program is Free Software and has ABSOLUTELY NO WARRANTY
Opening USB Device 0x0000:0x0000... Claiming USB DFU Runtime Interface... Determining device status: state = appIDLE, status = 0 Device really in Runtime Mode, send DFU detach request... Resetting USB... Opening USB Device... Found Runtime: [0x1d50:0x5119] devnum=9, cfg=0, intf=0, alt=1, name="u-boot" Claiming USB DFU Interface... Setting Alternate Setting ... Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing Transfer Size = 0x1000 bytes_per_hash=4316 Starting download: [##################################################] finished! state(2) = dfuIDLE, status(0) = No error condition is present Done! Resetting USB to switch back to runtime mode
- The last message (status(0)) tells us everything just worked fine - at the next boot the device will be started by the newest uboot loader.
To update the kernel:
./dfu-util -a kernel -R -D ./uImage-2.6.21.1-moko10-r0_0_1883_0-fic-gta01.bin
Flashing the kernel will probably take less than 1 minute. If you're having trouble, you may want to compare the output that you see to a "known good" U-Boot/dmesg/dfu-util output. The phone display should show "Starting DFU DOWNLOAD to partition 'kernel'.
To update the root filesystem: ./dfu-util -a rootfs -R -D ./Openmoko-devel-image-fic-gta01-20070501054014.rootfs.jffs2
Flashing the root filesystem will probably take around 13 minutes. Note that it can take over an hour if you are using a XEN VM for doing the flash.
Here is some "known good" output from U-Boot, dmesg, and dfu-util. The phone display should show "Starting DFU DOWNLOAD to partition 'rootfs'.
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).
Important Notes for early adopters:
Some old U-Boot versions are very buggy:
For U-Boot versions until somewhere in 2007 if you uploaded your rootfs image that is smaller that previous one it wouldn't work - you needed to attach to the U-Boot bootloader first, erase NAND partition that would contain the rootfs later and then upload your rootfs:
cu -l /dev/ttyACM0 GTA01Bv3 # nand erase rootfs
Note, that it might be wise to type, not drag-and-drop the "nand erase rootfs" line since when characters arrived too fast u-boot versions until mid-2008 tended to "eat" characters.
Also you may have to press the AUX button every 25 seconds or so to prevent the phone from going to sleep while being flashed. Very early versions of U-Boot also did not erase the rootfs before flashing it at all. To do that, do minicom /dev/ttyACM0, then nand erase rootfs, like written above.
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
or (newer versions)
opkg update && opkg upgrade
and have a look at additional ipkg repositories.
Question to anybody who knows: The kernel the openmoko boots from is in a different partition than the root file system in most setups right now. In former times there always was a warning that ipkg updates /boot/uImage - the location where the kernel that matches the current rootfs can be found - but didn't update the partition the kernel is loaded from in the default setup. The following line manually updates the kernel on this partition:
cat /boot/uImage >/dev/mtdblock3
Is typing this line still necessary? User:Peterpall
Troubleshooting notes
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 U-Boot 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.
A command line script to simplify dfu-util
DFUScript developed to assist users who have multiple devices in using dfu-util via the command line. Information on where to download and use DFUScript can be found on DFUScript