From patchwork Mon Feb 1 09:37:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Bisson X-Patchwork-Id: 576388 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id B0209140B93 for ; Mon, 1 Feb 2016 20:37:29 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=boundarydevices-com.20150623.gappssmtp.com header.i=@boundarydevices-com.20150623.gappssmtp.com header.b=U5DKdbNW; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 95E4E8B3BD; Mon, 1 Feb 2016 09:37:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NLNH2bnWfG6D; Mon, 1 Feb 2016 09:37:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id E53C294A8A; Mon, 1 Feb 2016 09:37:22 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 2A7441C086E for ; Mon, 1 Feb 2016 09:37:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3545B91DDD for ; Mon, 1 Feb 2016 09:37:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B6zyIa2rRZ5Z for ; Mon, 1 Feb 2016 09:37:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by whitealder.osuosl.org (Postfix) with ESMTPS id B95988CAAF for ; Mon, 1 Feb 2016 09:37:24 +0000 (UTC) Received: by mail-wm0-f48.google.com with SMTP id 128so61528686wmz.1 for ; Mon, 01 Feb 2016 01:37:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/T+RQT6vjazdReiWj8DHfyOLf9q+eq1a8MvqmeRbZMU=; b=U5DKdbNWOQ2czxu/JYG0e/SZs4fwwB3Lv/Y9VaEzWfcGYkXTCoOBuapbqwFRX5EaBo Tp8pxRq+SfLPyyms1nHtyhWfIEXsWndbyHGeAaPjs+f9CfPs9CLasWMRRE+OSsziF0jY 8/wWqt2ULkuyKUYSMiSGA7LA95SeBx5cVMi3D1s2eI+WsYRqB6x1hBGmgjhm/bupNPFS EC1pdyurOVXhMWy0ME66s5ihmnEWj//BCh0EjNIaioO+1qwdjZCOGovArS6ekTsrIByV h9mHmQZLpg/3ZDW98BpmdMzLT0x+Hp4wpr2hGQaRtN3xQ8w1LYG6lh4pi9pN94KUYUoz wX5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/T+RQT6vjazdReiWj8DHfyOLf9q+eq1a8MvqmeRbZMU=; b=bHjxsIPGY9Sp1zHqvu8Ra6XK4Dx81wQsiawMVtvxuZG6BzlnAGzRub5uVCw8jSfmwX EhyJyjsRm5MzJhaa8utrjImOYtYxOPNv9D6/YSiOG+P9/fRNhbOZF4fzUP2r+j/ddwfH 0WYLJnQ57PJ9Sg658jNQVU8Fsz0eaLFsw6toaG+gR1qcNbeU+5OpLmjBitFax54EWqhp gIsX9tZT8h/9QtIRV58mxyjkBqWe1/O/aN6hXPTbDEEVCb052WYf226lE+xhNQUNKvLk Yw68SuSUd00MInyW3NaArIo7wqd94Ec5nvuL+iOCj7CZZL3TBcnu94OIF1EpP8NdU/o0 iPew== X-Gm-Message-State: AG10YOQX01S3eQ2aO3KG9sSyqD/XMuqkMt06RP5dgw79JFJLvanrgkcphCvjnnnw1/f5tg== X-Received: by 10.28.22.199 with SMTP id 190mr11112037wmw.54.1454319436354; Mon, 01 Feb 2016 01:37:16 -0800 (PST) Received: from x240.lan (89-92-99-128.hfc.dyn.abo.bbox.fr. [89.92.99.128]) by smtp.googlemail.com with ESMTPSA id kw1sm28254252wjb.12.2016.02.01.01.37.14 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 01 Feb 2016 01:37:15 -0800 (PST) From: Gary Bisson To: buildroot@busybox.net Date: Mon, 1 Feb 2016 10:37:02 +0100 Message-Id: <1454319423-13913-4-git-send-email-gary.bisson@boundarydevices.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1454319423-13913-1-git-send-email-gary.bisson@boundarydevices.com> References: <1454319423-13913-1-git-send-email-gary.bisson@boundarydevices.com> Cc: luca@lucaceresoli.net, thomas.petazzoni@free-electrons.com, jezz@sysmic.org Subject: [Buildroot] [PATCH 3/4] kernel-module-imx-gpu-viv: add new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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 --- 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))