AMD Xilinx Yocto Project Layers 教程

AMD Xilinx Yocto Project Layers 教程

meta-xilinx Collection of Yocto Project layers to enable AMD Xilinx products meta-xilinx 项目地址: https://gitcode.com/gh_mirrors/me/meta-xilinx


项目介绍

AMD Xilinx Yocto Project Layers 是一个专为启用AMD Xilinx产品而设计的Yocto Project层集合。这个仓库包含了对AMD Xilinx系列硬件全面支持的各种必要元数据,包括编译工具、评估板配置、内核碎片、设备树等关键组件。它分为多个子层,涵盖了从MicroBlaze架构的特定实现到多媒体包,以及用于构建裸机固件的应用程序。这些层使得开发者可以便捷地在Yocto环境下为Xilinx FPGA及其SoC进行定制化系统开发。

项目快速启动

环境准备

确保您的开发环境已安装了Yocto Project。这通常涉及设置一个适合Yocto开发的操作系统环境(如Ubuntu)并安装必要的工具链。

克隆项目

首先,通过Git克隆meta-xilinx仓库到本地:

git clone https://github.com/Xilinx/meta-xilinx.git

配置Yocto Build环境

进入Yocto的工作目录,并将meta-xilinx添加到你的bblayers.conf中:

bitbake-layers add-layer path/to/meta-xilinx

编辑或创建您的local.conf文件以选择目标平台和其他构建选项。

构建示例

例如,若要为一个典型的Xilinx平台构建一个最小镜像,您可能需要指定机器类型并在命令行运行bitbake:

MACHINE="your_xilinx_board_name" bitbake core-image-minimal

请注意替换your_xilinx_board_name为您实际的目标开发板名称。

应用案例和最佳实践

应用案例广泛,包括但不限于嵌入式视觉处理、工业自动化控制、通信基础设施等。最佳实践中,建议从构建基础的Baremetal应用程序开始,逐步熟悉利用meta-xilinx提供的多媒体包开发高级应用,如通过GStreamer实现视频流处理。对于复杂系统,利用Lopper和System Device Tree(SDT)来管理启动映像而不依赖于meta-xilinx-tools层,是提升效率的一个进阶方法。

典型生态项目

AMD Xilinx的产品不仅限于核心硬件,还涉及到广泛的生态系统支持,如Vivado设计套件、Petalinux和OpenCL等,这些都是与meta-xilinx项目紧密相关的生态组成部分。开发者可以在构建自定义操作系统的同时,集成这些高级软件工具和框架,实现高度优化的软硬件协同设计。例如,结合Petalinux用于创建Linux系统,或者利用OpenCL加速算法执行,都是常见的生态应用场景。


本教程提供了一个简要的入门指南,深入学习时,请参考AMD Xilinx的Yocto Wiki页面及各子层的README.md文档获取更详细的信息和最新指导。

meta-xilinx Collection of Yocto Project layers to enable AMD Xilinx products meta-xilinx 项目地址: https://gitcode.com/gh_mirrors/me/meta-xilinx

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

ERROR: device-tree-xilinx-v2020.2+gitAUTOINC+f725aaecff-r0 do_compile: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:devicetree_do_compile(d) 0003: File: '/home/ljj/petalinux/csl_zynqsys_1/components/yocto/layers/core/meta/classes/devicetree.bbclass', lineno: 131, function: devicetree_do_compile 0127: if not(os.path.isfile(dtspath)) or not(dts.endswith(".dts") or devicetree_source_is_overlay(dtspath)): 0128: continue # skip non-.dts files and non-overlay files 0129: except: 0130: continue # skip if can't determine if overlay *** 0131: devicetree_compile(dtspath, includes, d) 0132:} 0133: 0134:devicetree_do_install() { 0135: for DTB_FILE in `ls *.dtb *.dtbo`; do File: '/home/ljj/petalinux/csl_zynqsys_1/components/yocto/layers/core/meta/classes/devicetree.bbclass', lineno: 119, function: devicetree_compile 0115: dtcargs += ["-i", i] 0116: dtcargs += ["-o", "{0}.{1}".format(dtname, "dtbo" if isoverlay else "dtb")] 0117: dtcargs += ["-I", "dts", "-O", "dtb", "{0}.pp".format(dts)] 0118: bb.note("Running {0}".format(" ".join(dtcargs))) *** 0119: subprocess.run(dtcargs, check = True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) 0120: 0121:python devicetree_do_compile() { 0122: includes = expand_includes("DT_INCLUDE", d) 0123: listpath = d.getVar("DT_FILES_PATH") File: '/opt/pkg/petalinux/2020.2/components/yocto/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/python3.7/subprocess.py', lineno: 512, function: run 0508: raise 0509: retcode = process.poll() 0510: if check and retcode: 0511: raise CalledProcessError(retcode, process.args, *** 0512: output=stdout, stderr=stderr) 0513: return CompletedProcess(process.args, retcode, stdout, stderr) 0514: 0515: 0516:def list2cmdline(seq): Exception: subprocess.CalledProcessError: Command '['dtc', '-@', '-p', '0x1000', '-i', '/home/ljj/petalinux/csl_zynqsys_1/project-spec/configs/../../components/plnx_workspace/device-tree/device-tree', '-i', '/home/ljj/petalinux/csl_zynqsys_1/build/tmp/work-shared/zynq-generic/kernel-source/scripts/dtc/include-prefixes', '-i', '/home/ljj/petalinux/csl_zynqsys_1/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2020.2+gitAUTOINC+f725aaecff-r0', '-i', '/home/ljj/petalinux/csl_zynqsys_1/build/tmp/work-shared/zynq-generic/kernel-source/arch/arm/boot/dts', '-o', 'system-top.dtb', '-I', 'dts', '-O', 'dtb', 'system-top.dts.pp']' returned non-zero exit status 1. Subprocess output: Error: /home/ljj/petalinux/csl_zynqsys_1/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2020.2+gitAUTOINC+f725aaecff-r0/system-user.dtsi:15.1-6 syntax error FATAL ERROR: Unable to parse input tree ERROR: Logfile of failure stored in: /home/ljj/petalinux/csl_zynqsys_1/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2020.2+gitAUTOINC+f725aaecff-r0/temp/log.do_compile.22923 ERROR: Task (/home/ljj/petalinux/csl_zynqsys_1/components/yocto/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb:do_compile) failed with exit code '1' NOTE: Tasks Summary: Attempted 4295 tasks of which 359 didn't need to be rerun and 1 failed. Summary: 1 task failed: /home/ljj/petalinux/csl_zynqsys_1/components/yocto/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb:do_compile Summary: There was 1 ERROR message shown, returning a non-zero exit code. ERROR: Failed to build project 结合上面设备树文件的代码,分析一下为什么会报错
03-16
INFO: Sourcing build tools [INFO] Building rootfs [INFO] Sourcing build environment [INFO] Generating workspace directory INFO: bitbake petalinux-image-minimal -c do_image_complete Parsing recipes: 100% |###############################################################################################################################################| Time: 0:01:32 Parsing of 2995 .bb files complete (0 cached, 2995 parsed). 4265 targets, 204 skipped, 0 masked, 0 errors. NOTE: Resolving any missing task queue dependencies Initialising tasks: 100% |############################################################################################################################################| Time: 0:00:02 Checking sstate mirror object availability: 100% |####################################################################################################################| Time: 0:00:55 Sstate summary: Wanted 502 Found 430 Missed 72 Current 772 (85% match, 94% complete) NOTE: Executing Tasks ERROR: avahi-0.7-r0 do_package_write_rpm_setscene: No suitable staging package found ERROR: Logfile of failure stored in: /home/ljj/petalinux/ALIENTEK-ZYNQ/build/tmp/work/cortexa9t2hf-neon-xilinx-linux-gnueabi/avahi/0.7-r0/temp/log.do_package_write_rpm_setscene.17888 WARNING: Setscene task (/home/ljj/petalinux/ALIENTEK-ZYNQ/components/yocto/layers/core/meta/recipes-connectivity/avahi/avahi_0.7.bb:do_package_write_rpm_setscene) failed with exit code '1' - real task will be run instead ERROR: avahi-0.7-r0 do_package_qa_setscene: No suitable staging package found ERROR: Logfile of failure stored in: /home/ljj/petalinux/ALIENTEK-ZYNQ/build/tmp/work/cortexa9t2hf-neon-xilinx-linux-gnueabi/avahi/0.7-r0/temp/log.do_package_qa_setscene.17887 WARNING: Setscene task (/home/ljj/petalinux/ALIENTEK-ZYNQ/components/yocto/layers/core/meta/recipes-connectivity/avahi/avahi_0.7.bb:do_package_qa_setscene) failed with exit code '1' - real task will be run instead 这个报错是怎么回事
03-12
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

史琼鸽Power

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值