Skip to contentSkip to conversation

libcec: add the libcec for HDMI device Control

PATCH Superseded Spenser Gilliland 5 participants 19 messages May 3, 2013 – Jul 29, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libcec: add the libcec for HDMI device Control

This package adds libcec for HDMI device control. It enables Raspberry Pi support if the rpi-userland package is installed.

---
 package/Config.in        |    1 +
 package/libcec/Config.in |    8 ++++++++
 package/libcec/libcec.mk |   21 +++++++++++++++++++++
 3 files changed, 30 insertions(+)
 create mode 100644 package/libcec/Config.in
 create mode 100644 package/libcec/libcec.mk
package/Config.in +1 -0
index 06bcdef..06b9226 100644
@@ -456,6 +456,7 @@ source "package/imx-lib/Config.in"
 source "package/lcdapi/Config.in"
 source "package/libaio/Config.in"
 source "package/libatasmart/Config.in"
+source "package/libcec/Config.in"
 source "package/libraw1394/Config.in"
 source "package/tslib/Config.in"
 source "package/libfreefare/Config.in"
package/libcec/Config.in new file +8 -0
new file mode 100644
index 0000000..2104a2b
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBCEC
+	bool "libCEC"
+	help
+	  libCEC allows you in combination with the right hardware to control your
+	  home theater devices with your TV remote control utilizing existing HDMI
+	  cabling.
+
+	  http://libcec.pulse-eight.com
package/libcec/libcec.mk new file +21 -0
new file mode 100644
index 0000000..803e105
@@ -0,0 +1,21 @@
+#############################################################
+#
+# libcec
+#
+#############################################################
+
+LIBCEC_VERSION = libcec-2.1.1
+LIBCEC_SITE = git://github.com/Pulse-Eight/libcec.git
+LIBCEC_SITE_METHOD = git
+LIBCEC_LICENSE = GPLv2+
+LIBCEC_LICENSE_FILE = COPYING
+
+LIBCEC_AUTORECONF = YES
+LIBCEC_INSTALL_STAGING = YES
+
+ifeq ($(BR2_PACKAGE_RPI_FIRMWARE),y)
+LIBCEC_CONF_OPT = --enable-rpi \
+   --with-rpi-include-path=$(STAGING_DIR)/usr/include
+endif
+
+$(eval $(autotools-package))
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 libcec: add the libcec for HDMI device Control

Dear Spenser Gilliland,

Quoted 1 line · Spenser Gilliland

This package adds libcec for HDMI device control. It enables Raspberry Pi support if the rpi-userland package is installed.

Commit messages should be wrapped at 80 columns.

Quoted 27 lines
---
 package/Config.in        |    1 +
 package/libcec/Config.in |    8 ++++++++
 package/libcec/libcec.mk |   21 +++++++++++++++++++++
 3 files changed, 30 insertions(+)
 create mode 100644 package/libcec/Config.in
 create mode 100644 package/libcec/libcec.mk
package/Config.in +1 -0
index 06bcdef..06b9226 100644
@@ -456,6 +456,7 @@ source "package/imx-lib/Config.in"
 source "package/lcdapi/Config.in"
 source "package/libaio/Config.in"
 source "package/libatasmart/Config.in"
+source "package/libcec/Config.in"
 source "package/libraw1394/Config.in"
 source "package/tslib/Config.in"
 source "package/libfreefare/Config.in"
package/libcec/Config.in new file +0 -0
new file mode 100644
index 0000000..2104a2b

package/libcec/Config.in line 2

Quoted 2 lines
package/libcec/Config.in new file +2 -0
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBCEC
+	bool "libCEC"

The label should be in lower-case, i.e "libcec".

Quoted 12 lines
package/libcec/Config.in new file +6 -0
+	help
+	  libCEC allows you in combination with the right hardware to control your
+	  home theater devices with your TV remote control utilizing existing HDMI
+	  cabling.
+
+	  http://libcec.pulse-eight.com
package/libcec/libcec.mk new file +0 -0
new file mode 100644
index 0000000..803e105

package/libcec/libcec.mk line 9

Quoted 9 lines
package/libcec/libcec.mk new file +9 -0
@@ -0,0 +1,21 @@
+#############################################################
+#
+# libcec
+#
+#############################################################
+
+LIBCEC_VERSION = libcec-2.1.1
+LIBCEC_SITE = git://github.com/Pulse-Eight/libcec.git
+LIBCEC_SITE_METHOD = git

Apparently, there is a tag in the git repo, so github provides a tarball. See
http://buildroot.org/downloads/manual/manual.html#github-download-url.

package/libcec/libcec.mk line 19

Quoted 10 lines
package/libcec/libcec.mk new file +10 -0
+LIBCEC_LICENSE = GPLv2+
+LIBCEC_LICENSE_FILE = COPYING
+
+LIBCEC_AUTORECONF = YES
+LIBCEC_INSTALL_STAGING = YES
+
+ifeq ($(BR2_PACKAGE_RPI_FIRMWARE),y)
+LIBCEC_CONF_OPT = --enable-rpi \
+   --with-rpi-include-path=$(STAGING_DIR)/usr/include
+endif

So the package builds and works fine without the RPi libraries, and those are just adding some optional features?

Thanks,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

PATCH 1/1 libcec: add the libcec for HDMI device Control

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Hi,

Quoted 4 lines

package/libcec/libcec.mk line 19

Quoted 4 lines
package/libcec/libcec.mk new file +4 -0
+ifeq ($(BR2_PACKAGE_RPI_FIRMWARE),y)
+LIBCEC_CONF_OPT = --enable-rpi \
+   --with-rpi-include-path=$(STAGING_DIR)/usr/include
+endif

Thomas> So the package builds and works fine without the RPi libraries, and Thomas> those are just adding some optional features?

It afaik enables the driver to use the cec interface on the rpi next to the driver for the pulse-eight usb dongle.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/1 libcec: add the libcec for HDMI device Control

Quoted 12 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Hi,

Quoted 4 lines

package/libcec/libcec.mk line 19

Quoted 4 lines
package/libcec/libcec.mk new file +4 -0
+ifeq ($(BR2_PACKAGE_RPI_FIRMWARE),y)
+LIBCEC_CONF_OPT = --enable-rpi \
+   --with-rpi-include-path=$(STAGING_DIR)/usr/include
+endif

Thomas> So the package builds and works fine without the RPi libraries, and Thomas> those are just adding some optional features?

Quoted 2 lines

It afaik enables the driver to use the cec interface on the rpi next to the driver for the pulse-eight usb dongle.

Thomas: Peter's explanation is correct.
Thomas: I am addressing the above issues in a new patch.

Spenser

--
Spenser Gilliland
Computer Engineer
Doctoral Candidate

#4 lore raw

PATCH v2 1/2 libcec: add libcec for HDMI device Control

In reply to Spenser Gilliland

This patch adds libcec for HDMI device control. It enables Raspberry Pi support if the rpi-userland package is installed.

---
 package/Config.in        |    1 +
 package/libcec/Config.in |    8 ++++++++
 package/libcec/libcec.mk |   30 ++++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+)
 create mode 100644 package/libcec/Config.in
 create mode 100644 package/libcec/libcec.mk
package/Config.in +1 -0
index 81a3f76..23af3f5 100644
@@ -463,6 +463,7 @@ source "package/imx-lib/Config.in"
 source "package/lcdapi/Config.in"
 source "package/libaio/Config.in"
 source "package/libatasmart/Config.in"
+source "package/libcec/Config.in"
 source "package/libraw1394/Config.in"
 source "package/tslib/Config.in"
 source "package/libfreefare/Config.in"
package/libcec/Config.in new file +8 -0
new file mode 100644
index 0000000..1cacd4a
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBCEC
+	bool "libcec"
+	help
+	  libcec allows you in combination with the right hardware to control your
+	  home theater devices with your TV remote control utilizing existing HDMI
+	  cabling.
+
+	  http://libcec.pulse-eight.com
package/libcec/libcec.mk new file +30 -0
new file mode 100644
index 0000000..cc2fbed
@@ -0,0 +1,30 @@
+#############################################################
+#
+# libcec
+#
+#############################################################
+
+LIBCEC_VERSION = libcec-2.1.1
+LIBCEC_SITE = http://github.com/Pulse-Eight/libcec/tarball/$(LIBCEC_VERSION)
+LIBCEC_LICENSE = GPLv2+
+LIBCEC_LICENSE_FILE = COPYING
+
+LIBCEC_AUTORECONF = YES
+LIBCEC_INSTALL_STAGING = YES
+LIBCEC_DEPENDENCIES = host-pkgconf
+
+ifeq ($(BR2_PACKAGE_LOCKDEV),y)
+LIBCEC_DEPENDENCIES += lockdev
+endif
+
+ifeq ($(BR2_PACKAGE_UDEV),y)
+LIBCEC_DEPENDENCIES += udev
+endif
+
+ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
+LIBCEC_CONF_OPT = --enable-rpi \
+   --with-rpi-include-path=$(STAGING_DIR)/usr/include
+LIBCEC_DEPENDENCIES += rpi-userland
+endif
+
+$(eval $(autotools-package))
Signature · 1 line
1.7.9.5
#5 lore raw

PATCH v2 2/2 lockdev: add lockdev

Add lockdev a package for locking devices.

---
 package/Config.in          |    1 +
 package/lockdev/Config.in  |    4 ++++
 package/lockdev/lockdev.mk |   30 ++++++++++++++++++++++++++++++
 3 files changed, 35 insertions(+)
 create mode 100644 package/lockdev/Config.in
 create mode 100644 package/lockdev/lockdev.mk
package/Config.in +1 -0
index 23af3f5..8498609 100644
@@ -255,6 +255,7 @@ source "package/iostat/Config.in"
 source "package/irda-utils/Config.in"
 source "package/kbd/Config.in"
 source "package/lcdproc/Config.in"
+source "package/lockdev/Config.in"
 source "package/lm-sensors/Config.in"
 source "package/lshw/Config.in"
 source "package/lsuio/Config.in"
package/lockdev/Config.in new file +4 -0
new file mode 100644
index 0000000..2bd75d1
@@ -0,0 +1,4 @@
+config BR2_PACKAGE_LOCKDEV
+	bool "lockdev"
+	help
+	  library for locking devices
package/lockdev/lockdev.mk new file +30 -0
new file mode 100644
index 0000000..10a5929
@@ -0,0 +1,30 @@
+#############################################################
+#
+# lockdev
+#
+#############################################################
+
+LOCKDEV_VERSION = 1.0.3
+LOCKDEV_SOURCE = lockdev_$(LOCKDEV_VERSION).orig.tar.gz
+LOCKDEV_SITE = http://ftp.debian.org/debian/pool/main/l/lockdev/
+LOCKDEV_LICENSE = LGPLv2.1
+LOCKDEV_LICENSE_FILE = LICENSE
+LOCKDEV_INSTALL_STAGING = YES
+
+define LOCKDEV_BUILD_CMDS
+	$(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) static shared
+endef
+
+define LOCKDEV_INSTALL_STAGING_CMDS
+	$(MAKE1) basedir=$(STAGING_DIR)/usr -C $(@D) install
+	ln -sf $(STAGING_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so
+	ln -sf $(STAGING_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so.1
+endef
+
+define LOCKDEV_INSTALL_TARGET_CMDS
+	$(MAKE1) basedir=$(TARGET_DIR)/usr -C $(@D) install
+	ln -sf $(TARGET_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so $(TARGET_DIR)/usr/lib/liblockdev.so
+	ln -sf $(TARGET_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so $(TARGET_DIR)/usr/lib/liblockdev.so.1
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.7.9.5
#6 lore raw

PATCH v2 2/2 lockdev: add lockdev

Spenser, All,

Quoted 3 lines · Spenser Gilliland

Add lockdev a package for locking devices.

[--SNIP--]

package/Config.in source "package/iostat/Config.in" · line 259

Quoted 10 lines
package/Config.in +1 -0
index 23af3f5..8498609 100644
@@ -255,6 +255,7 @@ source "package/iostat/Config.in"
 source "package/irda-utils/Config.in"
 source "package/kbd/Config.in"
 source "package/lcdproc/Config.in"
+source "package/lockdev/Config.in"
 source "package/lm-sensors/Config.in"

Alphabetical order, please ('o' comes after 'm', as far as I know! ;-) )

package/Config.in source "package/iostat/Config.in" · line 261

Quoted 2 lines
package/Config.in +0 -0
 source "package/lshw/Config.in"
 source "package/lsuio/Config.in"

[--SNIP--]

Quoted 23 lines
package/lockdev/lockdev.mk new file +17 -0
new file mode 100644
index 0000000..10a5929
@@ -0,0 +1,30 @@
+#############################################################
+#
+# lockdev
+#
+#############################################################
+
+LOCKDEV_VERSION = 1.0.3
+LOCKDEV_SOURCE = lockdev_$(LOCKDEV_VERSION).orig.tar.gz
+LOCKDEV_SITE = http://ftp.debian.org/debian/pool/main/l/lockdev/
+LOCKDEV_LICENSE = LGPLv2.1
+LOCKDEV_LICENSE_FILE = LICENSE
+LOCKDEV_INSTALL_STAGING = YES
+
+define LOCKDEV_BUILD_CMDS
+	$(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) static shared
+endef
+

package/lockdev/lockdev.mk line 27

Quoted 10 lines
package/lockdev/lockdev.mk new file +10 -0
+define LOCKDEV_INSTALL_STAGING_CMDS
+	$(MAKE1) basedir=$(STAGING_DIR)/usr -C $(@D) install
+	ln -sf $(STAGING_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so
+	ln -sf $(STAGING_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so.1
+endef
+
+define LOCKDEV_INSTALL_TARGET_CMDS
+	$(MAKE1) basedir=$(TARGET_DIR)/usr -C $(@D) install
+	ln -sf $(TARGET_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so $(TARGET_DIR)/usr/lib/liblockdev.so
+	ln -sf $(TARGET_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so $(TARGET_DIR)/usr/lib/liblockdev.so.1

What is the SONAME of the library? You only need to install the library to a file named as the SONAME, not any other symlink is required.

But of course, if "development files on target" are selected you need the .so symlink (but devel-files-on-target this is deprecated now).

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#7 lore raw

PATCH v2 2/2 lockdev: add lockdev

Yann,

Quoted 1 line

Alphabetical order, please ('o' comes after 'm', as far as I know! ;-) )

Fixed. Will resubmit.

Quoted 5 lines

What is the SONAME of the library? You only need to install the library to a file named as the SONAME, not any other symlink is required.

But of course, if "development files on target" are selected you need the .so symlink (but devel-files-on-target this is deprecated now).

$ objdump liblockdev.1.0.3.so -p | grep SONAME
  SONAME               liblockdev.so.1

So, just install liblockdev.so.1 . This needs to be changed in the TARGET_CMDS not the STAGING_CMDS, correct? IE.

+define LOCKDEV_INSTALL_TARGET_CMDS
+ $(MAKE1) basedir=$(TARGET_DIR)/usr -C $(@D) install
+ ln -sf $(TARGET_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so
$(TARGET_DIR)/usr/lib/liblockdev.so.1

Thanks, I'll shoot another patch out soon.

Spenser

#8 lore raw

PATCH v2 2/2 lockdev: add lockdev

In reply to Yann E. MORIN
Quoted 9 lines · Yann E. MORIN
Quoted 4 lines

package/lockdev/lockdev.mk line 27

Quoted 4 lines
package/lockdev/lockdev.mk new file +4 -0
+define LOCKDEV_INSTALL_TARGET_CMDS
+	$(MAKE1) basedir=$(TARGET_DIR)/usr -C $(@D) install
+	ln -sf $(TARGET_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so $(TARGET_DIR)/usr/lib/liblockdev.so
+	ln -sf $(TARGET_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so $(TARGET_DIR)/usr/lib/liblockdev.so.1

What is the SONAME of the library? You only need to install the library to a file named as the SONAME, not any other symlink is required.

But of course, if "development files on target" are selected you need the .so symlink (but devel-files-on-target this is deprecated now).

But aren't these links created automatically by ldconfig in
target-finalize? For staging it is still needed, of course.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#9 lore raw

PATCH v2 1/2 libcec: add libcec for HDMI device Control

In reply to Spenser Gilliland

Spenser, All,

Quoted 4 lines · Spenser Gilliland

This patch adds libcec for HDMI device control. It enables Raspberry Pi support if the rpi-userland package is installed.

[--SNIP--]

Quoted 8 lines
package/libcec/libcec.mk new file +2 -0
new file mode 100644
index 0000000..cc2fbed
@@ -0,0 +1,30 @@
+#############################################################
+#

package/libcec/libcec.mk line 12

Quoted 10 lines
package/libcec/libcec.mk new file +10 -0
+# libcec
+#
+#############################################################
+
+LIBCEC_VERSION = libcec-2.1.1
+LIBCEC_SITE = http://github.com/Pulse-Eight/libcec/tarball/$(LIBCEC_VERSION)
+LIBCEC_LICENSE = GPLv2+
+LIBCEC_LICENSE_FILE = COPYING
+
+LIBCEC_AUTORECONF = YES

I guess we need autoreconf because we get an extract of the repository, right? Please add a little note about it, it is not obvious at first sight.

package/libcec/libcec.mk line 16

Quoted 4 lines
package/libcec/libcec.mk new file +4 -0
+LIBCEC_INSTALL_STAGING = YES
+LIBCEC_DEPENDENCIES = host-pkgconf
+
+ifeq ($(BR2_PACKAGE_LOCKDEV),y)

lockdev is introduced only in a subsequent patch. This should have been
reversed: lockdev first, then libcec.

package/libcec/libcec.mk line 28

Quoted 12 lines
package/libcec/libcec.mk new file +12 -0
+LIBCEC_DEPENDENCIES += lockdev
+endif
+
+ifeq ($(BR2_PACKAGE_UDEV),y)
+LIBCEC_DEPENDENCIES += udev
+endif
+
+ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
+LIBCEC_CONF_OPT = --enable-rpi \
+   --with-rpi-include-path=$(STAGING_DIR)/usr/include
+LIBCEC_DEPENDENCIES += rpi-userland
+endif

Although not strictly required, I'd like an explicit --disable-rpi in the case rpi-userland is not available.

(In my twisted mind, I was imediately thinking of using Buildroot on an RPi that does have rpi-userland, but would not want it in my generated image, so would not like to pick the system one. Yes, I'm weird.:-] )

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#10 lore raw

PATCH v2 1/2 libcec: add libcec for HDMI device Control

Quoted 31 lines · Yann E. MORIN

Spenser, All,

Quoted 4 lines · Spenser Gilliland

This patch adds libcec for HDMI device control. It enables Raspberry Pi support if the rpi-userland package is installed.

[--SNIP--]

Quoted 8 lines
package/libcec/libcec.mk new file +2 -0
new file mode 100644
index 0000000..cc2fbed
@@ -0,0 +1,30 @@
+#############################################################
+#

package/libcec/libcec.mk line 12

Quoted 10 lines
package/libcec/libcec.mk new file +10 -0
+# libcec
+#
+#############################################################
+
+LIBCEC_VERSION = libcec-2.1.1
+LIBCEC_SITE = http://github.com/Pulse-Eight/libcec/tarball/$(LIBCEC_VERSION)
+LIBCEC_LICENSE = GPLv2+
+LIBCEC_LICENSE_FILE = COPYING
+
+LIBCEC_AUTORECONF = YES

I guess we need autoreconf because we get an extract of the repository, right? Please add a little note about it, it is not obvious at first sight.

Quoted 7 lines

package/libcec/libcec.mk line 16

Quoted 4 lines
package/libcec/libcec.mk new file +4 -0
+LIBCEC_INSTALL_STAGING = YES
+LIBCEC_DEPENDENCIES = host-pkgconf
+
+ifeq ($(BR2_PACKAGE_LOCKDEV),y)

lockdev is introduced only in a subsequent patch. This should have been
reversed: lockdev first, then libcec.

Will fix.

Quoted 7 lines
Quoted 7 lines
package/libcec/libcec.mk new file +7 -0
+LIBCEC_DEPENDENCIES += lockdev
+endif
+
+ifeq ($(BR2_PACKAGE_UDEV),y)
+LIBCEC_DEPENDENCIES += udev
+endif
+
Quoted 8 lines

package/libcec/libcec.mk line 28

Quoted 5 lines
package/libcec/libcec.mk new file +5 -0
+ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
+LIBCEC_CONF_OPT = --enable-rpi \
+   --with-rpi-include-path=$(STAGING_DIR)/usr/include
+LIBCEC_DEPENDENCIES += rpi-userland
+endif

Although not strictly required, I'd like an explicit --disable-rpi in the case rpi-userland is not available.

I'll add it to the next patch.

Quoted 3 lines

(In my twisted mind, I was imediately thinking of using Buildroot on an RPi that does have rpi-userland, but would not want it in my generated image, so would not like to pick the system one. Yes, I'm weird.:-] )

if by it you mean libcec. Then, libcec should be able to be used with USB adapters and RPI at the same time. I can test this use case as I have both an RPI and USB-CEC dongle. I'll let you know soon.

Quoted 11 lines

Regards,
Yann E. MORIN.

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

--
Spenser Gilliland
Computer Engineer
Doctoral Candidate

#11 lore raw

PATCH v3 1/2 lockdev: add lockdev

In reply to Spenser Gilliland

Add lockdev a package for locking devices.

---
 package/Config.in          |    1 +
 package/lockdev/Config.in  |    4 ++++
 package/lockdev/lockdev.mk |   29 +++++++++++++++++++++++++++++
 3 files changed, 34 insertions(+)
 create mode 100644 package/lockdev/Config.in
 create mode 100644 package/lockdev/lockdev.mk
package/Config.in +1 -0
index 81a3f76..05e2d45 100644
@@ -256,6 +256,7 @@ source "package/irda-utils/Config.in"
 source "package/kbd/Config.in"
 source "package/lcdproc/Config.in"
 source "package/lm-sensors/Config.in"
+source "package/lockdev/Config.in"
 source "package/lshw/Config.in"
 source "package/lsuio/Config.in"
 source "package/lvm2/Config.in"
package/lockdev/Config.in new file +4 -0
new file mode 100644
index 0000000..2bd75d1
@@ -0,0 +1,4 @@
+config BR2_PACKAGE_LOCKDEV
+	bool "lockdev"
+	help
+	  library for locking devices
package/lockdev/lockdev.mk new file +29 -0
new file mode 100644
index 0000000..c6a99a8
@@ -0,0 +1,29 @@
+#############################################################
+#
+# lockdev
+#
+#############################################################
+
+LOCKDEV_VERSION = 1.0.3
+LOCKDEV_SOURCE = lockdev_$(LOCKDEV_VERSION).orig.tar.gz
+LOCKDEV_SITE = http://ftp.debian.org/debian/pool/main/l/lockdev/
+LOCKDEV_LICENSE = LGPLv2.1
+LOCKDEV_LICENSE_FILE = LICENSE
+LOCKDEV_INSTALL_STAGING = YES
+
+define LOCKDEV_BUILD_CMDS
+	$(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) static shared
+endef
+
+define LOCKDEV_INSTALL_STAGING_CMDS
+	$(MAKE1) basedir=$(STAGING_DIR)/usr -C $(@D) install
+	ln -sf $(STAGING_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so
+	ln -sf $(STAGING_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so.1
+endef
+
+define LOCKDEV_INSTALL_TARGET_CMDS
+	$(MAKE1) basedir=$(TARGET_DIR)/usr -C $(@D) install
+	ln -sf $(TARGET_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so $(TARGET_DIR)/usr/lib/liblockdev.so.1
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.7.9.5
#12 lore raw

PATCH v3 2/2 libcec: add libcec for HDMI device Control

This patch adds libcec for HDMI device control. It enables Raspberry Pi support if the rpi-userland package is installed.

---
 package/Config.in        |    1 +
 package/libcec/Config.in |    8 ++++++++
 package/libcec/libcec.mk |   32 ++++++++++++++++++++++++++++++++
 3 files changed, 41 insertions(+)
 create mode 100644 package/libcec/Config.in
 create mode 100644 package/libcec/libcec.mk
package/Config.in +1 -0
index 05e2d45..df1e88e 100644
@@ -464,6 +464,7 @@ source "package/imx-lib/Config.in"
 source "package/lcdapi/Config.in"
 source "package/libaio/Config.in"
 source "package/libatasmart/Config.in"
+source "package/libcec/Config.in"
 source "package/libraw1394/Config.in"
 source "package/tslib/Config.in"
 source "package/libfreefare/Config.in"
package/libcec/Config.in new file +8 -0
new file mode 100644
index 0000000..1cacd4a
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBCEC
+	bool "libcec"
+	help
+	  libcec allows you in combination with the right hardware to control your
+	  home theater devices with your TV remote control utilizing existing HDMI
+	  cabling.
+
+	  http://libcec.pulse-eight.com
package/libcec/libcec.mk new file +32 -0
new file mode 100644
index 0000000..3ca1338
@@ -0,0 +1,32 @@
+#############################################################
+#
+# libcec
+#
+#############################################################
+
+LIBCEC_VERSION = libcec-2.1.1
+LIBCEC_SITE = http://github.com/Pulse-Eight/libcec/tarball/$(LIBCEC_VERSION)
+LIBCEC_LICENSE = GPLv2+
+LIBCEC_LICENSE_FILE = COPYING
+
+LIBCEC_AUTORECONF = YES
+LIBCEC_INSTALL_STAGING = YES
+LIBCEC_DEPENDENCIES = host-pkgconf
+
+ifeq ($(BR2_PACKAGE_LOCKDEV),y)
+LIBCEC_DEPENDENCIES += lockdev
+endif
+
+ifeq ($(BR2_PACKAGE_UDEV),y)
+LIBCEC_DEPENDENCIES += udev
+endif
+
+ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
+LIBCEC_CONF_OPT = --enable-rpi \
+   --with-rpi-include-path=$(STAGING_DIR)/usr/include
+LIBCEC_DEPENDENCIES += rpi-userland
+else
+LIBCEC_CONF_OPT = --disable-rpi
+endif
+
+$(eval $(autotools-package))
Signature · 1 line
1.7.9.5
#13 lore raw

PATCH v3 2/2 libcec: add libcec for HDMI device Control

here's a snippet which shows both a RPI and USB-CEC adapter operating concurrently.

# modprobe cdc-acm
# cec-client -l
Found devices: 2
device:              1
com port:            /dev/ttyACM0
vendor id:           2548
product id:          1001
firmware version:    2
firmware build date: Fri Jul 20 23:58:27 2012 +0000
type:                Pulse-Eight USB-CEC Adapter
device:              2
com port:            RPI
vendor id:           2708
product id:          1001
firmware version:    1
type:                Raspberry Pi

Spenser

Quoted 79 lines · Spenser Gilliland

This patch adds libcec for HDMI device control. It enables Raspberry Pi support if the rpi-userland package is installed.

---
 package/Config.in        |    1 +
 package/libcec/Config.in |    8 ++++++++
 package/libcec/libcec.mk |   32 ++++++++++++++++++++++++++++++++
 3 files changed, 41 insertions(+)
 create mode 100644 package/libcec/Config.in
 create mode 100644 package/libcec/libcec.mk
package/Config.in +1 -0
index 05e2d45..df1e88e 100644
@@ -464,6 +464,7 @@ source "package/imx-lib/Config.in"
 source "package/lcdapi/Config.in"
 source "package/libaio/Config.in"
 source "package/libatasmart/Config.in"
+source "package/libcec/Config.in"
 source "package/libraw1394/Config.in"
 source "package/tslib/Config.in"
 source "package/libfreefare/Config.in"
package/libcec/Config.in new file +8 -0
new file mode 100644
index 0000000..1cacd4a
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBCEC
+       bool "libcec"
+       help
+         libcec allows you in combination with the right hardware to control your
+         home theater devices with your TV remote control utilizing existing HDMI
+         cabling.
+
+         http://libcec.pulse-eight.com
package/libcec/libcec.mk new file +32 -1
new file mode 100644
index 0000000..3ca1338
@@ -0,0 +1,32 @@
+#############################################################
+#
+# libcec
+#
+#############################################################
+
+LIBCEC_VERSION = libcec-2.1.1
+LIBCEC_SITE = http://github.com/Pulse-Eight/libcec/tarball/$(LIBCEC_VERSION)
+LIBCEC_LICENSE = GPLv2+
+LIBCEC_LICENSE_FILE = COPYING
+
+LIBCEC_AUTORECONF = YES
+LIBCEC_INSTALL_STAGING = YES
+LIBCEC_DEPENDENCIES = host-pkgconf
+
+ifeq ($(BR2_PACKAGE_LOCKDEV),y)
+LIBCEC_DEPENDENCIES += lockdev
+endif
+
+ifeq ($(BR2_PACKAGE_UDEV),y)
+LIBCEC_DEPENDENCIES += udev
+endif
+
+ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
+LIBCEC_CONF_OPT = --enable-rpi \
+   --with-rpi-include-path=$(STAGING_DIR)/usr/include
+LIBCEC_DEPENDENCIES += rpi-userland
+else
+LIBCEC_CONF_OPT = --disable-rpi
+endif
+
+$(eval $(autotools-package))
--

1.7.9.5

Signature · 3 lines
Spenser Gilliland
Computer Engineer
Doctoral Candidate
#14 lore raw

PATCH v3 1/2 lockdev: add lockdev

In reply to Spenser Gilliland

Dear Spenser Gilliland,

package/lockdev/Config.in line 4

Quoted 10 lines · Spenser Gilliland
package/lockdev/Config.in new file +4 -0
new file mode 100644
index 0000000..2bd75d1
@@ -0,0 +1,4 @@
+config BR2_PACKAGE_LOCKDEV
+	bool "lockdev"
+	help
+	  library for locking devices

A few more details would be nice to have here, but I see that the package itself doesn't really provide a more detailed description of what it does. It also apparently doesn't have an upstream site.

package/lockdev/Config.in

Quoted 3 lines
package/lockdev/Config.in new file +3 -0
+LOCKDEV_VERSION = 1.0.3
+LOCKDEV_SOURCE = lockdev_$(LOCKDEV_VERSION).orig.tar.gz
+LOCKDEV_SITE = http://ftp.debian.org/debian/pool/main/l/lockdev/

You should use BR2_DEBIAN_MIRROR here. See package/argus/argus.mk for example. Or probably better, use http://snapshot.debian.net/, as in package/fakeroot/fakeroot.mk. Using snapshot.debian.net ensures that the file will always be present at this location.

Quoted 1 line

+LOCKDEV_LICENSE = LGPLv2.1

I checked and confirm that the license appears to be LGPLv2.1, without the plus.

Quoted 1 line

+LOCKDEV_LICENSE_FILE = LICENSE

LOCKDEV_LICENSE_FILES

package/lockdev/Config.in

Quoted 5 lines
package/lockdev/Config.in new file +5 -0
+LOCKDEV_INSTALL_STAGING = YES
+
+define LOCKDEV_BUILD_CMDS
+	$(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) static shared
+endef

Building the shared variant will not work when
BR2_PREFER_STATIC_LIB=y.

package/lockdev/Config.in

Quoted 10 lines
package/lockdev/Config.in new file +10 -0
+define LOCKDEV_INSTALL_STAGING_CMDS
+	$(MAKE1) basedir=$(STAGING_DIR)/usr -C $(@D) install
+	ln -sf $(STAGING_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so
+	ln -sf $(STAGING_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so.1
+endef
+
+define LOCKDEV_INSTALL_TARGET_CMDS
+	$(MAKE1) basedir=$(TARGET_DIR)/usr -C $(@D) install
+	ln -sf $(TARGET_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so $(TARGET_DIR)/usr/lib/liblockdev.so.1
+endef

I am not sure using the 'install' target is appropriate here. Looking at the package Makefile, it not only installs the library, in usr/lib, but also some debug stuff in usr/lib/debug, some profile stuff in usr/lib/profile, etc.

So, I believe it should probably be something like (untested) :

ifeq ($(BR2_PREFER_STATIC_LIB),y)
define LOCKDEV_BUILD_CMDS

	$(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) static

endef

define LOCKDEV_INSTALL_STAGING_CMDS

	$(MAKE1) basedir=$(STAGING_DIR)/usr -C $(@D) install_dev

endef

else # BR2_PREFER_STATIC_LIB

define LOCKDEV_BUILD_CMDS

	$(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) static shared

endef

define LOCKDEV_INSTALL_STAGING_CMDS

	$(MAKE1) basedir=$(STAGING_DIR)/usr -C $(@D) install_dev install_run
	ln -sf $(STAGING_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so
	ln -sf $(STAGING_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so.1

endef

define LOCKDEV_INSTALL_TARGET_CMDS

	$(MAKE1) basedir=$(TARGET_DIR)/usr -C $(@D) install_run
	ln -sf $(TARGET_DIR)/usr/lib/liblockdev.$(LOCKDEV_VERSION).so $(TARGET_DIR)/usr/lib/liblockdev.so.1

endef

endif # BR2_PREFER_STATIC_LIB

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#15 lore raw

PATCH v4 1/2 lockdev: add lockdev

In reply to Spenser Gilliland

Add lockdev a package for locking devices.

---
 package/Config.in          |    1 +
 package/lockdev/Config.in  |    4 ++++
 package/lockdev/lockdev.mk |   41 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 46 insertions(+)
 create mode 100644 package/lockdev/Config.in
 create mode 100644 package/lockdev/lockdev.mk
package/Config.in +1 -0
index 81a3f76..05e2d45 100644
@@ -256,6 +256,7 @@ source "package/irda-utils/Config.in"
 source "package/kbd/Config.in"
 source "package/lcdproc/Config.in"
 source "package/lm-sensors/Config.in"
+source "package/lockdev/Config.in"
 source "package/lshw/Config.in"
 source "package/lsuio/Config.in"
 source "package/lvm2/Config.in"
package/lockdev/Config.in new file +4 -0
new file mode 100644
index 0000000..2bd75d1
@@ -0,0 +1,4 @@
+config BR2_PACKAGE_LOCKDEV
+	bool "lockdev"
+	help
+	  library for locking devices
package/lockdev/lockdev.mk new file +41 -0

41 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#16 lore raw

PATCH v4 2/2 libcec: add libcec for HDMI device Control

This patch adds libcec for HDMI device control. It enables Raspberry Pi support if the rpi-userland package is installed.

---
 package/Config.in        |    1 +
 package/libcec/Config.in |    8 ++++++++
 package/libcec/libcec.mk |   33 +++++++++++++++++++++++++++++++++
 3 files changed, 42 insertions(+)
 create mode 100644 package/libcec/Config.in
 create mode 100644 package/libcec/libcec.mk
package/Config.in +1 -0
index 05e2d45..df1e88e 100644
@@ -464,6 +464,7 @@ source "package/imx-lib/Config.in"
 source "package/lcdapi/Config.in"
 source "package/libaio/Config.in"
 source "package/libatasmart/Config.in"
+source "package/libcec/Config.in"
 source "package/libraw1394/Config.in"
 source "package/tslib/Config.in"
 source "package/libfreefare/Config.in"
package/libcec/Config.in new file +8 -0
new file mode 100644
index 0000000..1cacd4a
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBCEC
+	bool "libcec"
+	help
+	  libcec allows you in combination with the right hardware to control your
+	  home theater devices with your TV remote control utilizing existing HDMI
+	  cabling.
+
+	  http://libcec.pulse-eight.com
package/libcec/libcec.mk new file +33 -0
new file mode 100644
index 0000000..e3a69c6
@@ -0,0 +1,33 @@
+#############################################################
+#
+# libcec
+#
+#############################################################
+
+LIBCEC_VERSION = libcec-2.1.1
+LIBCEC_SITE = http://github.com/Pulse-Eight/libcec/tarball/$(LIBCEC_VERSION)
+LIBCEC_LICENSE = GPLv2+
+LIBCEC_LICENSE_FILE = COPYING
+
+# Autoreconf required due to being a dev tarball and not a release tarball.
+LIBCEC_AUTORECONF = YES
+LIBCEC_INSTALL_STAGING = YES
+LIBCEC_DEPENDENCIES = host-pkgconf
+
+ifeq ($(BR2_PACKAGE_LOCKDEV),y)
+LIBCEC_DEPENDENCIES += lockdev
+endif
+
+ifeq ($(BR2_PACKAGE_UDEV),y)
+LIBCEC_DEPENDENCIES += udev
+endif
+
+ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
+LIBCEC_CONF_OPT = --enable-rpi \
+   --with-rpi-include-path=$(STAGING_DIR)/usr/include
+LIBCEC_DEPENDENCIES += rpi-userland
+else
+LIBCEC_CONF_OPT = --disable-rpi
+endif
+
+$(eval $(autotools-package))
Signature · 1 line
1.7.9.5
#17 lore raw

PATCH v4 2/2 libcec: add libcec for HDMI device Control

Dear Spenser Gilliland,

Quoted 11 lines · Spenser Gilliland

This patch adds libcec for HDMI device control. It enables Raspberry Pi support if the rpi-userland package is installed.

---
 package/Config.in        |    1 +
 package/libcec/Config.in |    8 ++++++++
 package/libcec/libcec.mk |   33 +++++++++++++++++++++++++++++++++
 3 files changed, 42 insertions(+)
 create mode 100644 package/libcec/Config.in
 create mode 100644 package/libcec/libcec.mk

Thanks, applied, after adding the missing C++ dependency.

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#18 lore raw

PATCH v4 1/2 lockdev: add lockdev

In reply to Spenser Gilliland

Dear Spenser Gilliland,

Quoted 10 lines · Spenser Gilliland

Add lockdev a package for locking devices.

---
 package/Config.in          |    1 +
 package/lockdev/Config.in  |    4 ++++
 package/lockdev/lockdev.mk |   41 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 46 insertions(+)
 create mode 100644 package/lockdev/Config.in
 create mode 100644 package/lockdev/lockdev.mk

Applied, thanks. I've moved the package to Libraries->Filesystem, instead of the main "Hardware handling" menu.

Thanks,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com