Preparing native Raspberry Pi OS for LinuxCNC

More
2 years 8 months ago #294447 by ago_tm
Decided to add some probably useful details :

1. After preparing the userdata.txt file I called "make menu" and went through all the UI (for bcm2711 arm64) till the end.

2. I used branch linuxcnc-2.9.2 of rpi-img-builder-lcnc according to Rod's suggestion.

3. I used default image size IMGSIZE="122880MB"

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

More
2 years 8 months ago #294450 by ago_tm
Got it via balenaEtcher!
Thanks guys!
Code:
ago@pi-cnc:~$ uname -a Linux pi-cnc 6.1.77-rt21 #1 SMP PREEMPT Sun Feb 25 23:01:38 MSK 2024 aarch64 GNU/Linux

I still to customize it's vnc-server as I use headless CNC and install LinuxCNC itself. I didn't find it in the installed programs...
Will dig your framework deeper how to customize adding of the additional sources and gpg keys (to have linuxcnc, vscode, and sublime on the board).

Again - great work - The building process took about 30 minutes on 16 cores!
The following user(s) said Thank You: rodw

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

More
2 years 8 months ago #294452 by ago_tm
Hello guys, I continue experiments with just created image.
I have burned it on the SD Card 512Gb (not sure, probably it is to much?)
Did you faced with troubles like read-only root file system?
Here is what I have checked:

ago@pi-cnc:~$ sudo mount | grep /dev
udev on /dev type devtmpfs (rw,nosuid,relatime,size=1667364k,nr_inodes=416841,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/mmcblk0p2 on / type ext4 (ro,noatime,errors=remount-ro,commit=600)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
/dev/mmcblk0p1 on /boot/broadcom type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,flush,errors=remount-ro)

ago@pi-cnc:~$ sudo dmesg | grep mmcblk0p2
[    4.946191] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Quota mode: none.
[    7.221878] EXT4-fs (mmcblk0p2): re-mounted. Quota mode: none.
[  216.642005] EXT4-fs error (device mmcblk0p2): ext4_validate_block_bitmap:420: comm http: bg 128: bad block bitmap checksum
[  216.642025] Aborting journal on device mmcblk0p2-8.
[  216.722933] EXT4-fs error (device mmcblk0p2): ext4_journal_check_start:83: comm kworker/u8:0: Detected aborted journal
[  217.348056] EXT4-fs (mmcblk0p2): Remounting filesystem read-only
[  217.348076] EXT4-fs error (device mmcblk0p2) in ext4_writepages:2856: IO failure
[  217.348079] EXT4-fs (mmcblk0p2): failed to convert unwritten extents to written extents -- potential data loss!  (inode 108110, error -30)
[  217.348634] EXT4-fs (mmcblk0p2): failed to convert unwritten extents to written extents -- potential data loss!  (inode 108110, error -30)
[  217.348963] EXT4-fs (mmcblk0p2): failed to convert unwritten extents to written extents -- potential data loss!  (inode 108114, error -30)
[  217.349014] EXT4-fs (mmcblk0p2): failed to convert unwritten extents to written extents -- potential data loss!  (inode 108116, error -30)
[  217.349153] EXT4-fs (mmcblk0p2): failed to convert unwritten extents to written extents -- potential data loss!  (inode 108117, error -30)
[  217.349325] EXT4-fs (mmcblk0p2): failed to convert unwritten extents to written extents -- potential data loss!  (inode 108111, error -30)
[  217.349366] EXT4-fs (mmcblk0p2): failed to convert unwritten extents to written extents -- potential data loss!  (inode 108113, error -30)
[  217.349455] EXT4-fs (mmcblk0p2): failed to convert unwritten extents to written extents -- potential data loss!  (inode 108115, error -30)
[  217.349507] EXT4-fs (mmcblk0p2): failed to convert unwritten extents to written extents -- potential data loss!  (inode 108112, error -30)
[ 1171.143967] EXT4-fs error (device mmcblk0p2): __ext4_remount:6425: comm mount: Abort forced by user

Thank you for your help!

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

More
2 years 8 months ago #294483 by rodw
I suspect your SSD is too big given the bugs in the volume sizing upstream. They never imagined people would use large volumes or build images as big as we need. I have not merged upstream changes which might fix it. I will try and do that.

If you want to add extra packages, the best method I found was to use Debian PAckage search  packages.debian.org/index to locate your exact package and then add to this line
github.com/rodw-au/rpi-img-builder-lcnc/...ata.txt#L24C1-L24C11

Anything else needs to be done in  userscripts
github.com/rodw-au/rpi-img-builder-lcnc/...userscripts/uscripts
There are several section in  this file called at different times  but most of it is done in  run_function2 when the chroot exists
Files can be copied out of the chroot in run_function3  but the file paths change.
 

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

More
2 years 8 months ago #294485 by Cant do this anymore bye all
Is it a known working SD card at that capacity ?
A bit of searching for that particular error points to a file system error, you may have to run fsck on the SD card on a Linux system.
I doubt that it has anything to do with the size of the drive, more likely filesystem error on the SD card.
I do a google search for the text contained in the error.
The following user(s) said Thank You: ago_tm

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

More
2 years 8 months ago #294492 by elovalvo
I read what is reported in github.com/golyakoff/linux-info/blob/mai...aspberryOS/README.md .
My suggestion is to add (as reported here ubuntu.com/blog/industrial-embedded-systems-ii and here docs.ros.org/en/foxy/Tutorials/Miscellan...ernel-for-ROS-2.html )

Set CONFIG_HZ_1000 (note: this is no longer in the General Setup menu, go back twice)
-> Processor type and features
-> Timer frequency (1000 HZ)
(X) 1000 HZ

# Set CPU_FREQ_DEFAULT_GOV_PERFORMANCE [=y]
-> Power management and ACPI options
-> CPU Frequency scaling
-> CPU Frequency scaling (CPU_FREQ [=y])
-> Default CPUFreq governor (<choice> [=y])
(X) performance
The following user(s) said Thank You: ago_tm

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

Time to create page: 0.391 seconds
Powered by Kunena Forum