You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
BeagleV-Fire-ubuntu/rootfs/etc/beagleboard/gateware/change-gateware.sh

28 lines
622 B
Bash

#!/bin/bash
if ! id | grep -q root; then
echo "must be run as root"
exit
fi
if [ -d $1 ]
then
echo "Changing gateware."
if [ -e $1/mpfs_bitstream.spi ]
then
if [ -e $1/mpfs_dtbo.spi ]
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."
fi
else
echo "No gateware file found."
fi
else
echo "No directory found for this requested gateware."
fi