首先要在vivado里建立工程。
工程建立完成 一般流程 综合,实现,比特流
综合后如果有引出的模块要分配外接的管脚。
生成比特流后导入到SDK就可以了
这时候工程已经有bit流文件 和hdf硬件顶层设计文件。
source一下petalinux的环境
使用petatlinux建立工程,petalinux-creat --type project --template zynq --new 文件名
就会在当前目录先建立文件名的文件夹
cd到文件夹
petalinux-config --get-hw-description=
然后开始配置:
petalinux-config -c u-boot
--Device Drivers DMA Support ---> [*] Enable Driver Model for DMA drivers
FPGA support ---> [*] Enable Xilinx FPGA drivers │ │
│ │ [*] Enable Xilinx FPGA driver for ZynqMP
I2C support ---> [*] Enable Driver Model for I2C drivers
[*] Network device support ---> [*] Xilinx AXI Ethernet │ │
│ │ [*] Xilinx Ethernetlite │ │
│ │ [*] Xilinx Ethernet GEM
[*] USB support --->
petalinux-config -c kernel
[*] Networking support ---> Networking options ---> [*] IP: DHCP support │ │
│ │ [ ] IP: BOOTP support │ │
│ │ [*] IP: RARP support
petalinux-config -c rootfs
Filesystem Packages --->
libs ---> ffmpeg ---> [*] ffmpeg
console ---> utils ---> file ---> [*] file
console ---> utils ---> unzip ---> [*] unzip
console ---> utils ---> vim ---> [*] vim
$ petalinux-package --boot --fsbl --fpga --u-boot
zynq> flashcp -v BOOT.BIN /dev/mtd0 zynq> flashcp -v uImage /dev/mtd1 zynq> flashcp -v devicetree.dtb /dev/mtd2 zynq> flashcp -v uramdisk.image.gz /dev/mtd3
fatload mmc 0 0x1000000 image.ub
bootm 0x1000000
You can find all the modules in this directory:build/tmp/work/plnx_aarch64-xilinx-linux/linux-xlnx/4.9-xilinx-v2017.3+gitAUTOINC+f1b1e077d6-r0/image/lib/modules/4.9.0-xilinx-v2017.3/
it should list your modules with "find -name *.ko " command also.
添加脚本:
01-13-2017 07:18 AM
and for the kernel modify
after build the kernel you will find the source code in the
1. modify the code source in the
for example: drivers/w1/masters/w1-gpio.c
2. in the
git add file1(like:drivers/w1/masters/w1-gpio.c) file2 ...
3. give a pacth tile
git commit -s -m 'your commit title'
4.create the pacth
git format-patch -1
#and then you will see the .pacth in you current directory.
5. copy this .pacth to the
and add the linux-xlnx_%.bbappend file in the
like:
SRC_URI_append = " file://xxxx.patch"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"