From patchwork Sun Nov 5 22:23:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 834409 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.137; helo=fraxinus.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="pkz/y0kQ"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yVVbY5XSZz9s7h for ; Mon, 6 Nov 2017 09:24:09 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3F60A81110; Sun, 5 Nov 2017 22:24:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uYD-oTw2fZIB; Sun, 5 Nov 2017 22:24:06 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id EDA1287E61; Sun, 5 Nov 2017 22:24:05 +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 768C91C0A70 for ; Sun, 5 Nov 2017 22:24:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6F03E88700 for ; Sun, 5 Nov 2017 22:24:04 +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 J2Xg2gpD0lIt for ; Sun, 5 Nov 2017 22:24:03 +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 whitealder.osuosl.org (Postfix) with ESMTP id CC257886FA for ; Sun, 5 Nov 2017 22:24:02 +0000 (UTC) Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id 646F7B00896 for ; Sun, 5 Nov 2017 23:24:01 +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=1509920640; x=1510784641; bh=0CYx/cRzfEmKjbH4oU86iFp0 q2lu/ikCIn9pET6u+Yw=; b=pkz/y0kQrQB51o+V659s4EG7h8f2JMIDDrsi7YCK CE8e5pXbM1GY4ryuUnycBz1LOZG9QWmhp7DIuUDMjTfmnIC8fudF8micl7WSONGr +3tvssS1Yqm7Wz3UdyV6cVHf1XQMilfkskQQTurJsLkils3KhIuEt0il5+TgrIRR ysU= 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 HQrjFgZZkaRs for ; Sun, 5 Nov 2017 23:24:00 +0100 (CET) Received: from localhost.localdomain (unknown [192.168.123.44]) by mail.micronovasrl.com (Postfix) with ESMTPSA id 0F9C4B0072D; Sun, 5 Nov 2017 23:23:59 +0100 (CET) From: Giulio Benetti To: buildroot@buildroot.org Date: Sun, 5 Nov 2017 23:23:44 +0100 Message-Id: <1509920624-24325-1-git-send-email-giulio.benetti@micronovasrl.com> X-Mailer: git-send-email 2.7.4 Subject: [Buildroot] [PATCH 1/1] add sunxi-mali r6p2 mainline user space blob 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: Giulio Benetti MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Giulio Benetti --- 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 | 59 ++++++++++++++++++++++ 4 files changed, 121 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/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..42f973e --- /dev/null +++ b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk @@ -0,0 +1,59 @@ +################################################################################ +# +# sunxi-mali-mainline +# +################################################################################ + +# last sha1 character dropped to ensure unique filename +SUNXI_MALI_MAINLINE_VERSION = cb3e8ece9b2c3a70cbeb3204cd6f30eceaa3202 +SUNXI_MALI_MAINLINE_SITE = https://github.com/free-electrons/mali-blobs.git +SUNXI_MALI_MAINLINE_SITE_METHOD = git + +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 + +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +SUNXI_MALI_MAINLINE_DEPENDENCIES += xlib_libX11 xlib_libXfixes \ + xlib_libXext xlib_libXdamage libdrm +endif + +define SUNXI_MALI_MAINLINE_BUILD_CMDS +endef + +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +define SUNXI_MALI_MAINLINE_INSTALL_STAGING_CMDS + cp -rf $(@D)/$(SUNXI_MALI_LIB_VER)/x11_dma_buf/lib_x11_dma_buf/* $(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 +else +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 +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +define SUNXI_MALI_MAINLINE_INSTALL_TARGET_CMDS + cp -rf $(@D)/$(SUNXI_MALI_LIB_VER)/x11_dma_buf/lib_x11_dma_buf/* $(TARGET_DIR)/usr/lib +endef +else +define SUNXI_MALI_MAINLINE_INSTALL_TARGET_CMDS + cp -rf $(@D)/$(SUNXI_MALI_LIB_VER)/fbdev/lib/lib_fb_dev/* $(TARGET_DIR)/usr/lib/ +endef +endif + +$(eval $(generic-package))