package/openpowerlink: bump to version 1.8.5
PATCH v2 1/3 package/openpowerlink: bump to version 1.8.5
Remove upstream commit
---
v2: First bump the vertion to avoid to rename the existing patch.
--- ...-Fix-Linux-Powerlink-user-lib-add-INSTALL.patch | 28 ---------------------- package/openpowerlink/openpowerlink.mk | 2 +- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 package/openpowerlink/openpowerlink-0001-Fix-Linux-Powerlink-user-lib-add-INSTALL.patch
package/openpowerlink/openpowerlink-0001-Fix-Linux-Powerlink-user-lib-add-INSTALL.patch deleted +0 -28
@@ -1,28 +0,0 @@ -From cb6c4ff053e72f7fe5954894aebe2c0d94120b2d Mon Sep 17 00:00:00 2001 -From: Romain Naour <[email protected]> -Date: Thu, 3 Oct 2013 23:22:17 +0200 -Subject: [PATCH 5/5] [FIX] Linux Powerlink user lib: add INSTALL - -Signed-off-by: Romain Naour <[email protected]> ---- - Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt b/Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt -index e67d573..40b7756 100644 ---- a/Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt -+++ b/Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt -@@ -329,7 +329,9 @@ ENDIF () - # - # Installation - # --IF (WIN32) -+IF (UNIX) -+ INSTALL(TARGETS powerlink ARCHIVE DESTINATION lib) -+ELSEIF (WIN32) - IF (CFG_X86_WINDOWS_DLL) - INSTALL(TARGETS openPOWERLINK RUNTIME DESTINATION bin) - ENDIF (CFG_X86_WINDOWS_DLL) --- -1.8.4 -
package/openpowerlink/openpowerlink.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -OPENPOWERLINK_VERSION = V1.08.4 +OPENPOWERLINK_VERSION = V1.08.5 OPENPOWERLINK_SITE = http://git.code.sf.net/p/openpowerlink/code OPENPOWERLINK_SITE_METHOD = git OPENPOWERLINK_LICENSE = BSD-2c, GPLv2
Signature · 1 line
1.9.3
PATCH v2 2/3 package/openpowerlink: do not override CMAKE_SYSTEM_PROCESSOR
---
This commit must be applied after "pkg-cmake.mk: Set CMAKE_SYSTEM_PROCESSOR"
http://patchwork.ozlabs.org/patch/411789/
v2: rework the regex (Samuel Martin)
--- ...a-better-regex-for-cmake-system-processor.patch | 89 ++++++++++++++++++++++ package/openpowerlink/openpowerlink.mk | 10 --- 2 files changed, 89 insertions(+), 10 deletions(-) create mode 100644 package/openpowerlink/0001-fix-use-a-better-regex-for-cmake-system-processor.patch
package/openpowerlink/0001-fix-use-a-better-regex-for-cmake-system-processor.patch new file +89 -0
@@ -0,0 +1,89 @@ +From 9fd3aef2f9bb7a2b05b6823281bb5c988fa25149 Mon Sep 17 00:00:00 2001 +From: Romain Naour <[email protected]> +Date: Mon, 17 Nov 2014 23:27:05 +0100 +Subject: [PATCH 1/2] [FIX] use a better regex for CMAKE_SYSTEM_PROCESSOR + +According to CMake doc, CMAKE_SYSTEM_PROCESSOR is set to the +output of the command "uname -p" (in fact it is the output of "uname +-m"). This is only true for native compilation. + +In the case of cross-compilation, the CMake code does not set anything, +it just expects the CMAKE_SYSTEM_* variables to be set in the +toolchain file. + +Add a test matching the patern "^i.86$" and keep the old one "x86" for +compatibility. +By doing that, factorize this test using "^(i.86|x86(_64)?)$". + +Thanks to Samuel Martin [1] +[1] http://lists.busybox.net/pipermail/buildroot/2014-November/112163.html + +Signed-off-by: Romain Naour <[email protected]> +--- + Examples/X86/Linux/gnu/demo_kernel/CMakeLists.txt | 15 ++++----------- + .../X86/Linux/gnu/powerlink_kernel_module/CMakeLists.txt | 15 ++++----------- + 2 files changed, 8 insertions(+), 22 deletions(-) + +diff --git a/Examples/X86/Linux/gnu/demo_kernel/CMakeLists.txt b/Examples/X86/Linux/gnu/demo_kernel/CMakeLists.txt +index 271ecdc..b49ef53 100644 +--- a/Examples/X86/Linux/gnu/demo_kernel/CMakeLists.txt ++++ b/Examples/X86/Linux/gnu/demo_kernel/CMakeLists.txt +@@ -154,21 +154,14 @@ SET(MODULE_SOURCE_FILES + ${POWERLINK_SOURCE_DIR}/ObjDicts/${OBJDICT}/Objdict.c + ) + +-IF (CMAKE_SYSTEM_PROCESSOR STREQUAL x86) ++IF (CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86(_64)?)$") + SET(MODULE_SOURCE_FILES ${MODULE_SOURCE_FILES} ${POWERLINK_SOURCE_DIR}/EplStack/amix86.c) +- +-ELSEIF ( CMAKE_SYSTEM_PROCESSOR STREQUAL arm +- OR CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l) ++ELSEIF (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l") + SET(MODULE_SOURCE_FILES ${MODULE_SOURCE_FILES} ${POWERLINK_SOURCE_DIR}/EplStack/amiarm.c) +- +-ELSEIF ( CMAKE_SYSTEM_PROCESSOR STREQUAL i686 +- OR CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64) +- SET(MODULE_SOURCE_FILES ${MODULE_SOURCE_FILES} ${POWERLINK_SOURCE_DIR}/EplStack/amix86.c) +- +-ELSE (CMAKE_SYSTEM_PROCESSOR STREQUAL x86) ++ELSE (CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86(_64)?)$") + MESSAGE(FATAL_ERROR + "ami: CMAKE_SYSTEM_PROCESSOR is set to ${CMAKE_SYSTEM_PROCESSOR}. Valid targets are (x86, x86_64, arm, armv7l, i686).") +-ENDIF (CMAKE_SYSTEM_PROCESSOR STREQUAL x86) ++ENDIF (CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86(_64)?)$") + + SET(MODULE_FILE + ${MODULE_NAME}.ko +diff --git a/Examples/X86/Linux/gnu/powerlink_kernel_module/CMakeLists.txt b/Examples/X86/Linux/gnu/powerlink_kernel_module/CMakeLists.txt +index 1b47c76..f534a4d 100644 +--- a/Examples/X86/Linux/gnu/powerlink_kernel_module/CMakeLists.txt ++++ b/Examples/X86/Linux/gnu/powerlink_kernel_module/CMakeLists.txt +@@ -171,21 +171,14 @@ ELSE(CFG_POWERLINK_EDRV STREQUAL "I210") + SET(MODULE_SOURCE_FILES ${MODULE_SOURCE_FILES} ${POWERLINK_SOURCE_DIR}/Target/X86/Linux/gnu/generic/TimerHighReskX86.c) + ENDIF(CFG_POWERLINK_EDRV STREQUAL "I210") + +-IF (CMAKE_SYSTEM_PROCESSOR STREQUAL x86) ++IF (CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86(_64)?)$") + SET(MODULE_SOURCE_FILES ${MODULE_SOURCE_FILES} ${POWERLINK_SOURCE_DIR}/EplStack/amix86.c) +- +-ELSEIF ( CMAKE_SYSTEM_PROCESSOR STREQUAL arm +- OR CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l) ++ELSEIF (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l") + SET(MODULE_SOURCE_FILES ${MODULE_SOURCE_FILES} ${POWERLINK_SOURCE_DIR}/EplStack/amiarm.c) +- +-ELSEIF ( CMAKE_SYSTEM_PROCESSOR STREQUAL i686 +- OR CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64) +- SET(MODULE_SOURCE_FILES ${MODULE_SOURCE_FILES} ${POWERLINK_SOURCE_DIR}/EplStack/amix86.c) +- +-ELSE (CMAKE_SYSTEM_PROCESSOR STREQUAL x86) ++ELSE (CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86(_64)?)$") + MESSAGE(FATAL_ERROR + "ami: CMAKE_SYSTEM_PROCESSOR is set to ${CMAKE_SYSTEM_PROCESSOR}. Valid targets are (x86, x86_64, arm, armv7l, i686).") +-ENDIF (CMAKE_SYSTEM_PROCESSOR STREQUAL x86) ++ENDIF (CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86(_64)?)$") + + SET(MODULE_FILE + ${MODULE_NAME}.ko +-- +1.9.3 +
package/openpowerlink/openpowerlink.mk +0 -10
@@ -11,16 +11,6 @@ OPENPOWERLINK_LICENSE = BSD-2c, GPLv2 OPENPOWERLINK_LICENSE_FILES = license.txt OPENPOWERLINK_INSTALL_STAGING = YES -ifeq ($(BR2_i386),y) -OPENPOWERLINK_ARCH = x86 -endif - -ifeq ($(BR2_x86_64),y) -OPENPOWERLINK_ARCH = x86_64 -endif - -OPENPOWERLINK_CONF_OPTS = -DCMAKE_SYSTEM_PROCESSOR=$(OPENPOWERLINK_ARCH) - # There is no shared lib in openpowerlink, # so force static lib to build libpowerlink.a OPENPOWERLINK_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF
Signature · 1 line
1.9.3
PATCH v2 2/3 package/openpowerlink: do not override CMAKE_SYSTEM_PROCESSOR
Dear Romain Naour,
Quoted 9 lines · Romain Naour
Signed-off-by Romain Naour <[email protected]>---
This commit must be applied after "pkg-cmake.mk: Set
CMAKE_SYSTEM_PROCESSOR"
http://patchwork.ozlabs.org/patch/411789/v2: rework the regex (Samuel Martin)
--- ...a-better-regex-for-cmake-system-processor.patch | 89 ++++++++++++++++++++++
Can you submit this upstream?
Quoted 1 line
++ELSEIF (
CMAKE_SYSTEM_PROCESSORSTREQUAL "arm" ORCMAKE_SYSTEM_PROCESSORSTREQUAL "armv7l")
I think many other values than "arm" and "armv7l" are possible. Actually arm* indicates it's ARM.
But since this package is anyway only selectable on x86 and x86-64 in Buildroot, I applied the patch nonetheless.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 2/3 package/openpowerlink: do not override CMAKE_SYSTEM_PROCESSOR
Hi Thomas,
Le 11/12/2014 00:20, Thomas Petazzoni a ?crit :
Quoted 6 lines
Dear Romain Naour,
Quoted 3 lines · Romain Naour
Signed-off-by Romain Naour <[email protected]>---
Quoted 9 lines
Quoted 6 lines
This commit must be applied after "pkg-cmake.mk: Set
CMAKE_SYSTEM_PROCESSOR"
http://patchwork.ozlabs.org/patch/411789/v2: rework the regex (Samuel Martin)
--- ...a-better-regex-for-cmake-system-processor.patch | 89 ++++++++++++++++++++++Can you submit this upstream?
This patch is available in my sourceforge repository for openpowerlink's maintainers:
https://sourceforge.net/u/kubu/openPOWERLINK/ci/v1.8.5-bug-fix/tree/
Quoted 9 lines
Quoted 2 lines
++ELSEIF (
CMAKE_SYSTEM_PROCESSORSTREQUAL "arm" ORCMAKE_SYSTEM_PROCESSORSTREQUAL "armv7l")I think many other values than "arm" and "armv7l" are possible. Actually arm* indicates it's ARM.
But since this package is anyway only selectable on x86 and x86-64 in Buildroot, I applied the patch nonetheless.
Well, Openpowerlink is mainly used with x86 for now. But you're right the test need to be fixed upstream.
Best regards,
Signature · 8 lines
Romain Naour OPEN WIDE Ing?nierie - Paris 23/25, rue Daviel| 75013 PARIS http://ingenierie.openwide.fr Le blog des technologies libres et embarqu?es : http://www.linuxembedded.fr
PATCH v2 3/3 package/openpowerlink: enable dynamic build
In reply to Romain NaourAlso remove the install hook, all static libraries are removed from TARGET_DIR/usr/lib by target-finalize target
---
v2: new patch
--- ...-fix-user-space-stack-enable-shared-build.patch | 54 ++++++++++++++++++++++ package/openpowerlink/openpowerlink.mk | 10 +--- 2 files changed, 55 insertions(+), 9 deletions(-) create mode 100644 package/openpowerlink/0002-fix-user-space-stack-enable-shared-build.patch
package/openpowerlink/0002-fix-user-space-stack-enable-shared-build.patch new file +54 -0
@@ -0,0 +1,54 @@ +From 9c11eef037dc1137ab7a4656e45afde7d1a615c4 Mon Sep 17 00:00:00 2001 +From: Romain Naour <[email protected]> +Date: Sat, 22 Nov 2014 16:38:01 +0100 +Subject: [PATCH 2/2] [FIX]: user space stack: enable dynamic build + +The build fail if BUILD_SHARED_LIBS is set to ON. + +Depending on BUILD_SHARED_LIBS, link with STATIC or SHARED. + +Signed-off-by: Romain Naour <[email protected]> +--- + Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt b/Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt +index 40b7756..27360f2 100644 +--- a/Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt ++++ b/Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt +@@ -93,7 +93,13 @@ ENDIF(CFG_STORE_RESTORE) + # + # Set type of library + # +-IF (WIN32) ++IF (UNIX) ++ IF (BUILD_SHARED_LIBS) ++ SET(LIB_TYPE "SHARED") ++ ELSE (BUILD_SHARED_LIBS) ++ SET(LIB_TYPE "STATIC") ++ ENDIF(BUILD_SHARED_LIBS) ++ELSEIF (WIN32) + IF(CFG_X86_WINDOWS_DLL) + SET(LIB_TYPE "SHARED") + ELSE(CFG_X86_WINDOWS_DLL) +@@ -313,7 +319,7 @@ ENDIF () + # Define library source code + # + IF (UNIX) +- ADD_LIBRARY(powerlink ${LIB_SOURCES} ${LIB_SOURCES_KERNEL} ${LIB_SOURCES_USER} ${LIB_HEADERS} ${LIB_HEADERS_KERNEL} ${LIB_HEADERS_USER} ${LIB_OBJDICT}) ++ ADD_LIBRARY(powerlink ${LIB_TYPE} ${LIB_SOURCES} ${LIB_SOURCES_KERNEL} ${LIB_SOURCES_USER} ${LIB_HEADERS} ${LIB_HEADERS_KERNEL} ${LIB_HEADERS_USER} ${LIB_OBJDICT}) + + SET_PROPERTY(TARGET powerlink + PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL}) +@@ -330,7 +336,7 @@ ENDIF () + # Installation + # + IF (UNIX) +- INSTALL(TARGETS powerlink ARCHIVE DESTINATION lib) ++ INSTALL(TARGETS powerlink ARCHIVE DESTINATION lib LIBRARY DESTINATION lib COMPONENT library) + ELSEIF (WIN32) + IF (CFG_X86_WINDOWS_DLL) + INSTALL(TARGETS openPOWERLINK RUNTIME DESTINATION bin) +-- +1.9.3 +
package/openpowerlink/openpowerlink.mk +1 -9
@@ -11,20 +11,12 @@ OPENPOWERLINK_LICENSE = BSD-2c, GPLv2 OPENPOWERLINK_LICENSE_FILES = license.txt OPENPOWERLINK_INSTALL_STAGING = YES -# There is no shared lib in openpowerlink, -# so force static lib to build libpowerlink.a -OPENPOWERLINK_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF - -OPENPOWERLINK_CONF_OPTS += -DCFG_DEBUG_LVL=$(call qstrip,$(BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL)) +OPENPOWERLINK_CONF_OPTS = -DCFG_DEBUG_LVL=$(call qstrip,$(BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL)) ifeq ($(BR2_PACKAGE_OPENPOWERLINK_LIBPCAP),y) # use the user space stack (libpcap) OPENPOWERLINK_CONF_OPTS += -DCFG_KERNEL_STACK=OFF OPENPOWERLINK_DEPENDENCIES = libpcap -define OPENPOWERLINK_REMOVE_LIB - rm $(TARGET_DIR)/usr/lib/libpowerlink.a -endef -OPENPOWERLINK_POST_INSTALL_TARGET_HOOKS += OPENPOWERLINK_REMOVE_LIB else # use the kernel stack OPENPOWERLINK_CONF_OPTS += -DCFG_KERNEL_STACK=ON \
Signature · 1 line
1.9.3
Thomas Petazzoni
AppliedPATCH v2 3/3 package/openpowerlink: enable dynamic build
Dear Romain Naour,
Quoted 4 lines · Romain Naour
Also remove the install hook, all static libraries are removed from TARGET_DIR/usr/lib by target-finalize target
Signed-off-by Romain Naour <[email protected]>
Applied, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Thomas Petazzoni
AppliedPATCH v2 1/3 package/openpowerlink: bump to version 1.8.5
In reply to Romain NaourDear Romain Naour,
Quoted 10 lines · Romain Naour
Remove upstream commit
Signed-off-by Romain Naour <[email protected]>---
v2: First bump the vertion to avoid to rename the existing patch.--- ...-Fix-Linux-Powerlink-user-lib-add-INSTALL.patch | 28 ---------------------- package/openpowerlink/openpowerlink.mk | 2 +- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 package/openpowerlink/openpowerlink-0001-Fix-Linux-Powerlink-user-lib-add-INSTALL.patch
Applied, thanks. I don't know if it's related to the bump, but it's showing here a message that might be worth investigating:
CMake Warning at /home/thomas/projets/buildroot/output/host/usr/share/cmake-3.0/Modules/FindQt4.cmake:616 (message):
/usr/bin/qmake reported QT_INSTALL_LIBS as "/usr/lib/x86_64-linux-gnu" but
QtCore could not be found there. Qt is NOT installed correctly for the
target build environment.
Call Stack (most recent call first):
CMakeLists.txt:72 (FIND_PACKAGE)
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/3 package/openpowerlink: bump to version 1.8.5
Hi Thomas,
Le 11/12/2014 00:18, Thomas Petazzoni a ?crit :
Quoted 17 lines
Dear Romain Naour,
Quoted 10 lines · Romain Naour
Remove upstream commit
Signed-off-by Romain Naour <[email protected]>---
v2: First bump the vertion to avoid to rename the existing patch.--- ...-Fix-Linux-Powerlink-user-lib-add-INSTALL.patch | 28 ---------------------- package/openpowerlink/openpowerlink.mk | 2 +- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 package/openpowerlink/openpowerlink-0001-Fix-Linux-Powerlink-user-lib-add-INSTALL.patchApplied, thanks. I don't know if it's related to the bump, but it's showing here a message that might be worth investigating:
Quoted 7 lines
CMake Warning at
/home/thomas/projets/buildroot/output/host/usr/share/cmake-3.0/Modules/FindQt4.cmake:616(message):
/usr/bin/qmakereportedQT_INSTALL_LIBSas "/usr/lib/x86_64-linux-gnu" but
QtCore could not be found there. Qt is NOT installed correctly for the
target build environment.
Call Stack (most recent call first):
CMakeLists.txt:72 (FIND_PACKAGE)
Qt is only needed for the demo named "demo_mn_qt", but Qt is always checked even if this demo is disabled.
Ok, it's an annoying warning, I'll send a patch upstream.
For real Openpowerlink use case, Qt is not needed.
Best regards,
Signature · 8 lines
Romain Naour OPEN WIDE Ing?nierie - Paris 23/25, rue Daviel| 75013 PARIS http://ingenierie.openwide.fr Le blog des technologies libres et embarqu?es : http://www.linuxembedded.fr