2023-12-04 05:55:08 -04:00
|
|
|
#!/usr/bin/env bash
|
2022-05-24 11:20:17 -03:00
|
|
|
|
2014-06-19 09:42:13 -03:00
|
|
|
if [ "`echo $1`" = "load" ]; then
|
|
|
|
echo "Loading Test_Capes..."
|
2015-03-16 04:52:26 -03:00
|
|
|
cp devicetree/pxf/BB-SPI0-PXF-01-00A0.dtbo /lib/firmware/
|
|
|
|
cp devicetree/pxf/BB-SPI1-PXF-01-00A0.dtbo /lib/firmware/
|
|
|
|
cp devicetree/pxf/BB-BONE-PRU-05-00A0.dtbo /lib/firmware/
|
2014-08-13 14:52:12 -03:00
|
|
|
cp rcinpru0 /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-08-23 05:16:55 -03:00
|
|
|
echo am33xx_pwm > /sys/devices/bone_capemgr.*/slots
|
|
|
|
echo bone_pwm_P8_36 > /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..."
|
2014-08-13 14:52:12 -03:00
|
|
|
cp rcinpru0 /lib/firmware
|
2014-07-01 07:46:03 -03:00
|
|
|
cp pwmpru1 /lib/firmware
|
2014-08-13 14:52:12 -03:00
|
|
|
echo 0:rcinpru0,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
|