http://www.linuxcnc.org/iso/linuxcnc-2.8.1-pi4.zip
lsblk -l
Now attach the microSD card in the computer:
You should see sometihng like /dev/sda
sudo dd if=2021-01-20-linuxcnc-pi4.img of=/dev/[your device]
🙌🏿 In case you want to do all the instalation headless (Wifi + SSH). Do the following steps in the microSD boot partition:
touch ssh
Creating a wpa_supplicant.conf file.
touch wpa_supplicant.conf
Adding configuration to our file (Copy paste it, and change the Wifi SSID and PASSWORD) :
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=FI
network={
ssid="SSID"
psk="PASSWORD"
}
- Change SSID (your wifi name) and PASSWORD (wifi password) inside the double quotation marks
First we update repositories, them we upgrade the softwares and after that we reboot the system:
sudo apt update -y
If you get this, press 'y' and them the enter key:
E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
Do you want to accept these changes and continue updating from this repository? [y/N] y
then continue:
sudo apt upgrade -y
sudo reboot
If we get some prompt asking, just press y
and enter key.
sudo apt install linux-headers-4.19.71-rt24-v7l -y
sudo apt install mercurial build-essential automake tree dkms bison flex -y
git clone https://github.com/icshwi/etherlabmaster
cd etherlabmaster
make init
echo "ENABLE_CYCLES = NO" > configure/CONFIG_OPTIONS.local
make build
make install
echo "ETHERCAT_MASTER0=eth0" > ethercatmaster.local
make dkms_add
make dkms_build
make dkms_install
make setup
sudo ln -s /opt/etherlab/lib/lib* /usr/lib/
sudo reboot
Have a try with the following command:
ethercat master
sudo apt install libmodbus-dev libusb-1.0 libglib2.0-dev yapps2 libreadline-gplv2-dev tcl8.6-dev tclx8.4 tk8.6-dev libboost-python-dev
Because we place HAl in /opt/ we need to change the user access to it and not use always root permisions.
sudo git clone https://github.com/jjrbfi/lcnc_hal-core_ros.git /opt/hal-core
sudo chown -R pi:pi /opt/hal-core/
/opt/hal-core/./make
sudo rm /usr/bin/halcmd
sudo ln -s bin/halcmd /usr/bin/halcmd
If you use the same image provide here Due right now in hal-core do not have halrun, if we want to clean the hal enviroment we need to run the following:
/opt/hal-core/bin/./halcmd stop
kill `pgrep rtapi_app`
kill `pgrep lcec_conf`
At this point we have everything needed to launch our EtherCAT master + HAL ...