From patchwork Sat Nov 25 22:22:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 841314 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=micronovasrl.com header.i=@micronovasrl.com header.b="bx5U4CbT"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ykp4Q2K8Gz9s4q for ; Sun, 26 Nov 2017 09:43:17 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B3DC9884CE; Sat, 25 Nov 2017 22:43:14 +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 8x4-MznnPkdx; Sat, 25 Nov 2017 22:43:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 9885A87F00; Sat, 25 Nov 2017 22:43:12 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 1BAD61C038E for ; Sat, 25 Nov 2017 22:22:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 135202E599 for ; Sat, 25 Nov 2017 22:22:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id du-M2CTxNeNk for ; Sat, 25 Nov 2017 22:22:57 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.micronovasrl.com (mail.micronovasrl.com [212.103.203.10]) by silver.osuosl.org (Postfix) with ESMTP id D9FD82305C for ; Sat, 25 Nov 2017 22:22:56 +0000 (UTC) Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id E003DB00AC0 for ; Sat, 25 Nov 2017 23:22:55 +0100 (CET) Authentication-Results: mail.micronovasrl.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=micronovasrl.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=micronovasrl.com; h=x-mailer:message-id:date:date:subject:subject:to:from:from; s=dkim; t=1511648575; x=1512512576; bh=qpLZyX5il0AMUc4smsNIsK0u v4a7XCW/IlStZhVW9Zw=; b=bx5U4CbTFzwMMTPbQh97cu6vlGirk6U6kAuW6DTF mDoaoea5JOlAZACgHzaeujgQm/gBB2nj1kTm9U+nryd7Phd85zdvvigg8N9qc5hX PhfCWL1xr3qQ4lw7EcN25DJ6ntpmpfWBeiVsp1ucmAjUfgw4sta4B7UrCUPPcN0t xOs= X-Virus-Scanned: Debian amavisd-new at mail.micronovasrl.com Received: from mail.micronovasrl.com ([127.0.0.1]) by mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 61gKo3P1ifrm for ; Sat, 25 Nov 2017 23:22:55 +0100 (CET) Received: from localhost.localdomain (unknown [192.168.123.48]) by mail.micronovasrl.com (Postfix) with ESMTPSA id DA415B000A6; Sat, 25 Nov 2017 23:22:54 +0100 (CET) From: Giulio Benetti To: buildroot@buildroot.org Date: Sat, 25 Nov 2017 23:22:48 +0100 Message-Id: <1511648569-18855-1-git-send-email-giulio.benetti@micronovasrl.com> X-Mailer: git-send-email 2.7.4 Subject: [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Maxime Ripard , Giulio Benetti MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Added kernel allwinner mali driver package. Used combined with userspace Allwinner openGL libraries, it gives possibility to use 3D openGL SoC acceleration. Signed-off-by: Giulio Benetti --- DEVELOPERS | 3 ++ package/Config.in | 1 + package/sunxi-mali-driver-mainline/Config.in | 38 ++++++++++++++++++++++ .../sunxi-mali-driver-mainline.mk | 30 +++++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 package/sunxi-mali-driver-mainline/Config.in create mode 100644 package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk diff --git a/DEVELOPERS b/DEVELOPERS index 7621f96..60a934e 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -698,6 +698,9 @@ F: package/ocrad/ F: package/tesseract-ocr/ F: package/webp/ +N: Giulio Benetti +F: package/sunxi-mali-driver-mainline/ + N: Gregory Dymarek F: package/ding-libs/ F: package/gengetopt/ diff --git a/package/Config.in b/package/Config.in index fe5ccc4..e619992 100644 --- a/package/Config.in +++ b/package/Config.in @@ -497,6 +497,7 @@ endmenu source "package/stm32flash/Config.in" source "package/sunxi-cedarx/Config.in" source "package/sunxi-mali/Config.in" + source "package/sunxi-mali-driver-mainline/Config.in" source "package/sysstat/Config.in" source "package/targetcli-fb/Config.in" source "package/ti-gfx/Config.in" diff --git a/package/sunxi-mali-driver-mainline/Config.in b/package/sunxi-mali-driver-mainline/Config.in new file mode 100644 index 0000000..1f9ef59 --- /dev/null +++ b/package/sunxi-mali-driver-mainline/Config.in @@ -0,0 +1,38 @@ +comment "sunxi-mali-driver-mainline needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE + bool "sunxi-mali-driver-mainline" + depends on BR2_LINUX_KERNEL + select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra + help + This package builds and installs the Linux kernel driver for + the Mali GPU on Allwinner platforms, compatible with recent + Linux kernels (>= 4.4). Note that it should be installed + together with the corresponding userspace OpenGL libraries, + which are provided as binaries only at: + https://github.com/free-electrons/mali-blobs + + sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 with the + following options enabled: + + - CONFIG_CMA + - CONFIG_DMA_CMA + - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more + + https://github.com/mripard/sunxi-mali/blob/master/README.md + +if BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE + +choice + prompt "Version" + default BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE_R6P2 + help + Select the version of the kernel module. + +config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE_R6P2 + bool "r6p2" + +endchoice + +endif diff --git a/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file mode 100644 index 0000000..41d145d --- /dev/null +++ b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# sunxi-mali-driver-mainline +# +################################################################################ + +SUNXI_MALI_DRIVER_MAINLINE_VERSION = 42c7c139c14103a83bb2ad7e7a1f0ed491f96500 +SUNXI_MALI_DRIVER_MAINLINE_SITE = $(call github,mripard,sunxi-mali,$(SUNXI_MALI_DRIVER_MAINLINE_VERSION)) +SUNXI_MALI_DRIVER_MAINLINE_DEPENDENCIES = linux + +SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS = \ + KDIR=$(LINUX_DIR) \ + CROSS_COMPILE=$(TARGET_CROSS) \ + INSTALL_MOD_PATH=$(TARGET_DIR) + +ifeq ($(BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE_R6P2),y) +SUNXI_MALI_DRIVER_VER=r6p2 +endif + +define SUNXI_MALI_DRIVER_MAINLINE_BUILD_CMDS + cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \ + $(SHELL) ./build.sh -r $(SUNXI_MALI_DRIVER_VER) -b +endef + +define SUNXI_MALI_DRIVER_MAINLINE_INSTALL_TARGET_CMDS + cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \ + $(SHELL) ./build.sh -r $(SUNXI_MALI_DRIVER_VER) -i +endef + +$(eval $(generic-package))