-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from EmbeddedCamerata/ospp
开源之夏2023:基于Zynq MPSoC,尝试支持Xilinx Vitis AI的DPU驱动
- Loading branch information
Showing
70 changed files
with
1,963 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# makefile for DPU driver outside the linux kernel tree, and generate dpu.ko file | ||
# | ||
# a typical command for build the driver for Zynq 7000: | ||
# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- KERNELDIR=/path/to/your/kernel | ||
# | ||
# a typical command for build the driver for UltraScale+: | ||
# make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- KERNELDIR=/path/to/your/kernel | ||
# | ||
modname:=dpu | ||
obj-m:=$(modname).o | ||
dpu-objs:=dpucore.o | ||
|
||
PWD :=$(shell pwd) | ||
MAKE :=make | ||
|
||
|
||
KCFLAGS=KCFLAGS=" | ||
ifeq ($(DPU_TARGET),1.1) | ||
KCFLAGS +=-DCONFIG_DPU_v1_1_X | ||
else | ||
KCFLAGS +=-DCONFIG_DPU_v1_3_0 | ||
endif | ||
|
||
ifeq ($(ARCH),arm) | ||
KCFLAGS +=-DSIG_BASE_ADDR=0X4FF00000 -DCACHE_OFF | ||
endif | ||
ifeq ($(ARCH),arm64) | ||
KCFLAGS +=-DSIG_BASE_ADDR=0X8FF00000 | ||
endif | ||
|
||
# check the compiler version | ||
GCCV1 := $(shell $(CROSS_COMPILE)gcc -dumpversion | cut -f1 -d. ) | ||
GCCV2 := $(shell $(CROSS_COMPILE)gcc -dumpversion | cut -f2 -d. ) | ||
GCCV3 := $(shell expr `echo $(GCCV1)"*100+"$(GCCV2) | bc` ) | ||
|
||
DT_FLAG := $(shell expr `echo $(GCCV3)` \>= 409) | ||
ifeq ($(DT_FLAG),1) | ||
KCFLAGS += -Wno-error=date-time -Wno-date-time | ||
endif | ||
KCFLAGS+=" | ||
|
||
all: | ||
$(KCFLAGS) $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNELDIR) M=$(PWD) modules | ||
|
||
clean: | ||
rm -rf $(modname).ko *.o *mod* \.*cmd *odule* .tmp_versions | ||
|
||
.PHONY: all clean | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# RT-Thread building script for component | ||
|
||
from building import * | ||
|
||
cwd = GetCurrentDir() | ||
CPPPATH = [cwd] | ||
|
||
src = Split("""dpucore.c""") | ||
|
||
group = DefineGroup('dpu', src, depend = [''], CPPPATH = CPPPATH) | ||
|
||
objs = [group] | ||
|
||
Return('objs') |
Oops, something went wrong.