Changes between Version 6 and Version 7 of gsc/alternate_boot_device


Ignore:
Timestamp:
07/22/2024 07:18:37 PM (4 months ago)
Author:
Tim Harvey
Comment:

added details about setting the boot device

Legend:

Unmodified
Added
Removed
Modified
  • gsc/alternate_boot_device

    v6 v7  
    33= Alternate Boot Device
    44Some Gateworks family products have an 'Alternate boot device' that can be used for alternate firmware images, such as a flash recovery image:
    5  * Newport - eMMC vs microSD
     5 * Newport - eMMC (primary) vs microSD (alternate)
    66
     7[=#auto-switch-boot]
    78== Auto Switch Boot Device
    89The [wiki:gsc 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.
     
    1718i2c dev 0 && i2c mw 0x20 1 0x40 1     ;# enable R1.6 (SWITCH_BOOT_ENABLE)
    1819}}}
     20
     21== Current Boot Device
     22The 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 [wiki:gsc/#auto-switch-boot above] but can also be manually set:
     23
     24From Linux:
     25 * Alternate
     26{{{#!bash
     27i2cset -f -y 0 0x20 0x15 1 # set boot device to 1 (alternate)
     28}}}
     29 * Primary
     30{{{#!bash
     31i2cset -f -y 0 0x20 0x15 0 # set boot device to 0 (primary)
     32}}}
     33
     34U-Boot:
     35 * Alternate:
     36{{{#!bash
     37i2c dev 0 && i2c mw 0x20 0x15 1 # set boot device to 1 (alternate)
     38}}}
     39 * Primary:
     40{{{#!bash
     41i2c dev 0 && i2c mw 0x20 0x15 0 # set boot device to 0 (primary)
     42}}}