Note : The below steps are applicable for building images for 2020.1. These steps are deprecated. Customers are advised to use 2022.1 onwards drivers and the device tree.
-
Create a directory to build driver modules in local machine.
- example : mkdir build_dir
-
clone the linux-xlnx from git
https://github.com/Xilinx/linux-xlnx.git
to build_dir.
- cd build_dir
- git clone https://github.com/Xilinx/linux-xlnx.git
-
Clone the dp-modules to build_dir directory
- git clone https://github.com/Xilinx/dp-modules.git
-
create a directory for the kernel output
- mkdir kernel_output
-
Create a make file and copy the below contents to it
export TOP_DIR = $(shell pwd) BOARD_NAME := zcu102 export ARCH = arm64 GCC_PREFIX = <cross-compiler path> export DP_SOURCE := $(TOP_DIR)/dp-modules export KERNEL_SOURCE := $(TOP_DIR)/linux-xlnx export OUTPUT_DIR := $(TOP_DIR)/kernel_output export KERNEL_OUTPUT := $(OUTPUT_DIR)/linux-xlnx-$(ARCH) kernel: ARCH=$(ARCH) CROSS_COMPILE=$(GCC_PREFIX) make -C $(KERNEL_SOURCE) xilinx_zynqmp_defconfig O=$(KERNEL_OUTPUT) ARCH=$(ARCH) CROSS_COMPILE=$(GCC_PREFIX) make -j 40 -C $(KERNEL_SOURCE) O=$(KERNEL_OUTPUT) Image ARCH=$(ARCH) CROSS_COMPILE=$(GCC_PREFIX) make -j 40 -C $(KERNEL_SOURCE) O=$(KERNEL_OUTPUT) modules modules: ARCH=$(ARCH) CROSS_COMPILE=$(GCC_PREFIX) make -j 40 -C $(KERNEL_SOURCE) M=$(DP_SOURCE) O=$(KERNEL_OUTPUT) modules find $(DP_SOURCE) -type f -name '*.o' -delete find $(DP_SOURCE) -type f -name '*.cmd' -delete find $(DP_SOURCE) -type f -name 'Modules' -delete find $(DP_SOURCE) -type f -name 'Module.*' -delete find $(DP_SOURCE) -type f -name '*.order' -delete find $(DP_SOURCE) -type f -name '*.mod.c' -delete find $(DP_SOURCE) -type f -name '*.mod' -delete
-
run the below command to build the kernel
- $ make kernel
-
run the below command to build the dp-modules
- $make modules
- Now the DP Rx driver is ready to use.