Reboot; run the new redboot image – Comtrol eCos User Manual

Page 185

Advertising
background image

Chapter 4. Updating RedBoot

Note: This command loads the RedBoot image using the TFTP protocol via a network connection. Other
methods of loading are available, refer to the

load

command for more details.

Note: Note that the binary version of the image is being downloaded. This is to ensure that the memory after
the image is loaded should match the contents of the file on the host. Loading SREC or ELF versions of
the image does not guarantee this since these formats may contain holes, leaving bytes in these holes in an
unknown state after the load, and thus causing a likely cksum difference. It is possible to use these, but then
the step verifying the cksum below may fail.

Once the image is loaded into RAM, it should be checksummed, thus verifying that the image on the target is
indeed the image intended to be loaded, and that no corruption of the image has happened. This is done using the

cksum

command:

RedBoot> cksum

Computing cksum for area 0x06046800-0x06062fe8

POSIX cksum = 2535322412 116712 (0x971df32c 0x0001c7e8)

Compare the numbers with those for the binary version of the image on the host. If they do not match, try down-
loading the image again.

Assuming the cksum matches, the next step is programming the image into flash using the FIS commands.

Some platforms support locking (write protecting) certain regions of the flash, while others do not. If your platform
does not support locking, simply ignore the fis unlock and fis lock steps (the commands will not be recognized by
RedBoot).

RedBoot> fis unlock RedBoot

... Unlock from 0x00000000-0x00020000: ..

RedBoot> fis create RedBoot

An image named ’RedBoot’ exists - continue (y/n)? y

* CAUTION * about to program ’RedBoot’

at 0x00000000..0x0001c7e7 from 0x06046800 - continue (y/n)? y

... Erase from 0x00000000-0x00020000: ..

... Program from 0x06046800-0x06062fe8 at 0x00000000: ..

... Erase from 0x00070000-0x00080000: .

... Program from 0x0606f000-0x0607f000 at 0x00070000: .

RedBoot> fis lock RedBoot

... Lock from 0x00000000-0x00020000: ..

Reboot; run the new RedBoot image

Once the image has been successfully written into the flash, simply reset the target and the new version of RedBoot
should be running.

When installing RedBoot for the first time, or after updating to a newer RedBoot with different configuration keys,
it is necessary to update the configuration directory in the flash using the fconfig command. See

the Section called

Persistent State Flash-based Configuration and Control in Chapter 2

.

81

Advertising