Skip to contentSkip to conversation

ola: bump to 0.9.3

PATCH New Simon Marchi 2 participants 2 messages Dec 8, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ola: bump to 0.9.3

This update requires a few changes. First, good news, the patches that you guys have submitted to OLA have been merged, so we can drop those.

Less good news: OLA now builds a small protoc wrapper (ola_protoc) that is built and executed at compile-time on the host. If we don't change anything, ola_protoc is built with the target toolchain and therefore can't run on the host. Explanation for ola_protoc is here

To solve this, I created a package host-ola, which builds and provides an ola_protoc for the host. It tries to disable as much as possible of things that we won't need at configure time. Only ola_protoc is built and installed so it's not that long.

The change has been built-tested only.

[1] https://github.com/OpenLightingProject/ola/blob/master/protoc/ola-protoc.cpp#L20

---

New in v2:

* Fixed formatting.
* Added OLA_AUTORECONF, since we get the code directly from github.
* Use HOST_OLA_MAKE_OPTS instead of HOST_OLA_MAKE.
* Use full path in install.

---
 package/ola/ola-0001-fix-build-warning.patch       | 27 --------
 ...002-move-python-sub-check-to-configure.ac.patch | 48 -------------
 ...k-for-python-module-for-cross-compilation.patch | 81 ----------------------
 package/ola/ola.mk                                 | 33 +++++++--
 4 files changed, 27 insertions(+), 162 deletions(-)
 delete mode 100644 package/ola/ola-0001-fix-build-warning.patch
 delete mode 100644 package/ola/ola-0002-move-python-sub-check-to-configure.ac.patch
 delete mode 100644 package/ola/ola-0003-fix-check-for-python-module-for-cross-compilation.patch
package/ola/ola-0001-fix-build-warning.patch deleted +0 -27
deleted file mode 100644
index 1fdb58f..0000000
@@ -1,27 +0,0 @@
-Fix build on 64 bits architectures
-
-This upstream patch fixes a warning that, due to -Werror, is causing
-build failures on 64 bits architectures.
-
-Signed-off-by: Thomas Petazzoni <[email protected]>
-
-commit ea375582b0bfee93d66608ffc807078ffc48e961
-Author: Simon Newton <[email protected]>
-Date:   Wed Oct 30 09:23:49 2013 -0700
-
-    * Avoid a compiler warning
-
-diff --git a/plugins/e131/e131/PreamblePacker.cpp b/plugins/e131/e131/PreamblePacker.cpp
-index ef29e18..8dfcc72 100644
---- a/plugins/e131/e131/PreamblePacker.cpp
-+++ b/plugins/e131/e131/PreamblePacker.cpp
-@@ -77,7 +77,8 @@ const uint8_t *PreamblePacker::Pack(const PDUBlock<PDU> &pdu_block,
-   if (!m_send_buffer)
-     Init();
- 
--  unsigned int size = MAX_DATAGRAM_SIZE - sizeof(ACN_HEADER);
-+  unsigned int size = MAX_DATAGRAM_SIZE -
-+      static_cast<unsigned int>(sizeof(ACN_HEADER));
-   if (!pdu_block.Pack(m_send_buffer + sizeof(ACN_HEADER), &size)) {
-     OLA_WARN << "Failed to pack E1.31 PDU";
-     return NULL;
package/ola/ola-0002-move-python-sub-check-to-configure.ac.patch deleted +0 -48

48 lines not on this page · raw message

package/ola/ola-0003-fix-check-for-python-module-for-cross-compilation.patch deleted +0 -81

81 lines not on this page · raw message

package/ola/ola.mk +27 -6
index 95810c1..8e9d1fc 100644
@@ -4,18 +4,16 @@
 #
 ################################################################################
 
-OLA_VERSION = 0.8.33
-OLA_SITE = https://open-lighting.googlecode.com/files
+OLA_VERSION = 0.9.3
+OLA_SITE = $(call github,OpenLightingProject,ola,$(OLA_VERSION))
 
 OLA_LICENSE = LGPLv2.1+ (libola, libolacommon, Python bindings), GPLv2+ (libolaserver, olad, Python examples and tests)
 OLA_LICENSE_FILES = LICENCE GPL LGPL
 OLA_INSTALL_STAGING = YES
-
-# We modify configure.ac, so we need to autoreconf
 OLA_AUTORECONF = YES
 
 # util-linux provides uuid lib
-OLA_DEPENDENCIES = protobuf util-linux host-bison host-flex
+OLA_DEPENDENCIES = protobuf util-linux host-bison host-flex host-ola
 
 OLA_CONF_OPTS = \
 	ac_cv_have_pymod_google_protobuf=yes \
@@ -24,7 +22,29 @@ OLA_CONF_OPTS = \
 	--disable-unittests \
 	--disable-root-check \
 	--disable-java-libs \
-	--disable-fatal-warnings
+	--disable-fatal-warnings \
+	--with-ola-protoc=$(HOST_DIR)/usr/bin/ola_protoc
+
+# When building the host part, disable as much as possible to speed up
+# the configure step and avoid missing host dependencies.
+HOST_OLA_CONF_OPTS = \
+	--disable-all-plugins \
+	--disable-slp \
+	--disable-osc \
+	--disable-uart \
+	--disable-libusb \
+	--disable-libftdi \
+	--disable-http  \
+	--disable-examples \
+	--disable-unittests \
+	--disable-doxygen-html \
+	--disable-doxygen-doc
+
+# On the host side, we only need ola_protoc, so build and install this only.
+HOST_OLA_MAKE_OPTS = protoc/ola_protoc
+define HOST_OLA_INSTALL_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/protoc/ola_protoc $(HOST_DIR)/usr/bin/ola_protoc
+endef
 
 # sets where to find python libs built for target and required by ola
 OLA_CONF_ENV = PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages
@@ -149,3 +169,4 @@ OLA_CONF_OPTS += --disable-usbpro
 endif
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
2.1.3
#1 lore raw

PATCH v2 1/1 ola: bump to 0.9.3

Dear Simon Marchi,

Quoted 13 lines · Simon Marchi

This update requires a few changes. First, good news, the patches that you guys have submitted to OLA have been merged, so we can drop those.

Less good news: OLA now builds a small protoc wrapper (ola_protoc) that is built and executed at compile-time on the host. If we don't change anything, ola_protoc is built with the target toolchain and therefore can't run on the host. Explanation for ola_protoc is here

To solve this, I created a package host-ola, which builds and provides an ola_protoc for the host. It tries to disable as much as possible of things that we won't need at configure time. Only ola_protoc is built and installed so it's not that long.

Quoted 5 lines

The change has been built-tested only.

[1] https://github.com/OpenLightingProject/ola/blob/master/protoc/ola-protoc.cpp#L20

Thanks applied. I made some small changes though:

[Thomas:
- add HOST_OLA_DEPENDENCIES variable, so that host-ola doesn't get all the dependencies of the target ola package: certain target
ola dependencies do not have corresponding host packages (and it
doesn't make sense to have them as dependencies just to build ola_protoc)
- improve the commit log to mention which upstream commits
correspond to our patches.]

Of course, the first change is the most important one: if you were enabling all of the Ola sub-options, it would no longer build due to host-ola depending on non-existing host packages (because when the dependencies of a host package are not explicitly given, they are inherited from the dependencies of the corresponding target package).

See
http://git.buildroot.net/buildroot/commit/?id=66056a5179ef49f2ec10ba5d7fbd1a58863d1350

Thanks!

Thomas

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