[meta-xilinx] [meta-xilinx 2/3] mali-modules.bb: MALI kernel module recipe
Manjukumar Matha
manjukumar.harthikote-matha at xilinx.com
Mon May 16 14:48:24 PDT 2016
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 at xilinx.com>
---
recipes-graphics/mali/mali-modules.bb | 35 ++++++++++++++++++++++
recipes-graphics/mali/mali-modules/Makefile.patch | 36 +++++++++++++++++++++++
2 files changed, 71 insertions(+)
create mode 100644 recipes-graphics/mali/mali-modules.bb
create mode 100644 recipes-graphics/mali/mali-modules/Makefile.patch
diff --git a/recipes-graphics/mali/mali-modules.bb b/recipes-graphics/mali/mali-modules.bb
new file mode 100644
index 0000000..c809243
--- /dev/null
+++ b/recipes-graphics/mali/mali-modules.bb
@@ -0,0 +1,35 @@
+SUMMARY = "A Mali 400 Linux Kernel module"
+SECTION = "kernel/modules"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = " \
+ file://linux/license/gpl/mali_kernel_license.h;md5=68c66513a9dacef77a52c3d6c5e6afd5 \
+ "
+
+PV = "r5p1-01rel0"
+
+SRC_URI = " \
+ http://malideveloper.arm.com/downloads/drivers/DX910/${PV}/DX910-SW-99002-${PV}.tgz \
+ file://Makefile.patch \
+ "
+SRC_URI[md5sum] = "9c85c113e4d41ae992e45ba27287d1ab"
+SRC_URI[sha256sum] = "86209c99c36a7622402b016b6f764c212b738ccdec9cdc6d6f16758c013957a0"
+
+inherit module
+
+do_make_scripts[depends] += "virtual/kernel:do_unpack"
+
+S = "${WORKDIR}/driver/src/devicedrv/mali"
+
+COMPATIBLE_MACHINE = "^$"
+COMPATIBLE_MACHINE_zynqmp = "zynqmp"
+
+EXTRA_OEMAKE = 'KDIR="${STAGING_KERNEL_DIR}" \
+ ARCH="${ARCH}" \
+ BUILD=release \
+ MALI_PLATFORM="arm" \
+ USING_DT=1 \
+ MALI_SHARED_INTERRUPTS=1 \
+ CROSS_COMPILE="${TARGET_PREFIX}" \
+ O=${STAGING_KERNEL_BUILDDIR} \
+ '
diff --git a/recipes-graphics/mali/mali-modules/Makefile.patch b/recipes-graphics/mali/mali-modules/Makefile.patch
new file mode 100644
index 0000000..0f05687
--- /dev/null
+++ b/recipes-graphics/mali/mali-modules/Makefile.patch
@@ -0,0 +1,36 @@
+Change Makefile to be compatible with Yocto
+
+Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha at xilinx.com>
+Upstream Status: Pending
+--- driver/src/devicedrv/mali/Makefile 2015-03-29 20:38:45.000000000 -0700
++++ b/Makefile 2016-01-26 20:13:56.053436042 -0800
+@@ -85,7 +85,11 @@
+ # Define host system directory
+ KDIR-$(shell uname -m):=/lib/modules/$(shell uname -r)/build
+
+-include $(KDIR)/.config
++ifeq ($(O),)
++ include $(KDIR)/.config
++else
++ include $(O)/.config
++endif
+
+ ifeq ($(ARCH), arm)
+ # when compiling for ARM we're cross compiling
+@@ -170,10 +174,15 @@
+ EXTRA_DEFINES += -DPROFILING_SKIP_PP_JOBS=1 -DPROFILING_SKIP_GP_JOBS=1
+ endif
+
++EXTRA_DEFINES += -Wno-error=date-time
++
+ all: $(UMP_SYMVERS_FILE)
+- $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) modules
++ $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) O=$(O) modules
+ @rm $(FILES_PREFIX)__malidrv_build_info.c $(FILES_PREFIX)__malidrv_build_info.o
+
++modules_install:
++ $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) modules_install
++
+ clean:
+ $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) clean
+
--
2.1.4
More information about the meta-xilinx
mailing list