RPI4 Raspbian 64 bit & LinuxCNC

More
28 Aug 2023 13:07 #279167 by cornholio
Hey Rod does Bookworm work with SPI interface ? From memory last time I tried I couldn't for the life of me get it to work. Ended up using Raspbian based on Bullseye 64 bit.
Been messing around with a Spartan-6 FPGA dev board with modded 7c81 firmware to suit. And some of the Colorlight board based projects.

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

More
28 Aug 2023 13:28 #279168 by rodw
I have no idea. Andy did some work on the gpios so hopefully it will work now.
He's also writtesn a proper gpio driver but its not in the code yet.

This file is broken so don't download it. There is an obscure issue with the upstream installer which as been fixed so I am updating my repo and hoping to have it building overnight in a couple of minutes
 

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

More
28 Aug 2023 20:52 #279209 by rodw
The upstream bugs have been fixed but my download link has not been updated.
Built it again last night with the new framework and it installed fine but it only gave a command line interface. 
I installed XFCE and have worked out all the dependencies and linuxcnc is building happily.
Then I will need to script the process in the installer. That might not be easy!

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

More
29 Aug 2023 01:24 #279236 by thomlop
Yes, thank you. The password "cnc" worked. I'm a total newbie at this so I really appreciate the help.

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

More
29 Aug 2023 03:00 #279241 by rodw

Yes, thank you. The password "cnc" worked. I'm a total newbie at this so I really appreciate the help.

Thats interesting,. I had a total fail with that ISO until they changed something upstream
try typing
sudo apt install xfce4 firefox-esr
Then when done type startx and you should get an XFCE desktop. After that when you reboot it will be normal desktop
I have a list of dependencies at home which I will eventually share.
 

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

More
30 Aug 2023 12:29 #279370 by cornholio

Hey Rod does Bookworm work with SPI interface ? From memory last time I tried I couldn't for the life of me get it to work. Ended up using Raspbian based on Bullseye 64 bit.
Been messing around with a Spartan-6 FPGA dev board with modded 7c81 firmware to suit. And some of the Colorlight board based projects.



Think I've got it regarding spi & mesaflash talking to a 7c81 board
forum.linuxcnc.org/38-general-linuxcnc-q...pair?start=20#279367
The following user(s) said Thank You: rodw

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

More
31 Aug 2023 11:11 #279466 by rodw
I'm getting closer to an image with linuxcnc included. Today I got it compiling linuxcnc but it failed close to the end as 6 gb allocated for the image was not enough! That was at the end of the day, so hopefully tomorrow I will have sucess. It is very time consuming as I have to wait a long time until it runs the important script. Then if it errors, its back to the start.

I'm confident that it will include all the device tree overlays as it pulls the kernel code down from the official Raspberian repos and I patch it with the RT patch to get PREEMPT_RT.
The following user(s) said Thank You: cornholio

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

More
31 Aug 2023 13:02 #279468 by cornholio
I did one today, used the pi builder, booted up to console, add to do a few fixes to get it to boot to gui (some issues with debconf or something or other, after this booted to a XFCE just fine). Installed Linuxcnc, mesaflash geany, gvfs-fuse, gvfs-backends, samba-common and some other bits, it suits my needs as I use Axis mainly. Had a RT kernel from yesterdays exercise. One thing I wasn't keen on was that sudo didn't ask for a password (might as well be root), seemed a little silly, so fixed that up.
Shrank and compressed the image and then remembered I didn't clear the apt cache (about 800MB), fixed that up set the tzdata to Sydney Australia, added locales for AU NZ GB & US now I'm shrinking the image.
Made sure mesaflash can talk to my7c81 jerry rigged FPGA

Uncompressed FS is about 6.5GB so a 8GB sdcard would be the Min.
Compressed is about 1.5GB
Should expand the FS on first boot.
The utility I used to shrink the FS added some extra to the end.

Mainly did this as an exercise to see what it's like and for myself you seem to be on top of things so I wont put this out in the wild as it will just get confusing. Also I thought I'd just share some things I noted. I built the image on a Bullseye install. The compression I did on a machine that's a little faster.

Things to note: Did change the cmdline.txt file to suit the RT kernel (just 2 cores isolated), enabled spi via config.txt.
Even tho I installed the RT kernel via a package still had to move the kernel8.img file to the first partition as that is mount /boot/broadcom.
One thing that may need to be done is to mark the initramfs tools not to be updated, had an issue where it screw up things last night when I used the debian bookworm image.
The following user(s) said Thank You: rodw

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

More
31 Aug 2023 13:52 #279474 by rodw
Awesome work! I think you know more than me so don't go away.
A user script called uscripts can be placed in ths folder
github.com/rodw-au/rpi-img-builder-lcnc/...er/files/userscripts
run_function2 can be used to build linuxcnc.
I found it failed if run_function1 was not there so I just added an echo statement there.
I have not looked at how to update boot.txt

I'm sure my script will work as I tested it on my desktop pc. 
I am not planning on  adding the docs to the pi, I think it will be just too much for a little SBC!

Did you patch the kernel for preempt_rt? My linuxcnc branch has the patch already.
github.com/rodw-au/rpi-img-builder-lcnc/...linuxcnc/userpatches

Its great to know your mesa card is working. How is the latency?
Can you review the additional settings Vector added in this doc and see if they improve performance?
linuxcnc.org/docs/2.9/html/getting-start...rm_on_a_raspberry_pi
I know nothing about this stuff...

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

More
01 Sep 2023 11:17 #279564 by cornholio
Originally I used forum member's theAndreas gtihub project to build the kerne. Now I'm building another image with the image builder patching.
Latency appears to be fine for SPI\Ethernet applications.

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

Time to create page: 0.191 seconds
Powered by Kunena Forum