Installing LinuxCNC 2.8.4 on Raspbian 10 (Buster) tested on Raspberry Pi 3B+, Pi

More
04 Jan 2023 11:18 - 19 Feb 2023 15:44 #260915 by elovalvo
Tested on Raspberry pi 3B+, Pi 4B, Pi400

1) Download from 
www.raspberrypi.com/software/operating-s...spberry-pi-os-legacy 
a image of stable legacy version of Raspberry Pi OS Buster
and install to an SD card (with Raspberry Pi Imager or similar) 

2) Update OS
    
sudo apt update
sudo apt upgrade

3) Install the realtime kernel (5.15.65-rt49)
As reported in github.com/kdoren/linux/releases
    
sudo su     
cd /tmp     
wget https://github.com/kdoren/linux/releases/download/rpi_5.15.65-rt49/linux-image-5.15.65-rt49-v7l+_5.15.65-1_armhf.deb     
apt install ./linux-image-5.15.65-rt49-v7l+_5.15.65-1_armhf.deb     
KERN=5.15.65-rt49-v7l+      
mkdir -p /boot/$KERN/o/     
cp -d /usr/lib/linux-image-$KERN/overlays/* /boot/$KERN/o/     
cp -dr /usr/lib/linux-image-$KERN/* /boot/$KERN/     
[[ -d /usr/lib/linux-image-$KERN/broadcom ]] && cp -d /usr/lib/linux-image-$KERN/broadcom/* /boot/$KERN/     
touch /boot/$KERN/o/README     
mv /boot/vmlinuz-$KERN /boot/$KERN/     
mv /boot/initrd.img-$KERN /boot/$KERN/     
mv /boot/System.map-$KERN /boot/$KERN/     
cp /boot/config-$KERN /boot/$KERN/     
cp /boot/cmdline.txt /boot/$KERN/     
cat >> /boot/config.txt << EOF     

[all]     
kernel=vmlinuz-$KERN     
# initramfs initrd.img-$KERN     
os_prefix=$KERN/     
overlay_prefix=o/$(if [[ "$KERN" =~ 'v8' ]]; then echo -e "\narm_64bit=1"; fi)     
[all]     
EOF

4) Optimizing kernel (gnipsel.com/linuxcnc/rpi4-11-emc.html)
   
sudo nano /boot/$KERN/cmdline.txt
    
Add 'isolcpus=1,2,3 idle=poll' to the end of the string then press Ctrl x, y, Enter
Logout and Reboot

5) Install LinuxCNC
Boot the Pi and open a terminal
Add the LinuxCNC Archive Signing Key to your apt keyring
    
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-key 3cb9fd148f374fef

Add the apt repository:
(linuxcnc.org/docs/html/getting-started/g...th_preempt_rt_kernel)

echo deb http://linuxcnc.org/ buster base 2.8-rtpreempt | sudo tee /etc/apt/sources.list.d/linuxcnc.list
echo deb-src http://linuxcnc.org/ buster base 2.8-rtpreempt | sudo tee -a /etc/apt/sources.list.d/linuxcnc.list

Update the package list from linuxcnc.org
    
sudo apt-get update
sudo apt-get install linuxcnc-uspace linuxcnc-uspace-dev

The image is downloadable at this link:
linucnc-2.8.4-buster_armhf_rt.zip
 
Last edit: 19 Feb 2023 15:44 by elovalvo. Reason: The editor of the forum makes bad jokes...
The following user(s) said Thank You: tommylight, rodw, TimGow, CarterKraft, JT

Please Log in or Create an account to join the conversation.

More
07 Jan 2023 13:44 - 07 Feb 2023 13:23 #261162 by TimGow
elovalvo
Thank you for your procedure for installing LinuxCNC for Pi 3B+.

I had to make a small change to make the final 'sudo apt-get update' work:
edited /etc/apt/sources.list.d/linuxcnc.list
changed
deb linuxcnc.org/ buster base 2.8-rtpreempt
to
deb http://linuxcnc.org/ buster base 2.8-rtpreempt
All your work here is much appreciated.
Tim
Last edit: 07 Feb 2023 13:23 by JT. Reason: add code tags
The following user(s) said Thank You: elovalvo

Please Log in or Create an account to join the conversation.

More
07 Jan 2023 13:47 #261163 by TimGow
ah, the formatting here; it was the http:// that I added

Please Log in or Create an account to join the conversation.

More
05 Feb 2023 18:33 #263764 by 3DPandME
Hi,

when I follow these intructions these lines fail and if skipped the pi when getting to the rebooting stage gets stuck at the rainbow screen (new pi4)

cp -dr /usr/lib/linux-image-$KERN/* /boot/$KERN/
-d /usr/lib/linux-image-$KERN/broadcom && cp -d /usr/lib/linux-image-$KERN/broadcom/* /boot/$KERN/

Please Log in or Create an account to join the conversation.

More
06 Feb 2023 06:56 - 06 Feb 2023 06:57 #263801 by elovalvo
I think you forgot to define the KERN environment variable with the command:
KERN=5.15.65-rt49-v7l+

before the command
mkdir -p /boot/$KERN/o/
Last edit: 06 Feb 2023 06:57 by elovalvo.

Please Log in or Create an account to join the conversation.

More
07 Feb 2023 12:55 - 07 Feb 2023 13:11 #263924 by JT
Is there something missing from these steps? I get an error invalid option -- 'd'

cp -dr /usr/lib/linux-image-$KERN/* /boot/$KERN/
-d /usr/lib/linux-image-$KERN/broadcom && cp -d /usr/lib/linux-image-$KERN/broadcom/* /boot/$KERN/

JT
Last edit: 07 Feb 2023 13:11 by JT.

Please Log in or Create an account to join the conversation.

More
07 Feb 2023 13:13 - 07 Feb 2023 13:24 #263926 by JT
Also the first part of this line is a link? Ah you need to add code tags...

-d /usr/lib/linux-image-$KERN/broadcom && cp -d /usr/lib/linux-image-$KERN/broadcom/* /boot/$KERN/

JT
Last edit: 07 Feb 2023 13:24 by JT.

Please Log in or Create an account to join the conversation.

More
07 Feb 2023 13:26 #263929 by rodw
Have you guys tried these?
raspi.debian.net/daily-images/
If you go bookworm, preempt_rt is packaged and so is linuxcnc.
This is a headless install and leaves you with root access only  no pw
so to get a graphical environment you can (no sudo cos you are root)
apt install tasksel
tasksel
select a graphical environment
xfce?
reboot.
Its been a while since i've done this. I know at one stage vtk was missing and I compiled it but I suspect its been added.
There is a good video on youtube with a lady that goes through it step by step on bullseye (not the preempt_rt stuff)

Please Log in or Create an account to join the conversation.

More
07 Feb 2023 13:50 #263932 by JT
Looks like the forum changed your commands because you didn't use code tags

I think this is the correct command.
cp -dr /usr/lib/linux-image-$KERN/* /boot/$KERN/ [[ -d /usr/lib/linux-image-$KERN/broadcom ]]
cp -d /usr/lib/linux-image-$KERN/broadcom/* /boot/$KERN/

JT
The following user(s) said Thank You: elovalvo

Please Log in or Create an account to join the conversation.

More
07 Feb 2023 13:55 #263934 by JT
tasksel seems to do nothing and is already installed... you do have to login as root

JT

Please Log in or Create an account to join the conversation.

Time to create page: 0.090 seconds
Powered by Kunena Forum