Yocto linux加载错误的dtb

问题描述 投票:0回答:1

我有使用linux-yocto-tiny创建的beaglebone定制图像。为了使我的斗篷正常工作,我创建了一个自定义.dts文件。一切都能成功编译,.dtb已创建并放置在引导目录中。但是,引导时linux试图加载am335x-boneblack.dtb。我确定我的自定义设备树正在工作,因为当我将其重命名为am335x ***时,一切都按预期工作。

现在,我做了一些补丁,我认为这些补丁会使linux加载我的设备树:1)在我的机器配置文件my-yocto.conf中,我有以下几行(在我看来,请粘贴相关内容):

KERNEL_DEVICETREE = "my-cape.dtb"
IMAGE_BOOT_FILES ?= "u-boot.${UBOOT_SUFFIX} MLO zImage my-cape.dtb"
UBOOT_MACHINE = "am335x_evm_defconfig"

2)我已经修补了makefile:

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index dab2914fa..6f9892643 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -730,6 +730,7 @@ dtb-$(CONFIG_SOC_AM33XX) += \
    am335x-base0033.dtb \
    am335x-bone.dtb \
    am335x-boneblack.dtb \
+   my-cape.dtb \
    am335x-boneblack-wireless.dtb \
    am335x-boneblue.dtb \
    am335x-bonegreen.dtb \

3)在u-boot中制作补丁:

这里我不确定要在CONFIG_OF_LIST中放置什么,机器或设备树的名称,所以我都放置了这两个:

diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig
index 3457c1fc34..cc260ccedf 100644
--- a/configs/am335x_evm_defconfig
+++ b/configs/am335x_evm_defconfig
@@ -32,7 +32,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),1
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="am335x-evm"
-CONFIG_OF_LIST="am335x-evm am335x-bone am335x-boneblack am335x-evmsk am335x-bonegreen am335x-icev2 am335x-pocketbeagle"
+CONFIG_OF_LIST="am335x-evm am335x-bone am335x-boneblack am335x-evmsk am335x-bonegreen am335x-icev2 am335x-pocketbeagle my-cape my-yocto"
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_SPL_ENV_IS_NOWHERE=y
 CONFIG_BOOTCOUNT_LIMIT=y
-- 
2.17.1

am335x_evm.h中的更改:

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index c2b2d8dc..e0c1a160 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -139,7 +139,7 @@
        "if test $board_name = A335BONE; then " \
            "setenv fdtfile my-cape.dtb; fi; " \
        "if test $board_name = A335BNLT; then " \
-           "setenv fdtfile am335x-boneblack.dtb; fi; " \
+           "setenv fdtfile my-cape.dtb; fi; " \
        "if test $board_name = A335PBGL; then " \
            "setenv fdtfile am335x-pocketbeagle.dtb; fi; " \
        "if test $board_name = BBBW; then " \
-- 
2.17.1

我想念什么吗?我可以用uEnv文件加载dtb(我确实这样做了,并且正在工作)。但是我希望没有它的设备树可以被加载。加载系统后,我看到以下内容:

witch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc1(part 0) is current device
SD/MMC found on device 1
** Unrecognized filesystem type **
** Unrecognized filesystem type **
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
119 bytes read in 5 ms (22.5 KiB/s)
1:      Yocto
Retrieving file: /zImage
8905216 bytes read in 574 ms (14.8 MiB/s)
append: root=PARTUUID=0b6a9c67-02 rootwait console=ttyS0,115200
Retrieving file: /am335x-boneblack.dtb
Skipping Yocto for failure retrieving fdt

我如何使u-boot查找my-cape.dtb而不是am335x-boneblack.dtb?

embedded-linux yocto beagleboneblack
1个回答
0
投票

uEnv.txt内部配置了什么?

© www.soinside.com 2019 - 2024. All rights reserved.