[d-kernel] [PATCH 1/2] /lib/devicetree/<name.dtb> -> /lib/devicetree/<vendor>/<name.dtb> for aarch64

antohami на basealt.ru antohami на basealt.ru
Пн Апр 18 18:41:59 MSK 2022


From: Anton Midyukov <antohami на altlinux.org>

These symbolic links are needed to support U-Boot, which in the path of DTB
is missing VENDOR. There is an need to copy dtb to FAT32 partition to
bootload in UEFI mode.
---
 kernel-image.spec | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel-image.spec b/kernel-image.spec
index 29a6ba0ec066..da2739fc46df 100644
--- a/kernel-image.spec
+++ b/kernel-image.spec
@@ -425,8 +425,10 @@ mv %buildroot%modules_dir/kernel/drivers/media/radio/tea575x.ko %buildroot%modul
 %ifarch aarch64 %arm
 make dtbs_install INSTALL_DTBS_PATH=%buildroot/lib/devicetree/$KernelVer
 %ifarch aarch64
-find %buildroot/lib/devicetree/$KernelVer -mindepth 1 -type d |\
-       while read d; do mv $d/* $d/../ && rmdir $d && ln -srv $d/../ $d; done
+pushd %buildroot/lib/devicetree/$KernelVer/
+find . -mindepth 2 -type f | \
+       while read f; do ln -srv "$f" "$(basename $f)"; done
+popd
 %endif
 %endif
 
-- 
2.33.0



Подробная информация о списке рассылки devel-kernel