petalinux 交叉编译指定内核驱动
需要编译 u-dma-buf 驱动。
This repository contains a Makefie.
Makefile has the following Parameters:
Parameter Name | Description | Default Value |
---|---|---|
ARCH | Architecture Name | $(shell uname -m | sed -e s/arm.*/arm/ -e s/aarch64.*/arm64/) |
KERNEL_SRC | Kernel Source Directory | /lib/modules/$(shell uname -r)/build |
Cross Compile
If you have a cross-compilation environment for target system, you can compile with:
shell$ make ARCH=arm KERNEL_SRC=/home/fpga/src/linux-5.10.120-zynqmp-fpga-generic all
实际使用时我们petalinux 工程对应的内核文件不在上述目录,需要修改。指定如下:
make ARCH=arm64 KERNEL_SRC=/home/xxx/petalinux/build/tmp/work/plnx_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+gitAUTOINC+9811303824-r0/linux-plnx_zynqmp-standard-build/