From patchwork Fri Mar 6 07:14:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 1250074 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) 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; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Yf594DHkz9sRR for ; Fri, 6 Mar 2020 18:14:53 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id DC3CC86781; Fri, 6 Mar 2020 07:14:51 +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 5pRWQ6Nt0ufu; Fri, 6 Mar 2020 07:14:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id A7440867A5; Fri, 6 Mar 2020 07:14:50 +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 D43DC1BF35A for ; Fri, 6 Mar 2020 07:14:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id CAC4186FEA for ; Fri, 6 Mar 2020 07:14:48 +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 BVzyd4mj0Jc0 for ; Fri, 6 Mar 2020 07:14:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by whitealder.osuosl.org (Postfix) with ESMTPS id EA0C386938 for ; Fri, 6 Mar 2020 07:14:45 +0000 (UTC) X-Originating-IP: 90.89.41.158 Received: from localhost.localdomain (lfbn-tou-1-1473-158.w90-89.abo.wanadoo.fr [90.89.41.158]) (Authenticated sender: miquel.raynal@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id C9C9E60008; Fri, 6 Mar 2020 07:14:42 +0000 (UTC) From: Miquel Raynal To: buildroot@buildroot.org Date: Fri, 6 Mar 2020 08:14:34 +0100 Message-Id: <20200306071440.30433-2-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200306071440.30433-1-miquel.raynal@bootlin.com> References: <20200306071440.30433-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/7] package/sunxi-mali-utgard: rename from sunxi-mali-mainline X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Miquel Raynal , Maxime Chevallier , Paul Kocialkowski , Julien Corjon , Thomas Petazzoni , Luca Ceresoli , Peter Seiderer , Giulio Benetti , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This package provides Mali libraries for Sunxi Mali Utgard GPUs. The trailing -mainline is historical and was used at a time when there was two packages providing these libraries. The "non-upstream" package has been removed some time ago so before adding new packages bringing support for other ARM Mali GPU versions or implementations, rename sunxi-mali-mainline into sunxi-mali-utgard. Add a legacy entry. Signed-off-by: Miquel Raynal --- Config.in.legacy | 30 ++++++++++++ DEVELOPERS | 2 +- configs/olimex_a20_olinuxino_lime2_defconfig | 2 +- configs/olimex_a20_olinuxino_lime_defconfig | 2 +- docs/manual/adding-packages-virtual.txt | 2 +- package/Config.in | 2 +- package/glslsandbox-player/Config.in | 4 +- .../glslsandbox-player/glslsandbox-player.mk | 2 +- package/qt5/qt5base/qt5base.mk | 2 +- package/sunxi-mali-mainline/Config.in | 42 ---------------- .../sunxi-mali-mainline.mk | 49 ------------------- package/sunxi-mali-utgard/Config.in | 43 ++++++++++++++++ .../egl.pc | 0 .../glesv2.pc | 0 .../sunxi-mali-utgard.hash} | 2 +- .../sunxi-mali-utgard/sunxi-mali-utgard.mk | 49 +++++++++++++++++++ 16 files changed, 132 insertions(+), 101 deletions(-) delete mode 100644 package/sunxi-mali-mainline/Config.in delete mode 100644 package/sunxi-mali-mainline/sunxi-mali-mainline.mk create mode 100644 package/sunxi-mali-utgard/Config.in rename package/{sunxi-mali-mainline => sunxi-mali-utgard}/egl.pc (100%) rename package/{sunxi-mali-mainline => sunxi-mali-utgard}/glesv2.pc (100%) rename package/{sunxi-mali-mainline/sunxi-mali-mainline.hash => sunxi-mali-utgard/sunxi-mali-utgard.hash} (70%) create mode 100644 package/sunxi-mali-utgard/sunxi-mali-utgard.mk diff --git a/Config.in.legacy b/Config.in.legacy index 6a33ce9e1c..295b1c6003 100644 --- a/Config.in.legacy +++ b/Config.in.legacy @@ -144,6 +144,36 @@ endif ############################################################################### +config BR2_PACKAGE_SUNXI_MALI_MAINLINE + bool "sunxi-mali-mainline package was renamed" + select BR2_LEGACY + select BR2_PACKAGE_SUNXI_MALI_UTGARD + help + Since the removal of the sunxi-mali package, the + sunxi-mali-mainline package that coexisted became the only + package to provide Mali blobs. The "-mainline" suffix being + undescriptive nowadays and before adding new packages bringing + Mali support for other SoCs/GPU flavors, it is clearer to + rename it SUNXI_MALI_UTGARD. + +config BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 + bool "sunxi-mali-mainline-r6p2 was renamed" + select BR2_LEGACY + select BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 + help + The sunxi-mali-mainline package has been renamed + sunxi-mali-utgard, the suboptions of this package have also + been renamed accordingly. + +config BR2_PACKAGE_SUNXI_MALI_MAINLINE_R8P1 + bool "sunxi-mali-mainline-r8p1 was renamed" + select BR2_LEGACY + select BR2_PACKAGE_SUNXI_MALI_UTGARD_R8P1 + help + The sunxi-mali-mainline package has been renamed + sunxi-mali-utgard, the suboptions of this package have also + been renamed accordingly. + comment "Legacy options removed in 2020.02" config BR2_PACKAGE_QT5_VERSION_5_6 diff --git a/DEVELOPERS b/DEVELOPERS index dd44331b85..289fa9077d 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1013,7 +1013,7 @@ F: package/libnspr/ F: package/libnss/ F: package/minicom/ F: package/nfs-utils/ -F: package/sunxi-mali-mainline/ +F: package/sunxi-mali-utgard/ F: package/sunxi-mali-mainline-driver/ N: Gregory Dymarek diff --git a/configs/olimex_a20_olinuxino_lime2_defconfig b/configs/olimex_a20_olinuxino_lime2_defconfig index 21b681a1fb..02865d3c8c 100644 --- a/configs/olimex_a20_olinuxino_lime2_defconfig +++ b/configs/olimex_a20_olinuxino_lime2_defconfig @@ -27,7 +27,7 @@ BR2_LINUX_KERNEL_INSTALL_TARGET=y # sunxi packages BR2_PACKAGE_SUNXI_TOOLS=y -BR2_PACKAGE_SUNXI_MALI_MAINLINE=y +BR2_PACKAGE_SUNXI_MALI_UTGARD=y BR2_PACKAGE_SUNXI_MALI_MAINLINE_DRIVER=y # Filesystem diff --git a/configs/olimex_a20_olinuxino_lime_defconfig b/configs/olimex_a20_olinuxino_lime_defconfig index 029f9ebad3..58a468aabf 100644 --- a/configs/olimex_a20_olinuxino_lime_defconfig +++ b/configs/olimex_a20_olinuxino_lime_defconfig @@ -27,7 +27,7 @@ BR2_LINUX_KERNEL_INSTALL_TARGET=y # sunxi packages BR2_PACKAGE_SUNXI_TOOLS=y -BR2_PACKAGE_SUNXI_MALI_MAINLINE=y +BR2_PACKAGE_SUNXI_MALI_UTGARD=y BR2_PACKAGE_SUNXI_MALI_MAINLINE_DRIVER=y # Filesystem diff --git a/docs/manual/adding-packages-virtual.txt b/docs/manual/adding-packages-virtual.txt index 6326bb5455..722e6e3771 100644 --- a/docs/manual/adding-packages-virtual.txt +++ b/docs/manual/adding-packages-virtual.txt @@ -13,7 +13,7 @@ the provider used in the rootfs. For example, 'OpenGL ES' is an API for 2D and 3D graphics on embedded systems. The implementation of this API is different for the 'Allwinner Tech Sunxi' and the 'Texas Instruments OMAP35xx' platforms. So +libgles+ will be a virtual -package and +sunxi-mali+ and +ti-gfx+ will be the providers. +package and +sunxi-mali-utgard+ and +ti-gfx+ will be the providers. ==== +virtual-package+ tutorial diff --git a/package/Config.in b/package/Config.in index dfa3f34b9d..aa57d34f96 100644 --- a/package/Config.in +++ b/package/Config.in @@ -538,8 +538,8 @@ endmenu source "package/statserial/Config.in" source "package/stm32flash/Config.in" source "package/sunxi-cedarx/Config.in" - source "package/sunxi-mali-mainline/Config.in" source "package/sunxi-mali-mainline-driver/Config.in" + source "package/sunxi-mali-utgard/Config.in" source "package/sysstat/Config.in" source "package/targetcli-fb/Config.in" source "package/ti-gfx/Config.in" diff --git a/package/glslsandbox-player/Config.in b/package/glslsandbox-player/Config.in index dc0d2c07f1..ebd59521fc 100644 --- a/package/glslsandbox-player/Config.in +++ b/package/glslsandbox-player/Config.in @@ -55,7 +55,7 @@ config BR2_PACKAGE_GLSLSANDBOX_PLAYER_SCRIPTS choice prompt "Native windowing system" - default BR2_PACKAGE_GLSLSANDBOX_PLAYER_MALI if BR2_PACKAGE_SUNXI_MALI_MAINLINE + default BR2_PACKAGE_GLSLSANDBOX_PLAYER_MALI if BR2_PACKAGE_SUNXI_MALI_UTGARD default BR2_PACKAGE_GLSLSANDBOX_PLAYER_RPI if BR2_PACKAGE_RPI_USERLAND default BR2_PACKAGE_GLSLSANDBOX_PLAYER_SDL2 if BR2_PACKAGE_SDL2_OPENGLES default BR2_PACKAGE_GLSLSANDBOX_PLAYER_TISGX if BR2_PACKAGE_TI_SGX_UM @@ -71,7 +71,7 @@ config BR2_PACKAGE_GLSLSANDBOX_PLAYER_KMS config BR2_PACKAGE_GLSLSANDBOX_PLAYER_MALI bool "Allwinner ARM/Mali Frame Buffer" - depends on BR2_PACKAGE_SUNXI_MALI_MAINLINE + depends on BR2_PACKAGE_SUNXI_MALI_UTGARD config BR2_PACKAGE_GLSLSANDBOX_PLAYER_RPI bool "RaspberryPI Frame Buffer" diff --git a/package/glslsandbox-player/glslsandbox-player.mk b/package/glslsandbox-player/glslsandbox-player.mk index 5ace69d7dd..9b06ee4f05 100644 --- a/package/glslsandbox-player/glslsandbox-player.mk +++ b/package/glslsandbox-player/glslsandbox-player.mk @@ -42,7 +42,7 @@ ifeq ($(BR2_PACKAGE_GLSLSANDBOX_PLAYER_KMS),y) GLSLSANDBOX_PLAYER_DEPENDENCIES += libdrm GLSLSANDBOX_PLAYER_CONF_OPTS += --with-native-gfx=kms else ifeq ($(BR2_PACKAGE_GLSLSANDBOX_PLAYER_MALI),y) -GLSLSANDBOX_PLAYER_DEPENDENCIES += sunxi-mali-mainline +GLSLSANDBOX_PLAYER_DEPENDENCIES += sunxi-mali-utgard GLSLSANDBOX_PLAYER_CONF_OPTS += --with-native-gfx=mali else ifeq ($(BR2_PACKAGE_GLSLSANDBOX_PLAYER_RPI),y) GLSLSANDBOX_PLAYER_DEPENDENCIES += rpi-userland diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk index 774c771bc9..72d18b87da 100644 --- a/package/qt5/qt5base/qt5base.mk +++ b/package/qt5/qt5base/qt5base.mk @@ -312,7 +312,7 @@ ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y) ifeq ($(BR2_PACKAGE_IMX_GPU_VIV),y) # use vivante backend QT5BASE_EGLFS_DEVICE = EGLFS_DEVICE_INTEGRATION = eglfs_viv -else ifeq ($(BR2_PACKAGE_SUNXI_MALI_MAINLINE),y) +else ifeq ($(BR2_PACKAGE_SUNXI_MALI_UTGARD),y) # use mali backend QT5BASE_EGLFS_DEVICE = EGLFS_DEVICE_INTEGRATION = eglfs_mali endif diff --git a/package/sunxi-mali-mainline/Config.in b/package/sunxi-mali-mainline/Config.in deleted file mode 100644 index a2fb95bd79..0000000000 --- a/package/sunxi-mali-mainline/Config.in +++ /dev/null @@ -1,42 +0,0 @@ -config BR2_PACKAGE_SUNXI_MALI_MAINLINE - bool "sunxi-mali-mainline" - depends on BR2_aarch64 || (BR2_ARM_EABIHF && BR2_arm) - depends on BR2_TOOLCHAIN_USES_GLIBC - select BR2_PACKAGE_HAS_LIBEGL - select BR2_PACKAGE_HAS_LIBGLES - help - Install userspace Allwinner OpenGL libraries. - - https://github.com/bootlin/mali-blobs - -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 userspace module. - -config BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 - bool "r6p2" -config BR2_PACKAGE_SUNXI_MALI_MAINLINE_R8P1 - bool "r8p1" - -endchoice - -config BR2_PACKAGE_SUNXI_MALI_MAINLINE_REVISION - string - default "r6p2" if BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 - default "r8p1" if BR2_PACKAGE_SUNXI_MALI_MAINLINE_R8P1 - -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/sunxi-mali-mainline.mk b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk deleted file mode 100644 index 701a1fbbb4..0000000000 --- a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk +++ /dev/null @@ -1,49 +0,0 @@ -################################################################################ -# -# sunxi-mali-mainline -# -################################################################################ - -SUNXI_MALI_MAINLINE_VERSION = d691cb93884ca8ac67860502117bbec283dc19aa -SUNXI_MALI_MAINLINE_SITE = $(call github,bootlin,mali-blobs,$(SUNXI_MALI_MAINLINE_VERSION)) -SUNXI_MALI_MAINLINE_INSTALL_STAGING = YES -SUNXI_MALI_MAINLINE_PROVIDES = libegl libgles -SUNXI_MALI_MAINLINE_LICENSE = Allwinner End User Licence Agreement -SUNXI_MALI_MAINLINE_EULA_ORIGINAL = EULA\ for\ Mali\ 400MP\ _AW.pdf -SUNXI_MALI_MAINLINE_EULA_NO_SPACES = EULA_for_Mali_400MP_AW.pdf -SUNXI_MALI_MAINLINE_LICENSE_FILES = $(SUNXI_MALI_MAINLINE_EULA_NO_SPACES) - -SUNXI_MALI_MAINLINE_REV = $(call qstrip,$(BR2_PACKAGE_SUNXI_MALI_MAINLINE_REVISION)) - -ifeq ($(BR2_arm),y) -SUNXI_MALI_MAINLINE_ARCH=arm -else ifeq ($(BR2_aarch64),y) -SUNXI_MALI_MAINLINE_ARCH=arm64 -endif - -define SUNXI_MALI_MAINLINE_INSTALL_STAGING_CMDS - mkdir -p $(STAGING_DIR)/usr/lib $(STAGING_DIR)/usr/include - - cp -rf $(@D)/$(SUNXI_MALI_MAINLINE_REV)/$(SUNXI_MALI_MAINLINE_ARCH)/fbdev/*.so* \ - $(STAGING_DIR)/usr/lib/ - cp -rf $(@D)/include/fbdev/* $(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 - mkdir -p $(TARGET_DIR)/usr/lib - cp -rf $(@D)/$(SUNXI_MALI_MAINLINE_REV)/$(SUNXI_MALI_MAINLINE_ARCH)/fbdev/*.so* \ - $(TARGET_DIR)/usr/lib/ -endef - -define SUNXI_MALI_MAINLINE_FIXUP_LICENSE_FILE - mv $(@D)/$(SUNXI_MALI_MAINLINE_EULA_ORIGINAL) $(@D)/$(SUNXI_MALI_MAINLINE_EULA_NO_SPACES) -endef - -SUNXI_MALI_MAINLINE_POST_PATCH_HOOKS += SUNXI_MALI_MAINLINE_FIXUP_LICENSE_FILE - -$(eval $(generic-package)) diff --git a/package/sunxi-mali-utgard/Config.in b/package/sunxi-mali-utgard/Config.in new file mode 100644 index 0000000000..ff49ea03f1 --- /dev/null +++ b/package/sunxi-mali-utgard/Config.in @@ -0,0 +1,43 @@ +config BR2_PACKAGE_SUNXI_MALI_UTGARD + bool "sunxi-mali-utgard" + depends on BR2_aarch64 || (BR2_ARM_EABIHF && BR2_arm) + depends on BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_HAS_LIBGLES + help + Install userspace Allwinner OpenGL libraries for Mali + Utgard GPUs. + + https://github.com/bootlin/mali-blobs + +if BR2_PACKAGE_SUNXI_MALI_UTGARD + +config BR2_PACKAGE_PROVIDES_LIBEGL + default "sunxi-mali-utgard" + +config BR2_PACKAGE_PROVIDES_LIBGLES + default "sunxi-mali-utgard" + +choice + prompt "Version" + default BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 + help + Select the version of the userspace module. + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 + bool "r6p2" +config BR2_PACKAGE_SUNXI_MALI_UTGARD_R8P1 + bool "r8p1" + +endchoice + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_REVISION + string + default "r6p2" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 + default "r8p1" if BR2_PACKAGE_SUNXI_MALI_UTGARD_R8P1 + +endif + +comment "sunxi-mali-utgard 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-utgard/egl.pc similarity index 100% rename from package/sunxi-mali-mainline/egl.pc rename to package/sunxi-mali-utgard/egl.pc diff --git a/package/sunxi-mali-mainline/glesv2.pc b/package/sunxi-mali-utgard/glesv2.pc similarity index 100% rename from package/sunxi-mali-mainline/glesv2.pc rename to package/sunxi-mali-utgard/glesv2.pc diff --git a/package/sunxi-mali-mainline/sunxi-mali-mainline.hash b/package/sunxi-mali-utgard/sunxi-mali-utgard.hash similarity index 70% rename from package/sunxi-mali-mainline/sunxi-mali-mainline.hash rename to package/sunxi-mali-utgard/sunxi-mali-utgard.hash index 978be01024..528699126e 100644 --- a/package/sunxi-mali-mainline/sunxi-mali-mainline.hash +++ b/package/sunxi-mali-utgard/sunxi-mali-utgard.hash @@ -1,3 +1,3 @@ # Locally calculated -sha256 72969ecf470b9e5ce787c2f8f36242926e1e892af0891924ee59a2cd206de39f sunxi-mali-mainline-d691cb93884ca8ac67860502117bbec283dc19aa.tar.gz +sha256 72969ecf470b9e5ce787c2f8f36242926e1e892af0891924ee59a2cd206de39f sunxi-mali-utgard-d691cb93884ca8ac67860502117bbec283dc19aa.tar.gz sha256 8a06bcae44a41a886f339b4338422415a786787f113e9ed6456ae117104a0b6a EULA_for_Mali_400MP_AW.pdf diff --git a/package/sunxi-mali-utgard/sunxi-mali-utgard.mk b/package/sunxi-mali-utgard/sunxi-mali-utgard.mk new file mode 100644 index 0000000000..edbe81e62c --- /dev/null +++ b/package/sunxi-mali-utgard/sunxi-mali-utgard.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# sunxi-mali-utgard +# +################################################################################ + +SUNXI_MALI_UTGARD_VERSION = d691cb93884ca8ac67860502117bbec283dc19aa +SUNXI_MALI_UTGARD_SITE = $(call github,bootlin,mali-blobs,$(SUNXI_MALI_UTGARD_VERSION)) +SUNXI_MALI_UTGARD_INSTALL_STAGING = YES +SUNXI_MALI_UTGARD_PROVIDES = libegl libgles +SUNXI_MALI_UTGARD_LICENSE = Allwinner End User Licence Agreement +SUNXI_MALI_UTGARD_EULA_ORIGINAL = EULA\ for\ Mali\ 400MP\ _AW.pdf +SUNXI_MALI_UTGARD_EULA_NO_SPACES = EULA_for_Mali_400MP_AW.pdf +SUNXI_MALI_UTGARD_LICENSE_FILES = $(SUNXI_MALI_UTGARD_EULA_NO_SPACES) + +SUNXI_MALI_UTGARD_REV = $(call qstrip,$(BR2_PACKAGE_SUNXI_MALI_UTGARD_REVISION)) + +ifeq ($(BR2_arm),y) +SUNXI_MALI_UTGARD_ARCH=arm +else ifeq ($(BR2_aarch64),y) +SUNXI_MALI_UTGARD_ARCH=arm64 +endif + +define SUNXI_MALI_UTGARD_INSTALL_STAGING_CMDS + mkdir -p $(STAGING_DIR)/usr/lib $(STAGING_DIR)/usr/include + + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + $(STAGING_DIR)/usr/lib/ + cp -rf $(@D)/include/fbdev/* $(STAGING_DIR)/usr/include/ + + $(INSTALL) -D -m 0644 package/sunxi-mali-utgard/egl.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc + $(INSTALL) -D -m 0644 package/sunxi-mali-utgard/glesv2.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc +endef + +define SUNXI_MALI_UTGARD_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/lib + cp -rf $(@D)/$(SUNXI_MALI_UTGARD_REV)/$(SUNXI_MALI_UTGARD_ARCH)/fbdev/*.so* \ + $(TARGET_DIR)/usr/lib/ +endef + +define SUNXI_MALI_UTGARD_FIXUP_LICENSE_FILE + mv $(@D)/$(SUNXI_MALI_UTGARD_EULA_ORIGINAL) $(@D)/$(SUNXI_MALI_UTGARD_EULA_NO_SPACES) +endef + +SUNXI_MALI_UTGARD_POST_PATCH_HOOKS += SUNXI_MALI_UTGARD_FIXUP_LICENSE_FILE + +$(eval $(generic-package)) From patchwork Fri Mar 6 07:14:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 1250076 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) 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; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Yf5C5QqBz9sPK for ; Fri, 6 Mar 2020 18:14:55 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 3212687E76; Fri, 6 Mar 2020 07:14:53 +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 524oyYM4riHA; Fri, 6 Mar 2020 07:14:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id A2CA287E78; Fri, 6 Mar 2020 07:14:51 +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 C65521BF35A for ; Fri, 6 Mar 2020 07:14:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C179987E76 for ; Fri, 6 Mar 2020 07:14:49 +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 YgM5IF7+6XWg for ; Fri, 6 Mar 2020 07:14:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by hemlock.osuosl.org (Postfix) with ESMTPS id 5152187E72 for ; Fri, 6 Mar 2020 07:14:46 +0000 (UTC) X-Originating-IP: 90.89.41.158 Received: from localhost.localdomain (lfbn-tou-1-1473-158.w90-89.abo.wanadoo.fr [90.89.41.158]) (Authenticated sender: miquel.raynal@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 1F48C60003; Fri, 6 Mar 2020 07:14:44 +0000 (UTC) From: Miquel Raynal To: buildroot@buildroot.org Date: Fri, 6 Mar 2020 08:14:35 +0100 Message-Id: <20200306071440.30433-3-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200306071440.30433-1-miquel.raynal@bootlin.com> References: <20200306071440.30433-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/7] package/sunxi-mali-utgard-driver: rename from sunxi-mali-mainline-driver X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Miquel Raynal , Maxime Chevallier , Paul Kocialkowski , Julien Corjon , Thomas Petazzoni , Luca Ceresoli , Peter Seiderer , Giulio Benetti , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This package provides a Mali kernel driver for Sunxi Mali Utgard GPUs. The trailing -mainline is historical and was used at a time when there was two packages providing this driver. The "non-upstream" package has been removed some time ago so before adding new packages bringing support for other ARM Mali GPU versions or implementations, rename sunxi-mali-mainline-driver into sunxi-mali-utgard-driver. Add a legacy entry. Signed-off-by: Miquel Raynal --- Config.in.legacy | 18 +++++----- DEVELOPERS | 2 +- configs/olimex_a20_olinuxino_lime2_defconfig | 2 +- configs/olimex_a20_olinuxino_lime_defconfig | 2 +- linux/linux.mk | 2 +- package/Config.in | 2 +- package/sunxi-mali-mainline-driver/Config.in | 25 ------------- .../sunxi-mali-mainline-driver.mk | 35 ------------------- package/sunxi-mali-utgard-driver/Config.in | 25 +++++++++++++ .../sunxi-mali-utgard-driver.hash} | 2 +- .../sunxi-mali-utgard-driver.mk | 35 +++++++++++++++++++ 11 files changed, 75 insertions(+), 75 deletions(-) delete mode 100644 package/sunxi-mali-mainline-driver/Config.in delete mode 100644 package/sunxi-mali-mainline-driver/sunxi-mali-mainline-driver.mk create mode 100644 package/sunxi-mali-utgard-driver/Config.in rename package/{sunxi-mali-mainline-driver/sunxi-mali-mainline-driver.hash => sunxi-mali-utgard-driver/sunxi-mali-utgard-driver.hash} (66%) create mode 100644 package/sunxi-mali-utgard-driver/sunxi-mali-utgard-driver.mk diff --git a/Config.in.legacy b/Config.in.legacy index 295b1c6003..c9a044c68b 100644 --- a/Config.in.legacy +++ b/Config.in.legacy @@ -144,17 +144,17 @@ endif ############################################################################### -config BR2_PACKAGE_SUNXI_MALI_MAINLINE - bool "sunxi-mali-mainline package was renamed" +config BR2_PACKAGE_SUNXI_MALI_MAINLINE_DRIVER + bool "sunxi-mali-mainline-driver package was renamed" select BR2_LEGACY - select BR2_PACKAGE_SUNXI_MALI_UTGARD + select BR2_PACKAGE_SUNXI_MALI_UTGARD_DRIVER help - Since the removal of the sunxi-mali package, the - sunxi-mali-mainline package that coexisted became the only - package to provide Mali blobs. The "-mainline" suffix being - undescriptive nowadays and before adding new packages bringing - Mali support for other SoCs/GPU flavors, it is clearer to - rename it SUNXI_MALI_UTGARD. + Since the removal of the sunxi-mali-driver package, the + sunxi-mali-mainline-driver package that coexisted became the + only package to provide the Suxy Mali driver. The "-mainline" + suffix being undescriptive nowadays and before adding new + packages bringing Mali support for other SoCs/GPU flavors, it + is clearer to rename it SUNXI_MALI_UTGARD_DRIVER. config BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 bool "sunxi-mali-mainline-r6p2 was renamed" diff --git a/DEVELOPERS b/DEVELOPERS index 289fa9077d..f8d8bb360d 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1014,7 +1014,7 @@ F: package/libnss/ F: package/minicom/ F: package/nfs-utils/ F: package/sunxi-mali-utgard/ -F: package/sunxi-mali-mainline-driver/ +F: package/sunxi-mali-utgard-driver/ N: Gregory Dymarek F: package/ding-libs/ diff --git a/configs/olimex_a20_olinuxino_lime2_defconfig b/configs/olimex_a20_olinuxino_lime2_defconfig index 02865d3c8c..9a840c7803 100644 --- a/configs/olimex_a20_olinuxino_lime2_defconfig +++ b/configs/olimex_a20_olinuxino_lime2_defconfig @@ -28,7 +28,7 @@ BR2_LINUX_KERNEL_INSTALL_TARGET=y # sunxi packages BR2_PACKAGE_SUNXI_TOOLS=y BR2_PACKAGE_SUNXI_MALI_UTGARD=y -BR2_PACKAGE_SUNXI_MALI_MAINLINE_DRIVER=y +BR2_PACKAGE_SUNXI_MALI_UTGARD_DRIVER=y # Filesystem BR2_TARGET_ROOTFS_EXT2=y diff --git a/configs/olimex_a20_olinuxino_lime_defconfig b/configs/olimex_a20_olinuxino_lime_defconfig index 58a468aabf..974fb99d7d 100644 --- a/configs/olimex_a20_olinuxino_lime_defconfig +++ b/configs/olimex_a20_olinuxino_lime_defconfig @@ -28,7 +28,7 @@ BR2_LINUX_KERNEL_INSTALL_TARGET=y # sunxi packages BR2_PACKAGE_SUNXI_TOOLS=y BR2_PACKAGE_SUNXI_MALI_UTGARD=y -BR2_PACKAGE_SUNXI_MALI_MAINLINE_DRIVER=y +BR2_PACKAGE_SUNXI_MALI_UTGARD_DRIVER=y # Filesystem BR2_TARGET_ROOTFS_EXT2=y diff --git a/linux/linux.mk b/linux/linux.mk index 4b60f33ff3..e6346b7274 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -379,7 +379,7 @@ define LINUX_KCONFIG_FIXUP_CMDS $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY,$(@D)/.config) $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_SMACK,$(@D)/.config) $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_NETWORK,$(@D)/.config)) - $(if $(BR2_PACKAGE_SUNXI_MALI_MAINLINE_DRIVER), + $(if $(BR2_PACKAGE_SUNXI_MALI_UTGARD_DRIVER), $(call KCONFIG_ENABLE_OPT,CONFIG_CMA,$(@D)/.config) $(call KCONFIG_ENABLE_OPT,CONFIG_DMA_CMA,$(@D)/.config)) $(if $(BR2_PACKAGE_IPTABLES), diff --git a/package/Config.in b/package/Config.in index aa57d34f96..2137aa88ed 100644 --- a/package/Config.in +++ b/package/Config.in @@ -538,8 +538,8 @@ endmenu source "package/statserial/Config.in" source "package/stm32flash/Config.in" source "package/sunxi-cedarx/Config.in" - source "package/sunxi-mali-mainline-driver/Config.in" source "package/sunxi-mali-utgard/Config.in" + source "package/sunxi-mali-utgard-driver/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-mainline-driver/Config.in b/package/sunxi-mali-mainline-driver/Config.in deleted file mode 100644 index 057f20db66..0000000000 --- a/package/sunxi-mali-mainline-driver/Config.in +++ /dev/null @@ -1,25 +0,0 @@ -comment "sunxi-mali-mainline-driver needs a Linux kernel to be built" - depends on BR2_PACKAGE_SUNXI_MALI_MAINLINE - depends on !BR2_LINUX_KERNEL - -config BR2_PACKAGE_SUNXI_MALI_MAINLINE_DRIVER - bool "sunxi-mali-mainline-driver" - default y - depends on BR2_PACKAGE_SUNXI_MALI_MAINLINE # runtime - 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/bootlin/mali-blobs - - sunxi-mali-mainline-driver requires a Linux kernel >= 4.4 - with the following options enabled: - - - CONFIG_CMA - - CONFIG_DMA_CMA - - https://github.com/mripard/sunxi-mali/blob/master/README.md diff --git a/package/sunxi-mali-mainline-driver/sunxi-mali-mainline-driver.mk b/package/sunxi-mali-mainline-driver/sunxi-mali-mainline-driver.mk deleted file mode 100644 index 0edcdee4d6..0000000000 --- a/package/sunxi-mali-mainline-driver/sunxi-mali-mainline-driver.mk +++ /dev/null @@ -1,35 +0,0 @@ -################################################################################ -# -# sunxi-mali-mainline-driver -# -################################################################################ - -SUNXI_MALI_MAINLINE_DRIVER_VERSION = ec654ee9caeb0c4348caacd0cf5eb2730d1d70e2 -SUNXI_MALI_MAINLINE_DRIVER_SITE = $(call github,mripard,sunxi-mali,$(SUNXI_MALI_MAINLINE_DRIVER_VERSION)) -SUNXI_MALI_MAINLINE_DRIVER_DEPENDENCIES = linux -SUNXI_MALI_MAINLINE_DRIVER_LICENSE = GPL-2.0 -SUNXI_MALI_MAINLINE_DRIVER_LICENSE_FILES = LICENSE - -SUNXI_MALI_MAINLINE_DRIVER_MAKE_OPTS = \ - $(LINUX_MAKE_FLAGS) \ - KDIR=$(LINUX_DIR) - -define SUNXI_MALI_MAINLINE_DRIVER_USE_APPLY_PATCHES - ln -sf $(SUNXI_MALI_MAINLINE_REV)/series $(@D)/patches - $(SED) 's|quilt push -a|$(TOPDIR)/support/scripts/apply-patches.sh . ../patches|' \ - $(@D)/build.sh -endef - -SUNXI_MALI_MAINLINE_DRIVER_POST_PATCH_HOOKS += SUNXI_MALI_MAINLINE_DRIVER_USE_APPLY_PATCHES - -define SUNXI_MALI_MAINLINE_DRIVER_BUILD_CMDS - cd $(@D) && $(SUNXI_MALI_MAINLINE_DRIVER_MAKE_OPTS) \ - $(SHELL) ./build.sh -r $(SUNXI_MALI_MAINLINE_REV) -j $(PARALLEL_JOBS) -b -endef - -define SUNXI_MALI_MAINLINE_DRIVER_INSTALL_TARGET_CMDS - cd $(@D) && $(SUNXI_MALI_MAINLINE_DRIVER_MAKE_OPTS) \ - $(SHELL) ./build.sh -r $(SUNXI_MALI_MAINLINE_REV) -j $(PARALLEL_JOBS) -i -endef - -$(eval $(generic-package)) diff --git a/package/sunxi-mali-utgard-driver/Config.in b/package/sunxi-mali-utgard-driver/Config.in new file mode 100644 index 0000000000..d27fc4e755 --- /dev/null +++ b/package/sunxi-mali-utgard-driver/Config.in @@ -0,0 +1,25 @@ +comment "sunxi-mali-utgard-driver needs a Linux kernel to be built" + depends on BR2_PACKAGE_SUNXI_MALI_UTGARD + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_SUNXI_MALI_UTGARD_DRIVER + bool "sunxi-mali-utgard-driver" + default y + depends on BR2_PACKAGE_SUNXI_MALI_UTGARD # runtime + 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 Utgard 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/bootlin/mali-blobs + + sunxi-mali-utgard-driver requires a Linux kernel >= 4.4 + with the following options enabled: + + - CONFIG_CMA + - CONFIG_DMA_CMA + + https://github.com/mripard/sunxi-mali/blob/master/README.md diff --git a/package/sunxi-mali-mainline-driver/sunxi-mali-mainline-driver.hash b/package/sunxi-mali-utgard-driver/sunxi-mali-utgard-driver.hash similarity index 66% rename from package/sunxi-mali-mainline-driver/sunxi-mali-mainline-driver.hash rename to package/sunxi-mali-utgard-driver/sunxi-mali-utgard-driver.hash index 7c01d07d20..1d259987ea 100644 --- a/package/sunxi-mali-mainline-driver/sunxi-mali-mainline-driver.hash +++ b/package/sunxi-mali-utgard-driver/sunxi-mali-utgard-driver.hash @@ -1,3 +1,3 @@ # Locally calculated -sha256 98abeb8ff2e7e824ec89c7be9984ff298db1f35e48d79092238799ff5a239e91 sunxi-mali-mainline-driver-ec654ee9caeb0c4348caacd0cf5eb2730d1d70e2.tar.gz +sha256 98abeb8ff2e7e824ec89c7be9984ff298db1f35e48d79092238799ff5a239e91 sunxi-mali-utgard-driver-ec654ee9caeb0c4348caacd0cf5eb2730d1d70e2.tar.gz sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSE diff --git a/package/sunxi-mali-utgard-driver/sunxi-mali-utgard-driver.mk b/package/sunxi-mali-utgard-driver/sunxi-mali-utgard-driver.mk new file mode 100644 index 0000000000..e61a1f86ff --- /dev/null +++ b/package/sunxi-mali-utgard-driver/sunxi-mali-utgard-driver.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# sunxi-mali-utgard-driver +# +################################################################################ + +SUNXI_MALI_UTGARD_DRIVER_VERSION = ec654ee9caeb0c4348caacd0cf5eb2730d1d70e2 +SUNXI_MALI_UTGARD_DRIVER_SITE = $(call github,mripard,sunxi-mali,$(SUNXI_MALI_UTGARD_DRIVER_VERSION)) +SUNXI_MALI_UTGARD_DRIVER_DEPENDENCIES = linux +SUNXI_MALI_UTGARD_DRIVER_LICENSE = GPL-2.0 +SUNXI_MALI_UTGARD_DRIVER_LICENSE_FILES = LICENSE + +SUNXI_MALI_UTGARD_DRIVER_MAKE_OPTS = \ + $(LINUX_MAKE_FLAGS) \ + KDIR=$(LINUX_DIR) + +define SUNXI_MALI_UTGARD_DRIVER_USE_APPLY_PATCHES + ln -sf $(SUNXI_MALI_UTGARD_REV)/series $(@D)/patches + $(SED) 's|quilt push -a|$(TOPDIR)/support/scripts/apply-patches.sh . ../patches|' \ + $(@D)/build.sh +endef + +SUNXI_MALI_UTGARD_DRIVER_POST_PATCH_HOOKS += SUNXI_MALI_UTGARD_DRIVER_USE_APPLY_PATCHES + +define SUNXI_MALI_UTGARD_DRIVER_BUILD_CMDS + cd $(@D) && $(SUNXI_MALI_UTGARD_DRIVER_MAKE_OPTS) \ + $(SHELL) ./build.sh -r $(SUNXI_MALI_UTGARD_REV) -j $(PARALLEL_JOBS) -b +endef + +define SUNXI_MALI_UTGARD_DRIVER_INSTALL_TARGET_CMDS + cd $(@D) && $(SUNXI_MALI_UTGARD_DRIVER_MAKE_OPTS) \ + $(SHELL) ./build.sh -r $(SUNXI_MALI_UTGARD_REV) -j $(PARALLEL_JOBS) -i +endef + +$(eval $(generic-package)) From patchwork Fri Mar 6 07:14:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 1250077 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Yf5J705Yz9sPK for ; Fri, 6 Mar 2020 18:15:00 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 46D6721509; Fri, 6 Mar 2020 07:14:59 +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 NiUlqOM8LyzD; Fri, 6 Mar 2020 07:14:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id ABD442048E; Fri, 6 Mar 2020 07:14:52 +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 E28EA1BF9BD for ; Fri, 6 Mar 2020 07:14:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id DFA8486938 for ; Fri, 6 Mar 2020 07:14:49 +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 aAX2sHKkoMIy for ; Fri, 6 Mar 2020 07:14:48 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by whitealder.osuosl.org (Postfix) with ESMTPS id 4023986E68 for ; Fri, 6 Mar 2020 07:14:48 +0000 (UTC) X-Originating-IP: 90.89.41.158 Received: from localhost.localdomain (lfbn-tou-1-1473-158.w90-89.abo.wanadoo.fr [90.89.41.158]) (Authenticated sender: miquel.raynal@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 8E62F6000B; Fri, 6 Mar 2020 07:14:45 +0000 (UTC) From: Miquel Raynal To: buildroot@buildroot.org Date: Fri, 6 Mar 2020 08:14:36 +0100 Message-Id: <20200306071440.30433-4-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200306071440.30433-1-miquel.raynal@bootlin.com> References: <20200306071440.30433-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 3/7] package/rockchip-mali-bifrost: new package with binary blobs X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Miquel Raynal , Maxime Chevallier , Paul Kocialkowski , Julien Corjon , Thomas Petazzoni , Luca Ceresoli , Peter Seiderer , Giulio Benetti , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Maxime Chevallier There is already a package adding Mali blobs for Sunxi Mali Utgard GPUs. Many Rockchip SoCs feature a Mali Bifrost GPU and need specific libraries provided under binary form with a non-GPL compliant license by Rockchip. Package these libraries. Define a common *_INSTALL_CMDS macro, which takes as argument the base destination path, and use it to implement *_INSTALL_TARGET_CMDS and *_INSTALL_STAGING_CMDS. Signed-off-by: Maxime Chevallier Signed-off-by: Miquel Raynal --- package/Config.in | 1 + ...4-binaries-and-only-install-the-bifr.patch | 169 ++++++++++++++++++ package/rockchip-mali-bifrost/Config.in | 20 +++ .../rockchip-mali-bifrost.hash | 2 + .../rockchip-mali-bifrost.mk | 85 +++++++++ 5 files changed, 277 insertions(+) create mode 100644 package/rockchip-mali-bifrost/0001-cmake-Use-AArch64-binaries-and-only-install-the-bifr.patch create mode 100644 package/rockchip-mali-bifrost/Config.in create mode 100644 package/rockchip-mali-bifrost/rockchip-mali-bifrost.hash create mode 100644 package/rockchip-mali-bifrost/rockchip-mali-bifrost.mk diff --git a/package/Config.in b/package/Config.in index 2137aa88ed..f2217ee1d5 100644 --- a/package/Config.in +++ b/package/Config.in @@ -516,6 +516,7 @@ endmenu source "package/raspi-gpio/Config.in" source "package/read-edid/Config.in" source "package/rng-tools/Config.in" + source "package/rockchip-mali-bifrost/Config.in" source "package/rpi-userland/Config.in" source "package/rs485conf/Config.in" source "package/rtc-tools/Config.in" diff --git a/package/rockchip-mali-bifrost/0001-cmake-Use-AArch64-binaries-and-only-install-the-bifr.patch b/package/rockchip-mali-bifrost/0001-cmake-Use-AArch64-binaries-and-only-install-the-bifr.patch new file mode 100644 index 0000000000..c5cddea414 --- /dev/null +++ b/package/rockchip-mali-bifrost/0001-cmake-Use-AArch64-binaries-and-only-install-the-bifr.patch @@ -0,0 +1,169 @@ +From 8e076bbbd17f05e248e7cb139e437b0a75481983 Mon Sep 17 00:00:00 2001 +From: Maxime Chevallier +Date: Mon, 23 Dec 2019 09:20:22 +0100 +Subject: [PATCH] cmake: Use AArch64 binaries, and only install the bifrost + libraries + +Signed-off-by: Maxime Chevallier +--- + CMakeLists.txt | 24 ++---------------------- + pkgconfig/OpenCL.pc | 11 +++++++++++ + pkgconfig/egl.pc | 12 ++++++++++++ + pkgconfig/gbm.pc | 12 ++++++++++++ + pkgconfig/glesv2.pc | 12 ++++++++++++ + pkgconfig/mali.pc | 10 ++++++++++ + pkgconfig/wayland-egl.pc | 12 ++++++++++++ + 7 files changed, 71 insertions(+), 22 deletions(-) + create mode 100644 pkgconfig/OpenCL.pc + create mode 100644 pkgconfig/egl.pc + create mode 100644 pkgconfig/gbm.pc + create mode 100644 pkgconfig/glesv2.pc + create mode 100644 pkgconfig/mali.pc + create mode 100644 pkgconfig/wayland-egl.pc + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b0affff..363da33 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -21,31 +21,11 @@ INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/mali.icd" + DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/OpenCL/vendors/") + + INSTALL(FILES +-"${CMAKE_CURRENT_SOURCE_DIR}/lib/arm-linux-gnueabihf/libmali-midgard-t86x-r14p0.so" ++"${CMAKE_CURRENT_SOURCE_DIR}/lib/aarch64-linux-gnu/libmali-bifrost-g31-rxp0-wayland-gbm.so" + DESTINATION "${CMAKE_INSTALL_LIBDIR}") + + INSTALL(FILES +-"${CMAKE_CURRENT_SOURCE_DIR}/lib/arm-linux-gnueabihf/libmali-midgard-t76x-r14p0-r1p0.so" +-DESTINATION "${CMAKE_INSTALL_LIBDIR}") +- +-INSTALL(FILES +-"${CMAKE_CURRENT_SOURCE_DIR}/lib/arm-linux-gnueabihf/libmali-midgard-t76x-r14p0-r0p0.so" +-DESTINATION "${CMAKE_INSTALL_LIBDIR}") +- +-INSTALL(FILES +-"${CMAKE_CURRENT_SOURCE_DIR}/lib/arm-linux-gnueabihf/libmali-midgard-t76x-r14p0-r0p0-wayland.so" +-DESTINATION "${CMAKE_INSTALL_LIBDIR}") +- +-INSTALL(FILES +-"${CMAKE_CURRENT_SOURCE_DIR}/lib/arm-linux-gnueabihf/libmali-utgard-450-r7p0.so" +-DESTINATION "${CMAKE_INSTALL_LIBDIR}") +- +-INSTALL(FILES +-"${CMAKE_CURRENT_SOURCE_DIR}/lib/arm-linux-gnueabihf/libmali-utgard-400-r7p0.so" +-DESTINATION "${CMAKE_INSTALL_LIBDIR}") +- +-INSTALL(FILES +-"${CMAKE_CURRENT_SOURCE_DIR}/lib/arm-linux-gnueabihf/libmali-bifrost-g31-rxp0-wayland-gbm.so" ++"${CMAKE_CURRENT_SOURCE_DIR}/lib/aarch64-linux-gnu/libmali-bifrost-g31-rxp0-gbm.so" + DESTINATION "${CMAKE_INSTALL_LIBDIR}") + + INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/egl.pc" +diff --git a/pkgconfig/OpenCL.pc b/pkgconfig/OpenCL.pc +new file mode 100644 +index 0000000..218d0ff +--- /dev/null ++++ b/pkgconfig/OpenCL.pc +@@ -0,0 +1,11 @@ ++prefix=/usr ++exec_prefix=${prefix} ++libdir=${prefix}/lib ++includedir=${prefix}/include ++ ++Name: OpenCL ++Description: Mali OpenCL library ++Requires.private: ++Version: 1.2 ++Libs: -L${libdir} -lMaliOpenCL ++Cflags: -I${includedir} +diff --git a/pkgconfig/egl.pc b/pkgconfig/egl.pc +new file mode 100644 +index 0000000..fe9e23a +--- /dev/null ++++ b/pkgconfig/egl.pc +@@ -0,0 +1,12 @@ ++prefix=/usr ++exec_prefix=${prefix} ++libdir=${prefix}/lib ++includedir=${prefix}/include ++ ++Name: egl ++Description: Mali EGL library ++Requires.private: ++Version: 7.10 ++Libs: -L${libdir} -lEGL ++Libs.private: -lm -lpthread ++Cflags: -I${includedir} +diff --git a/pkgconfig/gbm.pc b/pkgconfig/gbm.pc +new file mode 100644 +index 0000000..e06a1e5 +--- /dev/null ++++ b/pkgconfig/gbm.pc +@@ -0,0 +1,12 @@ ++prefix=/usr ++exec_prefix=${prefix} ++libdir=${prefix}/lib ++includedir=${prefix}/include ++ ++Name: gbm ++Description: Mali GBM library ++Requires.private: ++Version: 10.4.0 ++Libs: -L${libdir} -lgbm ++Libs.private: ++Cflags: -I${includedir} +diff --git a/pkgconfig/glesv2.pc b/pkgconfig/glesv2.pc +new file mode 100644 +index 0000000..51b4fca +--- /dev/null ++++ b/pkgconfig/glesv2.pc +@@ -0,0 +1,12 @@ ++prefix=/usr ++exec_prefix=${prefix} ++libdir=${prefix}/lib ++includedir=${prefix}/include ++ ++Name: glesv2 ++Description: Mali GLESV2 library ++Requires.private: ++Version: ++Libs: -L${libdir} -lGLESv2 ++Libs.private: -lm -lpthread ++Cflags: -I${includedir} +diff --git a/pkgconfig/mali.pc b/pkgconfig/mali.pc +new file mode 100644 +index 0000000..b9aa626 +--- /dev/null ++++ b/pkgconfig/mali.pc +@@ -0,0 +1,10 @@ ++prefix=/usr ++exec_prefix=${prefix} ++libdir=${prefix}/lib ++includedir=${prefix}/include ++ ++Name: mali ++Description: Mali EGL library ++Requires.private: ++Libs: -L${libdir} -lMali ++Cflags: -I${includedir} +diff --git a/pkgconfig/wayland-egl.pc b/pkgconfig/wayland-egl.pc +new file mode 100644 +index 0000000..7539f8c +--- /dev/null ++++ b/pkgconfig/wayland-egl.pc +@@ -0,0 +1,12 @@ ++prefix=/usr ++exec_prefix=${prefix} ++libdir=${prefix}/lib ++includedir=${prefix}/include ++ ++Name: wayland-egl ++Description: Mali EGL library ++Requires.private: ++Version: 7.10 ++Libs: -L${libdir} -lMali ++Libs.private: -lm -lpthread ++Cflags: -I${includedir} +-- +2.24.1 + diff --git a/package/rockchip-mali-bifrost/Config.in b/package/rockchip-mali-bifrost/Config.in new file mode 100644 index 0000000000..499cf0d8a9 --- /dev/null +++ b/package/rockchip-mali-bifrost/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_ROCKCHIP_MALI_BIFROST + bool "rockchip-mali-bifrost" + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_arm || BR2_aarch64 + select BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_HAS_LIBGLES + help + Install the binary user-space libraries for the ARM Mali GPU. + This package requires a kernel with the ARM Mali GPU Kernel + Drivers enabled. + +if BR2_PACKAGE_ROCKCHIP_MALI_BIFROST + +config BR2_PACKAGE_PROVIDES_LIBEGL + default "rockchip-mali-bifrost" + +config BR2_PACKAGE_PROVIDES_LIBGLES + default "rockchip-mali-bifrost" + +endif diff --git a/package/rockchip-mali-bifrost/rockchip-mali-bifrost.hash b/package/rockchip-mali-bifrost/rockchip-mali-bifrost.hash new file mode 100644 index 0000000000..68f0d3dce0 --- /dev/null +++ b/package/rockchip-mali-bifrost/rockchip-mali-bifrost.hash @@ -0,0 +1,2 @@ +sha256 ee440d859e9d7dfdf29b9a00c7a633337913c407be567d3651c29c12eb75fd9c rockchip-mali-bifrost-721653b5b3b525a4f80d15aa7e2f9df7b7e60427.tar.gz +sha256 a78acc73de9909efb879800d4daa4640c4aaa55cd751238a133954aba15e4285 END_USER_LICENCE_AGREEMENT.txt diff --git a/package/rockchip-mali-bifrost/rockchip-mali-bifrost.mk b/package/rockchip-mali-bifrost/rockchip-mali-bifrost.mk new file mode 100644 index 0000000000..aefcd5057f --- /dev/null +++ b/package/rockchip-mali-bifrost/rockchip-mali-bifrost.mk @@ -0,0 +1,85 @@ +################################################################################ +# +# rockchip_mali_bifrost For Linux +# +################################################################################ + +ROCKCHIP_MALI_BIFROST_VERSION = 721653b5b3b525a4f80d15aa7e2f9df7b7e60427 +ROCKCHIP_MALI_BIFROST_SITE = $(call github,rockchip-linux,libmali,$(ROCKCHIP_MALI_BIFROST_VERSION)) +ROCKCHIP_MALI_BIFROST_LICENSE = END_USER_LICENCE_AGREEMENT.txt + +ROCKCHIP_MALI_BIFROST_INSTALL_STAGING = YES + +ROCKCHIP_MALI_BIFROST_DEPENDENCIES = host-patchelf libdrm + +ROCKCHIP_MALI_BIFROST_PROVIDES = libegl libgles + +#ifeq ($(BR2_PACKAGE_WAYLAND),y) +#ROCKCHIP_MALI_BIFROST_SUFFIX = -wayland +#else +#ifeq ($(BR2_PACKAGE_XORG7)),y) +#ROCKCHIP_MALI_BIFROST_SUFFIX = +#else +ROCKCHIP_MALI_BIFROST_SUFFIX = -gbm +#endif +#endif + +ROCKCHIP_MALI_BIFROST_LIBS = libmali-bifrost-g31-rxp0$(ROCKCHIP_MALI_BIFROST_SUFFIX).so + +ROCKCHIP_MALI_BIFROST_ARCH_DIR = $(if $(BR2_arm),arm-linux-gnueabihf,aarch64-linux-gnu) + +ifeq ($(BR2_PACKAGE_WAYLAND),y) +define ROCKCHIP_MALI_BIFROST_CREATE_WAYLAND_LINKS + rm -f $(1)/usr/lib/libwayland-egl.so* + + ln -sf libmali.so $(1)/usr/lib/libwayland-egl.so.1 + ln -sf libwayland-egl.so.1 $(1)/usr/lib/libwayland-egl.so +endef +endif + +ROCKCHIP_MALI_BIFROST_HEADERS_DIRS = CL EGL FBDEV GLES GLES2 GLES3 KHR + +define ROCKCHIP_MALI_BIFROST_INSTALL_CMDS + mkdir -p $(1)/usr/lib + cp -dpfr $(@D)/lib/$(ROCKCHIP_MALI_BIFROST_ARCH_DIR)/$(ROCKCHIP_MALI_BIFROST_LIBS) $(1)/usr/lib + + $(foreach l,$(ROCKCHIP_MALI_BIFROST_LIBS), + $(HOST_DIR)/bin/patchelf --set-soname libmali.so.1 $(1)/usr/lib/$(l) + ) + + ln -sf $(firstword $(ROCKCHIP_MALI_BIFROST_LIBS)) $(1)/usr/lib/libmali.so.1 + + $(foreach d,$(ROCKCHIP_MALI_BIFROST_HEADERS_DIRS),\ + cp -dpfr $(@D)/include/$(d) $(1)/usr/include/ + ) + cp -dpfr $(@D)/include/gbm.h $(1)/usr/include/ + mkdir -p $(1)/usr/lib/pkgconfig/ + cp -dpfr $(@D)/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/ + ln -sf libmali.so.1 $(1)/usr/lib/libmali.so + ln -sf libmali.so $(1)/usr/lib/libMali.so.1 + ln -sf libMali.so.1 $(1)/usr/lib/libMali.so + + ln -sf libmali.so $(1)/usr/lib/libEGL.so.1 + ln -sf libEGL.so.1 $(1)/usr/lib/libEGL.so + + ln -sf libmali.so $(1)/usr/lib/libgbm.so.1 + ln -sf libgbm.so.1 $(1)/usr/lib/libgbm.so + ln -sf libgbm.so.1 $(1)/usr/lib/libgbm.so.1.0.0 + + ln -sf libmali.so $(1)/usr/lib/libGLESv1_CM.so.1 + ln -sf libGLESv1_CM.so.1 $(1)/usr/lib/libGLESv1_CM.so + + ln -sf libmali.so $(1)/usr/lib/libGLESv2.so.2 + ln -sf libGLESv2.so.2 $(1)/usr/lib/libGLESv2.so + $(call ROCKCHIP_MALI_BIFROST_CREATE_WAYLAND_LINKS,$(1)) +endef + +define ROCKCHIP_MALI_BIFROST_INSTALL_TARGET_CMDS + $(call ROCKCHIP_MALI_BIFROST_INSTALL_CMDS,$(TARGET_DIR)) +endef + +define ROCKCHIP_MALI_BIFROST_INSTALL_STAGING_CMDS + $(call ROCKCHIP_MALI_BIFROST_INSTALL_CMDS,$(STAGING_DIR)) +endef + +$(eval $(generic-package)) From patchwork Fri Mar 6 07:14:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 1250079 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) 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; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Yf5K6nL9z9sRY for ; Fri, 6 Mar 2020 18:15:01 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E9D25868B5; Fri, 6 Mar 2020 07:14:58 +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 xhudPtq4gu6Y; Fri, 6 Mar 2020 07:14:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 301C686892; Fri, 6 Mar 2020 07:14:56 +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 4AD2A1BF35A for ; Fri, 6 Mar 2020 07:14:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 3C14C20345 for ; Fri, 6 Mar 2020 07:14:53 +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 OZME0APyeurc for ; Fri, 6 Mar 2020 07:14:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by silver.osuosl.org (Postfix) with ESMTPS id 22DE2204CA for ; Fri, 6 Mar 2020 07:14:49 +0000 (UTC) X-Originating-IP: 90.89.41.158 Received: from localhost.localdomain (lfbn-tou-1-1473-158.w90-89.abo.wanadoo.fr [90.89.41.158]) (Authenticated sender: miquel.raynal@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 124956000C; Fri, 6 Mar 2020 07:14:46 +0000 (UTC) From: Miquel Raynal To: buildroot@buildroot.org Date: Fri, 6 Mar 2020 08:14:37 +0100 Message-Id: <20200306071440.30433-5-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200306071440.30433-1-miquel.raynal@bootlin.com> References: <20200306071440.30433-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 4/7] package/mali-bifrost-driver: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Miquel Raynal , Maxime Chevallier , Paul Kocialkowski , Julien Corjon , Thomas Petazzoni , Luca Ceresoli , Peter Seiderer , Giulio Benetti , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add a new package to build and install a generic ARM Mali Bifrost GPU Linux kernel module. This module is compliant with the standard kernel-module infrastructure. Signed-off-by: Miquel Raynal --- package/Config.in | 1 + package/mali-bifrost-driver/Config.in | 17 +++++++++++++++++ .../mali-bifrost-driver.hash | 3 +++ .../mali-bifrost-driver/mali-bifrost-driver.mk | 15 +++++++++++++++ 4 files changed, 36 insertions(+) create mode 100644 package/mali-bifrost-driver/Config.in create mode 100644 package/mali-bifrost-driver/mali-bifrost-driver.hash create mode 100644 package/mali-bifrost-driver/mali-bifrost-driver.mk diff --git a/package/Config.in b/package/Config.in index f2217ee1d5..f9f71fc9eb 100644 --- a/package/Config.in +++ b/package/Config.in @@ -483,6 +483,7 @@ endmenu source "package/lsuio/Config.in" source "package/luksmeta/Config.in" source "package/lvm2/Config.in" + source "package/mali-bifrost-driver/Config.in" source "package/mali-t76x/Config.in" source "package/mdadm/Config.in" source "package/mdevd/Config.in" diff --git a/package/mali-bifrost-driver/Config.in b/package/mali-bifrost-driver/Config.in new file mode 100644 index 0000000000..c278048b98 --- /dev/null +++ b/package/mali-bifrost-driver/Config.in @@ -0,0 +1,17 @@ +comment "Mali Bifrost driver needs a Linux kernel to be built" + depends on BR2_PACKAGE_MALI_BIFROST_DRIVER + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_MALI_BIFROST_DRIVER + bool "mali-bifrost-driver" + default n + depends on BR2_PACKAGE_ROCKCHIP_MALI_BIFROST # runtime + depends on BR2_LINUX_KERNEL + help + This package builds and installs the Linux kernel driver for + the Mali Bifrost GPU, compatible with recent Linux kernels + (>= 5.4). Note that it should be installed together with the + corresponding userspace OpenGL libraries, which are usually + provided as binaries only by hardware vendors. + + mali-bifrost-driver requires a Linux kernel >= 5.4. diff --git a/package/mali-bifrost-driver/mali-bifrost-driver.hash b/package/mali-bifrost-driver/mali-bifrost-driver.hash new file mode 100644 index 0000000000..40d3b749bf --- /dev/null +++ b/package/mali-bifrost-driver/mali-bifrost-driver.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 915873382580ba86518ee0552980ce9726d51a819c90548e31dc4a528d532b1a mali-bifrost-driver-v0.1.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSE diff --git a/package/mali-bifrost-driver/mali-bifrost-driver.mk b/package/mali-bifrost-driver/mali-bifrost-driver.mk new file mode 100644 index 0000000000..5d1990676e --- /dev/null +++ b/package/mali-bifrost-driver/mali-bifrost-driver.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# mali-bifrost-driver +# +################################################################################ + +MALI_BIFROST_DRIVER_VERSION = v0.1 +MALI_BIFROST_DRIVER_SITE = $(call github,bootlin,mali-bifrost,$(MALI_BIFROST_DRIVER_VERSION)) +MALI_BIFROST_DRIVER_DEPENDENCIES = linux +MALI_BIFROST_DRIVER_LICENSE = GPL-2.0 +MALI_BIFROST_DRIVER_LICENSE_FILE = LICENSE +MALI_BIFROST_DRIVER_MODULE_SUBDIRS = r8p0/drivers/gpu/arm/midgard + +$(eval $(kernel-module)) +$(eval $(generic-package)) From patchwork Fri Mar 6 07:14:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 1250078 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Yf5K45nJz9sRR for ; Fri, 6 Mar 2020 18:15:01 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 1167520426; Fri, 6 Mar 2020 07:15:00 +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 R+ZHHdBrq5bI; Fri, 6 Mar 2020 07:14:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 3356F204CA; Fri, 6 Mar 2020 07:14:55 +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 A07B11BF35A for ; Fri, 6 Mar 2020 07:14:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9DEEF87E97 for ; Fri, 6 Mar 2020 07:14:52 +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 KAMqC3DEBMZe for ; Fri, 6 Mar 2020 07:14:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by hemlock.osuosl.org (Postfix) with ESMTPS id C0B5787E93 for ; Fri, 6 Mar 2020 07:14:51 +0000 (UTC) X-Originating-IP: 90.89.41.158 Received: from localhost.localdomain (lfbn-tou-1-1473-158.w90-89.abo.wanadoo.fr [90.89.41.158]) (Authenticated sender: miquel.raynal@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 07ADF6000B; Fri, 6 Mar 2020 07:14:48 +0000 (UTC) From: Miquel Raynal To: buildroot@buildroot.org Date: Fri, 6 Mar 2020 08:14:38 +0100 Message-Id: <20200306071440.30433-6-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200306071440.30433-1-miquel.raynal@bootlin.com> References: <20200306071440.30433-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 5/7] package/qt5: make it possible to use rockchip-mali-bifrost as GBM provider X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Miquel Raynal , Maxime Chevallier , Paul Kocialkowski , Julien Corjon , Thomas Petazzoni , Luca Ceresoli , Peter Seiderer , Giulio Benetti , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Thomas Petazzoni Signed-off-by: Thomas Petazzoni Signed-off-by: Miquel Raynal --- package/qt5/qt5base/qt5base.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk index 72d18b87da..8803a4821e 100644 --- a/package/qt5/qt5base/qt5base.mk +++ b/package/qt5/qt5base/qt5base.mk @@ -84,6 +84,9 @@ QT5BASE_DEPENDENCIES += gcnano-binaries else ifeq ($(BR2_PACKAGE_TI_SGX_LIBGBM),y) QT5BASE_CONFIGURE_OPTS += -gbm QT5BASE_DEPENDENCIES += ti-sgx-libgbm +else ifeq ($(BR2_PACKAGE_ROCKCHIP_MALI_BIFROST),y) +QT5BASE_CONFIGURE_OPTS += -gbm +QT5BASE_DEPENDENCIES += rockchip-mali-bifrost else QT5BASE_CONFIGURE_OPTS += -no-gbm endif From patchwork Fri Mar 6 07:14:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 1250081 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Yf5V6jbdz9sPK for ; Fri, 6 Mar 2020 18:15:10 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 0DEFB20515; Fri, 6 Mar 2020 07:15:08 +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 AHayUVC06LK8; Fri, 6 Mar 2020 07:15:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 2C21720529; Fri, 6 Mar 2020 07:14:57 +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 A5D571BF35A for ; Fri, 6 Mar 2020 07:14:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A2D3086E68 for ; Fri, 6 Mar 2020 07:14:53 +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 zt9jKVk5+U3l for ; Fri, 6 Mar 2020 07:14:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by whitealder.osuosl.org (Postfix) with ESMTPS id D790986938 for ; Fri, 6 Mar 2020 07:14:52 +0000 (UTC) X-Originating-IP: 90.89.41.158 Received: from localhost.localdomain (lfbn-tou-1-1473-158.w90-89.abo.wanadoo.fr [90.89.41.158]) (Authenticated sender: miquel.raynal@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 859BF60011; Fri, 6 Mar 2020 07:14:50 +0000 (UTC) From: Miquel Raynal To: buildroot@buildroot.org Date: Fri, 6 Mar 2020 08:14:39 +0100 Message-Id: <20200306071440.30433-7-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200306071440.30433-1-miquel.raynal@bootlin.com> References: <20200306071440.30433-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 6/7] package/qt5: generalize the condition on which EGLFS KMS gets supported X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Miquel Raynal , Maxime Chevallier , Paul Kocialkowski , Julien Corjon , Thomas Petazzoni , Luca Ceresoli , Peter Seiderer , Giulio Benetti , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" BR2_PACKAGE_HAS_LIBEGL indicates that the virtual libegl packet is enabled. This packet may be provided by mesa3d (this is actually what happens when selecting BR2_PACKAGE_MESA3D_OPENGL_EGL) but other providers may exist. Generalize the condition on which EGLFS KMS support is added to Qt5 to allow rockchip-mali-bifrost (and potentially other) to use the KMS back-end. Suggested-by: Thomas Petazzoni Signed-off-by: Miquel Raynal --- package/qt5/qt5base/qt5base.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk index 8803a4821e..ad01c7c843 100644 --- a/package/qt5/qt5base/qt5base.mk +++ b/package/qt5/qt5base/qt5base.mk @@ -295,7 +295,7 @@ QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_XML) += Qt5Xml QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_OPENGL_LIB) += Qt5OpenGL ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y) QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS) += Qt5EglFSDeviceIntegration -ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y) +ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y) QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS) += Qt5EglFsKmsSupport endif ifeq ($(BR2_PACKAGE_GCNANO_BINARIES),y) From patchwork Fri Mar 6 07:14:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 1250080 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) 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; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Yf5L5KZgz9sPK for ; Fri, 6 Mar 2020 18:15:02 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9F9B38735E; Fri, 6 Mar 2020 07:15:00 +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 rdMFsZxnkCOt; Fri, 6 Mar 2020 07:14:58 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 203508701E; Fri, 6 Mar 2020 07:14:58 +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 1ECD71BF35A for ; Fri, 6 Mar 2020 07:14:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1A63586E68 for ; Fri, 6 Mar 2020 07:14:55 +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 qZLlie4czFwO for ; Fri, 6 Mar 2020 07:14:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5906E86938 for ; Fri, 6 Mar 2020 07:14:54 +0000 (UTC) X-Originating-IP: 90.89.41.158 Received: from localhost.localdomain (lfbn-tou-1-1473-158.w90-89.abo.wanadoo.fr [90.89.41.158]) (Authenticated sender: miquel.raynal@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 9E15E60010; Fri, 6 Mar 2020 07:14:51 +0000 (UTC) From: Miquel Raynal To: buildroot@buildroot.org Date: Fri, 6 Mar 2020 08:14:40 +0100 Message-Id: <20200306071440.30433-8-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200306071440.30433-1-miquel.raynal@bootlin.com> References: <20200306071440.30433-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 7/7] package/qt5: allows using rockchip-mali-bifrost as OpenGL/KMS provider X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Miquel Raynal , Maxime Chevallier , Paul Kocialkowski , Julien Corjon , Thomas Petazzoni , Luca Ceresoli , Peter Seiderer , Giulio Benetti , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Maxime Chevallier In order to be able to use OpenGL with QT5 with a Rockchip Mali Bifrost GPU, a device integration provider has to be selected. We are interested in the KMS integration that works well with Mali Bifrost, make sure it gets build when using rockchip-mali-bifrost as OpenGL provider. Signed-off-by: Maxime Chevallier Signed-off-by: Miquel Raynal --- package/qt5/qt5base/qt5base.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk index ad01c7c843..2053988778 100644 --- a/package/qt5/qt5base/qt5base.mk +++ b/package/qt5/qt5base/qt5base.mk @@ -318,6 +318,9 @@ QT5BASE_EGLFS_DEVICE = EGLFS_DEVICE_INTEGRATION = eglfs_viv else ifeq ($(BR2_PACKAGE_SUNXI_MALI_UTGARD),y) # use mali backend QT5BASE_EGLFS_DEVICE = EGLFS_DEVICE_INTEGRATION = eglfs_mali +else ifeq ($(BR2_PACKAGE_ROCKCHIP_MALI_BIFROST),y) +# use kms backend +QT5BASE_EGLFS_DEVICE = EGLFS_DEVICE_INTEGRATION = eglfs_kms endif endif