RPI4 Raspbian 64 bit & LinuxCNC
01 Sep 2023 11:34 #279565
by rodw
Replied by rodw on topic RPI4 Raspbian 64 bit & LinuxCNC
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
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!
#!/bin/bash
run_function1 (){
echo "run_function 1 completed"
}
run_function2 (){
apt install -y xfce4 xfce4-terminal xfce4-power-manager
apt install -y geany firefox-esr konsole
apt install -y dh-python libudev-dev docbook-xsl asciidoc ghostscript imagemagick asciidoc-dblatex bwidget intltool libboost-python-dev libepoxy-dev libgl1-mesa-dev libglu1-mesa-dev libgtk-3-dev libmodbus-dev libgpiod-dev libeditreadline-dev libusb-1.0-0-dev libxmu-dev netcat-traditional netcat-openbsd po4a python3-dev python3-tk python3-xlib tcl8.6-dev tclx tk8.6-dev yapps2 libgtk2.0-dev
#Linuxcnc Docs
#apt install -y dvipng fonts-dejavu graphviz groff inkscape python3-lxml source-highlight texlive-font-utils texlive-lang-cyrillic texlive-lang-european texlive-lang-french texlive-lang-german texlive-lang-polish texlive-lang-spanish w3c-linkchecker
mkdir -p /tmp/devel/
cd /tmp/devel/
git clone https://github.com/LinuxCNC/linuxcnc.git linuxcnc-dev
cd linuxcnc-dev/src
git checkout 2.9
cd ../debian
./configure no-docs
cd ..
dpkg-buildpackage -b -uc
cd ..
apt install -y ./linuxcnc-uspace_2.9.0~pre1_arm64.deb
apt install -y ./linuxcnc-uspace-dev_2.9.0~pre1_arm64.deb
cd ..
#rm -r devel
echo "All done installing linuxcnc!"
}
The following user(s) said Thank You: Donno
Please Log in or Create an account to join the conversation.
01 Sep 2023 21:35 #279614
by rodw
Replied by rodw on topic RPI4 Raspbian 64 bit & LinuxCNC
I have yet to try this but with more generous support from Cornelius upstream, we need to use 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 commitRef: 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...
make commit board=bcm2711
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
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.
02 Sep 2023 01:14 #279634
by cornholio
Replied by cornholio on topic RPI4 Raspbian 64 bit & LinuxCNC
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.
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.
02 Sep 2023 01:35 #279635
by rodw
Replied by rodw on topic RPI4 Raspbian 64 bit & LinuxCNC
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
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.
02 Sep 2023 02:58 #279639
by cornholio
Replied by cornholio on topic RPI4 Raspbian 64 bit & LinuxCNC
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.
02 Sep 2023 07:21 #279649
by rodw
Replied by rodw on topic RPI4 Raspbian 64 bit & LinuxCNC
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
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.
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!
# make a development folder to keep the home folder tidy
cd ~
mkdir devel
cd devel
https://github.com/rodw-au/rpi-img-builder-lcnc
cd rpi-img-builder-lcnc
git checkout linuxcnc
#set up the environment - First run only
./install.sh
make ccompile
# Download the kernel fromn Raspberry but we want to go back to the matching commit
# for the latest preempt_rt patch which is Linux version 6.1.46
# The Raspberry Pi kernel is advancing regularly merging with the kernel.org source
make commit board=bcm2711
Enter: 9ed4f05ba2e2bcd9065831674e97b2b1283e866d
make rootfs board=bcm2711
make image board=bcm2711
# Before rebuild
make purge
#User name and password
User: cnc
Password: cnc
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.
Please Log in or Create an account to join the conversation.
03 Sep 2023 10:17 #279707
by rodw
Replied by rodw on topic RPI4 Raspbian 64 bit & LinuxCNC
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, typeNotes 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.
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
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.
03 Sep 2023 11:04 #279712
by cornholio
Replied by cornholio on topic RPI4 Raspbian 64 bit & LinuxCNC
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.
- rbobey1989
- Offline
- Premium Member
Less
More
- Posts: 105
- Thank you received: 27
03 Sep 2023 11:32 - 03 Sep 2023 14:22 #279715
by rbobey1989
Replied by rbobey1989 on topic RPI4 Raspbian 64 bit & LinuxCNC
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.
03 Sep 2023 18:19 #279754
by MLei
Replied by MLei on topic RPI4 Raspbian 64 bit & LinuxCNC
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,..
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.117 seconds