Add minipro dump/flash scripts
This commit is contained in:
11
models/sunrise/coreboot.config
Normal file
11
models/sunrise/coreboot.config
Normal file
@@ -0,0 +1,11 @@
|
||||
CONFIG_VENDOR_SYSTEM76=y
|
||||
CONFIG_BOARD_SYSTEM76_SUNRISE=y
|
||||
CONFIG_CCACHE=y
|
||||
CONFIG_CONSOLE_SERIAL=n
|
||||
CONFIG_PAYLOAD_ELF=y
|
||||
CONFIG_PAYLOAD_FILE="$(FIRMWARE_OPEN_UEFIPAYLOAD)"
|
||||
CONFIG_POST_IO=n
|
||||
CONFIG_SMMSTORE=y
|
||||
#TODO CONFIG_SUBSYSTEM_DEVICE_ID=0x50f2
|
||||
#TODO CONFIG_SUBSYSTEM_VENDOR_ID=0x1558
|
||||
#CONFIG_CONSOLE_SYSTEM76_EC=y
|
1
models/sunrise/ec.config
Normal file
1
models/sunrise/ec.config
Normal file
@@ -0,0 +1 @@
|
||||
BOARD=system76/sunrise
|
1
models/sunrise/minipro.txt
Normal file
1
models/sunrise/minipro.txt
Normal file
@@ -0,0 +1 @@
|
||||
W25Q256JV@SOIC8
|
15
scripts/_minipro.sh
Normal file
15
scripts/_minipro.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ ! -d "models/${MODEL}" ]
|
||||
then
|
||||
echo "model '${MODEL}' not found" >&2
|
||||
exit 1
|
||||
fi
|
||||
MODEL_DIR="$(realpath "models/${MODEL}")"
|
||||
|
||||
if [ ! -f "${MODEL_DIR}/minipro.txt" ]
|
||||
then
|
||||
echo "model '${MODEL}' does not have minipro.txt" >&2
|
||||
exit 1
|
||||
fi
|
||||
CHIP="$(cat "${MODEL_DIR}/minipro.txt")"
|
18
scripts/minipro-dump.sh
Executable file
18
scripts/minipro-dump.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "$0 [model]" >&2
|
||||
exit 1
|
||||
fi
|
||||
MODEL="$1"
|
||||
|
||||
source scripts/_minipro.sh
|
||||
|
||||
sudo minipro --device "${CHIP}" --pin_check --read build/dump.rom
|
||||
|
||||
./coreboot/build/cbfstool build/dump.rom read -r CONSOLE -f build/dump.log
|
||||
|
||||
less build/dump.log
|
14
scripts/minipro-flash.sh
Executable file
14
scripts/minipro-flash.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "$0 [model]" >&2
|
||||
exit 1
|
||||
fi
|
||||
MODEL="$1"
|
||||
|
||||
source scripts/_minipro.sh
|
||||
|
||||
sudo minipro --device "${CHIP}" --pin_check --write "build/${MODEL}/firmware.rom"
|
Reference in New Issue
Block a user