update buildroot to 2017.02.11
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
From 2e3dd0040e676530f7e735fab335ff449b9b3f4d Mon Sep 17 00:00:00 2001
|
||||
From: Lauren Post <lauren.post@freescale.com>
|
||||
Date: Tue, 22 Mar 2016 22:08:25 +0100
|
||||
Subject: [PATCH] Add ARM support into xf86drm.h
|
||||
|
||||
This provides support for Xorg interface. Without this the vivante
|
||||
samples will hang during close requiring a reboot
|
||||
|
||||
[Adapted from yocto project]
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Lauren Post <lauren.post@freescale.com>
|
||||
Signed-off-by: Evan Kotara <evan.kotara@freescale.com>
|
||||
[Thomas: change CAS code to only be used on ARMv6/ARMv7, and not
|
||||
ARMv4/ARMv5, which don't support ldrex/strex. If no CAS implementation
|
||||
is provided libdrm falls back to a system call for locking/unlocking.]
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
xf86drm.h | 22 ++++++++++++++++++++++
|
||||
1 file changed, 22 insertions(+)
|
||||
|
||||
diff --git a/xf86drm.h b/xf86drm.h
|
||||
index 481d882..72341f6 100644
|
||||
--- a/xf86drm.h
|
||||
+++ b/xf86drm.h
|
||||
@@ -469,6 +469,28 @@ do { register unsigned int __old __asm("o0"); \
|
||||
: "cr0", "memory"); \
|
||||
} while (0)
|
||||
|
||||
+# elif defined (__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \
|
||||
+ || defined (__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) \
|
||||
+ || defined (__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) \
|
||||
+ || defined (__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \
|
||||
+ || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \
|
||||
+ || defined(__ARM_ARCH_7EM__)
|
||||
+ #undef DRM_DEV_MODE
|
||||
+ #define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
|
||||
+
|
||||
+ #define DRM_CAS(lock,old,new,__ret) \
|
||||
+ do { \
|
||||
+ __asm__ __volatile__ ( \
|
||||
+ "1: ldrex %0, [%1]\n" \
|
||||
+ " teq %0, %2\n" \
|
||||
+ " ite eq\n" \
|
||||
+ " strexeq %0, %3, [%1]\n" \
|
||||
+ " movne %0, #1\n" \
|
||||
+ : "=&r" (__ret) \
|
||||
+ : "r" (lock), "r" (old), "r" (new) \
|
||||
+ : "cc","memory"); \
|
||||
+ } while (0)
|
||||
+
|
||||
#endif /* architecture */
|
||||
#endif /* __GNUC__ >= 2 */
|
||||
|
||||
--
|
||||
2.6.4
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 7384f79f69fdb7b691cc5b0c28c301b3fe8b633e Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Thu, 26 May 2016 10:46:57 +0200
|
||||
Subject: [PATCH] xf86atomic: require CAS support in libatomic_ops
|
||||
|
||||
Since AO_compare_and_swap_full() is used by libdrm, AO_REQUIRE_CAS
|
||||
must be defined before including <atomic_ops.h> so that we are sure
|
||||
that CAS support will be provided. This is necessary to make sure that
|
||||
the AO_compare_and_swap_full() function will be provided on all
|
||||
architectures, including the ones that don't have built-in CAS support
|
||||
such as SPARCv8.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
xf86atomic.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/xf86atomic.h b/xf86atomic.h
|
||||
index 922b37d..d7017a5 100644
|
||||
--- a/xf86atomic.h
|
||||
+++ b/xf86atomic.h
|
||||
@@ -58,6 +58,7 @@ typedef struct {
|
||||
#endif
|
||||
|
||||
#if HAVE_LIB_ATOMIC_OPS
|
||||
+#define AO_REQUIRE_CAS
|
||||
#include <atomic_ops.h>
|
||||
|
||||
#define HAS_ATOMIC_OPS 1
|
||||
--
|
||||
2.7.4
|
||||
|
||||
109
bsp/buildroot-2017.02.11/package/libdrm/Config.in
Normal file
109
bsp/buildroot-2017.02.11/package/libdrm/Config.in
Normal file
@@ -0,0 +1,109 @@
|
||||
menuconfig BR2_PACKAGE_LIBDRM
|
||||
bool "libdrm"
|
||||
select BR2_PACKAGE_LIBPTHREAD_STUBS
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # libpthread-stubs
|
||||
help
|
||||
Direct Rendering Manager
|
||||
|
||||
http://dri.freedesktop.org/libdrm/
|
||||
|
||||
if BR2_PACKAGE_LIBDRM
|
||||
|
||||
config BR2_PACKAGE_LIBDRM_HAS_ATOMIC
|
||||
bool
|
||||
default y if BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS || \
|
||||
BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
|
||||
config BR2_PACKAGE_LIBDRM_ENABLE_ATOMIC
|
||||
bool
|
||||
select BR2_PACKAGE_LIBATOMIC_OPS if !BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
|
||||
config BR2_PACKAGE_LIBDRM_INTEL
|
||||
bool "intel"
|
||||
select BR2_PACKAGE_LIBPCIACCESS
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
depends on BR2_PACKAGE_LIBDRM_HAS_ATOMIC
|
||||
select BR2_PACKAGE_LIBDRM_ENABLE_ATOMIC
|
||||
help
|
||||
Install intel graphics driver.
|
||||
|
||||
config BR2_PACKAGE_LIBDRM_RADEON
|
||||
bool "radeon"
|
||||
depends on BR2_PACKAGE_LIBDRM_HAS_ATOMIC
|
||||
select BR2_PACKAGE_LIBDRM_ENABLE_ATOMIC
|
||||
help
|
||||
Install AMD/ATI graphics driver.
|
||||
|
||||
config BR2_PACKAGE_LIBDRM_AMDGPU
|
||||
bool "amdgpu"
|
||||
depends on BR2_PACKAGE_LIBDRM_HAS_ATOMIC
|
||||
select BR2_PACKAGE_LIBDRM_ENABLE_ATOMIC
|
||||
help
|
||||
Install AMD GPU driver.
|
||||
|
||||
config BR2_PACKAGE_LIBDRM_NOUVEAU
|
||||
bool "nouveau"
|
||||
depends on BR2_PACKAGE_LIBDRM_HAS_ATOMIC
|
||||
select BR2_PACKAGE_LIBDRM_ENABLE_ATOMIC
|
||||
help
|
||||
Install NVIDIA graphics driver.
|
||||
|
||||
config BR2_PACKAGE_LIBDRM_VMWGFX
|
||||
bool "vmwgfx"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
help
|
||||
Installs Vmware graphics driver.
|
||||
|
||||
config BR2_PACKAGE_LIBDRM_OMAP
|
||||
bool "omap (experimental)"
|
||||
depends on BR2_arm
|
||||
depends on BR2_PACKAGE_LIBDRM_HAS_ATOMIC
|
||||
select BR2_PACKAGE_LIBDRM_ENABLE_ATOMIC
|
||||
help
|
||||
Install the TI OMAP driver using an experimental API.
|
||||
|
||||
config BR2_PACKAGE_LIBDRM_ETNAVIV
|
||||
bool "etnaviv (experimental)"
|
||||
depends on BR2_arm
|
||||
depends on BR2_PACKAGE_LIBDRM_HAS_ATOMIC
|
||||
select BR2_PACKAGE_LIBDRM_ENABLE_ATOMIC
|
||||
help
|
||||
Install the Etnaviv/Vivante driver using an experimental API.
|
||||
|
||||
config BR2_PACKAGE_LIBDRM_EXYNOS
|
||||
bool "exynos (experimental)"
|
||||
depends on BR2_arm
|
||||
help
|
||||
Install Samsung Exynos driver using an experimental API.
|
||||
|
||||
config BR2_PACKAGE_LIBDRM_FREEDRENO
|
||||
bool "freedreno"
|
||||
depends on BR2_arm || BR2_aarch64 || BR2_aarch64_be
|
||||
depends on BR2_PACKAGE_LIBDRM_HAS_ATOMIC
|
||||
select BR2_PACKAGE_LIBDRM_ENABLE_ATOMIC
|
||||
help
|
||||
Install Qualcomm Snapdragon driver.
|
||||
|
||||
config BR2_PACKAGE_LIBDRM_TEGRA
|
||||
bool "tegra (experimental)"
|
||||
depends on BR2_arm
|
||||
depends on BR2_PACKAGE_LIBDRM_HAS_ATOMIC
|
||||
select BR2_PACKAGE_LIBDRM_ENABLE_ATOMIC
|
||||
help
|
||||
Install NVIDIA Tegra driver using an experimental API.
|
||||
|
||||
config BR2_PACKAGE_LIBDRM_VC4
|
||||
bool "vc4"
|
||||
depends on BR2_arm
|
||||
help
|
||||
Install vc4 (Raspberry Pi) driver.
|
||||
|
||||
config BR2_PACKAGE_LIBDRM_INSTALL_TESTS
|
||||
bool "Install test programs"
|
||||
help
|
||||
This option allows to install the libdrm test programs.
|
||||
|
||||
endif
|
||||
|
||||
comment "libdrm needs a toolchain w/ threads"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
2
bsp/buildroot-2017.02.11/package/libdrm/libdrm.hash
Normal file
2
bsp/buildroot-2017.02.11/package/libdrm/libdrm.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# From https://lists.freedesktop.org/archives/dri-devel/2017-January/131209.html
|
||||
sha256 2d5a500eef412cc287d12268eed79d571e262d4957a2ec9258073f305985054f libdrm-2.4.75.tar.bz2
|
||||
116
bsp/buildroot-2017.02.11/package/libdrm/libdrm.mk
Normal file
116
bsp/buildroot-2017.02.11/package/libdrm/libdrm.mk
Normal file
@@ -0,0 +1,116 @@
|
||||
################################################################################
|
||||
#
|
||||
# libdrm
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBDRM_VERSION = 2.4.75
|
||||
LIBDRM_SOURCE = libdrm-$(LIBDRM_VERSION).tar.bz2
|
||||
LIBDRM_SITE = http://dri.freedesktop.org/libdrm
|
||||
LIBDRM_LICENSE = MIT
|
||||
|
||||
LIBDRM_INSTALL_STAGING = YES
|
||||
|
||||
LIBDRM_DEPENDENCIES = \
|
||||
libpthread-stubs \
|
||||
host-pkgconf
|
||||
|
||||
LIBDRM_CONF_OPTS = \
|
||||
--disable-cairo-tests \
|
||||
--disable-manpages
|
||||
|
||||
LIBDRM_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBATOMIC_OPS),y)
|
||||
LIBDRM_DEPENDENCIES += libatomic_ops
|
||||
ifeq ($(BR2_sparc_v8)$(BR2_sparc_leon3),y)
|
||||
LIBDRM_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -DAO_NO_SPARC_V9"
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBDRM_INTEL),y)
|
||||
LIBDRM_CONF_OPTS += --enable-intel
|
||||
LIBDRM_DEPENDENCIES += libpciaccess
|
||||
else
|
||||
LIBDRM_CONF_OPTS += --disable-intel
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBDRM_RADEON),y)
|
||||
LIBDRM_CONF_OPTS += --enable-radeon
|
||||
else
|
||||
LIBDRM_CONF_OPTS += --disable-radeon
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBDRM_AMDGPU),y)
|
||||
LIBDRM_CONF_OPTS += --enable-amdgpu
|
||||
else
|
||||
LIBDRM_CONF_OPTS += --disable-amdgpu
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBDRM_NOUVEAU),y)
|
||||
LIBDRM_CONF_OPTS += --enable-nouveau
|
||||
else
|
||||
LIBDRM_CONF_OPTS += --disable-nouveau
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBDRM_VMWGFX),y)
|
||||
LIBDRM_CONF_OPTS += --enable-vmwgfx
|
||||
else
|
||||
LIBDRM_CONF_OPTS += --disable-vmwgfx
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBDRM_OMAP),y)
|
||||
LIBDRM_CONF_OPTS += --enable-omap-experimental-api
|
||||
else
|
||||
LIBDRM_CONF_OPTS += --disable-omap-experimental-api
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBDRM_ETNAVIV),y)
|
||||
LIBDRM_CONF_OPTS += --enable-etnaviv-experimental-api
|
||||
else
|
||||
LIBDRM_CONF_OPTS += --disable-etnaviv-experimental-api
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBDRM_EXYNOS),y)
|
||||
LIBDRM_CONF_OPTS += --enable-exynos-experimental-api
|
||||
else
|
||||
LIBDRM_CONF_OPTS += --disable-exynos-experimental-api
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBDRM_FREEDRENO),y)
|
||||
LIBDRM_CONF_OPTS += --enable-freedreno
|
||||
else
|
||||
LIBDRM_CONF_OPTS += --disable-freedreno
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBDRM_TEGRA),y)
|
||||
LIBDRM_CONF_OPTS += --enable-tegra-experimental-api
|
||||
else
|
||||
LIBDRM_CONF_OPTS += --disable-tegra-experimental-api
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBDRM_VC4),y)
|
||||
LIBDRM_CONF_OPTS += --enable-vc4
|
||||
else
|
||||
LIBDRM_CONF_OPTS += --disable-vc4
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
|
||||
LIBDRM_CONF_OPTS += --enable-udev
|
||||
LIBDRM_DEPENDENCIES += udev
|
||||
else
|
||||
LIBDRM_CONF_OPTS += --disable-udev
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_VALGRIND),y)
|
||||
LIBDRM_CONF_OPTS += --enable-valgrind
|
||||
LIBDRM_DEPENDENCIES += valgrind
|
||||
else
|
||||
LIBDRM_CONF_OPTS += --disable-valgrind
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBDRM_INSTALL_TESTS),y)
|
||||
LIBDRM_CONF_OPTS += --enable-install-test-programs
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user