wiki:gsc/alternate_boot_device

Alternate Boot Device

Some Gateworks family products have an 'Alternate boot device' that can be used for alternate firmware images, such as a flash recovery image:

  • Newport - eMMC (primary) vs microSD (alternate)

Auto Switch Boot Device

The Gateworks System Controller implements an 'Auto Switch Boot Device' feature that can be useful as a firmware recovery mechanism. GSC register R1.6 (SWITCH_BOOT_ENABLE) enables this mode. When this is set and the board powers on it will initiate a countdown timer cleared by the boot firmware that expires in 30 seconds. Therefore if the boot firmware is missing/corrupt the board will power cycle and boot off the alternate device.

To enable from Linux:

i2cset -f -y 0 0x20 1 0x40      ;# enable R1.6 (SWITCH_BOOT_ENABLE)

To enable from u-boot

i2c dev 0 && i2c mw 0x20 1 0x40 1     ;# enable R1.6 (SWITCH_BOOT_ENABLE)

Current Boot Device

The current boot device is held in GSC register R21 (0x15) with a value of 0 being primary and a value of 1 being alternate. This value will be toggled by the 'Auto Switch Boot' feature above but can also be manually set:

From Linux:

  • Alternate
    i2cset -f -y 0 0x20 0x15 1 # set boot device to 1 (alternate)
    
  • Primary
    i2cset -f -y 0 0x20 0x15 0 # set boot device to 0 (primary)
    

U-Boot:

  • Alternate:
    i2c dev 0 && i2c mw 0x20 0x15 1 # set boot device to 1 (alternate)
    
  • Primary:
    i2c dev 0 && i2c mw 0x20 0x15 0 # set boot device to 0 (primary)
    
Last modified 4 months ago Last modified on 07/22/2024 07:20:25 PM
Note: See TracWiki for help on using the wiki.