Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gary Bisson <gary.bisson@boundarydevices.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/4] kernel-module-imx-gpu-viv: add new package
Date: Mon,  1 Feb 2016 10:37:02 +0100	[thread overview]
Message-ID: <1454319423-13913-4-git-send-email-gary.bisson@boundarydevices.com> (raw)
In-Reply-To: <1454319423-13913-1-git-send-email-gary.bisson@boundarydevices.com>

This is the Vivante kernel driver split from the kernel source code in
order to make it possible to be used in any kernel source since 3.10.53.

The driver source code provided by Freescale needs fixes so the
community forked the code to allow faster development and easier
integration of fixes from the community.

This patch is based on the Yocto equivalent:
https://github.com/Freescale/meta-fsl-arm/commit/32cf391
https://github.com/Freescale/meta-fsl-arm/commit/4249193

This package has been tested with the following commands:
 # modprobe galcore
 # cd /usr/share/examples/viv_samples/vdk/
 # ./tutorial7

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---
As explained in the cover letter, Yocto has a do_configure_append which
allows to modify the kernel configuration and remove the built-in Vivante
driver option.
https://github.com/Freescale/meta-fsl-arm/blob/master/classes/fsl-vivante-kernel-driver-handler.bbclass#L52

In order to have a similar mechanism the kernel module Vivante package
includes a LINUX_POST_CONFIGURE_HOOKS which doesn't really feel right.

Indeed, with this hook in place, the kernel and its modules are re-built
everytime a 'make' is issued. Not sure why it affects the build this way,
any input is appreciated.

Regards,
Gary
---
 package/freescale-imx/Config.in                    |  1 +
 .../kernel-module-imx-gpu-viv/Config.in            | 12 ++++++++++
 .../kernel-module-imx-gpu-viv.mk                   | 28 ++++++++++++++++++++++
 3 files changed, 41 insertions(+)
 create mode 100644 package/freescale-imx/kernel-module-imx-gpu-viv/Config.in
 create mode 100644 package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk

diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in
index a958dbd..dfb6cc4 100644
--- a/package/freescale-imx/Config.in
+++ b/package/freescale-imx/Config.in
@@ -52,6 +52,7 @@ source "package/freescale-imx/libz160/Config.in"
 endif
 if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q
 source "package/freescale-imx/imx-gpu-viv/Config.in"
+source "package/freescale-imx/kernel-module-imx-gpu-viv/Config.in"
 endif
 
 endif
diff --git a/package/freescale-imx/kernel-module-imx-gpu-viv/Config.in b/package/freescale-imx/kernel-module-imx-gpu-viv/Config.in
new file mode 100644
index 0000000..0725a89
--- /dev/null
+++ b/package/freescale-imx/kernel-module-imx-gpu-viv/Config.in
@@ -0,0 +1,12 @@
+comment "kernel-module-imx-gpu-viv needs a Linux kernel to be built"
+	depends on !BR2_LINUX_KERNEL
+
+config BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV
+	bool "kernel-module-imx-gpu-viv"
+	depends on BR2_LINUX_KERNEL
+	help
+	  Kernel loadable module for Vivante GPU.
+
+	  This package uses an exact copy of the GPU kernel driver source code
+	  of the same version as base and include fixes and improvements
+	  developed by FSL Community
diff --git a/package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk b/package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk
new file mode 100644
index 0000000..9c45f23
--- /dev/null
+++ b/package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk
@@ -0,0 +1,28 @@
+################################################################################
+#
+# kernel-module-imx-gpu-viv
+#
+################################################################################
+
+KERNEL_MODULE_IMX_GPU_VIV_VERSION = eeeb23c0fb1cee01318088d417025263479c44ac
+KERNEL_MODULE_IMX_GPU_VIV_SITE = \
+	$(call github,Freescale,kernel-module-imx-gpu-viv,$(KERNEL_MODULE_IMX_GPU_VIV_VERSION))
+KERNEL_MODULE_IMX_GPU_VIV_LICENSE = GPLv2
+KERNEL_MODULE_IMX_GPU_VIV_LICENSE_FILES = COPYING
+
+KERNEL_MODULE_IMX_GPU_VIV_MODULE_MAKE_OPTS = \
+	AQROOT=$(@D)/kernel-module-imx-gpu-viv-src \
+	KERNEL_DIR=$(LINUX_DIR)
+
+KERNEL_MODULE_IMX_GPU_VIV_MODULE_SUBDIRS = kernel-module-imx-gpu-viv-src
+
+# Modify Linux configuration in case it includes a built-in version of
+# the Vivante driver.
+define LINUX_CONFIGURATION_FIXUP
+	sed -i "/CONFIG_MXC_GPU_VIV[ =]/d" $(LINUX_DIR)/.config
+	echo "# CONFIG_MXC_GPU_VIV is not set" >> $(LINUX_DIR)/.config
+endef
+LINUX_POST_CONFIGURE_HOOKS += LINUX_CONFIGURATION_FIXUP
+
+$(eval $(kernel-module))
+$(eval $(generic-package))
-- 
2.7.0

  parent reply	other threads:[~2016-02-01  9:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01  9:36 [Buildroot] [PATCH 0/4] Update Freescale graphics packages Gary Bisson
2016-02-01  9:37 ` [Buildroot] [PATCH 1/4] imx-gpu-viv: bump version to 5.0.11 p7.1 Gary Bisson
2016-02-01  9:37 ` [Buildroot] [PATCH 2/4] xdriver_xf86-video-imx-viv: bump to version " Gary Bisson
2016-02-01  9:37 ` Gary Bisson [this message]
2016-02-01 20:56   ` [Buildroot] [PATCH 3/4] kernel-module-imx-gpu-viv: add new package Thomas Petazzoni
2016-02-01 21:28     ` Peter Korsgaard
2016-02-01 21:36       ` Yann E. MORIN
2016-02-01 23:33       ` Gary Bisson
2016-02-01  9:37 ` [Buildroot] [PATCH 4/4] configs/nitrogen6*: bump kernel version Gary Bisson
2016-02-01 20:53 ` [Buildroot] [PATCH 0/4] Update Freescale graphics packages Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1454319423-13913-4-git-send-email-gary.bisson@boundarydevices.com \
    --to=gary.bisson@boundarydevices.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox