NSLU2-Linux
view · edit · print · history

OpenSlug.DevelopmentNotes History

Hide minor edits - Show changes to markup

June 09, 2005, at 06:23 AM by jbowler --
Added line 11:
Added line 13:
Added line 15:
June 09, 2005, at 06:22 AM by jbowler --
Changed line 7 from:
  1. Save the existing config from 'Flashdisk' (/initrd), that's:
to:

1) Save the existing config from 'Flashdisk' (/initrd), that's:

Changed lines 11-15 from:
  1. Overwrite the MTD partitions 'Kernel' and 'Flashdisk' with new images.
  2. Mount 'Flashdisk' and restore the files from (1)
  3. Reboot

The algorithm does not ever return to flash, even though it has upgrade it completely. Nevertheless because the upgrade was complete we can be sure the flash image is consistent - only the restoration of the config files can damage it (and we can be pretty sure that the restoration is safe).

to:

2) Overwrite the MTD partitions 'Kernel' and 'Flashdisk' with new images. 3) Mount 'Flashdisk' and restore the files from (1) 4) Reboot

The algorithm does not ever return to flash, even though it has upgraded it completely. Nevertheless because the upgrade was complete we can be sure the flash image is consistent - only the restoration of the config files can damage it (and we can be pretty sure that the restoration is safe).

Parsing the RedBoot partition table

This is necessary to extract the kernel and 'Flashdisk' partition from an image. The code is not NSLU2 specific - it is in drivers/mtd/redboot.c. The directory is just an array of 256 byte entries, each starts with the name, so parsing it is easy.

June 09, 2005, at 02:57 AM by jbowler --
Added lines 1-15:

Reflashing OpenSlug

Currently the only option is to reflash the whole image, work is in progress to reflash kernel and rootfs separately, but we need an algorithm to make this work well in a real user upgrade.

Hence this sequence of operations to reflash OpenSlug:

  1. Save the existing config from 'Flashdisk' (/initrd), that's:
a) /etc/default/sysconf
b) /etc/network/interfaces
c) any files configed on the flashdisk from a known list, including passd and the dropbear key.
  1. Overwrite the MTD partitions 'Kernel' and 'Flashdisk' with new images.
  2. Mount 'Flashdisk' and restore the files from (1)
  3. Reboot

The algorithm does not ever return to flash, even though it has upgrade it completely. Nevertheless because the upgrade was complete we can be sure the flash image is consistent - only the restoration of the config files can damage it (and we can be pretty sure that the restoration is safe).

view · edit · print · history · Last edited by jbowler.
Originally by jbowler.
Page last modified on June 09, 2005, at 06:23 AM