Flash.sh cleanup : flashrom specifics now in board configs (#592)

Flash.sh cleanup : flashrom specifics now in board configs (#592)
This commit is contained in:
Sebastian McMillan 2020-02-19 11:04:56 -06:00 committed by GitHub
parent bcf522cb2e
commit f0d85ba2d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 11 additions and 9 deletions

View File

@ -30,4 +30,5 @@ export CONFIG_BOOT_KERNEL_REMOVE=""
export CONFIG_BOOT_DEV="/dev/sda1"
export CONFIG_USB_BOOT_DEV="/dev/sdb1"
export CONFIG_BOOT_RECOVERY_SERIAL="/dev/ttyS0"
export FLASHROM_OPTIONS='--force --noverify -p internal'
#export CONFIG_BOOT_STATIC_IP=192.168.1.2

View File

@ -35,3 +35,4 @@ export CONFIG_BOOT_GUI_MENU_NAME="Purism Librem 13v2 Heads Boot Menu"
export CONFIG_USB_BOOT_DEV="/dev/sdb1"
export CONFIG_WARNING_BG_COLOR="--background-gradient 0 0 0 150 125 0"
export CONFIG_ERROR_BG_COLOR="--background-gradient 0 0 0 150 0 0"
export FLASHROM_OPTIONS='-p internal:laptop=force_I_want_a_brick,ich_spi_mode=hwseq'

View File

@ -35,3 +35,4 @@ export CONFIG_BOOT_GUI_MENU_NAME="Purism Librem 13v2 Heads Boot Menu"
export CONFIG_USB_BOOT_DEV="/dev/sdb1"
export CONFIG_WARNING_BG_COLOR="--background-gradient 0 0 0 150 125 0"
export CONFIG_ERROR_BG_COLOR="--background-gradient 0 0 0 150 0 0"
export FLASHROM_OPTIONS='-p internal:laptop=force_I_want_a_brick,ich_spi_mode=hwseq'

View File

@ -37,3 +37,4 @@ export CONFIG_BOOT_GUI_MENU_NAME="Purism Librem 15v3 Heads Boot Menu"
export CONFIG_USB_BOOT_DEV="/dev/sdb1"
export CONFIG_WARNING_BG_COLOR="--background-gradient 0 0 0 150 125 0"
export CONFIG_ERROR_BG_COLOR="--background-gradient 0 0 0 150 0 0"
export FLASHROM_OPTIONS='-p internal:laptop=force_I_want_a_brick,ich_spi_mode=hwseq'

View File

@ -37,3 +37,4 @@ export CONFIG_BOOT_GUI_MENU_NAME="Purism Librem 15v4 Heads Boot Menu"
export CONFIG_USB_BOOT_DEV="/dev/sdb1"
export CONFIG_WARNING_BG_COLOR="--background-gradient 0 0 0 150 125 0"
export CONFIG_ERROR_BG_COLOR="--background-gradient 0 0 0 150 0 0"
export FLASHROM_OPTIONS='-p internal:laptop=force_I_want_a_brick,ich_spi_mode=hwseq'

View File

@ -28,3 +28,4 @@ export CONFIG_BOOT_KERNEL_ADD="intel_iommu=on"
export CONFIG_BOOT_KERNEL_REMOVE="quiet"
export CONFIG_BOOT_DEV="/dev/sda1"
export CONFIG_USB_BOOT_DEV="/dev/sdb1"
export FLASHROM_OPTIONS='--force --noverify-all -p internal:laptop=force_I_want_a_brick,ich_spi_mode=hwseq --ifd --image bios'

View File

@ -17,6 +17,7 @@ CONFIG_LINUX_E1000E=y
export CONFIG_USB_BOOT_DEV="/dev/sdb1"
export CONFIG_BOOTSCRIPT=/bin/x230-flash.init
export FLASHROM_OPTIONS='--force --noverify-all -p internal:laptop=force_I_want_a_brick,ich_spi_mode=hwseq --ifd --image bios'
# This board is "special" in that we only want the top 4 MB of the ROM
# for flashing into SPI flash 1 on the mainboard. This is enough to

View File

@ -34,6 +34,7 @@ export CONFIG_BOOT_GUI_MENU_NAME="Thinkpad X230 Heads Boot Menu"
export CONFIG_USB_BOOT_DEV="/dev/sdb1"
export CONFIG_WARNING_BG_COLOR="--background-gradient 0 0 0 150 125 0"
export CONFIG_ERROR_BG_COLOR="--background-gradient 0 0 0 150 0 0"
export FLASHROM_OPTIONS='--force --noverify-all -p internal:laptop=force_I_want_a_brick,ich_spi_mode=hwseq --ifd --image bios'
# This board has two SPI flash chips, an 8 MB that holds the IFD,
# the ME image and part of the coreboot image, and a 4 MB one that

View File

@ -6,15 +6,9 @@ set -e -o pipefail
. /etc/functions
. /tmp/config
case "$CONFIG_BOARD" in
librem* )
FLASHROM_OPTIONS='-p internal:laptop=force_I_want_a_brick,ich_spi_mode=hwseq'
;;
x230* )
FLASHROM_OPTIONS='--force --noverify-all --programmer internal --ifd --image bios'
;;
"kgpe-d16" )
FLASHROM_OPTIONS='--force --noverify --programmer internal'
case "$FLASHROM_OPTIONS" in
-* )
echo "Board $CONFIG_BOARD detected, continuing..."
;;
* )
die "ERROR: No board has been configured!\n\nEach board requires specific flashrom options and it's unsafe to flash without them.\n\nAborting."