diff options
author | Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> | 2016-05-16 14:48:24 -0700 |
---|---|---|
committer | Nathan Rossi <nathan@nathanrossi.com> | 2016-05-26 19:51:45 +1000 |
commit | ff7317138a30e18fd1b37c43f491954afdb169ba (patch) | |
tree | 9f3b90800a3c48b4e97717e055f516d783d1d928 | |
parent | fbc9fcd55a20ec205088c8026f5d25feb08430a3 (diff) | |
download | meta-xilinx-ff7317138a30e18fd1b37c43f491954afdb169ba.tar.gz |
mali-modules.bb: MALI kernel module recipe
This recipe builds kernel module for MALI 400. MALI 400 is supported in ZCU102
UltraScale+ MPSoC evaluation board.
Upstream status for Makefile patch : Pending
Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
-rw-r--r-- | recipes-graphics/mali/mali-modules.bb | 35 | ||||
-rw-r--r-- | recipes-graphics/mali/mali-modules/Makefile.patch | 36 |
2 files changed, 71 insertions, 0 deletions
diff --git a/recipes-graphics/mali/mali-modules.bb b/recipes-graphics/mali/mali-modules.bb new file mode 100644 index 00000000..c809243e --- /dev/null +++ b/recipes-graphics/mali/mali-modules.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | SUMMARY = "A Mali 400 Linux Kernel module" | ||
2 | SECTION = "kernel/modules" | ||
3 | |||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = " \ | ||
6 | file://linux/license/gpl/mali_kernel_license.h;md5=68c66513a9dacef77a52c3d6c5e6afd5 \ | ||
7 | " | ||
8 | |||
9 | PV = "r5p1-01rel0" | ||
10 | |||
11 | SRC_URI = " \ | ||
12 | http://malideveloper.arm.com/downloads/drivers/DX910/${PV}/DX910-SW-99002-${PV}.tgz \ | ||
13 | file://Makefile.patch \ | ||
14 | " | ||
15 | SRC_URI[md5sum] = "9c85c113e4d41ae992e45ba27287d1ab" | ||
16 | SRC_URI[sha256sum] = "86209c99c36a7622402b016b6f764c212b738ccdec9cdc6d6f16758c013957a0" | ||
17 | |||
18 | inherit module | ||
19 | |||
20 | do_make_scripts[depends] += "virtual/kernel:do_unpack" | ||
21 | |||
22 | S = "${WORKDIR}/driver/src/devicedrv/mali" | ||
23 | |||
24 | COMPATIBLE_MACHINE = "^$" | ||
25 | COMPATIBLE_MACHINE_zynqmp = "zynqmp" | ||
26 | |||
27 | EXTRA_OEMAKE = 'KDIR="${STAGING_KERNEL_DIR}" \ | ||
28 | ARCH="${ARCH}" \ | ||
29 | BUILD=release \ | ||
30 | MALI_PLATFORM="arm" \ | ||
31 | USING_DT=1 \ | ||
32 | MALI_SHARED_INTERRUPTS=1 \ | ||
33 | CROSS_COMPILE="${TARGET_PREFIX}" \ | ||
34 | O=${STAGING_KERNEL_BUILDDIR} \ | ||
35 | ' | ||
diff --git a/recipes-graphics/mali/mali-modules/Makefile.patch b/recipes-graphics/mali/mali-modules/Makefile.patch new file mode 100644 index 00000000..0f056875 --- /dev/null +++ b/recipes-graphics/mali/mali-modules/Makefile.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | Change Makefile to be compatible with Yocto | ||
2 | |||
3 | Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> | ||
4 | Upstream Status: Pending | ||
5 | --- driver/src/devicedrv/mali/Makefile 2015-03-29 20:38:45.000000000 -0700 | ||
6 | +++ b/Makefile 2016-01-26 20:13:56.053436042 -0800 | ||
7 | @@ -85,7 +85,11 @@ | ||
8 | # Define host system directory | ||
9 | KDIR-$(shell uname -m):=/lib/modules/$(shell uname -r)/build | ||
10 | |||
11 | -include $(KDIR)/.config | ||
12 | +ifeq ($(O),) | ||
13 | + include $(KDIR)/.config | ||
14 | +else | ||
15 | + include $(O)/.config | ||
16 | +endif | ||
17 | |||
18 | ifeq ($(ARCH), arm) | ||
19 | # when compiling for ARM we're cross compiling | ||
20 | @@ -170,10 +174,15 @@ | ||
21 | EXTRA_DEFINES += -DPROFILING_SKIP_PP_JOBS=1 -DPROFILING_SKIP_GP_JOBS=1 | ||
22 | endif | ||
23 | |||
24 | +EXTRA_DEFINES += -Wno-error=date-time | ||
25 | + | ||
26 | all: $(UMP_SYMVERS_FILE) | ||
27 | - $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) modules | ||
28 | + $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) O=$(O) modules | ||
29 | @rm $(FILES_PREFIX)__malidrv_build_info.c $(FILES_PREFIX)__malidrv_build_info.o | ||
30 | |||
31 | +modules_install: | ||
32 | + $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) modules_install | ||
33 | + | ||
34 | clean: | ||
35 | $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) clean | ||
36 | |||