RPI4 Raspbian 64 bit & LinuxCNC

More
07 Sep 2023 11:54 - 07 Sep 2023 13:21 #280196 by cornholio
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: 07 Sep 2023 13:21 by cornholio.
The following user(s) said Thank You: rodw

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

More
07 Sep 2023 12:00 #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
07 Sep 2023 12:13 #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
07 Sep 2023 12:26 #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.

More
07 Sep 2023 13:13 - 07 Sep 2023 13:18 #280204 by cornholio
Ok from what I know running a local package repo at home.
I upload the file/s to my server in a tmp directory, then I run reprepro which copies the the file/s to the correct directory and updates the files and whatever magic it does.
If my sources list I have a entry pointing to my local server.
I run sudo apt-get update on one of my computers, it odes its thing and tells me what needs upgrading.
If the packages on my server are the most recent it will use them, if the debian/ubuntu repo has the most recent it will use that, sometimes it's mix of local & debian.
I save bandwidth this way. I have a few machines running Mint so when I need to do an update I update one machine, copy the files to my server, server does it's thing, then the other computers get the updates from my server.

So I can build linuxcnc, upload to my server and do a normal upgrade to install the most recent git pull of Linuxcnc.
Last edit: 07 Sep 2023 13:18 by cornholio.

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

More
08 Sep 2023 07:02 - 08 Sep 2023 07:14 #280249 by Donno
@Cornholio can you please post your complete build instructions ?
Last edit: 08 Sep 2023 07:14 by Donno.

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

More
08 Sep 2023 07:18 #280252 by rodw

Cornholio can you please post your complete build instructions ?

clone my repository and checkout the linuxcnc branch
git clone https://github.com/rodw-au/rpi-img-builder-lcnc
git checkout linuxcnc
edit userdata.txt and change to this setting MENUCONFIG ="0"
Open the file instructions.txt
and follow the rest of the steps
SIMPLE!

This is not quite where I want it to be but it does work as is.
I ran out of time this morning before I had to go to work.
The following user(s) said Thank You: Donno

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

More
08 Sep 2023 07:35 #280254 by cornholio
One thing I may add:
Once you've successfully built a first kernel & rootfs, after that all need to do is
make image board=bcm2711
if you want to rebuild an image.
There's no need to build the kernel & initial rootfs again (once this is built it's compressed only to be decompressed when building a new rootfs).
After you have a successfully built an image, that can be used with qemu on a x86 host to build Linuxcnc once there's been an update on the Linuxcnc git repo. No need to use rpi-image-builder just to build updated packages.
The following user(s) said Thank You: Donno

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

More
09 Sep 2023 21:31 - 09 Sep 2023 21:33 #280351 by rodw
Could some of you please test my installer at last
drive.google.com/drive/folders/1Bv4ceKAa...4PQGjKfQ?usp=sharing
User: cnc
Password: cnc

For the builders,  clone my repo
github.com/rodw-au/rpi-img-builder-lcnc/tree/linuxcnc
and follow the instructions
github.com/rodw-au/rpi-img-builder-lcnc/...cnc/instructions.txt

The linuxcnc debs are now saved  to output/<board>/linuxcnc
There have been some big internal changes to the builder but from a usability perspective, all of the required linuxcnc packages are saved in ROOTFS so subsequent builds of the image are a lot faster!
Do NOT run make config as it will wipe out all of our settings in userdata.txt

Please let me know if additional customisations should be included.
Last edit: 09 Sep 2023 21:33 by rodw.

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

More
10 Sep 2023 00:46 #280358 by rodw
Andy asked if his new GPIO driver in master branch worked. (its not in 2.9 yet)
ref: linuxcnc.org/docs/devel/html/drivers/hal_gpio.html
I made an image using master branch.
If any of you know your way around the pi it would be great if you could test it out
Download here:
drive.google.com/file/d/1g6zVRar7TQUxSPb...fF6/view?usp=sharing

If it works, maybe he can backport it  to 2.9

Please give some feedback

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

Time to create page: 0.227 seconds
Powered by Kunena Forum