Re: Firmware upgrade technique
From: Geoff McCaughan (geoffm_at_spam.fqdn.com)
Date: 01/21/04
- Next message: Nobody: "Re: Market share data for microcontrollers"
- Previous message: Spehro Pefhany: "Re: Market share data for microcontrollers"
- In reply to: Dmytro Bablinyuk: "Firmware upgrade technique"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 21 Jan 2004 21:11:35 GMT
Dmytro Bablinyuk <dmytro.bablinyuk@tait.co.nz> wrote:
> I am working on a firmware upgrade/downgrade procedure for our
> embedded board.
> The board is running embedded linux, 64Mb ram and 4mb flash.
> The software will be downloaded via service kit and should be deployed
> on the board. The roll back mechanism in case of failure should be
> provided. Basically the board will roll back to the previous software
> version through the boot loader notification that upgrade was done and
> restart failed, so the boot loader on next re-start will start an old
> software.
> There can be entire filesystem or a set of folders to upgrade.
> Does somebody know any specific/standard procedures or can suggest me
> anything about what the best way to do that.
> Thank you for any suggestions.
How large is the software image you're dealing with? Do you have any mass
storage other than the 4mb flash?
I devised the following system for an embedded linux system:
In flash I have:-
Backup Kernel
Backup Ramdisk
Operational Kernel
Operational Ramdisk
Bootloader
These images are compressed and checksummed.
When I load firmware, I buffer the image in RAM, verify the checksum, and
then copy over the operational firmware in flash. The Bootloader is never
field upgraded.
At boot time I set a flag in static RAM and count boot attempts. If a boot
fails the watchdog will reset the system. I cycle through each possible
combination of Kernel and Ramdisk [starting with the operational copies
and trying each combination 3 times if necessary].
When the system has booted, I start a little task that interrogates the
flags set by the bootloader, works out which images it booted from, compares
the checksum of the images it booted from with the images it didn't boot
from, and if they're different the image we booted from is copied over the
image we didn't boot from.
So far, I have never had a system fail to boot, despite power interruptions
during firmware upgrades and other fun things.
- Next message: Nobody: "Re: Market share data for microcontrollers"
- Previous message: Spehro Pefhany: "Re: Market share data for microcontrollers"
- In reply to: Dmytro Bablinyuk: "Firmware upgrade technique"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|