Skip to content
Snippets Groups Projects
Commit cc4f0d4a authored by Angus Ainslie's avatar Angus Ainslie
Browse files

scripts/write_flash.sh: add an offset for the write


The firmware jail needs to be writen after the TPS firmware so add an
offset for the write.

libusb times out if we try and wait for the command to complete so the
timeouts needed to be extended.

Signed-off-by: default avatarAngus Ainslie <angus@akkea.ca>
parent 5753317a
No related branches found
No related tags found
2 merge requests!241write_flash.sh: add an offset for the write,!190Evergreen
Pipeline #75351 passed with stages
in 2 minutes and 25 seconds
......@@ -3,11 +3,17 @@
set -e
if [ $# -lt 1 ]; then
echo "Usage: $0 <file>"
echo "Usage: $0 <file> [offset]"
echo "\tWrites a file to the NOR flash"
exit 1
fi
if [ $# -gt 1 ]; then
OFFSET=$2
else
OFFSET=0
fi
cleanup()
{
[ -z "${UUU_SCRIPT}" ] || rm -f "${UUU_SCRIPT}"
......@@ -46,13 +52,15 @@ SDPV: jump
FB: ucmd setenv fastboot_buffer 0x43000000
FB: download -f ${FILE}
FB: ucmd sf probe
FB: ucmd sf erase 0 ${HEX_SIZE}
FB: delay 2000
FB: ucmd sf write 0x43000000 0 ${HEX_SIZE}
FB: delay 2000
FB: ucmd sf read 0x44000000 0 ${HEX_SIZE}
FB: delay 2000
FB: acmd sf erase ${OFFSET} ${HEX_SIZE}
FB: delay 9000
FB: acmd sf write 0x43000000 ${OFFSET} ${HEX_SIZE}
FB: delay 12000
FB: acmd sf read 0x44000000 ${OFFSET} ${HEX_SIZE}
FB: delay 9000
FB: ucmd cmp 0x43000000 0x44000000 ${HEX_WORDS}
FB: delay 2000
FB: Done
EOF
......
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