RPI4 Raspbian 64 bit & LinuxCNC

More
01 Sep 2023 11:34 #279565 by rodw
Cool, I built it today with linuxcnc but it would not boot for me. I'm not convinced its not an issue with this pi of mine
Its over 7 gb... try if you wish.
drive.google.com/file/d/1syY2FiNr_tJn29m...s_a/view?usp=sharing

The uscripts file to build linuxcnc looks like this
Warning: Spoiler!
The following user(s) said Thank You: Donno

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

More
01 Sep 2023 21:35 #279614 by rodw
I have yet to try this but with more generous support from Cornelius upstream, we need to use 
make commit board=bcm2711
I did not realise until recently that we are pulling down the Pi kernel from
github.com/raspberrypi/linux
When I started, the kernel version was 6.1.47 and now its marched forward to 6.1.50
The latest RT patch (which I use) is for kernel 6.1.46 so they are too far apart!
ref: mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/6.1/
Going back through the Raspberry Pi commits, 6.1.46 was committed in 17 August on commit
6c44e13dc284f7f4db17706ca48fd016d6b3d49a
Ref: github.com/raspberrypi/linux/commit/6c44...706ca48fd016d6b3d49a

So if we use the command above, we need to paste in the commit when asked for it.
Lets see how that goes...

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

More
02 Sep 2023 01:14 #279634 by cornholio
Ok that makes sense, whilst an image I made last night could boot, latency was rotten.
When I have a chance I'll give it a go.
One thing I've noticed is that the locales doesn't seem to be setup in the image, which is causing tasksel to not work. More than likely an issue at my end.

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

More
02 Sep 2023 01:35 #279635 by rodw
Actually I was not right with my methodology, We need to pick up the merge afterwards.
Read the tail of our conversation here github.com/pyavitz/rpi-img-builder/issues/56
The commit should be 9ed4f05ba2e2bcd9065831674e97b2b1283e866d


 
Attachments:

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

More
02 Sep 2023 02:58 #279639 by cornholio
Just running that now, seems to the right version and no unexpected messages when patching.
The following user(s) said Thank You: rodw

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

More
02 Sep 2023 07:21 #279649 by rodw
Success! finally got it working! The kernel is in sync with the RT patch!
I did not that sudo does not ask for a password

I have updated the linuxcnc branch of my repo
github.com/rodw-au/rpi-img-builder-lcnc/tree/linuxcnc

I also added an instructions.txt file explaining the steps required. Repeated in the spoiler
Warning: Spoiler!


I can't find where to add isolcpus. Where did you put it? The files I was expecting to find don't exist!

I'm hoping upstream might be able to modify something to set the commit
 number somewhere

To set the PREEMPT_RT kernel, when th eblue  menu is displayed, Open General settings and look for premption model. Open it. Select Fully Preemptible kernel. If this option is not displayed, go back to general settings and kepe looking for a noption that says expert in th emenu. Select it. Then go back to the Preemption model and ensure Fully Preemptible kernel is set. 

I am uploading the image. I will let you knoe when I have  a link.

Oh, and I saved the linuxcnc debs here. If you have a working system, these are current as of today!
drive.google.com/drive/folders/1DLb1ImM1...Sn3Lovyu?usp=sharing
Sorry did not built mesaflash.

Stii plenty to do to tidy this up.
The following user(s) said Thank You: mwiktowy, cornholio

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

More
03 Sep 2023 10:17 #279707 by rodw
Here is the boot ready image. Install using rpi-imager or Balena Etcher (which I use)
drive.google.com/drive/folders/1Bv4ceKAa...4PQGjKfQ?usp=sharing
If there is more than one file look at the timestamps in the file name and grab the latest one.

User: cnc
password cnc:
after boot, run: sudo menu-config to set locale and timezone etc.

As configured you don't need a password to run sudo. If you don't like the thought of this, type
sudo rm -f /etc/sudoers.d/010_*-nopasswd
Notes on the environment:
1. Forked from the offiical Raspberry Pi installer
2. Uses the Raspberry Bookworm Kernel 6.1.46 to match the latest PREEMPT_RT patch
3. XFCE desktop installed
4. isolcpus and other settings included for latency
5. Includes the device tree overlays from the official upstream sources
6 Linuxcnc built from Source. Refer the timestamp on the .img file for date aand time.

Repository here if you wish to build it (Follow steps in instructions.txt)
github.com/rodw-au/rpi-img-builder-lcnc/tree/linuxcnc
Lightly tested by Cornholio and myself

If additional optimisations are required, please let me know.
The following user(s) said Thank You: Donno

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

More
03 Sep 2023 11:04 #279712 by cornholio
Hey rod if you run xz -vT0 image_name you can reduce the download to about 2GB or so

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

More
03 Sep 2023 11:32 - 03 Sep 2023 14:22 #279715 by rbobey1989
Hello Rodw, good job, I have been following this thread for a few days, I've even read your conversations on Github, very good support by the way from Cornholio, yesterday I built a debian bookworm image with rt core and I installed linuxcnc from the repository ( apt-get ....), then when I launched latency-histogram it gave me a warning: """"Note: Using Posix non-realtime""""", I thought it might be a configuration problem on my part. build the kernel, a few moments ago I looked to see if there were new updates on the topic in the forum and I see that you provided an image, I tried it with hope but the terminal gives the same warning, any ideas on this, greetings
Last edit: 03 Sep 2023 14:22 by rbobey1989.

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

More
03 Sep 2023 18:19 #279754 by MLei
Hey, I did test that "first" build from 01 Sep, it was booting well with RPI4b 4G.How is the SPI with this latest one? Cornholio,. you did some activities with that one?
I am having also 7C81 to be driven here,..

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

Time to create page: 0.157 seconds
Powered by Kunena Forum