From: Wayland Bruns (wayland@companionlink.com)
Date: Wed Jul 10 2002 - 12:02:24 EDT
To All,
After much frustration, I have succeeded in gleaning the correct
instructions for restoring WinCE using a standard Windows PC and not
linux. As this was not obvious from the webpages, since I have never
used dd, here are my notes. Note: This method requires an iPaq serial
cable.
1. Connect to the iPaq
Use HyperTerminal. Set up a direct COM connection at 115200 baud,
8,none,1,none. Boot the iPaq and with some older bootloaders you need
to press a space bar. In Hyperterminal you should see "boot>"
2. Check bootloader version
Look on the iPaq for a version number. If it is not found, or if it is
lower than 2.18.01 you need to update your bootloader. To do this
download 2.18.01 from
ftp://ftp.handhelds.org/pub/linux/compaq/ipaq/v0.30/bootldr-2.18.01.bin.
After the download you should check the md5sum to be sure the file is
correct. Then in hyperterminal type "load bootldr". It will wait for
Xmodem. In Hyperterminal select Transfer|Send File, select your
bootloader file and select Xmodem as the protocol. This download takes
a few minutes, and then the iPaq will process it. When complete, reboot
the ipaq. Verify the version number.
3. Obtain the WinCE image portion of an iPaq ROM, divide it into chunks
Presuming you do not have a ROM image, you need to get one. The links
and general instructions are on
http://www.handhelds.org/z/wiki/Restoring%20Windows%20CE%20from%20the%20Compaq%20iPAQ%20Update.
Once you have the appropriate NK_*.nbf file you need to process it to be
the correct image. To do this, you need a binary file editor. I used
MFC in binary mode, the handhelds page suggests using HexEdit 2.1
a. Using your hex editor, trim the first 32 bytes from the file. This
is simply a header.
b. Starting from the back of the file, save all bytes from 0x00c00000
to flash_00c00000.bin. This will make a file that is 4194304 bytes long
(0x400000 bytes).
c. Then save all bytes from 0x00800000 to 0x00bfffff to
flash_00800000.bin
d. Then save all bytes from 0x00400000 to 0x007fffff to
flash_00400000.bin
e. Finally save all byts for 0x00040000 to 0x003fffff to
flash_00040000.bin. This will make a file that is 3932160 bytes long
(0x3C0000 bytes).
f. You can md5sum your files and compare with
http://www.handhelds.org/projects/wincerestoration.html. The file
0x00040000.bin will not have a comparison as samples use 0x00000000
instead.
4. Load the WinCE Image
Boot the iPaq and enter Serial Bootloader Console mode using the
calendar key. In Hyperterminal, this should give you the "boot>"
prompt. At the "boot>" prompt enter "load flash 0x00c00000". Mind the
zeros. The iPaq will prompt for Xmodem. Select Transfer|Send file,
browse to the flash_00c00000.bin
file, and make sure the protocol is Xmodem. This transfer will take
about 15 minutes. The iPaq will respond saying "00380000 bytes loaded
to C0000400". When complete, repeat the process using 00800000, then
00400000, and finally 00040000. Each will take another 15 minutes or
so. When complete you will get the "boot>" prompt. At this point you
can type "boot wince" and it should work correctly. If not, verify your
files using md5sum and comparing to the wincerestoration webpage.
5. Once in Windows CE you can verify the ROM using the Q menu,
Utilities.
Notes: Don't know why you can't load the whole image at once. One page
indicates that there is a buffer problem with xmodem.
Also, it seems dangerous to follow any instruction to "load flash
0x00000000" as this reloads the boot loader. Any errors with that and
the iPaq will no longer boot. Loading the bootloader using "load
bootldr" was very dependable for me (I did it 5 or 6 times). It seems
to me that as long as your remaining loads are to flash 0x00040000 or
higher then you can make all sorts of mistakes (as I did) and still
recover.
I hope this helps someone else save time.
Wayland
This archive was generated by hypermail 2.1.5 : Fri Jan 17 2003 - 17:47:04 EST