Commit b91e9536 authored by Pascal Bos's avatar Pascal Bos

added tool to flash QSPI over PCIe, still a WIP.

parent cbaff7e9
Pipeline #2344 failed with stage
in 2 minutes and 19 seconds
#! /bin/bash
if [ "$1" = "-h" ]; then
echo "Copies and loads a BOOT.bin to the spec7 qspi flash memory over PCIe."
echo "usage:
$0 NAME_OF_BOOT_BIN"
exit 1
fi
echo "dcache off" >/dev/ttyUSB1
echo "sf probe 0 0 0" >/dev/ttyUSB1
echo "sf erase 0 0x1cc0000">/dev/ttyUSB1
echo "erasing QSPI memory"
sleep 20
echo ""
echo "copying first 16 MiB of $1 to Spec7."
dd bs=128k count=128 if=$1 of=/dev/spec7_bar4
echo "sf write 0x01000000 0x00000000 0x01000000" >/dev/ttyUSB1
sleep 30
echo ""
echo "copying last sectors of $1 to Spec7."
dd bs=128k skip=128 if=$1 of=/dev/spec7_bar4
echo "sf write 0x01000000 0x01000000 0x01000000" >/dev/ttyUSB1
sleep 30
echo "done, you should probably do a POR action now."
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