2014-06-19 09:42:13 -03:00
|
|
|
if [ "`echo $1`" = "load" ]; then
|
|
|
|
echo "Loading Test_Capes..."
|
2014-07-19 00:22:09 -03:00
|
|
|
cp BB-SPI0-PXF-01-00A0.dtbo /lib/firmware/
|
|
|
|
cp BB-SPI1-PXF-01-00A0.dtbo /lib/firmware/
|
2014-06-19 09:42:13 -03:00
|
|
|
cp BB-BONE-PRU-05-00A0.dtbo /lib/firmware/
|
|
|
|
cp testpru0 /lib/firmware
|
2014-07-01 07:46:03 -03:00
|
|
|
cp pwmpru1 /lib/firmware
|
2014-06-19 09:42:13 -03:00
|
|
|
echo BB-BONE-PRU-05 > /sys/devices/bone_capemgr.*/slots
|
2014-07-19 00:22:09 -03:00
|
|
|
echo BB-SPI0-PXF-01 > /sys/devices/bone_capemgr.*/slots
|
|
|
|
echo BB-SPI1-PXF-01 > /sys/devices/bone_capemgr.*/slots
|
2014-06-19 09:42:13 -03:00
|
|
|
dmesg | grep "SPI"
|
|
|
|
dmesg | grep "PRU"
|
2014-06-30 14:00:53 -03:00
|
|
|
cat /sys/devices/bone_capemgr.*/slots
|
|
|
|
elif [ "`echo $1`" = "reload" ]; then
|
|
|
|
echo "Loading Firmware..."
|
|
|
|
cp testpru0 /lib/firmware
|
2014-07-01 07:46:03 -03:00
|
|
|
cp pwmpru1 /lib/firmware
|
|
|
|
echo 0:testpru0,1:pwmpru1 > /sys/devices/ocp.3/4a300000.prurproc/load
|
2014-06-19 09:42:13 -03:00
|
|
|
else
|
|
|
|
echo "Usage:"
|
2014-06-30 14:00:53 -03:00
|
|
|
echo " ./startup.sh load : to load the capes and firmware"
|
|
|
|
echo " ./startup.sh reload: to reload firmware"
|
2014-06-19 09:42:13 -03:00
|
|
|
fi
|