使用bitbake为BBB构建.dtbo覆盖 [英] Building .dtbo overlay for BBB using bitbake

查看:10
本文介绍了使用bitbake为BBB构建.dtbo覆盖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用带有定制设备树的内核linux-ti-staging-4.14为我的BBB构建了一个Yocto发行版(Rocko)。因为我需要将一个旧项目从Debian移植到Yocto,所以我还需要在内核中启用UIO功能,这也很好用。

现在,我还需要为UIO Pruss创建一个附加的设备树覆盖。我使用了here中的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]。

因为我对覆盖创建相当陌生,所以我不知道我遗漏了什么,也不知道如何修复它。有什么提示吗?

提前感谢!

更新:在上面的描述中添加了修补程序文件。

推荐答案

由于@BelHadjSalem的提示,我能够管理dtbo构建。 类文件devicetree.bbclass是在带有版本的Yocto中引入的,因此我将整个工作区更新为最新的Yocto版本(Dunfell)。之后,我创建了一个新的配方来构建我的dtbo覆盖:

inherit devicetree

FILESEXTRAPATHS_prepend := "${THISDIR}/files/dts:"

SRC_URI = " 
    file://AM335X-PRU-UIO-00A0.dts;subdir=git/overlays 
"

S = "${WORKDIR}/git/overlays"

COMPATIBLE_MACHINE = ".*(ti33x|beaglebone).*"

该食谱非常简单,并且根据需要在我的项目中起作用。

但是,有一个重要的注意事项:在任何内核配方或内核bbappend文件中继承devicetree.bb类将不起作用!不确定到底发生了什么,但devicetree.bbclass的继承将使内核配方配置无效,并失败ERROR: Nothing PROVIDES 'virtual/kernel'

这篇关于使用bitbake为BBB构建.dtbo覆盖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆