Skip to contentSkip to conversation

kmsxx: new package

PATCH New Maxime Ripard 3 participants 5 messages Apr 19, 2016 – Apr 25, 2016 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kmsxx: new package

KMS++ is a suite of library and test tools to interact with KMS drivers in the linux kernel.

---
 package/Config.in       |  1 +
 package/kmsxx/Config.in | 24 ++++++++++++++++++++++++
 package/kmsxx/kmsxx.mk  | 42 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 67 insertions(+)
 create mode 100644 package/kmsxx/Config.in
 create mode 100644 package/kmsxx/kmsxx.mk
package/Config.in +1 -0
index 529ad3364994..4bb60ead530b 100644
@@ -867,6 +867,7 @@ menu "Graphics"
 	source "package/imlib2/Config.in"
 	source "package/jasper/Config.in"
 	source "package/jpeg/Config.in"
+	source "package/kmsxx/Config.in"
 	source "package/lcms2/Config.in"
 	source "package/lesstif/Config.in"
 	source "package/libart/Config.in"
package/kmsxx/Config.in new file +24 -0
new file mode 100644
index 000000000000..4b70c276d4e3
@@ -0,0 +1,24 @@
+config BR2_PACKAGE_KMSXX
+	bool "kmsxx"
+	select BR2_PACKAGE_LIBDRM
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libpthread-stubs
+	help
+	  libkms++ is a C++11 library for kernel mode setting.
+
+	  Also included are simple test tools for KMS and python wrapper for
+	  libkms++.
+
+	  https://github.com/tomba/kmsxx
+
+if BR2_PACKAGE_KMSXX
+
+config BR2_PACKAGE_KMSXX_INSTALL_TESTS
+	bool "Install test programs"
+	help
+	  This option allows to install the kmsxx test programs.
+
+endif
+
+comment "kmsxx needs a toolchain w/ threads"
+        depends on !BR2_TOOLCHAIN_HAS_THREADS
+
package/kmsxx/kmsxx.mk new file +42 -0

42 lines not on this page · raw message

Signature · 1 line
2.8.1
#1 lore raw

PATCH 1/1 kmsxx: new package

Hi Maxime, all,

Quoted 30 lines · Maxime Ripard

KMS++ is a suite of library and test tools to interact with KMS drivers in the linux kernel.

---
 package/Config.in       |  1 +
 package/kmsxx/Config.in | 24 ++++++++++++++++++++++++
 package/kmsxx/kmsxx.mk  | 42 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 67 insertions(+)
 create mode 100644 package/kmsxx/Config.in
 create mode 100644 package/kmsxx/kmsxx.mk
package/Config.in +1 -0
index 529ad3364994..4bb60ead530b 100644
@@ -867,6 +867,7 @@ menu "Graphics"
        source "package/imlib2/Config.in"
        source "package/jasper/Config.in"
        source "package/jpeg/Config.in"
+       source "package/kmsxx/Config.in"
        source "package/lcms2/Config.in"
        source "package/lesstif/Config.in"
        source "package/libart/Config.in"
package/kmsxx/Config.in new file +0 -0
new file mode 100644
index 000000000000..4b70c276d4e3

package/kmsxx/Config.in line 6

Quoted 6 lines
package/kmsxx/Config.in new file +6 -0
@@ -0,0 +1,24 @@
+config BR2_PACKAGE_KMSXX
+       bool "kmsxx"
+       select BR2_PACKAGE_LIBDRM
+       depends on BR2_TOOLCHAIN_HAS_THREADS # libpthread-stubs
+       help
+         libkms++ is a C++11 library for kernel mode setting.

Does this mean there is some restriction on the toolchain properties? (maybe a minimal compiler version?)
If so, a "depends on BR2_TOOLCHAIN_GCC_AT_LEAST_..." would be needed.

Quoted 52 lines
package/kmsxx/Config.in new file +18 -0
+
+         Also included are simple test tools for KMS and python wrapper for
+         libkms++.
+
+         https://github.com/tomba/kmsxx
+
+if BR2_PACKAGE_KMSXX
+
+config BR2_PACKAGE_KMSXX_INSTALL_TESTS
+       bool "Install test programs"
+       help
+         This option allows to install the kmsxx test programs.
+
+endif
+
+comment "kmsxx needs a toolchain w/ threads"
+        depends on !BR2_TOOLCHAIN_HAS_THREADS
+
package/kmsxx/kmsxx.mk new file +28 -0
new file mode 100644
index 000000000000..b3a2e178bc22
@@ -0,0 +1,42 @@
+################################################################################
+#
+# kmsxx
+#
+################################################################################
+
+KMSXX_VERSION = bef0109aa93971dd6cc6040661dc6494533e6bee
+KMSXX_SITE = $(call github,tomba,kmsxx,$(KMSXX_VERSION))
+KMSXX_LICENSE = MPLv2.0
+KMSXX_LICENSE_FILES = LICENSE
+
+KMSXX_DEPENDENCIES += libdrm
+
+KMSXX_CONF_OPTS += -DLIBKMS_ENABLE_PYTHON=OFF
+
+ifeq ($(BR2_PACKAGE_KMSXX_INSTALL_TESTS),y)
+define KMSXX_INSTALL_TARGET_TESTS
+       $(INSTALL) -D -m 0755 $(@D)/libkmstest/libkmstest.so \
+               $(TARGET_DIR)/usr/lib/libkmstest.so
+       $(INSTALL) -D -m 0755 $(@D)/tests/db \
+               $(TARGET_DIR)/usr/bin/db
+       $(INSTALL) -D -m 0755 $(@D)/tests/fbtestpat \
+               $(TARGET_DIR)/usr/bin/fbtestpat
+       $(INSTALL) -D -m 0755 $(@D)/tests/kmscapture \
+               $(TARGET_DIR)/usr/bin/kmscapture
+       $(INSTALL) -D -m 0755 $(@D)/tests/kmsprint \
+               $(TARGET_DIR)/usr/bin/kmsprint
+       $(INSTALL) -D -m 0755 $(@D)/tests/kmsview \

package/kmsxx/kmsxx.mk line 38

Quoted 10 lines
package/kmsxx/kmsxx.mk new file +10 -0
+               $(TARGET_DIR)/usr/bin/kmsview
+       $(INSTALL) -D -m 0755 $(@D)/tests/testpat \
+               $(TARGET_DIR)/usr/bin/testpat
+endef
+endif
+
+define KMSXX_INSTALL_TARGET_CMDS
+       $(INSTALL) -D -m 0755 $(@D)/libkms++/libkms++.so \
+               $(TARGET_DIR)/usr/lib/libkms++.so
+

I don't think this blank line is necessary.

Quoted 11 lines
package/kmsxx/kmsxx.mk new file +4 -1
+       $(KMSXX_INSTALL_TARGET_TESTS)
+endef
+
+$(eval $(cmake-package))
--

2.8.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Regards,

Signature · 1 line
Samuel
#2 lore raw

PATCH 1/1 kmsxx: new package

Hello,

Quoted 9 lines · Samuel Martin

package/kmsxx/Config.in line 6

Quoted 6 lines
package/kmsxx/Config.in new file +6 -0
+config BR2_PACKAGE_KMSXX
+       bool "kmsxx"
+       select BR2_PACKAGE_LIBDRM
+       depends on BR2_TOOLCHAIN_HAS_THREADS # libpthread-stubs
+       help
+         libkms++ is a C++11 library for kernel mode setting.

Does this mean there is some restriction on the toolchain properties? (maybe a minimal compiler version?)
If so, a "depends on BR2_TOOLCHAIN_GCC_AT_LEAST_..." would be needed.

Well, for sure if it's written in C++, a dependency on BR2_INSTALL_LIBSTDCPP is needed.

And since it's C++11, a dependency on gcc 4.7 or 4.8 is most likely needed.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/1 kmsxx: new package

Hi Samuel, Thomas,

Quoted 14 lines · Thomas Petazzoni

Hello,

Quoted 9 lines · Samuel Martin

package/kmsxx/Config.in line 6

Quoted 6 lines
package/kmsxx/Config.in new file +6 -0
+config BR2_PACKAGE_KMSXX
+       bool "kmsxx"
+       select BR2_PACKAGE_LIBDRM
+       depends on BR2_TOOLCHAIN_HAS_THREADS # libpthread-stubs
+       help
+         libkms++ is a C++11 library for kernel mode setting.

Does this mean there is some restriction on the toolchain properties? (maybe a minimal compiler version?)
If so, a "depends on BR2_TOOLCHAIN_GCC_AT_LEAST_..." would be needed.

Quoted 5 lines

Well, for sure if it's written in C++, a dependency on BR2_INSTALL_LIBSTDCPP is needed.

And since it's C++11, a dependency on gcc 4.7 or 4.8 is most likely needed.

Good point, it seems like it was entirely supported in 4.8, let's add that as a dependency.

Thanks!
Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160425/a13c7e24/attachment.asc>

A message that is not in the archive (sent off-list or not yet received): 121769471.QD3BYebGGi@avalon

#5 lore raw

PATCH 1/1 kmsxx: new package

Hi Laurent,

Quoted 10 lines · Laurent Pinchart
Quoted 10 lines

+###########################################################################
##### +#

package/kmsxx/kmsxx.mk new file +3 -0
+# kmsxx
+#
+###########################################################################

##### +

package/kmsxx/kmsxx.mk new file +4 -0
+KMSXX_VERSION = bef0109aa93971dd6cc6040661dc6494533e6bee
+KMSXX_SITE = $(call github,tomba,kmsxx,$(KMSXX_VERSION))
+KMSXX_LICENSE = MPLv2.0
+KMSXX_LICENSE_FILES = LICENSE
Quoted 8 lines

package/kmsxx/kmsxx.mk line 14

Quoted 4 lines
package/kmsxx/kmsxx.mk new file +4 -0
+
+KMSXX_DEPENDENCIES += libdrm
+
+KMSXX_CONF_OPTS += -DLIBKMS_ENABLE_PYTHON=OFF

The python bindings are very useful to write unit tests. Would it be possible to add an option to enable them ? I use them successfully on a buildroot rootfs with python support enabled.

I didn't have anything to test them with, so that's why I disabled them at first, but I can enable it if you want. You'll have to test though ;)

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160425/cb44a101/attachment.asc>