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

More
3 years 9 months ago #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
Code:
     sudo apt update sudo apt upgrade

3) Install the realtime kernel (5.15.65-rt49)
As reported in github.com/kdoren/linux/releases
Code:
     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 )
Code:
    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
Code:
     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 )

Code:
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
Code:
     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
 

Please Log in to join the conversation.

More
3 years 9 months ago #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
Code:
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

Please Log in to join the conversation.

More
3 years 9 months ago #261163 by TimGow
ah, the formatting here; it was the http:// that I added

Please Log in to join the conversation.

More
3 years 8 months ago #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 to join the conversation.

More
3 years 8 months ago #263801 by elovalvo
I think you forgot to define the KERN environment variable with the command:
Code:
KERN=5.15.65-rt49-v7l+

before the command
Code:
mkdir -p /boot/$KERN/o/

Please Log in to join the conversation.

More
3 years 8 months ago #263924 by JT
Is there something missing from these steps? I get an error invalid option -- 'd'

Code:
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

Please Log in to join the conversation.

More
3 years 8 months ago #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

Please Log in to join the conversation.

More
3 years 8 months ago #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 to join the conversation.

More
3 years 8 months ago #263932 by JT
Looks like the forum changed your commands because you didn't use code tags

I think this is the correct command.
Code:
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

Please Log in to join the conversation.

More
3 years 8 months ago #263934 by JT
tasksel seems to do nothing and is already installed... you do have to login as root

JT

Please Log in to join the conversation.

Time to create page: 0.098 seconds
Powered by Kunena Forum