From 7b517e3a591e265d4abe9814ce539e63a8f70764 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Wed, 13 Sep 2023 21:01:12 -0500 Subject: [PATCH] gateware: more debugging Signed-off-by: Robert Nelson --- rootfs/etc/beagleboard/gateware/change-gateware.sh | 1 + rootfs/etc/microchip/update-gateware.sh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/rootfs/etc/beagleboard/gateware/change-gateware.sh b/rootfs/etc/beagleboard/gateware/change-gateware.sh index c794aa9..15160d3 100644 --- a/rootfs/etc/beagleboard/gateware/change-gateware.sh +++ b/rootfs/etc/beagleboard/gateware/change-gateware.sh @@ -9,6 +9,7 @@ then then cp -v $1/mpfs_dtbo.spi /lib/firmware/mpfs_dtbo.spi cp -v $1/mpfs_bitstream.spi /lib/firmware/mpfs_bitstream.spi + sync . /etc/microchip/update-gateware.sh else echo "No device tree overlay file found." diff --git a/rootfs/etc/microchip/update-gateware.sh b/rootfs/etc/microchip/update-gateware.sh index ccc292f..bbfd151 100644 --- a/rootfs/etc/microchip/update-gateware.sh +++ b/rootfs/etc/microchip/update-gateware.sh @@ -30,12 +30,15 @@ dtbo_ls=$(ls -l /lib/firmware/mpfs_dtbo.spi) dtbo_size=$(echo $dtbo_ls | cut -d " " -f 5) echo "Writing mpfs_dtbo.spi to /dev/mtd0" +echo "/usr/sbin/mtd_debug write /dev/mtd0 0x400 $dtbo_size /lib/firmware/mpfs_dtbo.spi" /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. +echo "/usr/sbin/mtd_debug write /dev/mtd0 0 4 /dev/zero" /usr/sbin/mtd_debug write /dev/mtd0 0 4 /dev/zero > /dev/zero # Initiate FPGA update. +echo "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.