board/beagleboard/beaglev_fire: cleanup gatewate update

Update the README following the update gateware fix and optimise the
script, making it easier for the user to use.

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
This commit is contained in:
Jamie Gibbons
2025-02-12 09:21:21 +00:00
committed by Romain Naour
parent 3fb075afad
commit 9ee7374098
2 changed files with 20 additions and 20 deletions

View File

@@ -108,12 +108,12 @@ https://docs.beagleboard.org/latest/boards/beaglev/fire/demos-and-tutorials/gate
Unzip the downloaded artifacts.zip file.
Go to the custom FPGA design directory:
'cd artifacts/bitstreams/my_custom_fpga_design'
'cd artifacts/bitstreams/my_custom_fpga_design/LinuxProgramming/'
On your Linux host development computer, copy the bitstream to BeagleV-Fire
board, replacing </path/to/your/> with the path to your BeagleV-Fire root file
system.
'cp -r ./LinuxProgramming /path/to/your/buildroot/board/beagleboard/beaglev_fire/rootfs-overlay/etc/'
'cp ./* /path/to/your/buildroot/board/beagleboard/beaglev_fire/rootfs-overlay/lib/firmware/'
To apply these changes to your image, make sure to re-build it with:
`make`
@@ -121,14 +121,7 @@ https://docs.beagleboard.org/latest/boards/beaglev/fire/demos-and-tutorials/gate
Then, re-flash your image - to ensure you have the necessary firmware files - by
following the above section "Flashing the image to your eMMC".
On BeagleV-Fire,
1. Make your update gateware script executable
'chmod +x /usr/share/microchip/update-gateware.sh'
2. Create a firmware directory
'mkdir /lib/firmware'
3. Change to the directory of your gateware script
`cd /usr/share/microchip/`
3. initiate the reprogramming of the FPGA with your gateware bitstream:
'./update-gateware.sh /etc/LinuxProgramming/'
On BeagleV-Fire initiate the reprogramming of the FPGA with your gateware bitstream:
`/usr/share/microchip/update-gateware.sh`
Wait for a couple of minutes for the BeagleV-Fire to reprogram itself.

View File

@@ -1,18 +1,25 @@
#!/bin/sh
if [ ! -e "$1"/mpfs_bitstream.spi ]; then
if [ $# -eq 0 ]; then
echo "No gateware location provided. Checking default location."
if [ ! -e /lib/firmware/mpfs_bitstream.spi ]; then
echo "No gateware file found."
exit 1
fi
else
echo "Gateware location provided: $1"
if [ ! -e "$1"/mpfs_bitstream.spi ]; then
echo "No gateware file found."
exit 1
else
if [ ! -d /lib/firmware ]; then
mkdir /lib/firmware
fi
cp "$1"/mpfs_dtbo.spi /lib/firmware/mpfs_dtbo.spi
cp "$1"/mpfs_bitstream.spi /lib/firmware/mpfs_bitstream.spi
fi
fi
if [ ! -d /lib/firmware ]
then
mkdir /lib/firmware
fi
cp "$1"/mpfs_dtbo.spi /lib/firmware/mpfs_dtbo.spi
cp "$1"/mpfs_bitstream.spi /lib/firmware/mpfs_bitstream.spi
# Trash existing device tree overlay in case the rest of the process fails:
flash_erase /dev/mtd0 0 16