Commit 46ba965d authored by root's avatar root Committed by Guillaume Tucker
Browse files

flash-kevin.sh: add serial number option



Add command line option to specify the Servo serial number in order to
be able to identify the device to program with flashrom.

This could be further improved by looking up the serial number from
the config file using the device name.
Signed-off-by: Guillaume Tucker's avatarGuillaume Tucker <guillaume.tucker@collabora.com>
parent 8bd8b8d4
......@@ -6,8 +6,9 @@ export PATH=$PWD/bin:$PATH
export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH
device="$1"
fw="$2"
backup="${3:-$device-backup.bin}"
serial="$2"
fw="$3"
backup="${4:-$device-backup.bin}"
[ -n "$device" ] || {
echo "Missing device name"
......@@ -40,7 +41,7 @@ sleep 1
echo "* backup $backup"
flashrom --programmer raiden_debug_spi -r "$backup"
flashrom --programmer raiden_debug_spi:serial=$serial -r "$backup"
echo "* fw_wp"
cmd fw_wp_en:on
......@@ -52,10 +53,10 @@ cmd fw_up
sleep 1
echo "* erase"
flashrom --programmer raiden_debug_spi -E
flashrom --programmer raiden_debug_spi:serial=$serial -E
echo "* flash [$fw]"
flashrom --programmer raiden_debug_spi -w "$fw"
flashrom --programmer raiden_debug_spi:serial=$serial -w "$fw"
echo "* vref off"
cmd spi2_vref:off spi2_buf_en:off
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment