- Posts: 383
- Thank you received: 135
Can the OPI5 be Configured to Run LCNC?
- royka
- Offline
- Platinum Member
-
Less
More
3 years 6 months ago - 3 years 6 months ago #268063
by royka
Replied by royka on topic Can the OPI5 be Configured to Run LCNC?
Just download this ready to use image with LinuxCNC already installed:
easyupload.io/qtgt4a
I think you're missing that the right u-boot/idbloader has to be written on the SD. When you want to be able to boot from an ext4 boot partition you'll need an idbloader that supports this, otherwise make it fat16 or ext2.
To write this u-boot to the SD, the first 16mb needs to be free, find an u-boot that supports opi5:
dd if=idbloader.img of=/dev/sdX conv=notrunc seek=64dd if=u-boot.itb of=/dev/sdX conv=notrunc seek=16384
That dtb from that thread is for Linux 6 with pancsf, for me it did not work on 5.10. If you want to be able to boot from USB you could write his loader to the SPI flash, it's in /usr/lib/linux-u-boot..../rkspi_loader.img and dd to mtdblock0.
In that folder you'll also find the idbloader and u-boot to write to the SD. To be honest I'm not sure if this is still necessary with that loader on SPI flash, but I think it does.
Connecting the UART and watch the serial monitor will help to see what's going wrong.
easyupload.io/qtgt4a
I think you're missing that the right u-boot/idbloader has to be written on the SD. When you want to be able to boot from an ext4 boot partition you'll need an idbloader that supports this, otherwise make it fat16 or ext2.
To write this u-boot to the SD, the first 16mb needs to be free, find an u-boot that supports opi5:
dd if=idbloader.img of=/dev/sdX conv=notrunc seek=64dd if=u-boot.itb of=/dev/sdX conv=notrunc seek=16384
That dtb from that thread is for Linux 6 with pancsf, for me it did not work on 5.10. If you want to be able to boot from USB you could write his loader to the SPI flash, it's in /usr/lib/linux-u-boot..../rkspi_loader.img and dd to mtdblock0.
In that folder you'll also find the idbloader and u-boot to write to the SD. To be honest I'm not sure if this is still necessary with that loader on SPI flash, but I think it does.
Connecting the UART and watch the serial monitor will help to see what's going wrong.
Last edit: 3 years 6 months ago by royka.
Please Log in or Create an account to join the conversation.
- kanuboy13b
- Offline
- Junior Member
-
Less
More
- Posts: 21
- Thank you received: 7
3 years 6 months ago #268102
by kanuboy13b
Replied by kanuboy13b on topic Can the OPI5 be Configured to Run LCNC?
You are probably correct that I am missing the right boot loader. The I made sure that the boot partition was fat16 as that seemed to be the case for working installs. Plus I remember reading somewhere that booting off a ext4 was an issue and why it was a headache to try to get it to boot from a nvme SSD drive. Something I'd still like to do at some point, but a working build is enough for me at the moment.
I did make sure the first 16mb were free, as it seemed every image I looked at had the same.
I had saw you the image available earlier but the link was broken. I downloaded the new image I just don't have the time until later today to try it.
Cheers!
I did make sure the first 16mb were free, as it seemed every image I looked at had the same.
I had saw you the image available earlier but the link was broken. I downloaded the new image I just don't have the time until later today to try it.
Cheers!
Please Log in or Create an account to join the conversation.
- royka
- Offline
- Platinum Member
-
Less
More
- Posts: 383
- Thank you received: 135
3 years 6 months ago #268128
by royka
Replied by royka on topic Can the OPI5 be Configured to Run LCNC?
That link became broken indeed after I edited the message, the editor on this forum is broken, it changes things you won't. (The first word after the link connected with the link)
On my nvme I just have one ext4 partition covering the whole drive with the syslinux/extlinux bootloader in /boot. Perhaps when you've the right rkspiloader written to the SPI flash you won't need it on the SD card either, but didn't try that. I assume this is usually done to make it bootable without needing to write it to the SPI flash to make it easier to flash afterwards.
In extlinux.conf it normally should be sufficient to write the UUID (root=UUID=.... and it will find that drive, but somehow it didn't. When it boots you into the syslinux command line you probably need to change the root=/dev/... in extlinux.conf. You could find the right location with "ls /dev" this could be different in Armbian vs syslinux.
In the UART console you'll see what's going on in the idbloader.
A mistake I made before was forgetting to add /boot/ to the locations of the kernel and initrd in extlinux.conf when I had the bootloader on the same partition as the root partition. When you don't see the UART console it's harder to find the issue.
But with writing the image I'd uploaded to a SD you should be ready to go. When you want to copy it to a nvme, an easy way to do this without having an extra bootloader on it, is to create 2 partitions exact the same size as on the image and dd the 2 partitions you need (boot and root). Then edit in extlinux.conf the root to /dev/nvme...p2. You could make these partitions easy with the gnome-disk-utility and set the size in bytes. But as you could see there are different ways to do this when you know which files are needed to edit.
Have fun with it, cheers!
On my nvme I just have one ext4 partition covering the whole drive with the syslinux/extlinux bootloader in /boot. Perhaps when you've the right rkspiloader written to the SPI flash you won't need it on the SD card either, but didn't try that. I assume this is usually done to make it bootable without needing to write it to the SPI flash to make it easier to flash afterwards.
In extlinux.conf it normally should be sufficient to write the UUID (root=UUID=.... and it will find that drive, but somehow it didn't. When it boots you into the syslinux command line you probably need to change the root=/dev/... in extlinux.conf. You could find the right location with "ls /dev" this could be different in Armbian vs syslinux.
In the UART console you'll see what's going on in the idbloader.
A mistake I made before was forgetting to add /boot/ to the locations of the kernel and initrd in extlinux.conf when I had the bootloader on the same partition as the root partition. When you don't see the UART console it's harder to find the issue.
But with writing the image I'd uploaded to a SD you should be ready to go. When you want to copy it to a nvme, an easy way to do this without having an extra bootloader on it, is to create 2 partitions exact the same size as on the image and dd the 2 partitions you need (boot and root). Then edit in extlinux.conf the root to /dev/nvme...p2. You could make these partitions easy with the gnome-disk-utility and set the size in bytes. But as you could see there are different ways to do this when you know which files are needed to edit.
Have fun with it, cheers!
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- kanuboy13b
- Offline
- Junior Member
-
Less
More
- Posts: 21
- Thank you received: 7
3 years 6 months ago #268178
by kanuboy13b
Replied by kanuboy13b on topic Can the OPI5 be Configured to Run LCNC?
I was able to boot up the image you provided last night and everything seems to be working so far. Looking forward to hooking up my Mesa board and start running some tests.
Thanks Royka, you've been extremely helpful!
Cheers!
Thanks Royka, you've been extremely helpful!
Cheers!
The following user(s) said Thank You: tommylight, royka
Please Log in or Create an account to join the conversation.
- Guglielmi
- Offline
- Senior Member
-
Less
More
- Posts: 78
- Thank you received: 17
3 years 6 months ago - 3 years 6 months ago #268197
by Guglielmi
Replied by Guglielmi on topic Can the OPI5 be Configured to Run LCNC?
Hello Royka, I noticed that in the image you shared, /lib/modules are missing (broken link...)
I found under boot/lib/modules maybe what could be copied/moved?
Are you aware about this issue?
I'm not an expert.. but I'm getting errors and finally it's impossible to install or configure anything else: I tried to share a folder with Windows PC, I tried to install a VNC server, wifi adapter.. no one USBs are working (except for keyboard and mouse in USB3).
What I can understand all these issues are most probably related to missing modules, right?
[Update]: I investigated and the issue is caused by the fact that Boot partition is considered as removable storage.. don't know why.
I'm using Win32DiskImager for the creation.. should I do something once SD is created?
I tried to copy modules from boot to usr/lib and the situation now is beter, USB are working..
I found under boot/lib/modules maybe what could be copied/moved?
Are you aware about this issue?
I'm not an expert.. but I'm getting errors and finally it's impossible to install or configure anything else: I tried to share a folder with Windows PC, I tried to install a VNC server, wifi adapter.. no one USBs are working (except for keyboard and mouse in USB3).
What I can understand all these issues are most probably related to missing modules, right?
[Update]: I investigated and the issue is caused by the fact that Boot partition is considered as removable storage.. don't know why.
I'm using Win32DiskImager for the creation.. should I do something once SD is created?
I tried to copy modules from boot to usr/lib and the situation now is beter, USB are working..
Last edit: 3 years 6 months ago by Guglielmi.
Please Log in or Create an account to join the conversation.
- royka
- Offline
- Platinum Member
-
Less
More
- Posts: 383
- Thank you received: 135
3 years 6 months ago - 3 years 6 months ago #268210
by royka
Replied by royka on topic Can the OPI5 be Configured to Run LCNC?
I'm aware of the error message at boot, but where is the broken link? What are you missing?
To share a folder with Windows, you'll need to have samba installed, although I recommend to install winscp on the windows machine.
The standard vnc server won't work on wayland.
Normally spoken gnome-remote-desktop is the only one that works that I'm aware of, but somehow it doesn't show up in the gnome-settings. I'll have a look at it when I've time for it.
Which USB devices are you trying?
There are not a lot wifi drivers installed indeed, you could check /boot/config-5.10.110-rt53 to see which drivers are in the kernel. Actually "rtl8821cu" seems to be the only one as module. If you think you miss one of the modules from that folder you could sudo insmod ...
It could be that I did not add the boot partition to /etc/fstab but I don't think this causes the issues you've got. In /etc/fstab you could add:
UUID=5b681169-45c5-4093-b294-370b651abe59 /boot ext4 defaults,noatime,commit=600,errors=remount-ro 0 1
To share a folder with Windows, you'll need to have samba installed, although I recommend to install winscp on the windows machine.
The standard vnc server won't work on wayland.
Normally spoken gnome-remote-desktop is the only one that works that I'm aware of, but somehow it doesn't show up in the gnome-settings. I'll have a look at it when I've time for it.
Which USB devices are you trying?
There are not a lot wifi drivers installed indeed, you could check /boot/config-5.10.110-rt53 to see which drivers are in the kernel. Actually "rtl8821cu" seems to be the only one as module. If you think you miss one of the modules from that folder you could sudo insmod ...
It could be that I did not add the boot partition to /etc/fstab but I don't think this causes the issues you've got. In /etc/fstab you could add:
UUID=5b681169-45c5-4093-b294-370b651abe59 /boot ext4 defaults,noatime,commit=600,errors=remount-ro 0 1
Last edit: 3 years 6 months ago by royka.
The following user(s) said Thank You: Guglielmi
Please Log in or Create an account to join the conversation.
Time to create page: 0.339 seconds