Petalinx2017.3 系统创建
Setp1:创建Petalinux工程 (在你想的目录下建立一个ax7020工程,创建一个新工程,路劲不包含中文字符) $: petalinux-create-t project -n ax7020 --template zynq
Setp2:工程配置硬件,将由XSDK生产的.bit与FSBL文件放到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 1:TF卡分两个区 第一引导分区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 修改完,编译完整工程
如果对UBOOT,KERNEL,ROOTFS修改使用以下命令:
参考: 系统搭建参考: 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 UG1144,UG1157 文档 修改设备树参考: 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
|