- Posts: 1199
- Thank you received: 426
Please Log in or Create an account to join the conversation.
I suspect you missed the pain caused by buggy changes made by upstream that broke my build....Small correction it’s not the amount of memory used to build the image it’s the size of the file on disk used to create the boot & root partitions and file systems in, later on during the process these are mounted, as you would a physical disk partition, as well as some of the “virtual” file systems, and qemu “boots” and your have your virtual arm64 machine, and this is the environment that everything is installed for the final file system.
Actually after the image has been finalised you can start a qemu session with it and make any fine adjustments and these will be in the image after you exit the qemu session. I haven’t attempted a full GUI session but a text mode session is fine. Of course you need to setup and mount the image and add the virtual file systems before hand, but if you look through the code you’ll see how this is done.
Basically the same as when you create a virtual machine with say for example VirtualBox. You’re asked how big you want your disk to be. Then a file is created (can be a fixed size or dynamically allocated) and when you boot partitions and file systems are created in the file.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
In their changed scripts they attempted to do some maths to work out the size to use and they got it way wrong. And of course i was the crash dummy that found the bug which was painful for a few days... But they fixed it.What changes were they ?
Even from the beginning that number referred to file size for the that the partitions and file systems .
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Hello, today I have a pleasure to test your build system. First of all - it is really great work, thanks again!Yes, I used 20 cores....
You need to read and understand userdata.txt.
There are basically 3 steps.
1. Get the Pi kernel source and build the lernel
2. Build the root file system
3. Build the image.
The relevant preempt_rt patch 6.1.69-rt21 from kernel.org is in userpatches
The commit is from the Raspberry 6.1.y kernel source github.com/raspberrypi/linux
This is the very next commit after the 6.1.69 kernel was merged into the raspberry kernel repo
This is important because without locking in the commit to get, the kernel can diverge a lot and it will become unstable with that patch
You could look for later RT patches and find a later kernel release that matches it.
After the Pi5 was released it took a long time before such a merge happened or the happened out of step. The current version is common for both the Pi5 and Pi4
Also from userdata.txt
### CUSTOM KERNEL - Comment out the one not required
CUSTOM_DEFCONFIG="0"
#MYCONFIG="linuxcnc-pi4_defconfig"
#MYCONFIG="linuxcnc-pi5_defconfig"
Once you configure the kernel with menuconfig, you can save the generated defconfig and tell it to use that. This means that on future builds, it skips menuconfig.
Also in custom.txt, try changing the image size to 12288MB. (12gb) This is how much memory is used when building the image. This might let you use the pi imager to burn the image. I found some bugs in their IMG shrink routine so made it big. I can't remember if the upstream changes have been merged in to fix this.
I installed network manager but Andy observed latency got worse so I took it out. You could add it to USER_PKGS
github.com/rodw-au/rpi-img-builder-lcnc/...ata.txt#L24C1-L24C11
I deliberately kept the image as standard as possible to stay as close to what the x86 installer offers
Please Log in or Create an account to join the conversation.