Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 948033 - installkernel fails to find devicetree on ARM64 when using gentoo-sources or git-sources
Summary: installkernel fails to find devicetree on ARM64 when using gentoo-sources or ...
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-13 11:04 UTC by Marek Bartosiewicz
Modified: 2025-01-21 09:00 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Bartosiewicz 2025-01-13 11:04:27 UTC
When doing classic
make && make modules_install && make install

on ARM64 system with the following /etc/kernel/devicetree file:
cat /etc/kernel/devicetree:

qcom/x1e80100-lenovo-yoga-slim7x.dtb

it fails with the following:

dracut[D]: lrwxrwxrwx   1 root     root           11 Jan 13 11:55 var/lock -> ../run/lock
dracut[D]: lrwxrwxrwx   1 root     root            6 Jan 13 11:55 var/run -> ../run
dracut[D]: drwxr-xr-x   2 root     root            0 Jan 13 11:55 var/tmp
dracut[D]: ========================================================================
dracut[D]: 
dracut[D]: dracut cmdline:
dracut[I]: *** Creating initramfs image file '/tmp/kernel-install.staging.X4dJde/initrd' done ***
/usr/lib/kernel/install.d/50-dracut.install succeeded.
About to execute /usr/lib/kernel/install.d/51-dracut-rescue.install add 6.12.9-gentoo /efi/gentoo/6.12.9-gentoo /usr/src/linux/arch/arm64/boot/Image
Successfully forked off '(exec-inner)' as PID 284194.
Skipping, 'dracut_rescue_image' not set to 'yes' in any dracut configuration file
/usr/lib/kernel/install.d/51-dracut-rescue.install succeeded.
About to execute /usr/lib/kernel/install.d/85-check-diskspace.install add 6.12.9-gentoo /efi/gentoo/6.12.9-gentoo /usr/src/linux/arch/arm64/boot/Image
Successfully forked off '(exec-inner)' as PID 284199.
Checking available disk space on /efi...
Disk space okay. Need at least 76827 KiB, found 376804 KiB.
/usr/lib/kernel/install.d/85-check-diskspace.install succeeded.
About to execute /usr/lib/kernel/install.d/90-compat.install add 6.12.9-gentoo /efi/gentoo/6.12.9-gentoo /usr/src/linux/arch/arm64/boot/Image
Successfully forked off '(exec-inner)' as PID 284209.
/usr/lib/kernel/install.d/90-compat.install succeeded.
About to execute /usr/lib/kernel/install.d/90-loaderentry.install add 6.12.9-gentoo /efi/gentoo/6.12.9-gentoo /usr/src/linux/arch/arm64/boot/Image
Successfully forked off '(exec-inner)' as PID 284210.
Error: could not find device tree blob 'qcom/x1e80100-lenovo-yoga-slim7x.dtb'.
/usr/lib/kernel/install.d/90-loaderentry.install failed with exit status 1.
/usr/lib/kernel/install.d/90-loaderentry.install failed with exit status 1.
(sd-exec-strv) failed with exit status 1.
make[1]: *** [arch/arm64/Makefile:196: install] Błąd 1
make: *** [Makefile:224: __sub-make] Błąd 2

========

But distribution kernel (gentoo-kernel) with the same file is perfectly OK and it installs dtb:

cat /efi/loader/entries/gentoo-6.12.8-gentoo-dist.conf 

# Boot Loader Specification type#1 entry
# File created by /usr/lib/kernel/install.d/90-loaderentry.install (systemd 257.1)
title      Gentoo Linux
version    6.12.8-gentoo-dist
sort-key   gentoo
options    root=UUID=6a9762e9-f4e6-46f2-aeb3-9f39bca11c11 rootfstype=xfs rw clk_ignore_unused pd_ignore_unused cma=128M console=tty1 vt.handoff=7 quiet splash
linux      /gentoo/6.12.8-gentoo-dist/linux
devicetree /gentoo/6.12.8-gentoo-dist/x1e80100-lenovo-yoga-slim7x.dtb
initrd     /gentoo/6.12.8-gentoo-dist/initrd
Comment 1 Nowa Ammerlaan gentoo-dev 2025-01-13 11:47:39 UTC
On arm64 it is required to run 'make dtbs_install' before 'make install'.
Comment 2 Marek Bartosiewicz 2025-01-13 12:14:43 UTC
Thanks, I'll try it!
Comment 3 Marek Bartosiewicz 2025-01-21 06:13:59 UTC
I tried again today with new gentoo-sources-6.13.0. Used this "oneliner":

make -j12 && make modules_install && make dtbs_install && make install

but it failed:

dracut[D]: dracut cmdline:
dracut[I]: *** Creating initramfs image file '/tmp/kernel-install.staging.9Y5ycv/initrd' done ***
/usr/lib/kernel/install.d/50-dracut.install succeeded.
About to execute /usr/lib/kernel/install.d/51-dracut-rescue.install add 6.13.0-gentoo /efi/gentoo/6.13.0-gentoo /usr/src/linux/arch/arm64/boot/Image
Successfully forked off '(exec-inner)' as PID 252193.
Skipping, 'dracut_rescue_image' not set to 'yes' in any dracut configuration file
/usr/lib/kernel/install.d/51-dracut-rescue.install succeeded.
About to execute /usr/lib/kernel/install.d/85-check-diskspace.install add 6.13.0-gentoo /efi/gentoo/6.13.0-gentoo /usr/src/linux/arch/arm64/boot/Image
Successfully forked off '(exec-inner)' as PID 252198.
Checking available disk space on /efi...
Disk space okay. Need at least 77327 KiB, found 635544 KiB.
/usr/lib/kernel/install.d/85-check-diskspace.install succeeded.
About to execute /usr/lib/kernel/install.d/90-compat.install add 6.13.0-gentoo /efi/gentoo/6.13.0-gentoo /usr/src/linux/arch/arm64/boot/Image
Successfully forked off '(exec-inner)' as PID 252208.
/usr/lib/kernel/install.d/90-compat.install succeeded.
About to execute /usr/lib/kernel/install.d/90-loaderentry.install add 6.13.0-gentoo /efi/gentoo/6.13.0-gentoo /usr/src/linux/arch/arm64/boot/Image
Successfully forked off '(exec-inner)' as PID 252209.
Error: could not find device tree blob 'qcom/x1e80100-lenovo-yoga-slim7x.dtb'.
/usr/lib/kernel/install.d/90-loaderentry.install failed with exit status 1.
/usr/lib/kernel/install.d/90-loaderentry.install failed with exit status 1.
(sd-exec-strv) failed with exit status 1.
make[1]: *** [arch/arm64/Makefile:196: install] Błąd 1
make: *** [Makefile:251: __sub-make] Błąd 2

Am I missing something still?
Comment 4 Nowa Ammerlaan gentoo-dev 2025-01-21 09:00:46 UTC
Set the equivalent of INSTALL_DTBS_PATH="/lib/modules/${KV_FULL}/dtb" in the environment. The default for the kernel is /boot, but the systemd-boot hook intentionally ignores /boot and instead finds the dtbs in the dtb subdirectory of the module directory.