RPI4 Raspbian 64 bit & LinuxCNC

More
3 years 1 month ago #280190 by Cant do this anymore bye all

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

More
3 years 1 month ago #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.

More
3 years 1 month ago - 3 years 1 month ago #280196 by Cant do this anymore bye all
Had a bit of a win.
Used your rpi-image-builder.
After the userscript installs linuxcnc I used scp to copy the packages to the output directory. As long as your are running ssh server on your build machine this works.
Now I'm just finishing off a build and moving onto phase 2. Time to make the server use it dual 4 Core Xeons, instead of just sitting there twiddling it's thumbs

edit: Successfully setup the chroot environment and build the Linuxcnc packages. No need to rebuild a complete image, worst I'd have to do is just do a apt upgrade before each build.

Should work for a RIP setup if I compress the linuxcnc-dev directory and copy it the RPi.
Last edit: 3 years 1 month ago by Cant do this anymore bye all.
The following user(s) said Thank You: rodw

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

More
3 years 1 month ago #280198 by rodw
I think the correct approach is to build linuxcnc in uscript function1() becasue you can just use cp there to move files into output. (I think)
Great you used my repo its pretty streamlined now. I would have known if my theory was correct had the wheels not fallen off this morning when I went to make an image...

Anyway, nothing that a reformat did not fix.

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

More
3 years 1 month ago #280200 by ruffle

Once an application gets into the stable release it is locked and does not changed.
 
Umm... not 100% sure that's right. If I do an apt update/apt upgrade on a running Debian system it tends to come up with loads of packages that can be upgraded.

Just done that on a fairly recently updated Buster machine and it's offering to upgrade 14 packages (firefox, chrome, php etc). On another rarely updated one it's offering 264 upgrades!

I freely admit I've no clue how a package gets into the 'can be updated' state but from a users perspective package updates within a release are normal.

If LinuxCNC users are going to have to download a new .img file that's going to get boring pretty fast as all their settings and configs will need re-implementing for each new img. Smells a little of Microsoft's "Just reinstall Windows" approach :)

If LinuxCNC in Debian can't be updated until Trixie then I do wonder what the point was of getting it accepted as a standard package in the first place.

Note: I'm really really really not trying to argue the toss or denigrate all the work you're putting in. If I'm being annoying then please do feel free to tell me to shove off and I won't take offense :)

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

More
3 years 1 month ago #280202 by rodw
On an x86 machine an apt upgrade right now will only update security patches . As its so new, there is not much else. But it will get updates to linuxcnc. I just did a new bookworm install  and there was nothing to upgrade.
If you did it on buster, there has no doubt been some point releases 9.1,9.2 etc since linxcnc made their ISO. So far in Bookworm, we have only had a 12.1 update. Remember I said it was locked to new packages?

Once Linuxcnc finally releases 2.9, It will sort out becasue we don't upgrade our versions often either.

And it is possible to do an apt full upgrade after changing sources so you can upgrade from Buster to Bullseye and then to Bookworm...
I have done this but its almost quicker to reinstall from scratch.

I am hoping this imager will also publish the linuxcnc debs so if run in an automated buildbot it could update the imager and the linuxcnc debs.
IN any case, its possible to pin repositories and pull linuxcnc from trixie or backports while running Bookworm


 

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

Time to create page: 0.370 seconds
Powered by Kunena Forum