#!/bin/bash
echo "Programming FPGA...."
killall restart.sh
killall b110_main
killall remote
#mv /home/root/fpga/B110_top.bit /home/root/fpga/B110_top_tmp.bit
#cp /home/root/fpga/B110_top_prog.bit /home/root/fpga/B110_top.bit
#cp /home/root/fpga_load /var/tmp
#cd /var/tmp
#chmod +x fpga_load
#sync
#ip link set br0 down
#./fpga_load
#ip link set br0 up
echo "Programming M30...."
gzip -d -f /home/root/02_M30/01_M30_firm/*.gz
cd /home/root/02_M30/02_tools
chmod +x *
./flash_write_all.sh
#cp /home/root/fpga/B110_top_tmp.bit /home/root/fpga/B110_top.bit
#cd /var/tmp
sync
#./fpga_load
#cp /home/root/b110_main /var/tmp
#cd /var/tmp
#chmod +x b110_main
#./b110_main
