首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >文件无法从Yocto编译为BeagleBone

文件无法从Yocto编译为BeagleBone
EN

Stack Overflow用户
提问于 2018-09-29 16:05:20
回答 1查看 1.3K关注 0票数 0

我正在使用德州仪器公司官方的Yocto为BeaglebonX-15( TI AM5728处理器)构建一个完整的BSP。

整个SDK为SDK中的机器=am57xx-evm类型构建了很好的版本。后来的SDK包括机器=beagle-x15,但是我需要这个带有Linux内核4.4的旧版本。

这个SDK中的Linux4.4内核确实包含了beagle-x15设备树片段,但是beagle x15的机器配置不存在,所以我从后面的SDK中为新机器提供了1 conf文件。

问题是设备树无法编译--存在一个语法问题,如下所示:

代码语言:javascript
复制
| Error: /home/user/tisdk/build/arago-tmp-external-linaro-toolchain/work-shared/beagle-x15/kernel-source/arch/arm/boot/dts/beagle-x15-cmem.dtsi:1.1-2 syntax error
| FATAL ERROR: Unable to parse input tree
| scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/am57xx-beagle-x15-revc.dtb' failed
| make[3]: *** [arch/arm/boot/dts/am57xx-beagle-x15-revc.dtb] Error 1
| arch/arm/Makefile:333: recipe for target 'am57xx-beagle-x15-revc.dtb' failed
| make[2]: *** [am57xx-beagle-x15-revc.dtb] Error 2
| Makefile:150: 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
| WARNING: /home/user/tisdk/build/arago-tmp-external-linaro-toolchain/work/beagle_x15-linux-gnueabi/linux-ti-staging/4.4.41+gitAUTOINC+f9f6f0db2d-r7a.arago5.tisdk60/temp/run.do_compile.121513:1 exit 1 from 'exit 1'
| ERROR: oe_runmake failed
| ERROR: Function failed: do_compile (log file is located at /home/user/tisdk/build/arago-tmp-external-linaro-toolchain/work/beagle_x15-linux-gnueabi/linux-ti-staging/4.4.41+gitAUTOINC+f9f6f0db2d-r7a.arago5.tisdk60/temp/log.do_compile.121513)

以下是无法编译的整个DTSI文件:

代码语言:javascript
复制
    / {
        reserved-memory {
                #address-cells = <2>;
                #size-cells = <2>;
                ranges;

                cmem_block_mem_0: cmem_block_mem@a0000000 {
                        reg = <0x0 0xa0000000 0x0 0x0c000000>;
                        no-map;
                        status = "okay";
                };

        cmem_block_mem_1_ocmc3: cmem_block_mem@40500000 {
            reg = <0x0 0x40500000 0x0 0x100000>;
            no-map;
            status = "okay";
        };
        };

        cmem {
                compatible = "ti,cmem";
                #address-cells = <1>;
                #size-cells = <0>;

        #pool-size-cells = <2>;

                status = "okay";

                cmem_block_0: cmem_block@0 {
                        reg = <0>;
                        memory-region = <&cmem_block_mem_0>;
                        cmem-buf-pools = <1 0x0 0x0c000000>;
                };

        cmem_block_1: cmem_block@1 {
            reg = <1>;
            memory-region = <&cmem_block_mem_1_ocmc3>;
        };
        };
};

以下是beagle-x15.conf文件:

代码语言:javascript
复制
#@TYPE: Machine
#@NAME: BeagleBoard X15
#@DESCRIPTION: Machine configuration for the BeagleBoard X15

require conf/machine/include/dra7xx.inc

KERNEL_DEVICETREE = "am57xx-beagle-x15.dtb am57xx-beagle-x15-revb1.dtb am57xx-beagle-x15-revc.dtb"

MACHINE_GUI_CLASS = "bigscreen"

SERIAL_CONSOLE = "115200 ttyS2"

UBOOT_MACHINE = "am57xx_evm_config"

WKS_FILE = "sdimage-bootpart.wks"
IMAGE_BOOT_FILES = "MLO u-boot.img"
IMAGE_FSTYPES += "tar.xz wic.xz"

do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot"

# UBI information.  Note that this is board and kernel specific.  Changes
# in your kernel port may require changes in these variables.  For more
# details about this board please see
# http://processors.wiki.ti.com/index.php/UBIFS_Support

# do ubiattach /dev/ubi_ctrl -m 7 -O 2048
# From dmesg:
# UBI: smallest flash I/O unit:    2048
# UBI: logical eraseblock size:    126976 bytes
# from ubiattach stdout:
# UBI device number 0, total 1988 LEBs
MKUBIFS_ARGS = "-F -m 2048 -e 126976 -c 8192"

# do ubiattach /dev/ubi_ctrl -m 7 -O 2048
# from dmesg:
# UBI: smallest flash I/O unit:    2048
# UBI: physical eraseblock size:   131072 bytes (128 KiB)
# UBI: sub-page size:              512
# UBI: VID header offset:          2048 (aligned 2048)
UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512 -O 2048"

如何让这个DTSI文件编译?谢谢。

更新:原来Ubuntu编译器也失败了(版本1.4 ):

代码语言:javascript
复制
dtc -O dtb -o /home/user/Desktop/test.dtb /home/user/tisdk/build/arago-tmp-external-linaro-toolchain/work-shared/beagle-x15/kernel-source/arch/arm/boot/dts/beagle-x15-cmem.dtsi
Error: /home/user/tisdk/build/arago-tmp-external-linaro-toolchain/work-shared/beagle-x15/kernel-source/arch/arm/boot/dts/beagle-x15-cmem.dtsi:1.1-2 syntax error
FATAL ERROR: Unable to parse input tree
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-09-29 17:15:50

如果没有指定版本,dtc编译器默认将设备树版本视为0。版本0的语法不同于版本1。

代码语言:javascript
复制
/dts-v1/;

作为你的第一行设备树文件。

除此之外,通常需要编译.dts文件,而不是直接编译.dtsi (包含)。因此,您需要定义具有.dts扩展名的设备树文件,包括.dtsi文件。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52570141

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档