RPI4 Raspbian 64 bit & LinuxCNC

More
06 Sep 2023 18:43 #280137 by rodw
Well, yes. my goal is to be able to have an image for the Pi based on Bookworm that can be used when they release Version 2.9. Deploying the resulting image on the web site is a task for the devs. But its likely to be driven by an automated buildbot. The current buiildbot for bullseye and bookworm does not build debs or images for the pi. The oldbuildbot uses a pi and its not been very reliable. It crashes once  a month and brings the whole buildbot down. This runs on a cross compiler so should be more robust and produce the debs as well as the image.
I'm just trying to remove some roadblocks so 2.9 is released sooner than later.

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

More
06 Sep 2023 18:47 #280138 by rodw


The 'normal' Raspian stylee dd from the SDCard to a USB SSD doesn't result in a bootable USB device but sticking Cornholio's .img on a USB SSD does boot... but didn't auto-resize the root partition :-( a parted and resize2fs sorted that (no not idea but it worked!).
 

I thought the "normal" Raspberian style would use rpi-imager www.raspberrypi.com/software/
Balena Etcher is also an alternative which runs on any platform and is way faster than dd

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

More
06 Sep 2023 19:04 #280140 by cornholio
What you to need to remember whilst the kernel is Raspbian , the underlying OS is pure Debian.

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

More
07 Sep 2023 06:06 - 07 Sep 2023 06:14 #280168 by ruffle

I thought the "normal" Raspberian style would use rpi-imager www.raspberrypi.com/software/
Balena Etcher is also an alternative which runs on any platform and is way faster than dd

Getting a little OT but rpi-imager/etcher is primarily a means to create a bootable SD Card from a .img file. I was talking about migrating a live system running on an SD Card to a USB SSD on a RPi and yes there are pretty, gui ways of doing this in Raspian World for people that can't spell dd :) :) :)

Back on topic; as LinuxCNC is an official part of Debian Bookworm, given a bootable Bookworm for the RPi (which Cornholio seems to have given us; thank you) going forward users would just "apt update", "apt upgrade" to get the latest official LinuxCNC release and life is good (even then why would you if it's all working? My Mill is happily running on 2.8.0-pre1 of 2016 vintage :)).

There isn't really a need to generate new .img files that I can see until, possibly, Trixie comes along in a couple of years time with a different kernel; and even then a dist-upgrade might work (note to Cornholio: should there be a repo in sources.list for the rt kernel?).

So thanks to both yourself and Cornholio. I now have LinuxCNC 2.9 on Bookworm on my RPi with which to continue my lathe conversion.

 
Last edit: 07 Sep 2023 06:14 by ruffle. Reason: Pah. Edit borked the quote.

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

More
07 Sep 2023 06:42 #280170 by rodw
On the Pi, you are not able to just do an apt update to get the latest version of linuxcnc. You will either have to get a newer img from us or build from source because there are no pi images being created by the new linuxcnc buildbot. The one in Bookworm is dated February I think.

I told you I am not a pi user....

And not having much luck here, Somehow I have corrupted the linux internals so need to install linux again :(
Just trying to do the final mucking arround to save the linuxcnc debs in the output folder.

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

More
07 Sep 2023 08:28 #280176 by cornholio
The rt kernel is built from source and as it stands there is only one branch of RPi 6.x sources that match an available set of real time patch set.
To have a repo for the kernel someone would have to have a server setup as repo. I did that once (for packages built for Linuxcnc on Mint) and no not again.

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

More
07 Sep 2023 08:55 #280178 by cornholio

On the Pi, you are not able to just do an apt update to get the latest version of linuxcnc. You will either have to get a newer img from us or build from source because there are no pi images being created by the new linuxcnc buildbot. The one in Bookworm is dated February I think.

I told you I am not a pi user....
 



I'm going to try and scp to copy from the qemu guest (which is doing the build) to the host (the machine running image builder)

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

More
07 Sep 2023 09:37 #280184 by ruffle

On the Pi, you are not able to just do an apt update to get the latest version of linuxcnc.
 

Now I'm confused again (easily done).

As LinuxCNC is an official Debian thing hosted in the Debian repository then the package maintainer will, presumably, have to love and care for it, push stable updates to Debian which then become available to update like any other Debian package. A Debian version isn't frozen; just look at the number of in-release updates.

This obviously won't get the latest bleeding edge dev version but should cover the stable released ones.

Or am I totaly misunderstanding the point of getting LinuxCNC into the official Debian repo?

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

More
07 Sep 2023 10:02 #280190 by cornholio

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

More
07 Sep 2023 10:05 #280192 by rodw
Once the source of a package is zipped up and sent to debian, it goes into sid branch and their buildbots make debs for every supported architecture (including the Pi). then after its proven to be safe, it moves into testing branch. Every couple of years, Debian makes a new stable release from testing branch. Once an application gets into the stable release it is locked and does not changed. Debian Bookworm (version 12) is the release branch. Because Linuxcnc has its own buildbot and repositories, you can add those to the apt system. This is what my X86 installer does automatically. Then when it does an upgrade, it will grab the very latest debs of linuxcnc.

But that buildbot is unable to build the debs for the Pi so the only option is to build from source to update linuxcnc. Its my hope that this installer could be hooked into the buildbot system and produce an image and updated debs for the pi whenever the code base is changed. But I am not a decision maker, I am just trying to remove some roadblocks.

So Debian 12 was released on the 6.1 kernel. Further to Cornholio's comments, we need the Preempt-rt patch from kernel.org. This can be found at kernel.org mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/6.1/
Each version of the Linux kernel goes through a number of releases. the latest RT patch you can see it is 6.1.46 
This patch is used to update the ordinary kernel code and compiled to get a PREEMPT_RT kernel. But it needs to be applied to the same version to guarantee reliable operation. The Raspberry Pi kernel repo has advanced to 6.1.51 so we can't use the very latest. Instead we searched the git tree and found the commit where the 6.1.46 kernel was merged into the raspberry kernel. So this is the base code we retrieve in the installer and we have copied the RT patch into a folder in the installer which first applies our patch, the builds the kernel, followed by a root file system and linuxcnc and turns it into an image. Because the linux kernel has now advanced up to 6.5, its unlikely the patch will change, so this should last for a long time. Except for the need to update linuxcnc.

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

Time to create page: 0.483 seconds
Powered by Kunena Forum