RPI4 Debian 64bit

More
01 Mar 2020 19:34 #158905 by tjmarch
RPI4 Debian 64bit was created by tjmarch
Download Debian 64bit Buster image bellow link

RPI4_Debian-64_Lite

This image has the RT-Preempt kernel 4.19.71-rt24-v8+ already installed

Follow instructions to write image to SD card use balenaEtcher method. Instructions on following web page.
www.raspberrypi.org/documentation/instal...ing-images/README.md
This image file dose not have raspi-config it is necessary to resize,
(expand) Root file system,(partition #2 ext4 file system)
with gparted using raspbian on PI or another computer with newer distribution of linux before starting
some linux distribution do not have a current enough release of gparted
user = debian
password = debian


# Connect to wired network

sudo apt-get -y update
sudo apt-get -y upgrade


# Generate your locales currently set to en_US.UTF-8

sudo dpkg-reconfigure locales


# Update to correct keyboard layout currently set US

sudo dpkg-reconfigure keyboard-configuration


# Update Time Zone currently set for US/Michigan

sudo dpkg-reconfigure tzdata


# Install a Desktop
XFCE and LXDE are quite snappy with low memory overhead but are not the only choices
Use the following command then make your choice

sudo tasksel


# Install of Linuxcnc

First install gdebi all depends will install automatically

sudo apt install gdebi gdebi-core

I have compiled two versions of linuxcnc links below

Linuxcnc-Master
Linuxcnc-2.8

Extract archive and install deb for documentation for your language then linuxcnc-uspace with gdebi from commandline
sudo gdebi -n <FileName>.deb


# To overcome permissions for memory usage for gpio driver download the following archive

services

There two files in archive extract them

setmempermissions.service
setgpiomempermissions.service

Place files in
/etc/systemd/system/

Do in Terminal

sudo systemctl enable setmempermissions.service
sudo systemctl start setmempermissions.service
sudo systemctl enable setgpiomempermissions.service
sudo systemctl start setgpiomempermissions.service
sudo reboot -n

After reboot check /dev/mem and /dev/gpiomem permissions
In terminal

cd /dev
ls -l | more
press ENTER key to scroll through

Should be
crwxrwxrwx 1 root root 246, 0 Mar 1 09:50 gpiomem <---date and time will be different
crwxrwxrwx 1 root kmem 1, 1 Mar 1 09:50 mem

If someone knows a better way of doing this without having to change permissions after every reboot I am all ears


#To make image backup of sdcard on a linux computer I think this works on MAC also

# First use Gparted to shrink second partition using raspbian on PI or another computer with a newer distribution of linux
some linux distributions do not have a current enough release of gparted

sudo fdisk -u -l <----use to find where sdcard is mounted run without card, then with card
sudo fdisk -u -l /dev/mmcblk0 <----run with name of sdcard in my computer this is /dev/mmcblk0 your card may be named different


Output from above
Disk /dev/mmcblk0: 30 GiB, 32191283200 bytes, 62873600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x46f1a0e2

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 8192 93813 85622 41.8M c W95 FAT32 (LBA)
/dev/mmcblk0p2 94208 5869567 5775360 2.8G 83 Linux

# Use dd, the following will copy image to your hard drives' home directory

sudo dd if=/dev/mmcblk0 of=~/<name-of-your-choice>.img count=5869567 <--END of sectors on p2, yours will be different

# Remember to expand file system with gparted when rewriting to a new sdcard or hard drive


# To use a hard drive or SSD drive

Follow instructions to write image to SD card and hard drive or ssd drive
use balenaEtcher method. Instructions on following web page.
www.raspberrypi.org/documentation/instal...ing-images/README.md
This image file dose not have raspi-config it is nessary to resize,
(expand) Root file system,(partition #2 ext4 file system)
with gparted using raspbian on PI or another computer with a newer distribution of linux before booting
some linux distributions do not have a current enough release of gparted

Write image file that you saved to both sdcard and hard drive or ssd drive
then on the sdcard edit cmdline.txt look for
root=/dev/mmcblk0p2
change to
root=/dev/sda2

Use both sdcard and hard drive or ssd drive to boot
The following user(s) said Thank You: Mike_Eitel, tommylight, elovalvo, Aciera, bbsr_5a

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

More
23 May 2020 18:37 #168706 by cakeslob
Replied by cakeslob on topic RPI4 Debian 64bit
The million dollar question for me, can you load backplot in qtvcp or qtpyvcp screens, using debian instead of raspbian?

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

More
23 May 2020 19:53 #168715 by tjmarch
Replied by tjmarch on topic RPI4 Debian 64bit
You will have to try it and see

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

More
23 May 2020 23:45 #168748 by phillc54

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

More
24 May 2020 04:55 #168767 by tjmarch
Replied by tjmarch on topic RPI4 Debian 64bit
Ok thanks for the info but is it 32 bit which I am sure it is, this post refers to a 64 bit Debian build

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

More
17 Aug 2020 09:50 #178472 by thekarlmiller
Replied by thekarlmiller on topic RPI4 Debian 64bit
This is how I attempted to load LinuxCNC 2.8 on a RPi 4 with 4GB ram according to the instructions in this post. The text below is exactly what I typed and did (stuff in parenthesis are my comments), but runs has jitter numbers in the 85,000,000ns range without doing ANYTHING on the Raspberry Pi but login to the XFCE gui as debian and selected the Jitter test.
Is there some other RPi overclock or something similar that this post does not mention to get reasonble jitter
numbers?


Here are the steps I used (in this order):
(download Raspberry Pi imager program (https://www.raspberrypi.org/downloads/)
(use it to burn rpi4-debian64-rtkernel64.img.xz image from (https://forum.linuxcnc.org/9-installing-linuxcnc/38494-rpi4-debian-64bit))
(connect RPi to wired network, plugin keyboard )
(login as user debian, passwd=debian)
sudo passwd root             (change it to debian)
sudo apt-get -y update
sudo apt-get -y upgrade
sudo reboot
sudo sh /boot/install.sh
       (copied there after flashing the sd card (before booting Pi with it)
       from https://www.raspberrypi.org/forums/viewtopic.php?t=42836, which suggests using
       install.sh from https://github.com/EmilGus/install_raspi-config)
sudo apt --fix-broken install (raspi-config install failed so someone online suggested this and the subsequent --expand-rootfs worked okay)
sudo reboot
(login as debian/debian)
sudo raspi-config --expand-rootfs
sudo reboot
sudo dpkg-reconfigure locales      ( choose en_US.UTF-8 )
sudo dpkg-reconfigure keyboard-configuration
sudo dpkg-reconfigure tzdata       ( choose US/Eastern )
sudo reboot
sudo tasksel                                  ( choose XFCE )
sudo reboot
sudo apt-get install cifs-utils (to mount samba utilities)
sudo mount.cifs //mycomputer/share /home/debian/mnt/lcnc-binaries/ -o user=myusername,pass=<place password here>
cd /home/debian/mnt/lcnc-binaries/.../<path to zip files from (https://forum.linuxcnc.org/9-installing-linuxcnc/38494-rpi4-debian-64bit)
mkdir /home/debian/linuxcnc-install-files
cp linuxcnc-debs-2.8.zip /home/debian/linuxcnc-install-files
cp linuxcnc-mem-services.zip /home/debian/linuxcnc-install-files
cd /home/debian/linuxcnc-install-files
sudo unzip /home/debian/linuxcnc-install-files/linuxcnc-mem-services.zip   -d /etc/systemd/system
unzip linuxcnc-debs-2.8.zip
mv linuxcnc\ debs\ 2.8/ linux-cnc-debs-2.8
sudo mv /etc/systemd/system/mem\ services/set* /etc/systemd/system
sudo rm -rf /etc/systemd/system/mem\ sevices/
sudo systemctl enable setmempermissions.service
sudo systemctl start setmempermissions.service
sudo systemctl enable setgpiomempermissions.service
sudo systemctl start setgpiomempermissions.service
sudo reboot -n
sudo ls -l /dev | more             (looking for mem and gpiomem)
sudo apt install gdebi gdebi-core
sudo gdebi -n /home/debian/linuxcnc-install-files/linux-cnc-debs-2.8/linuxcnc-doc-en_2.8.0~pre1_all.deb
sudo gdebi -n /home/debian/linuxcnc-install-files/linux-cnc-debs-2.8/linuxcnc-uspace_2.8.0~pre1_arm64.deb
sudo reboot
(login to XFCE gui as debian, and run the LinuxCNC Jitter test)

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

More
17 Aug 2020 09:53 #178473 by phillc54

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

More
18 Aug 2020 03:29 #178565 by thekarlmiller
Replied by thekarlmiller on topic RPI4 Debian 64bit
Thank you so much. That looks promising. I will give it a try. I am already in my third day of just getting it running.
The forum posts are useful in some cases, however, most of these posts seem to ramble for page, after page of people trying to solve very specific driver issues, or dealing with a specific issue with a certain distribution.

Thank you again. Hopefully you will see me responding shortly about how well this worked.

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

Time to create page: 0.102 seconds
Powered by Kunena Forum