Skip to content

Commit

Permalink
adding udev rules, netplan and computer configuration scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
DanHert committed Dec 6, 2023
1 parent d366bde commit aabe594
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 0 deletions.
20 changes: 20 additions & 0 deletions miscellaneous/netplan/01-netcfg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: no
dhcp6: no
addresses: [10.10.20.101/24]
wifis:
wlan0:
dhcp4: no
dhcp6: no
addresses: [192.168.69.101/24]
gateway4: 192.168.69.1
access-points:
"wifi_ssid":
password: "wifi_password"
nameservers:
addresses: [8.8.8.8]

5 changes: 5 additions & 0 deletions miscellaneous/udev_rules/99-usb-serial_F330_PCB.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# RULES FOR F330 POWER DISTRIBUTION BOARD
# Pixhawk
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", ENV{ID_USB_INTERFACE_NUM}=="00", SYMLINK+="pixhawk",OWNER="mrs",MODE="0666"
# MRS Module 1
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", ENV{ID_USB_INTERFACE_NUM}=="01", SYMLINK+="MRS_MODULE1",OWNER="mrs",MODE="0666"
20 changes: 20 additions & 0 deletions miscellaneous/udev_rules/99-usb-serial_F450_PCB.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="pixhawk", OWNER="mrs", MODE="0666"

# RULES for F450 Distribution Board
# Pixhawk
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ENV{ID_USB_INTERFACE_NUM}=="00", SYMLINK+="pixhawk",OWNER="mrs",MODE="0666"
# MRS Module 1
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ENV{ID_USB_INTERFACE_NUM}=="01", SYMLINK+="MRS_MODULE1",OWNER="mrs",MODE="0666"
# MRS Module 2
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ENV{ID_USB_INTERFACE_NUM}=="02", SYMLINK+="MRS_MODULE2",OWNER="mrs",MODE="0666"
# MRS Module 3
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ENV{ID_USB_INTERFACE_NUM}=="03", SYMLINK+="MRS_MODULE3",OWNER="mrs",MODE="0666"









20 changes: 20 additions & 0 deletions miscellaneous/udev_rules/99-usb-serial_T650_PCB.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="pixhawk", OWNER="mrs", MODE="0666"

# RULES for F450 Distribution Board
# Pixhawk
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ENV{ID_USB_INTERFACE_NUM}=="00", SYMLINK+="pixhawk",OWNER="mrs",MODE="0666"
# MRS Module 1
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ENV{ID_USB_INTERFACE_NUM}=="01", SYMLINK+="MRS_MODULE1",OWNER="mrs",MODE="0666"
# MRS Module 2
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ENV{ID_USB_INTERFACE_NUM}=="02", SYMLINK+="MRS_MODULE2",OWNER="mrs",MODE="0666"
# STM32
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ENV{ID_USB_INTERFACE_NUM}=="03", SYMLINK+="MRS_MCU",OWNER="mrs",MODE="0666"









20 changes: 20 additions & 0 deletions miscellaneous/udev_rules/99-usb-serial_X500_PCB.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="pixhawk", OWNER="mrs", MODE="0666"

# RULES for F450 Distribution Board
# Pixhawk
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ENV{ID_USB_INTERFACE_NUM}=="03", SYMLINK+="pixhawk",OWNER="mrs",MODE="0666"
# MRS Module 1
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ENV{ID_USB_INTERFACE_NUM}=="00", SYMLINK+="MRS_MODULE1",OWNER="mrs",MODE="0666"
# MRS Module 2
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ENV{ID_USB_INTERFACE_NUM}=="01", SYMLINK+="MRS_MODULE2",OWNER="mrs",MODE="0666"
# MRS Module 3
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ENV{ID_USB_INTERFACE_NUM}=="02", SYMLINK+="MRS_MODULE3",OWNER="mrs",MODE="0666"









1 change: 1 addition & 0 deletions scripts/computer_config/disable_hibernation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
15 changes: 15 additions & 0 deletions scripts/computer_config/disable_network_manager.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

sudo systemctl stop NetworkManager.service
sudo systemctl disable NetworkManager.service

sudo systemctl stop NetworkManager-wait-online.service
sudo systemctl disable NetworkManager-wait-online.service

sudo systemctl stop NetworkManager-dispatcher.service
sudo systemctl disable NetworkManager-dispatcher.service

sudo systemctl stop network-manager.service
sudo systemctl disable network-manager.service

sudo netplan apply
3 changes: 3 additions & 0 deletions scripts/computer_config/fix_dualboot_time_offset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

sudo timedatectl set-local-rtc 1
7 changes: 7 additions & 0 deletions scripts/computer_config/fix_network_interface_names.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

sudo sed -i 's/GRUB_CMDLINE_LINUX=""/GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"/g' /etc/default/grub
sudo update-grub

echo " "
echo "Reboot the system to apply changes"

0 comments on commit aabe594

Please sign in to comment.