odroid-mali: new package
authorDagg Stompler <daggs@gmx.com>
Sun, 24 Jul 2016 16:35:06 +0000 (19:35 +0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 24 Jul 2016 20:32:48 +0000 (22:32 +0200)
Signed-off-by: Dagg Stompler <daggs@gmx.com>
[Thomas:
 - restrict to EABIhf for ARM, since the libraries are pre-built for
   this ABI
 - add comment about the glibc dependency
 - indicate odroid-scripts is a runtime dependency
 - remove fbset dependency]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/Config.in
package/odroid-mali/Config.in [new file with mode: 0644]
package/odroid-mali/odroid-mali.hash [new file with mode: 0644]
package/odroid-mali/odroid-mali.mk [new file with mode: 0644]

index be9b4cbb0641ead44d252bcd95f45e5e98689574..814141f18784d66014625a9d6b3abef769f6cb12 100644 (file)
@@ -414,6 +414,7 @@ endmenu
        source "package/nvidia-driver/Config.in"
        source "package/nvidia-tegra23/Config.in"
        source "package/nvme/Config.in"
+       source "package/odroid-mali/Config.in"
        source "package/odroid-scripts/Config.in"
        source "package/ofono/Config.in"
        source "package/ola/Config.in"
diff --git a/package/odroid-mali/Config.in b/package/odroid-mali/Config.in
new file mode 100644 (file)
index 0000000..2cd8e0d
--- /dev/null
@@ -0,0 +1,25 @@
+config BR2_PACKAGE_ODROID_MALI
+       bool "odroid-mali"
+       select BR2_PACKAGE_HAS_LIBEGL
+       select BR2_PACKAGE_HAS_LIBGLES
+       select BR2_PACKAGE_ODROID_SCRIPTS # runtime
+       depends on BR2_TOOLCHAIN_USES_GLIBC
+       depends on BR2_aarch64 || BR2_ARM_EABIHF
+       help
+         Install the ARM Mali drivers for odroidc2 based systems.
+
+         https://github.com/mdrjr/c2_mali
+
+if BR2_PACKAGE_ODROID_MALI
+
+config BR2_PACKAGE_PROVIDES_LIBEGL
+       default "odroid-mali"
+
+config BR2_PACKAGE_PROVIDES_LIBGLES
+       default "odroid-mali"
+
+endif
+
+comment "odroid-mali needs a glibc toolchain"
+       depends on BR2_aarch64 || BR2_ARM_EABIHF
+       depends on !BR2_TOOLCHAIN_USES_GLIBC
diff --git a/package/odroid-mali/odroid-mali.hash b/package/odroid-mali/odroid-mali.hash
new file mode 100644 (file)
index 0000000..4d24824
--- /dev/null
@@ -0,0 +1,2 @@
+# Locally computed hash
+sha256 29d98ed4b8694b860d9289787c416faa847b0de26d36580a53add1752b4c2e9a  odroid-mali-46fe49f37e3506c6205ad8c50980eca9bfff11e3.tar.gz
diff --git a/package/odroid-mali/odroid-mali.mk b/package/odroid-mali/odroid-mali.mk
new file mode 100644 (file)
index 0000000..7b8e511
--- /dev/null
@@ -0,0 +1,36 @@
+################################################################################
+#
+# odroid-mali
+#
+################################################################################
+
+ODROID_MALI_VERSION = 46fe49f37e3506c6205ad8c50980eca9bfff11e3
+ODROID_MALI_SITE = $(call github,mdrjr,c2_mali,$(ODROID_MALI_VERSION))
+ODROID_MALI_LICENSE = Hardkernel EULA
+ODROID_MALI_LICENSE_FILES = README.md
+
+ODROID_MALI_INSTALL_STAGING = YES
+ODROID_MALI_PROVIDES = libegl libgles
+
+ifeq ($(BR2_aarch64),y)
+ODROID_MALI_INSTALL_ARCH = mali_libs
+else
+ODROID_MALI_INSTALL_ARCH = 32bit_libs
+endif
+
+define ODROID_MALI_INSTALL_LIBS
+       cp -dpfr $(@D)/fbdev/$(ODROID_MALI_INSTALL_ARCH)/lib* $(1)/usr/lib/
+endef
+
+define ODROID_MALI_INSTALL_STAGING_CMDS
+       $(call ODROID_MALI_INSTALL_LIBS,$(STAGING_DIR))
+       mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
+       cp -dpfr $(@D)/pkgconfig/*.pc $(STAGING_DIR)/usr/lib/pkgconfig/
+       cp -dpfr $(@D)/fbdev/mali_headers/* $(STAGING_DIR)/usr/include
+endef
+
+define ODROID_MALI_INSTALL_TARGET_CMDS
+       $(call ODROID_MALI_INSTALL_LIBS,$(TARGET_DIR))
+endef
+
+$(eval $(generic-package))