remusmp / rpi-rt-kernel

56 stars 34 forks source link

Fixes for some filepath errors with 32-bit builds #18

Open rcswift opened 2 months ago

rcswift commented 2 months ago

I'm trying to build a kernel-rt for a PiZero and I ran into the same errors mentioned in #16 and #14. These two changes seem to allow the build to complete and result in a valid image.

From the docs:

Next, build the kernel. This step can take a long time, depending on your Raspberry Pi model.

  • Run the following commands to build a 64-bit kernel: make -j6 Image.gz modules dtbs
  • Run the following command to build a 32-bit kernel: make -j6 zImage modules dtbs
  1. Depending on your kernel version, run the following command:
    • For kernels up to version 6.4: sudo cp arch/arm/boot/dts/*.dtb /boot/firmware/
    • For kernels version 6.5 and above: sudo cp arch/arm/boot/dts/broadcom/*.dtb /boot/firmware/
Buyingbf commented 2 months ago

I was able to get an image built with these two changes, however my Pi Zero W image did not have the PREEMPT_RT patch applied. I had to further change the Dockerfile and update any occurrence of {PATCH} with {LINUX_KERNEL_RT_PATCH} - I don't have any experience working with Docker but I am pretty sure PATCH is undefined and was causing file not found errors.

rcswift commented 2 months ago

@Buyingbf with all three changes, do you get an image that boots all the way to a login prompt?

I seem to be having a problem where my Pi Zero W gets almost to a boot prompt and then prints out:

...
[   11.238513] systemd[1]: Starting systemd-sysctl.service - Apply Kernel Variables...
[   11.271671] systemd[1]: Mounted sys-fs-fuse-connections.mount - FUSE Control File System.
[   11.410028] systemd[1]: Mounted sys-kernel-config.mount - Kernel Configuration File System.
[   11.882694] systemd[1]: Started systemd-journald.service - Journal Service.
[   26.496835] reboot: Power down

This is happening on every boot with the image that I generate using this process, but a stock "Raspberry Pi OS Lite (32-bit)" image from the official imager is working fine.

Buyingbf commented 2 months ago

My image seems to be working fine so far, here's the image I generated in case you wanted to test it: https://drive.google.com/file/d/1a46mwd7G9Mdzb-iN72mogZh3d_LFAZ0l/view?usp=sharing

rcswift commented 2 months ago

Thanks! I've verified that this image works, and a new build of my image is working as well.