Skip to contentSkip to conversation

ti-sgx-libgbm: new package

PATCH New Einar Jon Gunnarsson 3 participants 10 messages Jul 5, 2018 – Sep 15, 2018 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 ti-sgx-libgbm: new package

ti-sgx-libgbm is a required package for ti-sgx-um in SDK 4.00

---
 package/Config.in                        |  1 +
 package/ti-sgx-libgbm/Config.in          |  9 +++++++++
 package/ti-sgx-libgbm/ti-sgx-libgbm.hash |  3 +++
 package/ti-sgx-libgbm/ti-sgx-libgbm.mk   | 17 +++++++++++++++++
 4 files changed, 30 insertions(+)
 create mode 100644 package/ti-sgx-libgbm/Config.in
 create mode 100644 package/ti-sgx-libgbm/ti-sgx-libgbm.hash
 create mode 100644 package/ti-sgx-libgbm/ti-sgx-libgbm.mk
package/Config.in +1 -0
index 20fe5ad..c2046a1 100644
@@ -522,6 +522,7 @@ endmenu
 	source "package/ti-sgx-demos/Config.in"
 	source "package/ti-sgx-km/Config.in"
 	source "package/ti-sgx-um/Config.in"
+	source "package/ti-sgx-libgbm/Config.in"
 	source "package/ti-uim/Config.in"
 	source "package/ti-utils/Config.in"
 	source "package/triggerhappy/Config.in"
package/ti-sgx-libgbm/Config.in new file +9 -0
new file mode 100644
index 0000000..07536d9
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_TI_SGX_LIBGBM
+	bool "ti-sgx-libgbm"
+	depends on BR2_PACKAGE_TI_SGX_KM
+	select BR2_PACKAGE_WAYLAND
+	help
+	  This package provides libgbm.so.2 for the
+	  TI SGX implementation
+
+	  https://git.ti.com/glsdk/libgbm
package/ti-sgx-libgbm/ti-sgx-libgbm.hash new file +3 -0
new file mode 100644
index 0000000..ffcf134
@@ -0,0 +1,3 @@
+# locally computed:
+sha256 758872d87137a919274bdbb9b9c811e2f309ab0338e58a4c67df6db7b2a6c6f5 ti-sgx-libgbm-43cc786d0e5b8274fa93048c7f3bb8d6b62522db.tar.gz
+sha256 dd6e66175f7f4ffe27f5f4dcc35005e07e6ef3aae2ec6fafaf52a53adb450cc1 debian/copyright
package/ti-sgx-libgbm/ti-sgx-libgbm.mk new file +17 -0
new file mode 100644
index 0000000..29f6866
@@ -0,0 +1,17 @@
+################################################################################
+#
+# ti-sgx-libgbm
+#
+################################################################################
+
+# This is the current "next" branch, which corresponds to SDK 04.00.00.00
+TI_SGX_LIBGBM_VERSION = 43cc786d0e5b8274fa93048c7f3bb8d6b62522db
+TI_SGX_LIBGBM_SITE = git://git.ti.com/glsdk/libgbm.git
+TI_SGX_LIBGBM_INSTALL_STAGING = YES
+TI_SGX_LIBGBM_AUTORECONF = YES
+TI_SGX_LIBGBM_LICENSE = MIT
+TI_SGX_LIBGBM_LICENSE_FILES = debian/copyright
+
+TI_SGX_LIBGBM_DEPENDENCIES = wayland
+
+$(eval $(autotools-package))
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/3 ti-sgx-{km, um, demos}: bump from SDK 02.00 to SDK 04.00

Fixed build and added license file hashes.
Depends on new package ti-sgx-libgbm.

Jumps from branch am4/k4.1 to ti-img-sgx/1.14.3699939/k4.9

---
 Config.in.legacy                       | 18 ++++++++++++++++++
 package/ti-sgx-demos/ti-sgx-demos.hash |  3 ++-
 package/ti-sgx-demos/ti-sgx-demos.mk   | 20 ++++++++++++++++----
 package/ti-sgx-km/Config.in            | 23 ++++++++++-------------
 package/ti-sgx-km/ti-sgx-km.hash       |  3 ++-
 package/ti-sgx-km/ti-sgx-km.mk         | 22 ++++++++++------------
 package/ti-sgx-um/Config.in            |  3 ++-
 package/ti-sgx-um/S80ti-sgx            | 14 --------------
 package/ti-sgx-um/powervr.ini          |  4 ++--
 package/ti-sgx-um/ti-sgx-um.hash       |  3 ++-
 package/ti-sgx-um/ti-sgx-um.mk         | 32 +++++++++++++++++++++++++-------
 11 files changed, 89 insertions(+), 56 deletions(-)
 delete mode 100644 package/ti-sgx-um/S80ti-sgx
Config.in.legacy +18 -0
index 9743ebd..2349d5e 100644
@@ -296,6 +296,15 @@ config BR2_PACKAGE_TI_SGX_AM4430
 	  BR2_PACKAGE_TI_SGX_AM4430 has been renamed to
 	  BR2_PACKAGE_TI_SGX_KM_AM4430.
 
+# Note: BR2_PACKAGE_TI_SGX_KM_AM4430 is still referenced from
+# package/ti-sgx-km/Config.in
+config BR2_PACKAGE_TI_SGX_KM_AM4430
+	bool "ti-sgx-km AM4430 option removed"
+	select BR2_LEGACY
+	help
+	  The AM4430 option has been replaced by AM437X
+	  in the 4.9 kernel.
+
 # Note: BR2_PACKAGE_TI_SGX_AM5430 is still referenced from
 # package/ti-sgx-km/Config.in
 config BR2_PACKAGE_TI_SGX_AM5430
@@ -306,6 +315,15 @@ config BR2_PACKAGE_TI_SGX_AM5430
 	  BR2_PACKAGE_TI_SGX_AM5430 has been renamed to
 	  BR2_PACKAGE_TI_SGX_KM_AM5430.
 
+# Note: BR2_PACKAGE_TI_SGX_KM_AM5430 is still referenced from
+# package/ti-sgx-km/Config.in
+config BR2_PACKAGE_TI_SGX_KM_AM5430
+	bool "ti-sgx-km AM5430 option removed"
+	select BR2_LEGACY
+	help
+	  The AM5430 option has been replaced by AM57X
+	  in the 4.9 kernel.
+
 config BR2_PACKAGE_JANUS_AUDIO_BRIDGE
 	bool "janus-gateway audio-bridge option renamed"
 	select BR2_LEGACY
package/ti-sgx-demos/ti-sgx-demos.hash +2 -1
index 43acf91..2b8be48 100644
@@ -1,2 +1,3 @@
 # Locally computed:
-sha256 9d1d4da2c2b35303e239f99eb4003b8b206078a682aa083d5fb831ee4197f3bf ti-sgx-demos-f24650bc8243b25c23d6a0a502ed79fc472ac424.tar.gz
+sha256 32e6887fbed83bd937bf9761ee51adc5253c22161d7d6b720713cecaf0c212fc ti-sgx-demos-f09e59b2467cb0a5b88b6329fe35527cf65ed6e9.tar.gz
+sha256 052741ea66a4a48e0ef8cab259d2dc136e7cf52fda694af8d1fe9bd28abe333b LegalNotice.txt
package/ti-sgx-demos/ti-sgx-demos.mk +16 -4
index 80af79b..8e56b40 100644
@@ -4,15 +4,27 @@
 #
 ################################################################################
 
-# This correpsonds to SDK 02.00.00.00
-TI_SGX_DEMOS_VERSION = f24650bc8243b25c23d6a0a502ed79fc472ac424
+# This corresponds to SDK 04.00.00.00
+TI_SGX_DEMOS_VERSION = f09e59b2467cb0a5b88b6329fe35527cf65ed6e9
 TI_SGX_DEMOS_SITE = git://git.ti.com/graphics/img-pvr-sdk.git
 TI_SGX_DEMOS_LICENSE = Imagination Technologies License Agreement
 TI_SGX_DEMOS_LICENSE_FILES = LegalNotice.txt
 
+# Wayland demos seem to need at least X11
+TI_SGX_DEMOS_SUBDIR = NullWS
+
+# The full demo folder is +100MB, so limit to 5 like in SDK 02.00.00.00
+TI_SGX_DEMOS_BINARIES = OGLES2ChameleonMan \
+	OGLES2FilmTV \
+	OGLES2MagicLantern \
+	OGLES2ParticleSystem \
+	OGLES2BinaryShader
+
 define TI_SGX_DEMOS_INSTALL_TARGET_CMDS
-	cp -dpfr $(@D)/targetfs/Examples/Advanced/OGLES* \
-		$(TARGET_DIR)/usr/bin/
+	for i in $(TI_SGX_DEMOS_BINARIES) ; do \
+		cp -dpfr $(@D)/targetfs/Examples/Advanced/$(TI_SGX_DEMOS_SUBDIR)/$$i \
+			$(TARGET_DIR)/usr/bin/ ; \
+	done
 endef
 
 $(eval $(generic-package))
package/ti-sgx-km/Config.in +10 -13
index 348efde..2997faf 100644
@@ -8,7 +8,7 @@ config BR2_PACKAGE_TI_SGX_KM
 	select BR2_LINUX_NEEDS_MODULES
 	help
 	  Kernel modules for TI CPUs with SGX GPU.
-	  This package supports AM335x, AM437x, AM4430 and AM5430.
+	  This package supports AM33xx, AM43xx and AM57xx.
 	  It builds the kernel module and the user space binaries.
 	  For older CPUs or kernels use the ti-gfx package.
 
@@ -22,8 +22,10 @@ choice
 	prompt "Target"
 	default BR2_PACKAGE_TI_SGX_KM_AM335X if BR2_PACKAGE_TI_SGX_AM335X # legacy
 	default BR2_PACKAGE_TI_SGX_KM_AM437X if BR2_PACKAGE_TI_SGX_AM437X # legacy
-	default BR2_PACKAGE_TI_SGX_KM_AM4430 if BR2_PACKAGE_TI_SGX_AM4430 # legacy
-	default BR2_PACKAGE_TI_SGX_KM_AM5430 if BR2_PACKAGE_TI_SGX_AM5430 # legacy
+	default BR2_PACKAGE_TI_SGX_KM_AM437X if BR2_PACKAGE_TI_SGX_AM4430    # legacy
+	default BR2_PACKAGE_TI_SGX_KM_AM437X if BR2_PACKAGE_TI_SGX_KM_AM4430 # legacy
+	default BR2_PACKAGE_TI_SGX_KM_AM57X  if BR2_PACKAGE_TI_SGX_AM5430    # legacy
+	default BR2_PACKAGE_TI_SGX_KM_AM57X  if BR2_PACKAGE_TI_SGX_KM_AM5430 # legacy
 	default BR2_PACKAGE_TI_SGX_KM_AM335X
 	help
 	  Select the SOC for which you would like to install drivers.
@@ -31,22 +33,17 @@ choice
 config BR2_PACKAGE_TI_SGX_KM_AM335X
 	bool "AM335x"
 	help
-	  AM335x CPU
+	  All AM33xx derivatives
 
 config BR2_PACKAGE_TI_SGX_KM_AM437X
 	bool "AM437x"
 	help
-	  AM437x CPU
+	  All AM43xx derivatives
 
-config BR2_PACKAGE_TI_SGX_KM_AM4430
-	bool "AM4430"
+config BR2_PACKAGE_TI_SGX_KM_AM57X
+	bool "AM57x"
 	help
-	  AM4430 CPU
-
-config BR2_PACKAGE_TI_SGX_KM_AM5430
-	bool "AM5430"
-	help
-	  AM5430 CPU
+	  All DRA7xx / AM57xx derivatives
 
 endchoice
 
package/ti-sgx-km/ti-sgx-km.hash +2 -1
index 7f7e0ac..f02ddce 100644
@@ -1,2 +1,3 @@
 # Locally computed:
-sha256 47728ff8fc48827116cc042efa777a22a83dd4bd17c494e2a53b8c204ca59624 ti-sgx-km-2b7523d07a13ab704a24a7664749551f4a13ed32.tar.gz
+sha256 c9023eb01d611be71bada4903645b60dea4529b8276a7827db48fbd2bae27583 ti-sgx-km-0086977380d3320d70a3abc78b95fa0641427073.tar.gz
+sha256 e9d660547691b2a9232850fd43aac16d40fd063023166fd27162020c30dc2bd4 eurasia_km/GPL-COPYING
package/ti-sgx-km/ti-sgx-km.mk +10 -12
index 0e1bc33..ed827ef 100644
@@ -4,11 +4,11 @@
 #
 ################################################################################
 
-# This correpsonds to SDK 02.00.00.00
-TI_SGX_KM_VERSION = 2b7523d07a13ab704a24a7664749551f4a13ed32
+# This corresponds to SDK 04.00.00.00
+TI_SGX_KM_VERSION = 0086977380d3320d70a3abc78b95fa0641427073
 TI_SGX_KM_SITE = git://git.ti.com/graphics/omap5-sgx-ddk-linux.git
 TI_SGX_KM_LICENSE = GPL-2.0
-TI_SGX_KM_LICENSE_FILES = GPL-COPYING
+TI_SGX_KM_LICENSE_FILES = eurasia_km/GPL-COPYING
 
 TI_SGX_KM_DEPENDENCIES = linux
 
@@ -17,25 +17,23 @@ TI_SGX_KM_MAKE_OPTS = \
 	KERNELDIR=$(LINUX_DIR) \
 	PVR_NULLDRM=1
 
+TI_SGX_KM_PLATFORM_NAME = omap
+
 ifeq ($(BR2_PACKAGE_TI_SGX_KM_AM335X),y)
-TI_SGX_KM_PLATFORM_NAME = omap335x
-else ifeq ($(BR2_PACKAGE_TI_SGX_KM_AM437X),y)
-TI_SGX_KM_PLATFORM_NAME = omap437x
-else ifeq ($(BR2_PACKAGE_TI_SGX_KM_AM4430),y)
-TI_SGX_KM_PLATFORM_NAME = omap4430
-else ifeq ($(BR2_PACKAGE_TI_SGX_KM_5430),y)
-TI_SGX_KM_PLATFORM_NAME = omap5430
+TI_SGX_KM_MAKE_ENV += TARGET_PRODUCT=ti335x
+else ifeq ($(BR2_PACKAGE_TI_KM_SGX_AM437X),y)
+TI_SGX_KM_MAKE_ENV += TARGET_PRODUCT=ti437x
 endif
 
 TI_SGX_KM_SUBDIR = eurasia_km/eurasiacon/build/linux2/$(TI_SGX_KM_PLATFORM_NAME)_linux
 
 define TI_SGX_KM_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) $(TI_SGX_KM_MAKE_OPTS) \
+	$(TI_SGX_KM_MAKE_ENV) $(TARGET_MAKE_ENV) $(MAKE) $(TI_SGX_KM_MAKE_OPTS) \
 		-C $(@D)/$(TI_SGX_KM_SUBDIR)
 endef
 
 define TI_SGX_KM_INSTALL_TARGET_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) $(TI_SGX_KM_MAKE_OPTS) \
+	$(TI_SGX_KM_MAKE_ENV) $(TARGET_MAKE_ENV) $(MAKE) $(TI_SGX_KM_MAKE_OPTS) \
 		DISCIMAGE=$(TARGET_DIR) \
 		kbuild_install -C $(@D)/$(TI_SGX_KM_SUBDIR)
 endef
package/ti-sgx-um/Config.in +2 -1
index 8e1e4fb..e27e500 100644
@@ -15,9 +15,10 @@ config BR2_PACKAGE_TI_SGX_UM
 	select BR2_PACKAGE_HAS_LIBEGL
 	select BR2_PACKAGE_HAS_LIBGLES
 	select BR2_PACKAGE_HAS_POWERVR
+	select BR2_PACKAGE_TI_SGX_LIBGBM
 	help
 	  Graphics libraries for TI CPUs with SGX5xx GPU.
-	  This package supports AM335x, AM437x, AM4430 and AM5430.
+	  This package supports AM33xx, AM43xx and AM54xx.
 	  For older CPUs or kernels use the ti-gfx package.
 
 	  http://git.ti.com/graphics/omap5-sgx-ddk-um-linux
package/ti-sgx-um/S80ti-sgx deleted +0 -14
deleted file mode 100644
index 8cae52f..0000000
@@ -1,14 +0,0 @@
-#!/bin/sh
-case "$1" in
-  start)
-	printf "Initializing SGX graphics driver "
-	/usr/bin/pvrsrvinit
-	[ $? = 0 ] && echo "OK" || echo "FAIL"
-  ;;
-  stop)
-  ;;
-  *)
-    echo "Usage: $0 {start|stop}"
-    exit 1
-  ;;
-esac
package/ti-sgx-um/powervr.ini +2 -2
index fc92d45..229d143 100644
@@ -1,6 +1,6 @@
 [default]
-#defaul library without double buffering:
-WindowSystem=libpvrDRMWSEGL_FRONT.so
+#default library:
+#WindowSystem=libpvrws_WAYLAND.so
 #alternative library, slower but with double buffering
 #WindowSystem=libpvrDRMWSEGL.so
 DisableHWTQTextureUpload=1
package/ti-sgx-um/ti-sgx-um.hash +2 -1
index a6a0566..e7bae03 100644
@@ -1,2 +1,3 @@
 # Locally computed:
-sha256 c17f23d255cff8fe72fc3f5cae3d7550e387af07d036954b4f08e573379406d0 ti-sgx-um-e15f1543bab4de9e8927a2c4934addf3fd16ffcb.tar.gz
+sha256 c6d9cfc4806d44f8dd73abe52ca0a292d004e68886ba1657ca5ac39ec1ab0025 ti-sgx-um-358fe42d34a7570896e5d1639869da564ddd0484.tar.gz
+sha256 733aedfdd192ef955f775f820729ac8ee5d26f7cfefd4c6bcbae80e68b7062dc TI-Linux-Graphics-DDK-UM-Manifest.doc
package/ti-sgx-um/ti-sgx-um.mk +25 -7
index d5c50a0..c252ea1 100644
@@ -4,22 +4,33 @@
 #
 ################################################################################
 
-# This correpsonds to SDK 02.00.00.00
-TI_SGX_UM_VERSION = e15f1543bab4de9e8927a2c4934addf3fd16ffcb
+# This correpsonds to SDK 04.00.00.00
+TI_SGX_UM_VERSION = 358fe42d34a7570896e5d1639869da564ddd0484
 TI_SGX_UM_SITE = git://git.ti.com/graphics/omap5-sgx-ddk-um-linux.git
 TI_SGX_UM_LICENSE = TI TSPA License
-TI_SGX_UM_LICENSE_FILES = OMAP5-Linux-Graphics-DDK-UM-Manifest.doc
+TI_SGX_UM_LICENSE_FILES = TI-Linux-Graphics-DDK-UM-Manifest.doc
 TI_SGX_UM_INSTALL_STAGING = YES
 
 # ti-sgx-um is a egl/gles provider only if libdrm is installed
 TI_SGX_UM_DEPENDENCIES = libdrm
+# ti-sgx-libgbm must be built before QT to find EGL
+TI_SGX_UM_DEPENDENCIES += ti-sgx-libgbm
+
+# NOTE: TI_SGX_UM is intentionally using TI_SGX_KM variables
+ifeq ($(BR2_PACKAGE_TI_SGX_KM_AM335X),y)
+TI_SGX_UM_MAKE_ENV += TARGET_PRODUCT=ti335x
+else ifeq ($(BR2_PACKAGE_TI_SGX_KM_AM437X),y)
+TI_SGX_UM_MAKE_ENV += TARGET_PRODUCT=ti437x
+else # BR2_PACKAGE_TI_SGX_KM_AM57X
+TI_SGX_UM_MAKE_ENV += TARGET_PRODUCT=jacinto6evm
+endif
 
 define TI_SGX_UM_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DISCIMAGE=$(STAGING_DIR) install
+	$(TI_SGX_UM_MAKE_ENV) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DISCIMAGE=$(STAGING_DIR) install
 endef
 
 define TI_SGX_UM_INSTALL_TARGET_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DISCIMAGE=$(TARGET_DIR) install
+	$(TI_SGX_UM_MAKE_ENV) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DISCIMAGE=$(TARGET_DIR) install
 endef
 
 # libs use the following file for configuration
@@ -28,11 +39,18 @@ define TI_SGX_UM_INSTALL_CONF
 		$(TARGET_DIR)/etc/powervr.ini
 endef
 
-TI_SGX_UM_POST_INSTALL_TARGET_HOOKS += TI_SGX_UM_INSTALL_CONF
+# Many binaries depend on libGLESv2.so.1, but libGLESv2.so.2 is installed
+define TI_SGX_UM_INSTALL_FIX_MESA_STYLE_SYMLINK
+	cp -dpf $(TARGET_DIR)/usr/lib/libGLESv2.so.2 $(TARGET_DIR)/usr/lib/libGLESv2.so.1
+endef
+
+TI_SGX_UM_POST_INSTALL_TARGET_HOOKS += TI_SGX_UM_INSTALL_CONF TI_SGX_UM_INSTALL_FIX_MESA_STYLE_SYMLINK
 
+# sysV file has the wrong name. Copy it from staging and delete the installed one
 define TI_SGX_UM_INSTALL_INIT_SYSV
-	$(INSTALL) -D -m 0755 package/ti-sgx-um/S80ti-sgx \
+	$(INSTALL) -D -m 0755 $(STAGING_DIR)/etc/init.d/rc.pvr \
 		$(TARGET_DIR)/etc/init.d/S80ti-sgx
+	$(RM) $(TARGET_DIR)/etc/init.d/rc.pvr
 endef
 
 $(eval $(generic-package))
Signature · 1 line
2.7.4
#2 lore raw

PATCH 3/3 configs/beaglebone_qt5: bump kernel and uboot version

In reply to Einar Jon Gunnarsson

Bring beaglebone_qt5 to the same level as beaglebone.

---
 .../{linux-4.1-sgx.fragment => linux-4.9-sgx.fragment}      |  0
 configs/beaglebone_qt5_defconfig                            | 13 +++++--------
 2 files changed, 5 insertions(+), 8 deletions(-)
 rename board/beaglebone/{linux-4.1-sgx.fragment => linux-4.9-sgx.fragment} (100%)
board/beaglebone/linux-4.9-sgx.fragment renamed from board/beaglebone/linux-4.1-sgx.fragment +0 -0
similarity index 100%
rename from board/beaglebone/linux-4.1-sgx.fragment
rename to board/beaglebone/linux-4.9-sgx.fragment
configs/beaglebone_qt5_defconfig +5 -8
index fb61bf5..d66d112 100644
@@ -1,9 +1,8 @@
 BR2_arm=y
 BR2_cortex_a8=y
 BR2_GLOBAL_PATCH_DIR="board/beaglebone/patches"
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_1=y
 BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
-BR2_GCC_VERSION_5_X=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
 BR2_TOOLCHAIN_BUILDROOT_CXX=y
 BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyO0"
@@ -11,11 +10,11 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="board/beaglebone/post-image.sh"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_GIT=y
 BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.ti.com/processor-sdk/processor-sdk-linux.git"
-BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="52c4aa7cdb93d61f8008f380135beaf7b8fa6593"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="a75d8e93056181d512f6c818e8627bd4554aaf92"
 BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"
-BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/beaglebone/linux-4.1-sgx.fragment"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/beaglebone/linux-4.9-sgx.fragment"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
-BR2_LINUX_KERNEL_INTREE_DTS_NAME="am335x-evm am335x-bone am335x-boneblack am335x-evmsk"
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="am335x-evm am335x-bone am335x-boneblack am335x-bonegreen am335x-evmsk"
 BR2_PACKAGE_FBV=y
 BR2_PACKAGE_QT5=y
 BR2_PACKAGE_QT5BASE_EXAMPLES=y
@@ -30,13 +29,11 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="124M"
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_VERSION=y
-BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.09.01"
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.01"
 BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am335x_evm"
 BR2_TARGET_UBOOT_NEEDS_DTC=y
 # BR2_TARGET_UBOOT_FORMAT_BIN is not set
 BR2_TARGET_UBOOT_FORMAT_IMG=y
-BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
-BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="spl/u-boot-spl.bin"
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="MLO"
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
Signature · 1 line
2.7.4
#3 lore raw

PATCH 1/3 ti-sgx-libgbm: new package

In reply to Einar Jon Gunnarsson

Am Thu, 05 Jul 2018 08:57:53 +0200 schrieb Einar Jon Gunnarsson:

package/ti-sgx-libgbm/Config.in line 9

Quoted 12 lines
package/ti-sgx-libgbm/Config.in new file +9 -0
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_TI_SGX_LIBGBM
+	bool "ti-sgx-libgbm"
+	depends on BR2_PACKAGE_TI_SGX_KM
+	select BR2_PACKAGE_WAYLAND
+	help
+	  This package provides libgbm.so.2 for the
+	  TI SGX implementation
+
+	  https://git.ti.com/glsdk/libgbm

a similar patch was posted two years ago:
http://lists.busybox.net/pipermail/buildroot/2016-July/167443.html

Back then Thomas wrote:
"Is this libgbm a TI-specific implementation of the libgm available in
Mesa ? If that's the case, then it's going to be complicated to package, as we would have two implementations of the same API."

Working on the next bump of Kodi to v18 I needed to build mesa3d with libgbm only, no x11, no wayland. To do so I created a virtual package for libgbm which could be used by your package as well to solve the problem Thomas noted:

https://github.com/bkuhls/buildroot/commit/
af585ebdd2627980eda0581f99aa844c7292d4de

https://github.com/bkuhls/buildroot/
commit/92a0e96c32aac50a7e28eb0941463c21b119a727

The whole code is still WIP and closely bound to my Kodi repo but you should get the idea ;)

Regards, Bernd

author
#4 lore raw

PATCH 1/3 ti-sgx-libgbm: new package

Hello Bernd

Quoted 18 lines · Bernd Kuhls

Am Thu, 05 Jul 2018 08:57:53 +0200 schrieb Einar Jon Gunnarsson:

package/ti-sgx-libgbm/Config.in line 9

Quoted 12 lines
package/ti-sgx-libgbm/Config.in new file +9 -0
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_TI_SGX_LIBGBM
+     bool "ti-sgx-libgbm"
+     depends on BR2_PACKAGE_TI_SGX_KM
+     select BR2_PACKAGE_WAYLAND
+     help
+       This package provides libgbm.so.2 for the
+       TI SGX implementation
+
+       https://git.ti.com/glsdk/libgbm

a similar patch was posted two years ago:
http://lists.busybox.net/pipermail/buildroot/2016-July/167443.html

Quoted 4 lines

Back then Thomas wrote:
"Is this libgbm a TI-specific implementation of the libgm available in
Mesa ? If that's the case, then it's going to be complicated to package, as we would have two implementations of the same API."

This is indeed a TI-specific implementation of the libgm available in Mesa. Since it is only available for a subset of ARM CPUs, and Mesa not available on ARM, I don't see a big risk of conflicts.

Quoted 5 lines

Working on the next bump of Kodi to v18 I needed to build mesa3d with libgbm only, no x11, no wayland. To do so I created a virtual package for libgbm which could be used by your package as well to solve the problem Thomas noted:

Interesting. This implementation of libgbm links to Wayland, and will not run without it. X11 is not needed.

The virtual package makes sense.

Signature · 2 lines
Regards
Einar J?n
Quoted 12 lines

https://github.com/bkuhls/buildroot/commit/
af585ebdd2627980eda0581f99aa844c7292d4de

https://github.com/bkuhls/buildroot/
commit/92a0e96c32aac50a7e28eb0941463c21b119a727

The whole code is still WIP and closely bound to my Kodi repo but you should get the idea ;)

Regards, Bernd

#5 lore raw

PATCH 1/3 ti-sgx-libgbm: new package

In reply to Bernd Kuhls

Hello Bernd,

Quoted 9 lines · Bernd Kuhls

Back then Thomas wrote:
"Is this libgbm a TI-specific implementation of the libgm available in
Mesa ? If that's the case, then it's going to be complicated to package, as we would have two implementations of the same API."

Working on the next bump of Kodi to v18 I needed to build mesa3d with libgbm only, no x11, no wayland. To do so I created a virtual package for libgbm which could be used by your package as well to solve the problem Thomas noted:

Did you made some progress with this libgbm work? We can't merge ti-sgx-libgbm without this, otherwise we would have two packages installing the same conflicting library.

So perhaps it would be nice to have a simple patch series adding a libgbm virtual package, and adding mesa3d as a provider for it.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#7 lore raw

PATCH 1/3 ti-sgx-libgbm: new package

In reply to Einar Jon Gunnarsson

Hello Einar,

Quoted 3 lines · Einar Jon Gunnarsson

ti-sgx-libgbm is a required package for ti-sgx-um in SDK 4.00

I tested this package, and it didn't build because it depends on libdrm and udev, and those dependencies are not taken into account.

package/ti-sgx-libgbm/Config.in line 3

Quoted 9 lines
package/ti-sgx-libgbm/Config.in new file +3 -0
new file mode 100644
index 0000000..07536d9
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_TI_SGX_LIBGBM
+	bool "ti-sgx-libgbm"
+	depends on BR2_PACKAGE_TI_SGX_KM

Is there a reason for having this dependency ? It does not require having the kernel or the kernel modules built in order to build ti-sgx-libgbm.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#8 lore raw

PATCH 1/3 ti-sgx-libgbm: new package

Oh boy,

This was all before the birth of my first child, which seems like a lifetime ago.

A virtual package would be fine, but I have no other comments on the 2 newest mails.

Quoted 10 lines · Thomas Petazzoni

Hello Einar,

Quoted 3 lines · Einar Jon Gunnarsson

ti-sgx-libgbm is a required package for ti-sgx-um in SDK 4.00

I tested this package, and it didn't build because it depends on libdrm and udev, and those dependencies are not taken into account.

I didn't think of that. I only built it on the
beaglebone-qt_defconfig, and my own am335 config,
which both have udev and libdrm.

Quoted 5 lines
Quoted 5 lines
package/ti-sgx-libgbm/Config.in new file +0 -0
new file mode 100644
index 0000000..07536d9
Quoted 8 lines

package/ti-sgx-libgbm/Config.in line 3

Quoted 4 lines
package/ti-sgx-libgbm/Config.in new file +3 -0
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_TI_SGX_LIBGBM
+     bool "ti-sgx-libgbm"
+     depends on BR2_PACKAGE_TI_SGX_KM

Is there a reason for having this dependency ? It does not require having the kernel or the kernel modules built in order to build ti-sgx-libgbm.

This dependency is mostly there for consistency with the other BR2_PACKAGE_TI_SGX_*
packages.
ti-sgx-um and ti-sgx-demos are like this, which makes hiding them in menuconfig easier.
This one is the ti-sgx implementation of the mesa libgbm, and the shared libs in ti-sgx-um
depend on it. It probably won't be useful on anything that else than ARMs that use ti-sgx-um
(which also depends on ti-sgx-km).
So what are you trying to build them on?

Building the package is one thing, but what is the point of building it if you don't have anything
that can use it? I think you need the ti-sgx kernel module for anything meaningful.

Note that Mesa3D does not build on ARM, and this only builds on a subset of ARM, so it is literally
impossible to create a defconfig that contains both implementations of libgbm. Conflicts can't happen.

Signature · 2 lines
Regards
Einar J?n

A message that is not in the archive (sent off-list or not yet received): 20180914091851.6a922cda@windsurf

author
#10 lore raw

PATCH 1/3 ti-sgx-libgbm: new package

OK.

So I had time to look at this.
I think the whole thing needs to be reworked. Let's park it for now. I'll wait for the virtual package to be merged and then add a new fully tested patch against a more recent master.
If someone bumps beaglebone_defconfig to kernel 4.14.40 (current ti sdk 5.00), then I would bring beaglebone_qt_defconfig all the way up to that one.

Quoted 8 lines · Thomas Petazzoni
Quoted 5 lines
Quoted 4 lines

Is there a reason for having this dependency ? It does not require having the kernel or the kernel modules built in order to build ti-sgx-libgbm.

I wanted to quickly build test ti-sgx-libgbm, and not have to build a kernel + kernel modules, so I dropped the "depends on" on TI SGX kernel modules.

Quoted 7 lines
Quoted 4 lines

Building the package is one thing, but what is the point of building it if you don't have anything
that can use it? I think you need the ti-sgx kernel module for anything meaningful.

Build testing :-)

But you don't need to build ti-sgx-km (and therefore kernel) to build this package. This is just to hide it in menuconfig. I added these:

# make sure libdrm builds udev
ti-sgx-um: depends on BR2_PACKAGE_HAS_UDEV
# lazy way to add all the depends of ti-sgx-um
ti-sgx-libgbm: depends on BR2_PACKAGE_TI_SGX_UM
# make sure we have libdrm+udev for ti-sgx-libgbm
TI_SGX_LIBGBM_DEPENDENCIES += libdrm
Then 'make ti-sgx-libgbm' on an empty folder works fine, and doesn't build
kernel or ti-sgx-km/ti-sgx-um.

I just noticed that ti-sgx-demos depends on ti-sgx-um, not ti-sgx-km. This one is the same, I doubt that anyone can use it without ti-sgx-um. So it might make more sense to just make this depend on ti-sgx-um. But since ti-sgx-um selects it, it can't be selected alone (always "-*-" in menuconfig or hidden/disabled).
How do you guys like to handle that kind of dependency?

Quoted 4 lines

As explained above, Mesa3D is available on ARM. While it indeed doesn't have support for the PowerVR in TI platforms, you can still enable Mesa3D using the softpipe or llvmpipe drivers on ARM TI platforms, so it is possible to have a conflict.

You're right. I just always assumed Mesa was for Intel CPUs. Virtual package FTW.

--
Regards
Einar J?n