|
|
Installing the bootloader using SynCE
Introduction
SynCE transfers between Linux and Microsoft Pocket PC using the same protocol that "ActiveSync" uses.
SynCE is quite new and evolving rapidly, and its use for installing Linux on the iPAQ is
also new, so it is quite possible you will have difficulties given its early state and rapid
evolution. The directions below were written using SynCE version 0.7. Using
SynCE does spare you from having to have a Windows system to
install Linux on your iPAQ.
If you have difficulties, you can always use the ActiveSync method
of bootloader installation.
Bootldr Installation and Backup
- First: install SynCE.
- Plug in your serial cable from your system to the iPAQ, and make sure the
iPAQ is plugged into its power-supply. You don't want your iPAQ to run out of power in the middle
of this procedure.
- Startup SynCE:
Start the SynCE communications daemon and configure your serial port on your
Linux system by executing the following commands, which start up SynCE, configure
your serial port, and start up a PPP connection to the iPAQ. Some of the commands
must be executed as root, and some must not be executed as root: the commands that
must be exectuted as root are indicated by use of the "sudo" command below.
If all is well, you'll get cheery connect tones from your iPAQ, and ppp0 will
be alive and well on your Linux system, and the iPAQ can be pinged using
the address shown by your ifconfig ppp0 information.
- Two programs have to be copied to the iPAQ:
a program "BootBlaster" that is used to rewrite the
boot sector in flash with a bootloader "bootldr" able to support Linux (and PocketPC).
For H3100, H3600, H3700 and H3800 machines, the flash rewriter is named
BootBlaster_1.18.exe.
For H3900, H5400, and H5500 machines, it is named
BootBlaster3900-2.3.exe.
For H3100, H3600, H3700 and H3800 machines, the boot loader is named
bootldr-sa-2.20.4.bin.gz.
For H3900, H5400, and H5500 machines, it is named
bootldr-pxa-2.20.4.bin.gz.
Bootblaster will take either gzipped or not-gzipped bootloader images; best to
use the supplied .gz format files.
The following SynCE commands will do the copy of these files
for all but the H3900:
pcp bootldr-sa-2.20.4.bin.gz ":/My Documents/bootldr.bin.gz"
pcp BootBlaster_1.18.exe ":/Windows/Start Menu/Programs/Bootblaster.exe"
For the H3900, the commands are:
pcp bootldr-pxa-2.20.4.bin.gz ":/My Documents/bootldr.bin.gz"
pcp BootBlaster_1.19.exe ":/Windows/Start Menu/Programs/Bootblaster.exe"
- Start up BootBlaster
From Pocket PC: "Start->Programs-Bootblaster", or from
Linux, by the command:
prun "/Windows/Start Menu/Programs/Bootblaster.exe"

- Save your PocketPC image for later restoration, if desired.
-
Execute "Flash -> Save Bootldr .gz
Format" in BootBlaster to save the bootloader in file "\My
Documents\saved_bootldr.gz" on the iPAQ.

Note that the Linux Bootloader will also boot PocketPC,
so restoration of this file is not generally required. Right at
the moment, there is a bug in the Linux Bootloader which causes
PocketPC to reinitialize itself every few boots. You may indeed
wish to keep and restore this bootloader if you restore PocketPC.
-
Execute "Flash -> Save Wince .gz
Format" in BootBlaster to save the PocketPC image in file
"\My Documents\wince_image.gz" on the iPAQ. This takes two to
three minutes.
If no backup of Pocket PC is desired, you can skip this step entirely.
Note that this procedure saves your bootloader and Pocket PC executable image: it does not preserve any
data you may have entered in your iPAQ under Pocket PC. So also synchronize your iPAQ to your host
to preserve this data. Note that Familiar does not *yet* have any way to resynchronize this data
to Linux (we hope/expect to have Linux<->Host synchronization in a near future release).
- Copy these files back to your Linux system by executing the following commands:
pcp ":/My Documents/saved_bootldr.gz"
pcp ":/My Documents/wince_image.gz"
Copying the bootldr file takes about 10 seconds over a serial line.
As the Pocket PC image is pretty large, and serial lines slow, the copy of Pocket PC takes quite a while
over a serial line (~20 minutes).
As in any backup files, please save them in a safe place.
We save them in .gz form, both to speed copying them to the host, but more imporantly,
to allows you to check whether the files have
been correctly copied due to the internal checksum. We highly recommend checking
the checksum on both files before presuming your backup is safe (see the gzip man
page for details).
- Install the bootloader.
Before continuing, be sure that the iPAQ is plugged into
external power, and that the battery is charged, to protect against the
small chance of power failure during the very limited period the iPAQ is
reprogramming the bootloader flash. Do NOT
touch the power button or reset button on your iPAQ until you have
performed the "Verify" step below.
From the "Flash" menu on BootBlaster, select "Program".

A file dialog will open allowing you to select the bootloader to use.
Select bootldr.bin.gz, which may have a version number embedded in it. We use a gzip file because it has an internal checksum.
Wait patiently. It takes about 15 seconds to program
the bootloader. Do
not interrupt this process, or the iPAQ may be left in an
unusable state.
From the "Flash" menu on BootBlaster, select "Verify".
- If it does not say that you have a valid bootloader, do
NOT reset your iPAQ, do NOT turn off your iPAQ.
- Instead, try programming the
flash again.
- If that doesn't work, program your flash with your
saved bootloader.
- If that doesn't work, send e-mail to
bootldr@handhelds.org and/or get on the IRC and ask for help.
Leave the iPAQ plugged in and do NOT reset it or turn it off.
If everything has gone well, you have successfully
installed the CRL bootldr program, which can run either Linux or PocketPC. As yet,
your PocketPC image is intact and should restart normally; the next step actually installs
Linux (overwriting Pocket PC).
Shut down SynCE, "killall dccm", and
continue to the install serial step.
Scripting
Paulo writes: "I install a lot of iPAQ with Linux, so i built my own script to do that from my Linux Box:"
#!/bin/sh
dccm
sudo synce-serial-config ttyS0
sleep 1
sudo synce-serial-start
sleep 3
pcp bootldr-sa-2.20.4.bin ":/My Documents/bootldr.bin"
sleep 1
pcp BootBlaster_1.19.exe ":/Windows/Start Menu/Programs/Bootblaster.exe"
sleep 1
prun "/Windows/Start Menu/Programs/Bootblaster.exe"
sleep 1
synce-serial-abort
sleep 1
killall dccm
Jim Gettys
|