In short, I'm trying to build a FULLY-PREEMPT-REALTIME system to run on my Orange Pi Zero 2W.
I used this post as a reference, and got quite far. But, I'm stuck on something that I believe I undestand, but don't know how to resolve.
I don't believe this is a probleme specific to my board though.
What I've done so far with success is both install and run a pre-built Armbian Image on this board, as well as build my own image and run it. Both work perfectly.
Now, I'm attempting to apply the RT patch and build a fresh image (or even just a Kernel) to get the FULL REALTIME kernel support working.
However, the build system fails after the kernel is built sucesfully, as it is unable to find the resulting kernel image generated.
I belive the issue is simply that when the RT .patch is applied and configured to the kernel, it builds a kernel file with an alterered filename.
Instead of 6.6.65-current-sunxi64 It creates 6.6.65-rt47-current-sunxi64
As a result, the build process for the kernel stage fails as it's unable to find the file it is expecting to find.
Here is what I have done, and what outputs I am finding.
As stated, It was a success with A locally built clean Armbian
./compile.sh BOARD=orangepizero2w BRANCH=current RELEASE=bookworm BUILD_MINIMAL=yes BUILD_DESKTOP=no KERNEL_CONFIGURE=no AUFS=no KERNELBRANCH='tag:v6.6.65'
System booted up and ran as normal.
$ uname -a
inux orangepizero2w 6.6.65-current-sunxi64 #2 SMP Wed Dec 11 15:13:43 UTC 2024 aarch64 GNU/Linux
I then attempted to apply the PREEMPT_RT kernel patch.
download and gunzip
https://cdn.kernel.org/pub/linux/kernel/projects/rt/6.6/patch-6.6.65-rt47.patch.gz
into the directory userpatches/kernel/archive/sunxi-6.6
Then a kernel-configure step
Worth noting that I do see this patch file applied in the output of the following command.
./compile.sh BOARD=orangepizero2w BRANCH=current RELEASE=bookworm KERNELBRANCH='tag:v6.6.65' kernel-config
Where I proceeded to enable the full REALTIME kernel (4th option).
General setup -> Preemption Mode -> Fully Preemptible Kernel (Real-Time)
Finally followed with a compile command.
./compile.sh BOARD=orangepizero2w BRANCH=current RELEASE=bookworm BUILD_MINIMAL=yes BUILD_DESKTOP=no KERNEL_CONFIGURE=no AUFS=no KERNELBRANCH='tag:v6.6.65'
The part of the build output that I beleive is relevant is this. It shows the failure, and what I believe is an indication of why it fails. It appears that the build script it is not aware of needing to find the file name that has the rt47 portion.
๐ณ|๐จ] INSTALL /armbian/.tmp/work-3b1e65cb-74c9-47f6-aa6c-d7787497b9b0/kernel_dest_install_dir-44x4J/dtbs/allwinner/overlay/sun50i-h616-i2c1-pi.dtbo
[๐ณ|๐จ] INSTALL /armbian/.tmp/work-3b1e65cb-74c9-47f6-aa6c-d7787497b9b0/kernel_dest_install_dir-44x4J/dtbs/allwinner/overlay/sun50i-h616-i2c2-pi.dtbo
[๐ณ|๐จ] INSTALL /armbian/.tmp/work-3b1e65cb-74c9-47f6-aa6c-d7787497b9b0/kernel_dest_install_dir-44x4J/dtbs/allwinner/overlay/sun50i-h616-gpu.dtbo
[๐ณ|๐จ] INSTALL /armbian/.tmp/work-3b1e65cb-74c9-47f6-aa6c-d7787497b9b0/kernel_dest_install_dir-44x4J/dtbs/allwinner/overlay/sun50i-a64-fixup.scr
[๐ณ|๐จ] INSTALL /armbian/.tmp/work-3b1e65cb-74c9-47f6-aa6c-d7787497b9b0/kernel_dest_install_dir-44x4J/dtbs/allwinner/overlay/sun50i-h5-fixup.scr
[๐ณ|๐จ] INSTALL /armbian/.tmp/work-3b1e65cb-74c9-47f6-aa6c-d7787497b9b0/kernel_dest_install_dir-44x4J/dtbs/allwinner/overlay/sun50i-h6-fixup.scr
[๐ณ|๐จ] INSTALL /armbian/.tmp/work-3b1e65cb-74c9-47f6-aa6c-d7787497b9b0/kernel_dest_install_dir-44x4J/dtbs/allwinner/overlay/sun50i-h616-fixup.scr
[๐ณ|๐จ] INSTALL /armbian/.tmp/work-3b1e65cb-74c9-47f6-aa6c-d7787497b9b0/kernel_dest_install_dir-44x4J/dtbs/allwinner/overlay/README.sun50i-a64-overlays
[๐ณ|๐จ] INSTALL /armbian/.tmp/work-3b1e65cb-74c9-47f6-aa6c-d7787497b9b0/kernel_dest_install_dir-44x4J/dtbs/allwinner/overlay/README.sun50i-h5-overlays
[๐ณ|๐จ] make[1]: Nothing to be done for 'install'.
[๐ณ|๐จ] make: Nothing to be done for 'install'.
[๐ณ|๐ฑ] Kernel built in [ 95 seconds - 6.6.65-sunxi64 ]
[๐ณ|๐ฑ] Packaging kernel [ sunxi64 linux-sunxi64-current ]
[๐ณ|๐ฑ] Kernel .deb package version [ 6.6.65-S943e-Dfa7d-P3e46-Caa1fH5c21-HK01ba-Vc222-B59f0-R448a ]
[๐ณ|๐ฑ] Packaging linux-image [ sunxi64 linux-sunxi64-current ]
[๐ณ|๐จ] [ 26M] /armbian/.tmp/work-3b1e65cb-74c9-47f6-aa6c-d7787497b9b0/kernel_dest_install_dir-44x4J/image/boot
[๐ณ|๐จ] โโโ [215K] config-6.6.65-rt47-current-sunxi64
[๐ณ|๐จ] โโโ [3.4M] System.map-6.6.65-rt47-current-sunxi64
[๐ณ|๐จ] โโโ [ 22M] vmlinuz-6.6.65-rt47-current-sunxi64
[๐ณ|๐จ]
[๐ณ|๐จ] 26M used in 0 directories, 3 files
[๐ณ|๐ฑ] Kernel-built image filetype [ vmlinuz-6.6.65-current-sunxi64: cannot open `/armbian/.tmp/work-3b1e65cb-74c9-47f6-aa6c-d7787497b9b0/kernel_dest_install_dir-44x4J/image/boot/vmlinuz-6.6.65-current-sunxi64' (No such file or directory) ]
[๐ณ|๐จ] ls: cannot access '/armbian/.tmp/work-3b1e65cb-74c9-47f6-aa6c-d7787497b9b0/kernel_dest_install_dir-44x4J/image/boot/vmlinuz-6.6.65-current-sunxi64': No such file or directory
[๐ณ|๐จ] /armbian/.tmp/work-3b1e65cb-74c9-47f6-aa6c-d7787497b9b0/kernel_dest_install_dir-44x4J/image/boot:
[๐ณ|๐จ] total 26220
[๐ณ|๐จ] drwxrwxr-x 2 root root 100 Dec 30 17:08 .
[๐ณ|๐จ] drwxrwxr-x 3 root root 60 Dec 30 17:07 ..
[๐ณ|๐จ] -rw-rw-r-- 1 root root 220621 Dec 30 17:08 config-6.6.65-rt47-current-sunxi64
[๐ณ|๐จ] -rw-rw-r-- 1 root root 3564498 Dec 30 17:08 System.map-6.6.65-rt47-current-sunxi64
[๐ณ|๐จ] -rw-rw-r-- 1 root root 23056392 Dec 30 17:08 vmlinuz-6.6.65-rt47-current-sunxi64
[๐ณ|๐ฅ] Error 2 occurred in main shell [ at /armbian/lib/functions/logging/runners.sh:211
run_host_command_logged_raw() --> lib/functions/logging/runners.sh:211
run_host_command_logged() --> lib/functions/logging/runners.sh:193
kernel_package_callback_linux_image() --> lib/functions/compilation/kernel-debs.sh:221
create_kernel_deb() --> lib/functions/compilation/kernel-debs.sh:131
prepare_kernel_packaging_debs() --> lib/functions/compilation/kernel-debs.sh:72
kernel_package() --> lib/functions/compilation/kernel.sh:248
do_with_hooks() --> lib/functions/general/extensions.sh:567
do_with_logging() --> lib/functions/logging/section-logging.sh:81
kernel_prepare_build_and_package() --> lib/functions/compilation/kernel.sh:171
compile_kernel() --> lib/functions/compilation/kernel.sh:100
artifact_kernel_build_from_sources() --> lib/functions/artifacts/artifact-kernel.sh:240
artifact_build_from_sources() --> lib/functions/artifacts/artifacts-obtain.sh:34
obtain_complete_artifact() --> lib/functions/artifacts/artifacts-obtain.sh:280
build_artifact_for_image() --> lib/functions/artifacts/artifacts-obtain.sh:392
main_default_build_packages() --> lib/functions/main/build-packages.sh:106
full_build_packages_rootfs_and_image() --> lib/functions/main/default-build.sh:31
do_with_default_build() --> lib/functions/main/default-build.sh:42
cli_standard_build_run() --> lib/functions/cli/cli-build.sh:25
armbian_cli_run_command() --> lib/functions/cli/utils-cli.sh:136
cli_entrypoint() --> lib/functions/cli/entrypoint.sh:176
main() --> compile.sh:50
]
[๐ณ|๐ฅ] Cleaning up [ please wait for cleanups to finish ]
[๐ณ|๐ฟ] ANSI log file built; inspect it by running: [ less -RS output/logs/log-build-3b1e65cb-74c9-47f6-aa6c-d7787497b9b0.log.ans ]
[๐ณ|๐ฟ] Share log manually (or SHARE_LOG=yes): [ curl --data-binary @output/logs/log-build-3b1e65cb-74c9-47f6-aa6c-d7787497b9b0.log.ans https://paste.armbian.com/log ]
[๐ฅ] -------------Docker run failed after 152s-------------------------- [ ๐ณ failed ]
[๐ฑ] Cleaning up [ please wait for cleanups to finish ]
~/devel/personal/Armbian/build โ main !1
Thanks for any help with this.
I hope I've provided enough information to make sense of what I'm attempting to do.