eCos Home

RedBoot Home


About eCos

Supported Hardware

Downloading and Installation

Documentation

FAQ

Mailing lists

Problems

Licensing

Anonymous CVS

Contributions and Third Party Projects

eCos

iPAQ RedBoot, eCos and Embedded Linux demonstration


On this page, you can try out RedBoot, and demonstration applications of both eCos and embedded Linux on your own Compaq iPAQ PocketPC.

Installing RedBoot

The first step to try the demo is to install RedBoot on the iPAQ. To do this, follow the instructions in the RedBoot User's Guide. As advised and described there, we recommend you use the Compaq OSloader to save your existing FLASH contents.

Prebuilt RedBoot binaries for the iPAQ are available from this page.

Running the eCos MicroWindows/NanoX demo

Once RedBoot is working, you can download and run the eCos MicroWindows/NanoX demo. Prebuilt images are available from ftp://ecos.sourceware.org/pub/ecos/ipaqdemo/ecos/ or (preferably) a mirror site closer to you.

Loading via TFTP

To load the demo via TFTP, ensure the images are located in /tftpboot on your TFTP server and execute these commands:

RedBoot> lo -d -r -b 0x200000 /tftpboot/ecosromfs.gz
Raw file loaded 0x00200000-0x002736c0
RedBoot> lo -r -b 0x20000 /tftpboot/nanoxdemo.gz
Raw file loaded 0x00020000-0x00054d3c

Loading via serial

To load the demo via serial, for example with XMODEM, type the following command:

RedBoot> lo -d -m xmodem -r -b 0x200000
Now send the ecosromfs.gz file via XMODEM. Then enter the command:
RedBoot> lo -m xmodem -r -b 0x20000
Send the nanoxdemo.gz file via XMODEM.

Running the demo without programming in FLASH

It is possible to run the demo with just the nanoxdemo.gz file loaded (without needing the ecosromfs.gz file), without programming anything into the FLASH. The demo may be run simply with the commands:

RedBoot> lo -d -r -b 0x20000 /tftpboot/nanoxdemo.gz
Raw file loaded 0x00020000-0x00054d3c
RedBoot> go 0x20040

Note the addition of the "-d" flag which indicates to uncompress the data as it is being loaded,

However note that without the ecosromfs.gz file programmed into FLASH, the Scribbles application will not work.

Installing permanently in FLASH

This demo may be permanently installed in FLASH with the following commands. Before these commands are executed, you must first ensure the two images have been loaded as described above, but do not enter the go command.

If you have not already initialized RedBoot's FLASH image system, do so now:

RedBoot> fi in
About to initialize [format] FLASH image system - are you sure (y/n)? y
*** Initialize FLASH Image System
    Warning: device contents not erased, some blocks may not be usable
... Unlock from 0x50fc0000-0x51000000: .
... Erase from 0x50fc0000-0x51000000: .
... Program from 0x01f70000-0x01f70400 at 0x50fc0000: .
... Lock from 0x50fc0000-0x51000000: .

Now program the images:

RedBoot> fi cr ROM_DISK -f 0x50f00000 -l 0x80000 -b 0x200000
... Erase from 0x50f00000-0x50f80000: ..
... Program from 0x00200000-0x00280000 at 0x50f00000: ..
... Unlock from 0x50fc0000-0x51000000: .
... Erase from 0x50fc0000-0x51000000: .
... Program from 0x01f70000-0x01fb0000 at 0x50fc0000: .
... Lock from 0x50fc0000-0x51000000: .
RedBoot>
fi cr eCos_demo -f 0x50ec0000 -l 0x40000 -b 0x20000 -r 0x20000 -e 0x20040
... Erase from 0x50ec0000-0x50f00000: .
... Program from 0x0020000-0x00060000 at 0x50080000: .
... Unlock from 0x50fc0000-0x51000000: .
... Erase from 0x50fc0000-0x51000000: .
... Program from 0x01f70000-0x01fb0000 at 0x50fc0000: .
... Lock from 0x50fc0000-0x51000000: .

Running the Embedded Linux demo

Once RedBoot is working, you can download and run the iPaq Embedded Linux demo. Prebuilt images are available from ftp://ecos.sourceware.org/pub/ecos/ipaqdemo/linux/ or (preferably) a mirror site closer to you.

Loading the JFFS2 image via TFTP

To load the JFFS2 filesystem image via TFTP, ensure the image is located in /tftpboot on your TFTP server and execute these commands:

RedBoot> lo -r -b 0x100000 /tftpboot/ipaqjffs2.img
Raw file loaded 0x00100000-0x00c99540
      

Loading the JFFS2 image via serial

To load the JFFS2 filesystem image via serial, for example with XMODEM, type the following command:

RedBoot> lo -m xmodem -r -b 0x100000
      
Now send the ipaqjffs2.img file via XMODEM.

Saving the JFFS2 image to FLASH

Now save this image to flash with the command:

RedBoot> fi cr JFFS2 -f 0x50100000 -b 0x100000 -l 0xdc0000 -s 0xb99540
... Erase from 0x50100000-0x50ec0000: ........................................................
... Program from 0x00100000-0x00c99540 at 0x50100000: ...............................................
... Unlock from 0x50fc0000-0x51000000: .
... Erase from 0x50fc0000-0x51000000: .
... Program from 0x01f70000-0x01fb0000 at 0x50fc0000: .
... Lock from 0x50fc0000-0x51000000: .

*** caution: make sure the size matches the load size of ipaqjffs2.img

Loading the Linux kernel image via TFTP

To load the Linux kernel image via TFTP, ensure the image is located in /tftpboot on your TFTP server and execute these commands:

RedBoot> lo -r -b 0x100000 /tftpboot/ipaqzimage.img
Raw file loaded 0x00100000-0x0017e122
      

Loading the Linux kernel image via serial

To load the Linux kernel image via serial, for example with XMODEM, type the following command:

RedBoot> lo -m xmodem -r -b 0x100000
      
Now send the ipaqzimage.img file via XMODEM.

Saving the Linux kernel image to FLASH

Now save this image to flash with the command:

RedBoot> fi cr Linux -f 0x50080000 -b 0x100000 -l 0x80000 -r 0x100000
... Erase from 0x50080000-0x50100000: ..
... Program from 0x00100000-0x00180000 at 0x50080000: ..
... Unlock from 0x50fc0000-0x51000000: .
... Erase from 0x50fc0000-0x51000000: .
... Program from 0x01f70000-0x01fb0000 at 0x50fc0000: .
... Lock from 0x50fc0000-0x51000000: .

*** caution: make sure the size matches the load size of ipaqzimage.img

Running the demos

If all images have been programmed as above, then the FLASH directory listing should be as follows:

RedBoot> fi li
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0x50000000  0x00100000  0x00040000  0x50000040
RedBoot config    0x50F80000  0x50F80000  0x00040000  0x00000000
FIS directory     0x50FC0000  0x50FC0000  0x00040000  0x00000000
ROM_DISK          0x50F00000  0x01F00000  0x00080000  0x00000000
eCos_demo         0x50EC0000  0x00020000  0x00040000  0x00020040
JFFS2             0x50100000  0x00100000  0x00DC0000  0x00000000
Linux             0x50080000  0x00100000  0x00080000  0x00000000

The eCos Microwindows/NanoX demo can be run using the commands:

RedBoot> fi loa -d eCos_demo
RedBoot> go 0x20040
      

The Embedded Linux demo can be run using the commands:

RedBoot> fi loa -d Linux
RedBoot> ex -b 0x100000 -l 0x280000 -c "noinitrd root=/dev/mtdblock/3 init=/linuxrc console=ttySA0,38400"
You can log in as user "root" with password "rootme".

The demo can be set up to run automatically at boot/reset time:

RedBoot> fc
Run script at boot: false t
Enter script, terminate with empty line
>>
fi loa -d eCos_demo
>> go -w 5 0x20040
>> fi loa -d Linux
>> ex -b 0x100000 -l 0x280000 -c "noinitrd root=/dev/mtdblock/3 init=/linuxrc console=ttySA0,38400" -w 5
>>
Boot script timeout (1000ms resolution): 5
.
Update RedBoot non-volatile configuration - are you sure (y/n)? y

Now when you reset the unit, RedBoot will display this message indicating that you have 5 seconds to abort or the script will be executed. Note: you can abort via the "return" (funny curved arrow) button on the iPAQ itself or by typing ^C on the serial port.

Once the script starts, it will load the NanoX demo. Again, you have 5 seconds to abort this step.

If the NanoX step is aborted, then the Linux kernel will be loaded and you have 5 seconds to abort.

Building the demos

To rebuild the eCos NanoX demo from source, go to this page. To rebuild the Embedded Linux demo from source, go to this page.