From patchwork Tue Nov 14 19:39:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 838011 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.133; helo=hemlock.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="gj6RGgpI"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ybz916Tkhz9s5L for ; Wed, 15 Nov 2017 07:08:37 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 76119878B4; Tue, 14 Nov 2017 20:08:33 +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 vrK0eb3OgkUO; Tue, 14 Nov 2017 20:08:29 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 03EB4878C3; Tue, 14 Nov 2017 20:08:29 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id B77F61BFE90 for ; Tue, 14 Nov 2017 19:39:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id AB2C4876A0 for ; Tue, 14 Nov 2017 19:39:47 +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 jkIvGt5SiaPi for ; Tue, 14 Nov 2017 19:39:46 +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 hemlock.osuosl.org (Postfix) with ESMTP id 628038769F for ; Tue, 14 Nov 2017 19:39:46 +0000 (UTC) Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id 9918AB009F7 for ; Tue, 14 Nov 2017 20:39:43 +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=1510688383; x=1511552384; bh=YXfaHZ5H6ddPHkjU0rsELyqJ ZMLkLkqCbgmZTbrRz9A=; b=gj6RGgpI+wz3ONU/adSYFQTEQM9XFYbLxt62Oq+2 F9pVwVI0oDLnLhsvHusXuGGZfScTKaGc7KdniWWKe0ygH7bYZ/oTo1xU74qAsSZa HD1HM9hfX83pUbcLEf/bYEHDjMdBSccF1rRI3eO0VZQAI7rV2yg4OACeV3JrRejD ML4= 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 Jwg8SPfQW3ZU for ; Tue, 14 Nov 2017 20:39:43 +0100 (CET) Received: from localhost.localdomain (62-11-51-166.dialup.tiscali.it [62.11.51.166]) by mail.micronovasrl.com (Postfix) with ESMTPSA id B3C3EB006FF; Tue, 14 Nov 2017 20:39:42 +0100 (CET) From: Giulio Benetti To: buildroot@buildroot.org Date: Tue, 14 Nov 2017 20:39:05 +0100 Message-Id: <1510688345-16840-1-git-send-email-giulio.benetti@micronovasrl.com> X-Mailer: git-send-email 2.7.4 Subject: [Buildroot] [PATCH v4 1/1] sunxi-mali-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@free-electrons.com, maxime.ripard@free-electrons.com, Giulio Benetti MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add Allwinner Mali openGL userspace driver r6p2. Used combined with kernelspace Mali driver, it gives possibility to use 3D openGL SoC acceleration. It provides fbdev libraries and headers. It is compatible with Linux >= 4.4 as sunxi-mali-driver-mainline. Signed-off-by: Giulio Benetti --- Changes v3 -> v4: * removed X11 support DEVELOPERS | 1 + package/Config.in | 1 + package/sunxi-mali-mainline/Config.in | 38 ++++++++++++++++++++++ package/sunxi-mali-mainline/egl.pc | 12 +++++++ package/sunxi-mali-mainline/glesv2.pc | 12 +++++++ package/sunxi-mali-mainline/sunxi-mali-mainline.mk | 33 +++++++++++++++++++ 6 files changed, 97 insertions(+) create mode 100644 package/sunxi-mali-mainline/Config.in create mode 100644 package/sunxi-mali-mainline/egl.pc create mode 100644 package/sunxi-mali-mainline/glesv2.pc create mode 100644 package/sunxi-mali-mainline/sunxi-mali-mainline.mk diff --git a/DEVELOPERS b/DEVELOPERS index 2fe95c8..1a751b8 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -697,6 +697,7 @@ F: package/webp/ N: Giulio Benetti F: package/sunxi-mali-driver-mainline/ +F: package/sunxi-mali-mainline/ N: Gregory Dymarek F: package/ding-libs/ diff --git a/package/Config.in b/package/Config.in index 8de2227..041c6f6 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-driver-mainline/Config.in" + source "package/sunxi-mali-mainline/Config.in" source "package/sunxi-mali/Config.in" source "package/sysstat/Config.in" source "package/targetcli-fb/Config.in" diff --git a/package/sunxi-mali-mainline/Config.in b/package/sunxi-mali-mainline/Config.in new file mode 100644 index 0000000..0b180d7 --- /dev/null +++ b/package/sunxi-mali-mainline/Config.in @@ -0,0 +1,38 @@ +config BR2_PACKAGE_SUNXI_MALI_MAINLINE + bool "sunxi-mali-mainline" + depends on BR2_arm + depends on BR2_ARM_EABIHF + depends on BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_HAS_LIBGLES + help + Install the ARM Mali drivers for sunxi based systems (i.e + systems based on ARM Allwinner SoCs). This driver requires + either the sunxi-kernel with the ARM Mali driver enabled or + the installation of the ARM Mali drivers as an external + module. + +if BR2_PACKAGE_SUNXI_MALI_MAINLINE + +config BR2_PACKAGE_PROVIDES_LIBEGL + default "sunxi-mali-mainline" + +config BR2_PACKAGE_PROVIDES_LIBGLES + default "sunxi-mali-mainline" + +choice + prompt "Version" + default BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 + help + Select the version of the kernel module. + +config BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 + bool "r6p2" + +endchoice + +endif + +comment "sunxi-mali needs an EABIhf glibc toolchain" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_ARM_EABIHF diff --git a/package/sunxi-mali-mainline/egl.pc b/package/sunxi-mali-mainline/egl.pc new file mode 100644 index 0000000..3854e5f --- /dev/null +++ b/package/sunxi-mali-mainline/egl.pc @@ -0,0 +1,12 @@ +prefix=/usr/ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: egl +Description: ARM Mali implementation of EGL +Version: 1.4 +Requires: +Libs: -L${libdir} -lEGL -lGLESv2 +Cflags: -I${includedir} + diff --git a/package/sunxi-mali-mainline/glesv2.pc b/package/sunxi-mali-mainline/glesv2.pc new file mode 100644 index 0000000..6910b46 --- /dev/null +++ b/package/sunxi-mali-mainline/glesv2.pc @@ -0,0 +1,12 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: glesv2 +Description: ARM Mali implementation of OpenGL ESv2 +Version: 2.0 +Requires: +Libs: -L${libdir} -lGLESv2 -lGLESv1_CM +Cflags: -I${includedir} + diff --git a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk new file mode 100644 index 0000000..1f7c05c --- /dev/null +++ b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# sunxi-mali-mainline +# +################################################################################ + +SUNXI_MALI_MAINLINE_VERSION = cb3e8ece9b2c3a70cbeb3204cd6f30eceaa32023 +SUNXI_MALI_MAINLINE_SITE = $(call github,free-electrons,mali-blobs,$(SUNXI_MALI_MAINLINE_VERSION)) +SUNXI_MALI_MAINLINE_INSTALL_STAGING = YES +SUNXI_MALI_MAINLINE_PROVIDES = libegl libgles + +ifeq ($(BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2),y) +SUNXI_MALI_LIB_VER=r6p2 +endif + +define SUNXI_MALI_MAINLINE_INSTALL_STAGING_CMDS + cp -rf $(@D)/$(SUNXI_MALI_LIB_VER)/fbdev/lib/lib_fb_dev/* \ + $(STAGING_DIR)/usr/lib/ + cp -rf $(@D)/$(SUNXI_MALI_LIB_VER)/fbdev/include/* \ + $(STAGING_DIR)/usr/include/ + + $(INSTALL) -D -m 0644 package/sunxi-mali-mainline/egl.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc + $(INSTALL) -D -m 0644 package/sunxi-mali-mainline/glesv2.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc +endef + +define SUNXI_MALI_MAINLINE_INSTALL_TARGET_CMDS + cp -rf $(@D)/$(SUNXI_MALI_LIB_VER)/fbdev/lib/lib_fb_dev/* \ + $(TARGET_DIR)/usr/lib/ +endef + +$(eval $(generic-package))