|
|
@ -14,23 +14,24 @@ echo "==========================================================================
|
|
|
|
|
|
|
|
|
|
|
|
read -rsp $'Press any key to continue...\n' -n1 key
|
|
|
|
read -rsp $'Press any key to continue...\n' -n1 key
|
|
|
|
|
|
|
|
|
|
|
|
mount -t debugfs none /sys/kernel/debug
|
|
|
|
# Already mounted by default...
|
|
|
|
|
|
|
|
#/usr/bin/mount -t debugfs none /sys/kernel/debug
|
|
|
|
|
|
|
|
|
|
|
|
# Trash exisitng device tree overlay in case the rest of the process fails:
|
|
|
|
# Trash exisitng device tree overlay in case the rest of the process fails:
|
|
|
|
mtd_debug erase /dev/mtd0 0x0 0x10000
|
|
|
|
/usr/sbin/mtd_debug erase /dev/mtd0 0x0 0x10000
|
|
|
|
|
|
|
|
|
|
|
|
# Write device tree overlay
|
|
|
|
# Write device tree overlay
|
|
|
|
dtbo_ls=$(ls -l /lib/firmware/mpfs_dtbo.spi)
|
|
|
|
dtbo_ls=$(ls -l /lib/firmware/mpfs_dtbo.spi)
|
|
|
|
dtbo_size=$(echo $dtbo_ls | cut -d " " -f 5)
|
|
|
|
dtbo_size=$(echo $dtbo_ls | cut -d " " -f 5)
|
|
|
|
|
|
|
|
|
|
|
|
mtd_debug write /dev/mtd0 0x400 $dtbo_size /lib/firmware/mpfs_dtbo.spi > /dev/zero
|
|
|
|
/usr/sbin/mtd_debug write /dev/mtd0 0x400 $dtbo_size /lib/firmware/mpfs_dtbo.spi > /dev/zero
|
|
|
|
|
|
|
|
|
|
|
|
# Fake the presence of a golden image for now.
|
|
|
|
# Fake the presence of a golden image for now.
|
|
|
|
mtd_debug write /dev/mtd0 0 4 /dev/zero > /dev/zero
|
|
|
|
/usr/sbin/mtd_debug write /dev/mtd0 0 4 /dev/zero > /dev/zero
|
|
|
|
|
|
|
|
|
|
|
|
# Initiate FPGA update.
|
|
|
|
# Initiate FPGA update.
|
|
|
|
echo 1 > /sys/kernel/debug/fpga/microchip_exec_update
|
|
|
|
echo 1 > /sys/kernel/debug/fpga/microchip_exec_update
|
|
|
|
|
|
|
|
|
|
|
|
# Reboot Linux for the gateware update to take effect.
|
|
|
|
# Reboot Linux for the gateware update to take effect.
|
|
|
|
# FPGA reprogramming takes places between Linux shut-down and HSS restarting the board.
|
|
|
|
# FPGA reprogramming takes places between Linux shut-down and HSS restarting the board.
|
|
|
|
reboot
|
|
|
|
/usr/sbin/reboot
|
|
|
|