人工智能与机器人技术论坛

 找回密码
 立即注册
查看: 4494|回复: 0
打印 上一主题 下一主题

petalinx 创建工程及编译

[复制链接]

82

主题

143

帖子

1024

积分

金牌会员

Rank: 6Rank: 6

积分
1024
跳转到指定楼层
楼主
发表于 2018-12-29 17:38:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
                       
Petalinx2017.3 系统创建

Setp1:创建Petalinux工程
                (在你想的目录下建立一个ax7020工程,创建一个新工程,路劲不包含中文字符)
                $:  petalinux-create-t project -n ax7020 --template zynq

Setp2:工程配置硬件,将由XSDK生产的.bitFSBL文件放到HW文件中,(XSDK生成的文件design_1_wrapper_hw_platform_0中所由文件+FSBL文件)
               $:cdax7020
               $:petalinux-config –get-hw-description=../HW7030/
(如果路**件没错产生如下界面:)

更正:dtg settings:

console=ttyPS0,115200 earlyprintk root=/dev/mmcblk0p2 rw rootwait rootfstype=ext4 devtmpfs.mount=0


设置:自动登录

Yocto-settings > Enable debug-tweaks


setp3(编译image)

$:petalinux-build


setp4: (链接生成引导项)

$:cd image/linux

$:petalinux-package --boot --fsbl FSBL.elf --fpga design_1_wrapper.bit --u-boot

setp5:SD启动image

1TF卡分两个区 第一引导分区FAT32 第二文件系统分区 EXT4

2

BOOT(FAT32):

cp images/linux/BOOT.BIN /media/BOOT/

cp images/linux/image.ub /media/BOOT/

cp images/linux/system.dtb /media/BOOT/


ROOTFS(ext4)root权限):

sudo tar xvf rootfs.tar.gz -C /media/rootfs(官方文档)

系统启动日志:dmseg → log.txt


进一步搭建:

setp5:修改设备树:

XSDK产生 system.dts 文件,

1) pl.dtsi: This is a file where all the memory mapped peripheral logic(PL) IP nodes will be available.

2) pcw.dtsi: This is a file where the dynamic properties where the PS peripheral needs.
3)system-top.dts:
系统级
4)zynqmp.dtsi: This file contains all the PS peripheral information and also the cpu info.
5) zynqmp-clk-ccf.dtsi: This file contains all the clock information for the peripheral IPs.

方法一:将修改

system-top.dts设备树文件由:

zynq-7000.dtsi"

pl.dtsi

pcw.dtsi

/ax7020/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi

组成;

将设备树文件下的system.dts对比system-top.dts 将我们的设备树添加到用户:system-user.dtsi


方法二:

将设备树文件下的system.dts文件复制到Linux下,用gedit打开,与petalinux下的system-top.dts文件进行对比修改,完善自己的设备树功能。修改之后开始就可以继续进行内核移植了。

利用以下命令完整生产 dtb 文件;

$:dtc -I dts -O dtb -o system.dtb system.dts

修改完,编译完整工程


如果对UBOOTKERNELROOTFS修改使用以下命令:


参考:

系统搭建参考:

https://blog.csdn.net/ye1223/article/details/84112337#4.3%EF%BC%8EPetalinux%E5%B7%A5%E7%A8%8B%EF%BC%88Ubuntu%2016.04%E7%8E%AF%E5%A2%83%EF%BC%89

UG1144UG1157 文档

修改设备树参考:

https://blog.csdn.net/yishuicanhong/article/details/80210852?utm_source=blogxgwz0

官方wiki

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842279/Build+Device+Tree+Blob





回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|AiRobotNews.com|人工智能与机器人技术论坛  

GMT+8, 2024-4-24 01:24 , Processed in 0.086762 second(s), 4 queries , File On.

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表