line endings from CRLF to LF; prepare for MOK signing

master
Sven 2025-04-07 18:26:04 +02:00
parent 663b7205ce
commit e7709d134d
1 changed files with 70 additions and 67 deletions

View File

@ -1,67 +1,70 @@
#!/bin/bash #!/bin/bash
cd $HOME cd $HOME
sudo apt install -y linux-headers-generic build-essential gcc git dkms cmake libusb-1.0-0-dev libpcap-dev can-utils sudo apt install -y linux-headers-generic build-essential gcc git dkms cmake libusb-1.0-0-dev libpcap-dev can-utils
rm -rf intrepid-socketcan-kernel-module rm -rf intrepid-socketcan-kernel-module
git clone https://github.com/intrepidcs/intrepid-socketcan-kernel-module.git git clone https://github.com/intrepidcs/intrepid-socketcan-kernel-module.git
cd intrepid-socketcan-kernel-module cd intrepid-socketcan-kernel-module
make make
sudo make install
grep -F -q 'can' /etc/modules | echo 'can' | sudo tee -a /etc/modules # check for MOK signing the module...
grep -F -q 'can-raw' /etc/modules | echo 'can-raw' | sudo tee -a /etc/modules
grep -F -q 'can-dev' /etc/modules | echo 'can-dev' | sudo tee -a /etc/modules sudo make install
sudo modprobe can grep -F -q 'can' /etc/modules | echo 'can' | sudo tee -a /etc/modules
sudo modprobe can-raw grep -F -q 'can-raw' /etc/modules | echo 'can-raw' | sudo tee -a /etc/modules
sudo modprobe can-dev grep -F -q 'can-dev' /etc/modules | echo 'can-dev' | sudo tee -a /etc/modules
sudo insmod intrepid.ko sudo modprobe can
sudo modprobe can-raw
sudo modprobe can-dev
cd .. sudo insmod intrepid.ko
rm -rf icsscand
git clone --recursive https://github.com/intrepidcs/icsscand.git
cd icsscand cd ..
mkdir -p build && cd build rm -rf icsscand
cmake -DCMAKE_BUILD_TYPE=Release .. git clone --recursive https://github.com/intrepidcs/icsscand.git
make cd icsscand
mkdir -p build && cd build
sudo cp libicsneo-socketcan-daemon /usr/sbin/ cmake -DCMAKE_BUILD_TYPE=Release ..
make
echo << EOF > icsscand.service
[Unit] sudo cp libicsneo-socketcan-daemon /usr/sbin/
Description=Intrepid Device Scanner
echo << EOF > icsscand.service
[Service] [Unit]
ExecStart=/usr/sbin/libicsneo-socketcan-daemon Description=Intrepid Device Scanner
[Install] [Service]
WantedBy=multi-user.target ExecStart=/usr/sbin/libicsneo-socketcan-daemon
EOF
[Install]
sudo cp icsscand.service /etc/systemd/system/ WantedBy=multi-user.target
EOF
sudo systemctl enable icsscand.service
sudo systemctl start icsscand.service sudo cp icsscand.service /etc/systemd/system/
sleep 10 sudo systemctl enable icsscand.service
sudo systemctl start icsscand.service
cd ../..
sudo ip link set can0 up sleep 10
sudo ip link set can1 up
sudo ip link set can2 up cd ../..
sudo ip link set can3 up sudo ip link set can0 up
sudo ip link set can1 up
rm -rf libicsneo sudo ip link set can2 up
git clone https://github.com/intrepidcs/libicsneo sudo ip link set can3 up
cd libicsneo
cmake -S . -B build rm -rf libicsneo
cmake --build build git clone https://github.com/intrepidcs/libicsneo
sudo cp build/*.so /usr/lib/ cd libicsneo
sudo cp 99-intrepidcs.rules /etc/udev/rules.d/ cmake -S . -B build
sudo cp -r include/* /usr/include cmake --build build
sudo udevadm control --reload sudo cp build/*.so /usr/lib/
sudo udevadm trigger sudo cp 99-intrepidcs.rules /etc/udev/rules.d/
sudo cp -r include/* /usr/include
cd .. sudo udevadm control --reload
sudo udevadm trigger
cd ..