start_ethercat_master.sh 444 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. if [ $# -eq 0 ]; then
  3. echo "Usage: $0 <MAC address>"
  4. exit 1
  5. fi
  6. mac_address="$1"
  7. modprobe phylink
  8. insmod /lib/modules/$(uname -r)/ethercat/master/ec_master.ko main_devices="${mac_address}"
  9. insmod /lib/modules/$(uname -r)/ethercat/devices/ec_generic.ko
  10. modprobe pcs_xpcs
  11. cd /lib/modules/$(uname -r)/kernel/drivers/net/ethernet/stmicro/stmmac/
  12. insmod stmmac.ko
  13. insmod stmmac-platform.ko
  14. insmod dwmac-starfive-plat.ko
  15. cd /root