我使用内核 linux-ti-staging-4.14 和自定义设备树为我的 BBB 构建了 yocto 发行版 (rocko)。由于我需要将一个旧项目从 Debian 移植到 Yocto,因此我还需要在内核中启用 UIO 功能,这也可以正常工作。
现在我还需要为 UIO PRUSS 创建一个附加的设备树覆盖。我使用来自的 dts 文件here https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/AM335X-PRU-UIO-00A0.dts并通过 bbappend 扩展了内核配方:
inherit kernel-devicetree
FILESEXTRAPATHS_prepend := "${THISDIR}/files/dts:${THISDIR}/files/beaglebone:"
# Make custom kernel with PRU enabled
SRC_URI += " \
file://bbb-pru-minimal.dts;subdir=git/arch/${ARCH}/boot/dts \
file://AM335X-PRU-UIO-00A0-overlay.dts;subdir=git/arch/${ARCH}/boot/dts/overlays \
file://0001-add-UIO-dtbo.patch \
file://defconfig \
"
KERNEL_DEVICETREE = " \
AM335X-PRU-UIO-00A0.dtbo \
bbb-pru-minimal.dtb \
"
上面列出的补丁文件包含:
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 7949c213a434..fe2513074893 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -610,6 +610,7 @@ dtb-$(CONFIG_SOC_TI81XX) += \
dm8168-evm.dtb \
dra62x-j5eco-evm.dtb
dtb-$(CONFIG_SOC_AM33XX) += \
+ AM335X-PRU-UIO-00A0.dtbo \
am335x-baltos-ir2110.dtb \
am335x-baltos-ir3220.dtb \
am335x-baltos-ir5221.dtb \
但是,内核构建失败,因为 .dtbo 目标似乎没有规则:
| CC scripts/mod/empty.o
| CC scripts/mod/devicetable-offsets.s
| MKELF scripts/mod/elfconfig.h
| HOSTCC scripts/mod/modpost.o
| HOSTCC scripts/mod/sumversion.o
| CHK scripts/mod/devicetable-offsets.h
| HOSTCC scripts/mod/file2alias.o
| HOSTLD scripts/mod/modpost
| NOTE: make -j 24 HOSTCC=gcc -isystem[TOPDIR]/build/tmp/work/beaglebone-poky-linux-gnueabi/linux-ti-staging/4.14.79+gitAUTOINC+3438de3474-c/recipe-sysroot-native/usr/include -O2 -pipe -L[TOPDIR]/build/tmp/work/beaglebone-poky-linux-gnueabi/linux-ti-staging/4.14.79+gitAUTOINC+3438de3474-c/recipe-sysroot-native/usr/lib -L[TOPDIR]/build/tmp/work/beaglebone-poky-linux-gnueabi/linux-ti-staging/4.14.79+gitAUTOINC+3438de3474-c/recipe-sysroot-native/lib -Wl,-rpath-link,[TOPDIR]/build/tmp/work/beaglebone-poky-linux-gnueabi/linux-ti-staging/4.14.79+gitAUTOINC+3438de3474-c/recipe-sysroot-native/usr/lib -Wl,-rpath-link,[TOPDIR]/build/tmp/work/beaglebone-poky-linux-gnueabi/linux-ti-staging/4.14.79+gitAUTOINC+3438de3474-c/recipe-sysroot-native/lib -Wl,-rpath,[TOPDIR]/build/tmp/work/beaglebone-poky-linux-gnueabi/linux-ti-staging/4.14.79+gitAUTOINC+3438de3474-c/recipe-sysroot-native/usr/lib -Wl,-rpath,[TOPDIR]/build/tmp/work/beaglebone-poky-linux-gnueabi/linux-ti-staging/4.14.79+gitAUTOINC+3438de3474-c/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=[TOPDIR]/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 HOSTCPP=gcc -E AM335X-PRU-UIO-00A0.dtbo
| CHK scripts/mod/devicetable-offsets.h
| make[3]: *** No rule to make target 'arch/arm/boot/dts/AM335X-PRU-UIO-00A0.dtbo'. Stop.
| arch/arm/Makefile:345: recipe for target 'AM335X-PRU-UIO-00A0.dtbo' failed
| make[2]: *** [AM335X-PRU-UIO-00A0.dtbo] Error 2
| Makefile:146: recipe for target 'sub-make' failed
| make[1]: *** [sub-make] Error 2
| Makefile:24: recipe for target '__sub-make' failed
| make: *** [__sub-make] Error 2
| ERROR: oe_runmake failed
请注意,出于隐私原因,我将错误消息中的绝对路径替换为 [TOPDIR]。
由于我对叠加创建相当陌生,所以我真的不知道我缺少什么或如何修复它。有什么提示吗?
先感谢您!
Update:在上面的描述中添加了补丁文件。