[Bug]: sun50i-*-fixup.scr lost in 6.16 edge kernel
What happened?
Without it the bluetooth and other overlays can't work
How to reproduce?
check: /boot/dtb-6.16.8-edge-sunxi64/allwinner/overlay/sun50i-h616-fixup.scr
Branch
main (main development branch)
On which host OS are you running the build script and observing this problem?
Ubuntu 24.04 Noble
Are you building on Windows WSL2?
- [ ] Yes, my Ubuntu/Debian/OtherOS is running on WSL2
Relevant log URL
No response
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Jira ticket: AR-2776
in fact, lost all fixup.scr
so I do see this: https://github.com/armbian/build/blob/main/patch/kernel/archive/sunxi-6.16/patches.armbian/cb1-overlay.patch
I don't have any unused H616 boards, and the one board I can think of is still on bullseye & 6.1.11. it'll take me a bit to get it fully updated.
this is likely relevant:
tabris@brunnt:~/build/armbian-build/cache/sources/linux-kernel-worktree$ grep sun50i-h616-fixup.scr -r 6.1[26]__sunxi64__arm64
6.12__sunxi64__arm64/arch/arm64/boot/dts/allwinner/overlay/Makefile: sun50i-h616-fixup.scr
6.12__sunxi64__arm64/arch/arm64/boot/dts/allwinner/overlay/.sun50i-h616-fixup.scr.cmd:savedcmd_arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-fixup.scr := mkimage -C none -A arm64 -T script -d arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-fixup.scr-cmd arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-fixup.scr
6.16__sunxi64__arm64/arch/arm64/boot/dts/allwinner/overlay/Makefile: sun50i-h616-fixup.scr
tabris@brunnt:~/build/armbian-build/cache/sources/linux-kernel-worktree$ find 6.1[26]__sunxi64__arm64 -name 'sun50i-h616-fixup.scr'
6.12__sunxi64__arm64/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-fixup.scr
tabris@brunnt:~/build/armbian-build/cache/sources/linux-kernel-worktree$
Note that although the file is mentioned in the 6.16's Makefile, it doesn't seem to have used the same machinery.
looks like the relevant command in Makefile.lib got moved to Makefile.dtbs
tabris@brunnt:~/build/armbian-build/cache/sources/linux-kernel-worktree$ grep -A1 quiet_cmd_scr 6.1[26]__sunxi64__arm64/scripts/Makefile.*
6.12__sunxi64__arm64/scripts/Makefile.lib:quiet_cmd_scr = FIXUP IMAGE $@
6.12__sunxi64__arm64/scripts/Makefile.lib- cmd_scr = mkimage -C none -A $(ARCH) -T script -d $< $@
--
6.16__sunxi64__arm64/scripts/Makefile.dtbs:quiet_cmd_scr = MKIMAGE $@
6.16__sunxi64__arm64/scripts/Makefile.dtbs- cmd_scr = mkimage -C none -A $(ARCH) -T script -d $< $@
There are probably other missing/relocated pieces also.
@igorpecovnik as it looks like he did the most recent changes in patch/kernel/archive/sunxi-6.16/
restoring quiet_cmd_scr & cmd_scr to scripts/Makefile.lib did nothing [apparently] useful.
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 1d581ba5df66..5a96cf9fdccb 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -364,10 +364,19 @@ quiet_cmd_lz4 = LZ4 $@
quiet_cmd_lz4_with_size = LZ4 $@
cmd_lz4_with_size = { cat $(real-prereqs) | $(LZ4) -l -9 - -; \
$(size_append); } > $@
+# Fixup script mkimage provided by Armbian
+# ---------------------------------------------------------------------------
+
+quiet_cmd_scr = FIXUP IMAGE $@
+ cmd_scr = mkimage -C none -A $(ARCH) -T script -d $< $@
+
+$(obj)/%.scr: $(src)/%.scr-cmd FORCE
+ $(call if_changed,scr)
+
# U-Boot mkimage
# ---------------------------------------------------------------------------
MKIMAGE := $(srctree)/scripts/mkuboot.sh
i haven't got to 6.16.y yet and I am not sure if i can do anything here - too many other things and EDGE is not a release priority. I am trying to get in touch with @The-going as he is maintaining Allwinner. But any help is welcome here as the task is big.
This might be related to https://github.com/armbian/build/pull/9049/changes/9847b4ed24e35084d6983f40b46dc08b07f663d1 https://github.com/armbian/build/commit/9847b4ed24e35084d6983f40b46dc08b07f663d1
Please test against the PR mentioned above.
Nope, wasn't related and also it didn't fix itself. Tested on zero2 with 6.18. Noticed in boot log
Failed to load '/boot/dtb/allwinner/overlay/-fixup.scr'
[...]
4203 bytes read in 6 ms (683.6 KiB/s)
Applying kernel provided DT fixup script (sun50i-h616-fixup.scr)
## Executing script at 45000000
15153874 bytes read in 628 ms (23 MiB/s)
[...]
😃
For once some changes in scripts/Makefile.lib seem missing and for the other uboot fails to load because overlay_prefix isn't set in the armbianEnv.txt which should be sun50i-h616 by default. So there are two concurring issues.
Need to do a bit more testing there before pushing anything.
Should be fixed with https://github.com/armbian/build/commit/77f096fbc8cccfa934b23d59f9574860dde54c9d
wonderful!