Preparing native Raspberry Pi OS for LinuxCNC

More
27 Feb 2024 06:39 #294579 by cornholio
Replied by cornholio on topic Preparing native Raspberry Pi OS for LinuxCNC
I installed the kernel using packages & info here
github.com/kdoren/linux/wiki/Installatio...ge-(Raspberry-Pi-OS)

then I used the following to prevent the kernel being upgraded
sudo apt-mark hold linux-image
sudo apt-mark hold linux-headers

reboot
used this
www.linuxcnc.org/linuxcnc-install.sh

then installed linuxcnc-uspace-dev

Seemed to work fine
The following user(s) said Thank You: ago_tm

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

More
27 Feb 2024 09:31 #294586 by rodw
If you type sudo menu-config, you should be able to edit your username and password and other settings in a graphical environment. Refer the screen dump in the read.me on my repo.
The following user(s) said Thank You: ago_tm

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

  • ago_tm
  • ago_tm's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
29 Feb 2024 22:55 #294807 by ago_tm
just a brief status of my experiments...

I spent several days trying to setup the feasible VNC server on the Debian 12 LinuxCNC image but unfortunately looks like I can't. The only successful result was reached with x11vnc, but jitter grew up to ~280 μs (280,000 ns) just after I run x11vnc process (even with no connections).

I also tried to install there wayvnc like on raspberry OS, but debian sources contains too old version 0.5xx. On raspberry it is 0.8xx RC and several days ago they released regular 0.8. But I didn't understand how to resolve the dependency hell with all the required packages...

Will try to use Rod's toolchain to prepare the image based on the Raspberry Pi OS — I'm really loved in the way how can I customize all the required packages and appearance before the image has been flashed.

If someone resolved the lightsweight enough VNC server on Debian, I would be pleased to take a look. Thanks,

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

More
01 Mar 2024 00:04 #294809 by cornholio
Replied by cornholio on topic Preparing native Raspberry Pi OS for LinuxCNC
Rods tool chain creates a Debian based image, not a Raspberry Pi OS based image. Whilst the are similar there are some differences, you lose some of the customizations that Raspberry Pi Foundation has.
On my Raspberry Pi based image I used this tutorial:
pimylifeup.com/raspberry-pi-vnc-server/

Can't remember if I checked latency, if I did it doesn't stick in my mind there were any latency issues. One thing I forgot to add is I changed from the wayland backend to the X11 backend using raspi-config. The X11 layer in wayland was very very slow in some of the tests I tried.
The following user(s) said Thank You: ago_tm

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

More
01 Mar 2024 08:02 #294823 by rodw
You would be better off looking for debian packaged VNC software here packages.debian.org/index
It will tell you if there are ARM64 packages but the way debian works, it builds for all platforms 
The following user(s) said Thank You: ago_tm

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

  • ago_tm
  • ago_tm's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
09 Mar 2024 16:21 #295521 by ago_tm
I created a kind of step by step instruction for the customisation of the RPI Image Builder: github.com/golyakoff/linux-info/blob/mai...Debian12OS/README.md 

Hope I covered the majority of the customization cases in different places of the framework written by rodw.

Please feel free to write your comments :)
The following user(s) said Thank You: rodw

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

More
16 Jun 2024 16:12 #303116 by tjtr33
Hello, I get aurh error on last line of these cmds

cd ~
git clone --depth=1 --branch v2.9.2 github.com/linuxcnc/linuxcnc.git ~/linuxcnc-dev
cd linuxcnc-dev
./debian/configure uspace
mk-build-deps
mv linuxcnc-build-deps_$(cat VERSION)_all.deb ../linuxcnc-build-deps_$(cat VERSION)_all.deb
su -c "apt install ../linuxcnc-build-deps_$(cat VERSION)_all.deb -y"

I checked my pwd, I can login ok

but still get auth err when last l line asks for pwd

i tried to circumvent using
sudo apt install ../linuxcnc-build-deps<tab for autocompletion>
but ended with broken packages

this fails as well, same way
su -c "ls"

help!
tomp tjtr33

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

More
27 Jun 2024 04:19 #303869 by tjtr33
2024/06/27
re raspberry pi and software stepping:

There are two ways to install LinuxCNC discussed in this thread.

The first is to use an ISO image mentioned in the official getting started guide.
Te second way is to the old a system as described by user aso_tm.

The iso solution users wayland and has no screen capture or synaptic
and makes installing synaptic difficult
Also most LinuxCNC apps appear several times in the menus.
All together, these features made me want to build the system.

The second method (ago_tm)
requires additional flags this true the apt install commands
to overcome not trusted sources errors.
Also, gebrated debs involve permission problems
for some me user who is neither me nor wrote.
Beware that the 'copy me' aid copies the $ prompt too.
Getting the build to complete requires several restarts
The first start will show you the error
and the second will hopefully will succeed after modification.
The changes will be to the last line of the copied multiline command.

But, the bottom line is...
neither solution will give you reasonable software stepping
due to huge latencies, between 3 and 7mS (yes mS)
Using latency-histogram --no-base
with 10 glxgears abd 1 youtube vid
OR one VLC vid. ( similar to ago_tm's testing)

So the raspberry pi( my version for) he's not suited to software stepping
and the contributors to this thread suggest using a hardware step generator.

I ask:
1) iI a hardware step generator is used
are latency test meaningless?
Do those tests identify no constraints on the control system?

2) What steps per second can be acgieved?
( my case would be for an rpi4B 4G)

Thanks tjtr33 / tomp

written with nerd-dictation
huh

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

More
27 Jun 2024 05:50 #303870 by cornholio
Replied by cornholio on topic Preparing native Raspberry Pi OS for LinuxCNC
with su you are required to have\know the root password.
sudo only requires you to know your root password.

Latency can be improved by adding isolcpus=2,3 to the kernel command line.The location of the file that needs to be edited is under different directories of /boot depending if you use a pre made Linuxcnc image or install on top of a Raspberry Pi Foundation image. With the RPi Foundation images I use rasp-config to switch from wayland to X11.

I'm not sure what the exact figures are for mesa hardware stepping are but they are way more then you would ever need/find a stepper driver that could use a pulse train that quick.

Be wary of the DIY projects, they are excellent, but sometimes assembling all the hardware required for voltage level translation, coping with differential signals for encoders can come close to Mesa hardware. If you have experience in this field it can be done, I've been down that track, adjusting Mesa source code to suit a dev board and then designing hardware to suit and getting PCBs made then patching Linuxcnc drivers to work with my DIY stuff.

With regards to the latency tests with hardware stepping the constraints aren't so tight, but there is an upper limit.

If I was to try software stepping my list of candidates would be(also some notes on usable interfaces for the RPi models):
1. An x86 system, 4 core if possible with a RT_PREEMPT kernel, for 2 cores maybe a RTAI kernel. (A PC and a parallel port card can be cheaper than an RPi)
2. A RPi5 as this is overall a faster product than the RPi4, but it wont support hardware stepping via SPI. TLDR; the Linuxcnc driver to access the SPI at the hardware level needs a rewrite. Ethernet hasn't been seen to be a problem.
4. A RPi4 (or even better because of a slightly faster clock an RP-400) but don't expect the the machine to excite the world. Spi interface is an option as is Ethernet is also fine for mesa boards.

Be aware that some DIY SPI based options require a servo & base thread, whereas the 7c81,7c80 & 7i90 do not.

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

More
05 Jul 2024 14:23 #304468 by tjtr33
Thanks very much.
You tell me severalnew things, esp re: spi.

My trusty pentium4 died recently,
after years of being on lifesupport.

luckily, I have an Rpi4 to try SPI remora MKS masahup.
(and a i686 that I can dictate this to)

(note for oother vision impairted, try nerd-dictation)

again, thanks!

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

Time to create page: 0.089 seconds
Powered by Kunena Forum