Skip to contentSkip to conversation

Openpowerlink: new package

PATCH New Romain Naour 3 participants 12 messages Sep 21, 2013 – Sep 23, 2013 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 Openpowerlink: new package

---
 package/Config.in                                  |  1 +
 package/openpowerlink/Config.in                    | 92 +++++++++++++++++++++
 .../openpowerlink-FIX-demo_mn_qt.patch             | 27 +++++++
 package/openpowerlink/openpowerlink.mk             | 93 ++++++++++++++++++++++
 4 files changed, 213 insertions(+)
 create mode 100644 package/openpowerlink/Config.in
 create mode 100644 package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch
 create mode 100644 package/openpowerlink/openpowerlink.mk
package/Config.in +1 -0
index e1dfd5d..fdf9b55 100644
@@ -912,6 +912,7 @@ endmenu
 menu "Real-Time"
 source "package/xenomai/Config.in"
 source "package/rtai/Config.in"
+source "package/openpowerlink/Config.in"
 endmenu
 
 menu "Shell and utilities"
package/openpowerlink/Config.in new file +92 -0

92 lines not on this page · raw message

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +27 -0
new file mode 100644
index 0000000..a71298d
@@ -0,0 +1,27 @@
+From 8658075bd7c49a7481e8f6d0d7a13b0651e1dfd7 Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+Date: Wed, 18 Sep 2013 23:33:04 +0200
+Subject: [PATCH 1/1] [FIX] demo_mn_qt: add EplDebug.c in demo_sources list
+
+demo_mn_qt use EplGetEmergErrCodeStr()
+
+Signed-off-by: Romain Naour <[email protected]>
+---
+ Examples/X86/Generic/demo_mn_qt/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt b/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt
+index 9db2f7f..48ae9eb 100644
+--- a/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt
++++ b/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt
+@@ -78,6 +78,7 @@ SET(DEMO_SOURCES src/EplApi.cpp
+                  src/MainWindow.cpp
+                  src/NodeState.cpp
+                  ${POWERLINK_SOURCE_DIR}/ObjDicts/${OBJDICT}/EplApiProcessImageSetup.c
++                 ${POWERLINK_SOURCE_DIR}/EplStack/EplDebug.c
+     )
+ 
+ # The TRACE macros need trace.c on the Windows platform
+-- 
+1.8.4
+
package/openpowerlink/openpowerlink.mk new file +93 -0

93 lines not on this page · raw message

Signature · 1 line
1.8.4
#2 lore raw

PATCH 1/1 Openpowerlink: new package

Hi Romain,

Thanks for contributing! A few comments below.

Op 21-sep.-2013 02:48 schreef "Romain Naour" <[email protected]> het volgende:

Quoted 6 lines
---
 package/Config.in                                  |  1 +
 package/openpowerlink/Config.in                    | 92

+++++++++++++++++++++

Quoted 2 lines
 .../openpowerlink-FIX-demo_mn_qt.patch             | 27 +++++++
 package/openpowerlink/openpowerlink.mk             | 93

++++++++++++++++++++++

Quoted 3 lines
 4 files changed, 213 insertions(+)
 create mode 100644 package/openpowerlink/Config.in
 create mode 100644

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch

package/Config.in endmenu · line 915

Quoted 11 lines
 create mode 100644 package/openpowerlink/openpowerlink.mk
package/Config.in +1 -0
index e1dfd5d..fdf9b55 100644
@@ -912,6 +912,7 @@ endmenu
 menu "Real-Time"
 source "package/xenomai/Config.in"
 source "package/rtai/Config.in"
+source "package/openpowerlink/Config.in"

Is real-time the right menu for openpowerlink? The current packages in that menu provide real time capabilities, not packages you use in a real time environment. There is an other menu 'hardware handling' that at first sight seems also fitting.

Note that entries should be in alphabetical order, but apparently xenomai and rtai weren't yet.

Review

Quoted 4 lines
package/Config.in +0 -0
 endmenu
 
 menu "Shell and utilities"
(quoted diff) +0 -0

b/package/openpowerlink/Config.in

package/openpowerlink/Config.in line 5

Quoted 10 lines

new file mode 100644
index 0000000..42a6099

package/openpowerlink/Config.in new file +5 -0
@@ -0,0 +1,92 @@
+comment "openpowerlink requires thread support in toolchain"
+       depends on !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_OPENPOWERLINK
+       bool "Openpowerlink"

We typically write such entries in all-lowercase.

package/openpowerlink/Config.in

Quoted 6 lines
package/openpowerlink/Config.in new file +6 -0
+       depends on BR2_TOOLCHAIN_HAS_THREADS
+       depends on BR2_i386 || BR2_x86_64
+       help
+         openPOWERLINK is an Open Source Industrial Ethernet
+         stack implementing the POWERLINK protocol for Managing Node
+         (MN, POWERLINK Master) and Controlled Node (CN, POWERLINK

Slave).

package/openpowerlink/Config.in line 13

Quoted 2 lines
package/openpowerlink/Config.in new file +2 -0
+
+         It is provided by SYSTEC electronic (

http://www.systec-electronic.com),

package/openpowerlink/Config.in line 15

Quoted 2 lines
package/openpowerlink/Config.in new file +2 -0
+         B&R (http://www.br-automation.com) and
+         Kalycito (http://www.kalycito.com).

It's there a url specifically for this package? This should be mentioned as the last line of the entry.

package/openpowerlink/Config.in line 20

Quoted 5 lines
package/openpowerlink/Config.in new file +5 -0
+
+if BR2_PACKAGE_OPENPOWERLINK
+
+choice
+       prompt "Openpowerlink mode"

Is it necessary to repeat the package name here?

package/openpowerlink/Config.in

Quoted 10 lines
package/openpowerlink/Config.in new file +10 -0
+
+config BR2_PACKAGE_OPENPOWERLINK_LIBPCAP
+       bool "userspace stack"
+       select BR2_PACKAGE_LIBPCAP
+
+config BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE
+       bool "kernel stack"
+       depends on BR2_LINUX_KERNEL
+       help
+         You may select BR2_PACKAGE_PCIUTILS for lscpi, and

BR2_PACKAGE_PROCPS for ps command.

package/openpowerlink/Config.in line 33

Quoted 3 lines
package/openpowerlink/Config.in new file +3 -0
+         These commands are used in EplLoad and EplUndload scripts.
+
+endchoice

Is there more help that can be given for both options? Are there benefits/advantages on either? Or limitations in functionality?

Quoted 4 lines
package/openpowerlink/Config.in new file +4 -0
+
+if BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE
+
+choice

package/openpowerlink/Config.in line 47

Quoted 10 lines
package/openpowerlink/Config.in new file +10 -0
+       prompt "Select Ethernet Powerlink Driver"
+
+config BR2_PACKAGE_OPENPOWERLINK_82573
+       bool "Intel 82573"
+
+config BR2_PACKAGE_OPENPOWERLINK_8255x
+       bool "Intel 8255x"
+
+config BR2_PACKAGE_OPENPOWERLINK_RTL8139
+       bool "Realteck RTL-8139"

This should be Realtek

Quoted 11 lines
package/openpowerlink/Config.in new file +11 -0
+
+endchoice
+
+endif
+
+choice
+       prompt "Select MN/CN mode"
+
+       config BR2_PACKAGE_OPENPOWERLINK_MN
+       bool "MN"
+       help

package/openpowerlink/Config.in line 68

Quoted 10 lines
package/openpowerlink/Config.in new file +10 -0
+         Enable Managing Node mode
+
+       config BR2_PACKAGE_OPENPOWERLINK_CN
+       bool "CN"
+       help
+         Enable Controlled Node mode
+
+endchoice
+
+# Powerlink Demos

It would make sense to group the demos under a suboption, don't you think?

Review

Quoted 25 lines
package/openpowerlink/Config.in new file +24 -0
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE
+       bool "Console MN demo"
+       depends on BR2_PACKAGE_OPENPOWERLINK_MN
+
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_QT
+       bool "QT MN demo"
+       depends on BR2_PACKAGE_OPENPOWERLINK_MN
+       select BR2_PACKAGE_QT
+       select BR2_PACKAGE_QT_STL
+
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE
+       bool "Console CN demo"
+       depends on !BR2_PACKAGE_OPENPOWERLINK_MN
+
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_LINUX_KERNEL
+       bool "Kernel demo"
+       depends on BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE
+
+config BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL
+       string "Debug level for EPL"
+       help
+         default value: 0xEC000000L
+
+endif
(quoted diff) +0 -0

b/package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch

Patches should be named openpowerlink-0001-description.patch, and we typically use lowercase and dashes for the description.

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch line 4

Quoted 9 lines

new file mode 100644
index 0000000..a71298d

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +4 -0
@@ -0,0 +1,27 @@
+From 8658075bd7c49a7481e8f6d0d7a13b0651e1dfd7 Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+Date: Wed, 18 Sep 2013 23:33:04 +0200
+Subject: [PATCH 1/1] [FIX] demo_mn_qt: add EplDebug.c in demo_sources

list

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch

Quoted 9 lines
package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +9 -0
+
+demo_mn_qt use EplGetEmergErrCodeStr()
+
+Signed-off-by: Romain Naour <[email protected]>
+---
+ Examples/X86/Generic/demo_mn_qt/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt

b/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch line 23

Quoted 7 lines
package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +7 -0
+index 9db2f7f..48ae9eb 100644
+--- a/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt
++++ b/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt
+@@ -78,6 +78,7 @@ SET(DEMO_SOURCES src/EplApi.cpp
+                  src/MainWindow.cpp
+                  src/NodeState.cpp
+

${POWERLINK_SOURCE_DIR}/ObjDicts/${OBJDICT}/EplApiProcessImageSetup.c

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch line 27

Quoted 7 lines
package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +7 -0
++                 ${POWERLINK_SOURCE_DIR}/EplStack/EplDebug.c
+     )
+
+ # The TRACE macros need trace.c on the Windows platform
+--
+1.8.4
+

Is this patch something that can be upstreamed?

Review

Quoted 1 line
(quoted diff) +0 -0

openpowerlink.mk

package/openpowerlink/openpowerlink.mk

Quoted 6 lines

new file mode 100644
index 0000000..ac28de9

package/openpowerlink/openpowerlink.mk new file +0 -0
@@ -0,0 +1,93 @@

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

package/openpowerlink/openpowerlink.mk line 4

Quoted 4 lines
package/openpowerlink/openpowerlink.mk new file +3 -0
+#
+# openPOWERLINK
+#

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

package/openpowerlink/openpowerlink.mk

Quoted 4 lines
package/openpowerlink/openpowerlink.mk new file +4 -0
+
+OPENPOWERLINK_VERSION = V1.08.3
+OPENPOWERLINK_SOURCE = openPOWERLINK-$(OPENPOWERLINK_VERSION).zip
+OPENPOWERLINK_SITE =

http://downloads.sourceforge.net/project/openpowerlink/openPOWERLINK/V1.8.3

Quoted 8 lines
package/openpowerlink/openpowerlink.mk new file +8 -0
+
+OPENPOWERLINK_LICENSE = BSD-2c, GPLv2
+OPENPOWERLINK_LICENSE_FILES = license.txt
+OPENPOWERLINK_INSTALL_STAGING = YES
+
+ifeq ($(BR2_i386),y)
+OPENPOWERLINK_ARCH = x86
+endif

package/openpowerlink/openpowerlink.mk

Quoted 10 lines
package/openpowerlink/openpowerlink.mk new file +10 -0
+
+ifeq ($(BR2_x86_64),y)
+OPENPOWERLINK_ARCH = x86_64
+endif
+
+OPENPOWERLINK_CONF_OPT = -DCMAKE_SYSTEM_PROCESSOR=$(OPENPOWERLINK_ARCH)
+OPENPOWERLINK_CONF_OPT += -DCMAKE_BUILD_TYPE=Debug
+OPENPOWERLINK_CONF_OPT += -DCMAKE_INSTALL_PREFIX=/usr/
+
+OPENPOWERLINK_DEBUG_LEVEL = $(call

qstrip,$(BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL))

package/openpowerlink/openpowerlink.mk line 30

Quoted 3 lines
package/openpowerlink/openpowerlink.mk new file +3 -0
+
+ifeq ($(OPENPOWERLINK_DEBUG_LEVEL),)
+OPENPOWERLINK_CONF_OPT += -DCFG_DEBUG_LVL=0xEC000000L

What about moving this as default to Config.in, then you don't need a if-else here?

Quoted 50 lines
package/openpowerlink/openpowerlink.mk new file +50 -0
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_DEBUG_LVL=$(OPENPOWERLINK_DEBUG_LEVEL)
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_LIBPCAP),y)
+#  use the user space stack (libpcap)
+OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_STACK=OFF
+OPENPOWERLINK_DEPENDENCIES = libpcap
+else
+# use the kernel stack
+OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_STACK=ON
+OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_DIR=$(LINUX_DIR)
+OPENPOWERLINK_CONF_OPT += -DCMAKE_SYSTEM_VERSION=$(LINUX_VERSION)
+OPENPOWERLINK_DEPENDENCIES = linux
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_82573),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=82573
+else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_RTL8139),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=8139
+else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_8255x),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=8255x
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_MN),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_MN=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_MN=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_CONSOLE=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_CONSOLE=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_QT),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_QT=ON
+OPENPOWERLINK_DEPENDENCIES += qt
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_QT=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_CN_CONSOLE=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_CN_CONSOLE=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_LINUX_KERNEL),y)

package/openpowerlink/openpowerlink.mk

Quoted 10 lines
package/openpowerlink/openpowerlink.mk new file +10 -0
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_LINUX_KERNEL=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_LINUX_KERNEL=OFF
+endif
+
+define OPENPOWERLINK_EXTRACT_CMDS
+       $(RM) -rf $(OPENPOWERLINK_DIR)
+       unzip -q -d $(BUILD_DIR)/ $(DL_DIR)/$(OPENPOWERLINK_SOURCE)
+       test -d $(OPENPOWERLINK_DIR) || \
+               mv $(BUILD_DIR)/$(subst .zip,,$(OPENPOWERLINK_SOURCE))

$(OPENPOWERLINK_DIR)

Quoted 5 lines
package/openpowerlink/openpowerlink.mk new file +3 -1
+endef
+
+$(eval $(cmake-package))
--

1.8.4

Best regards,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130921/e097f2d9/attachment-0001.html>

#3 lore raw

PATCH 1/1 Openpowerlink: new package

Dear Thomas De Schampheleire,

Quoted 8 lines · Thomas De Schampheleire

Hi Romain,

Thanks for contributing! A few comments below.

Op 21-sep.-2013 02:48 schreef "Romain Naour" <[email protected]> het volgende:

Quoted 2 lines
Quoted 9 lines
Quoted 4 lines
---
 package/Config.in                                  |  1 +
 package/openpowerlink/Config.in                    | 92

+++++++++++++++++++++

Quoted 2 lines
 .../openpowerlink-FIX-demo_mn_qt.patch             | 27 +++++++
 package/openpowerlink/openpowerlink.mk             | 93

++++++++++++++++++++++

Quoted 1 line
 4 files changed, 213 insertions(+)

Whenever you reply to an e-mail, since a few weeks, your replies are badly line-wrapped. Would it be possible to tune your e-mail client not to do so?

Thanks a lot!

Thomas

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

PATCH 1/1 Openpowerlink: new package

In reply to Thomas De Schampheleire

Hi Thomas,

Le 21/09/2013 09:16, Thomas De Schampheleire a ?crit :

Quoted 3 lines

Hi Romain,

Thanks for contributing! A few comments below.

You're welcome.

Quoted 15 lines

Op 21-sep.-2013 02:48 schreef "Romain Naour" <romain.naour at openwide.fr <mailto:[email protected]>> het volgende:

Quoted 13 lines
Signed-off-by Romain Naour <romain.naour at openwide.fr <mailto:[email protected]>>
---
 package/Config.in                                  |  1 +
 package/openpowerlink/Config.in                    | 92 +++++++++++++++++++++
 .../openpowerlink-FIX-demo_mn_qt.patch             | 27 +++++++
 package/openpowerlink/openpowerlink.mk <http://openpowerlink.mk>             | 93 ++++++++++++++++++++++
 4 files changed, 213 insertions(+)
 create mode 100644 package/openpowerlink/Config.in
 create mode 100644 package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch
 create mode 100644 package/openpowerlink/openpowerlink.mk <http://openpowerlink.mk>
Quoted 12 lines

package/Config.in endmenu · line 915

Quoted 9 lines
package/Config.in +1 -0
index e1dfd5d..fdf9b55 100644
@@ -912,6 +912,7 @@ endmenu
 menu "Real-Time"
 source "package/xenomai/Config.in"
 source "package/rtai/Config.in"
+source "package/openpowerlink/Config.in"

Is real-time the right menu for openpowerlink? The current packages in that menu provide real time capabilities, not packages you use in a real time environment. There is an other menu 'hardware handling' that at first sight seems also fitting.

I wasn't sure about that...
It is because openpowerlink is mainly used when you're running a preempt-rt kernel.

Quoted 2 lines

Note that entries should be in alphabetical order, but apparently xenomai and rtai weren't yet.

I will fix that.

Quoted 29 lines
Quoted 10 lines
package/Config.in +0 -0
 endmenu
 
 menu "Shell and utilities"
package/openpowerlink/Config.in new file +0 -0
new file mode 100644
index 0000000..42a6099

package/openpowerlink/Config.in line 5

Quoted 5 lines
package/openpowerlink/Config.in new file +5 -0
@@ -0,0 +1,92 @@
+comment "openpowerlink requires thread support in toolchain"
+       depends on !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_OPENPOWERLINK
+       bool "Openpowerlink"

We typically write such entries in all-lowercase.

package/openpowerlink/Config.in line 15

Quoted 10 lines
package/openpowerlink/Config.in new file +10 -0
+       depends on BR2_TOOLCHAIN_HAS_THREADS
+       depends on BR2_i386 || BR2_x86_64
+       help
+         openPOWERLINK is an Open Source Industrial Ethernet
+         stack implementing the POWERLINK protocol for Managing Node
+         (MN, POWERLINK Master) and Controlled Node (CN, POWERLINK Slave).
+
+         It is provided by SYSTEC electronic (http://www.systec-electronic.com),
+         B&R (http://www.br-automation.com) and
+         Kalycito (http://www.kalycito.com).
Quoted 1 line

It's there a url specifically for this package? This should be mentioned as the last line of the entry.

yes, the sources are available at sourceforge.

Quoted 9 lines

package/openpowerlink/Config.in line 20

Quoted 6 lines
package/openpowerlink/Config.in new file +5 -0
+
+if BR2_PACKAGE_OPENPOWERLINK
+
+choice
+       prompt "Openpowerlink mode"

Is it necessary to repeat the package name here?

Quoted 15 lines

package/openpowerlink/Config.in line 33

Quoted 13 lines
package/openpowerlink/Config.in new file +13 -0
+
+config BR2_PACKAGE_OPENPOWERLINK_LIBPCAP
+       bool "userspace stack"
+       select BR2_PACKAGE_LIBPCAP
+
+config BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE
+       bool "kernel stack"
+       depends on BR2_LINUX_KERNEL
+       help
+         You may select BR2_PACKAGE_PCIUTILS for lscpi, and BR2_PACKAGE_PROCPS for ps command.
+         These commands are used in EplLoad and EplUndload scripts.
+
+endchoice

Is there more help that can be given for both options? Are there benefits/advantages on either? Or limitations in functionality?

I will add some help from openpowerlink documentation.

Quoted 17 lines
Quoted 5 lines
package/openpowerlink/Config.in new file +4 -0
+
+if BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE
+
+choice

package/openpowerlink/Config.in line 47

Quoted 10 lines
package/openpowerlink/Config.in new file +10 -0
+       prompt "Select Ethernet Powerlink Driver"
+
+config BR2_PACKAGE_OPENPOWERLINK_82573
+       bool "Intel 82573"
+
+config BR2_PACKAGE_OPENPOWERLINK_8255x
+       bool "Intel 8255x"
+
+config BR2_PACKAGE_OPENPOWERLINK_RTL8139
+       bool "Realteck RTL-8139"

This should be Realtek

thanks

Quoted 16 lines
Quoted 16 lines
package/openpowerlink/Config.in new file +15 -0
+
+endchoice
+
+endif
+
+choice
+       prompt "Select MN/CN mode"
+
+       config BR2_PACKAGE_OPENPOWERLINK_MN
+       bool "MN"
+       help
+         Enable Managing Node mode
+
+       config BR2_PACKAGE_OPENPOWERLINK_CN
+       bool "CN"
Quoted 8 lines

package/openpowerlink/Config.in line 68

Quoted 6 lines
package/openpowerlink/Config.in new file +6 -0
+       help
+         Enable Controlled Node mode
+
+endchoice
+
+# Powerlink Demos

It would make sense to group the demos under a suboption, don't you think?

Why not, ok.

Quoted 20 lines
Quoted 20 lines
package/openpowerlink/Config.in new file +19 -0
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE
+       bool "Console MN demo"
+       depends on BR2_PACKAGE_OPENPOWERLINK_MN
+
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_QT
+       bool "QT MN demo"
+       depends on BR2_PACKAGE_OPENPOWERLINK_MN
+       select BR2_PACKAGE_QT
+       select BR2_PACKAGE_QT_STL
+
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE
+       bool "Console CN demo"
+       depends on !BR2_PACKAGE_OPENPOWERLINK_MN
+
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_LINUX_KERNEL
+       bool "Kernel demo"
+       depends on BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE
+
+config BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL
Quoted 8 lines

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch

Quoted 6 lines
package/openpowerlink/Config.in new file +5 -0
+       string "Debug level for EPL"
+       help
+         default value: 0xEC000000L
+
+endif
package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch +0 -0

Patches should be named openpowerlink-0001-description.patch, and we typically use lowercase and dashes for the description.

ok

Quoted 27 lines
Quoted 27 lines

new file mode 100644
index 0000000..a71298d

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +21 -0
@@ -0,0 +1,27 @@
+From 8658075bd7c49a7481e8f6d0d7a13b0651e1dfd7 Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour at openwide.fr <mailto:[email protected]>>
+Date: Wed, 18 Sep 2013 23:33:04 +0200
+Subject: [PATCH 1/1] [FIX] demo_mn_qt: add EplDebug.c in demo_sources list
+
+demo_mn_qt use EplGetEmergErrCodeStr()
+
+Signed-off-by: Romain Naour <romain.naour at openwide.fr <mailto:[email protected]>>
+---
+ Examples/X86/Generic/demo_mn_qt/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt b/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt
+index 9db2f7f..48ae9eb 100644
+--- a/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt
++++ b/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt
+@@ -78,6 +78,7 @@ SET(DEMO_SOURCES src/EplApi.cpp
+                  src/MainWindow.cpp
+                  src/NodeState.cpp
+                  ${POWERLINK_SOURCE_DIR}/ObjDicts/${OBJDICT}/EplApiProcessImageSetup.c
++                 ${POWERLINK_SOURCE_DIR}/EplStack/EplDebug.c
Quoted 8 lines

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch line 27

Quoted 6 lines
package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +6 -0
+     )
+
+ # The TRACE macros need trace.c on the Windows platform
+--
+1.8.4
+

Is this patch something that can be upstreamed?

Definitely, my patches for openpowerlink are available in my sourceforge account. Openpowerlink's developers can get them for the next release.

Quoted 31 lines
Quoted 31 lines
package/openpowerlink/openpowerlink.mk <http://openpowerlink.mk> new file +24 -0
new file mode 100644
index 0000000..ac28de9
@@ -0,0 +1,93 @@
+################################################################################
+#
+# openPOWERLINK
+#
+################################################################################
+
+OPENPOWERLINK_VERSION = V1.08.3
+OPENPOWERLINK_SOURCE = openPOWERLINK-$(OPENPOWERLINK_VERSION).zip
+OPENPOWERLINK_SITE = http://downloads.sourceforge.net/project/openpowerlink/openPOWERLINK/V1.8.3
+
+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_OPT = -DCMAKE_SYSTEM_PROCESSOR=$(OPENPOWERLINK_ARCH)
+OPENPOWERLINK_CONF_OPT += -DCMAKE_BUILD_TYPE=Debug
Quoted 8 lines

package/openpowerlink/openpowerlink.mk <http://openpowerlink.mk> line 30

Quoted 6 lines
package/openpowerlink/openpowerlink.mk <http://openpowerlink.mk> new file +6 -0
+OPENPOWERLINK_CONF_OPT += -DCMAKE_INSTALL_PREFIX=/usr/
+
+OPENPOWERLINK_DEBUG_LEVEL = $(call qstrip,$(BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL))
+
+ifeq ($(OPENPOWERLINK_DEBUG_LEVEL),)
+OPENPOWERLINK_CONF_OPT += -DCFG_DEBUG_LVL=0xEC000000L

What about moving this as default to Config.in, then you don't need a if-else here?

Ok

Quoted 61 lines
Quoted 61 lines
package/openpowerlink/openpowerlink.mk <http://openpowerlink.mk> new file +60 -0
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_DEBUG_LVL=$(OPENPOWERLINK_DEBUG_LEVEL)
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_LIBPCAP),y)
+#  use the user space stack (libpcap)
+OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_STACK=OFF
+OPENPOWERLINK_DEPENDENCIES = libpcap
+else
+# use the kernel stack
+OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_STACK=ON
+OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_DIR=$(LINUX_DIR)
+OPENPOWERLINK_CONF_OPT += -DCMAKE_SYSTEM_VERSION=$(LINUX_VERSION)
+OPENPOWERLINK_DEPENDENCIES = linux
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_82573),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=82573
+else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_RTL8139),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=8139
+else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_8255x),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=8255x
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_MN),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_MN=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_MN=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_CONSOLE=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_CONSOLE=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_QT),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_QT=ON
+OPENPOWERLINK_DEPENDENCIES += qt
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_QT=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_CN_CONSOLE=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_CN_CONSOLE=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_LINUX_KERNEL),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_LINUX_KERNEL=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_LINUX_KERNEL=OFF
+endif
+
+define OPENPOWERLINK_EXTRACT_CMDS
+       $(RM) -rf $(OPENPOWERLINK_DIR)
+       unzip -q -d $(BUILD_DIR)/ $(DL_DIR)/$(OPENPOWERLINK_SOURCE)
+       test -d $(OPENPOWERLINK_DIR) || \
+               mv $(BUILD_DIR)/$(subst .zip,,$(OPENPOWERLINK_SOURCE)) $(OPENPOWERLINK_DIR)
Quoted 9 lines
Quoted 5 lines
package/openpowerlink/openpowerlink.mk <http://openpowerlink.mk> new file +3 -1
+endef
+
+$(eval $(cmake-package))
--

1.8.4

Best regards,
Thomas

Thank you Thomas for your review.

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
#5 lore raw

PATCH 1/1 Openpowerlink: new package

In reply to Romain Naour

Hi Thomas,

Op 21-sep.-2013 02:48 schreef "Romain Naour" <[email protected]> het volgende:

Quoted 6 lines
---
 package/Config.in                                  |  1 +
 package/openpowerlink/Config.in                    | 92

+++++++++++++++++++++

Quoted 2 lines
 .../openpowerlink-FIX-demo_mn_qt.patch             | 27 +++++++
 package/openpowerlink/openpowerlink.mk             | 93

++++++++++++++++++++++

Quoted 3 lines
 4 files changed, 213 insertions(+)
 create mode 100644 package/openpowerlink/Config.in
 create mode 100644

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch

Review

Quoted 15 lines
 create mode 100644 package/openpowerlink/openpowerlink.mk
package/Config.in +1 -0
index e1dfd5d..fdf9b55 100644
@@ -912,6 +912,7 @@ endmenu
 menu "Real-Time"
 source "package/xenomai/Config.in"
 source "package/rtai/Config.in"
+source "package/openpowerlink/Config.in"
 endmenu
 
 menu "Shell and utilities"
(quoted diff) +0 -0

b/package/openpowerlink/Config.in

Quoted 6 lines

new file mode 100644
index 0000000..42a6099

package/openpowerlink/Config.in new file +1 -0
@@ -0,0 +1,92 @@
+comment "openpowerlink requires thread support in toolchain"

package/openpowerlink/Config.in line 11

Quoted 10 lines
package/openpowerlink/Config.in new file +10 -0
+       depends on !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_OPENPOWERLINK
+       bool "Openpowerlink"
+       depends on BR2_TOOLCHAIN_HAS_THREADS
+       depends on BR2_i386 || BR2_x86_64
+       help
+         openPOWERLINK is an Open Source Industrial Ethernet
+         stack implementing the POWERLINK protocol for Managing Node
+         (MN, POWERLINK Master) and Controlled Node (CN, POWERLINK

Slave).

package/openpowerlink/Config.in line 13

Quoted 2 lines
package/openpowerlink/Config.in new file +2 -0
+
+         It is provided by SYSTEC electronic (

http://www.systec-electronic.com),

Quoted 7 lines
package/openpowerlink/Config.in new file +7 -0
+         B&R (http://www.br-automation.com) and
+         Kalycito (http://www.kalycito.com).
+
+if BR2_PACKAGE_OPENPOWERLINK
+
+choice
+       prompt "Openpowerlink mode"

package/openpowerlink/Config.in

Quoted 10 lines
package/openpowerlink/Config.in new file +10 -0
+
+config BR2_PACKAGE_OPENPOWERLINK_LIBPCAP
+       bool "userspace stack"
+       select BR2_PACKAGE_LIBPCAP
+
+config BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE
+       bool "kernel stack"
+       depends on BR2_LINUX_KERNEL
+       help
+         You may select BR2_PACKAGE_PCIUTILS for lscpi, and

BR2_PACKAGE_PROCPS for ps command.

Review

Quoted 63 lines
package/openpowerlink/Config.in new file +62 -0
+         These commands are used in EplLoad and EplUndload scripts.
+
+endchoice
+
+if BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE
+
+choice
+       prompt "Select Ethernet Powerlink Driver"
+
+config BR2_PACKAGE_OPENPOWERLINK_82573
+       bool "Intel 82573"
+
+config BR2_PACKAGE_OPENPOWERLINK_8255x
+       bool "Intel 8255x"
+
+config BR2_PACKAGE_OPENPOWERLINK_RTL8139
+       bool "Realteck RTL-8139"
+
+endchoice
+
+endif
+
+choice
+       prompt "Select MN/CN mode"
+
+       config BR2_PACKAGE_OPENPOWERLINK_MN
+       bool "MN"
+       help
+         Enable Managing Node mode
+
+       config BR2_PACKAGE_OPENPOWERLINK_CN
+       bool "CN"
+       help
+         Enable Controlled Node mode
+
+endchoice
+
+# Powerlink Demos
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE
+       bool "Console MN demo"
+       depends on BR2_PACKAGE_OPENPOWERLINK_MN
+
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_QT
+       bool "QT MN demo"
+       depends on BR2_PACKAGE_OPENPOWERLINK_MN
+       select BR2_PACKAGE_QT
+       select BR2_PACKAGE_QT_STL
+
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE
+       bool "Console CN demo"
+       depends on !BR2_PACKAGE_OPENPOWERLINK_MN
+
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_LINUX_KERNEL
+       bool "Kernel demo"
+       depends on BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE
+
+config BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL
+       string "Debug level for EPL"
+       help
+         default value: 0xEC000000L
+
+endif
(quoted diff) +0 -0

b/package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch line 4

Quoted 9 lines

new file mode 100644
index 0000000..a71298d

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +4 -0
@@ -0,0 +1,27 @@
+From 8658075bd7c49a7481e8f6d0d7a13b0651e1dfd7 Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+Date: Wed, 18 Sep 2013 23:33:04 +0200
+Subject: [PATCH 1/1] [FIX] demo_mn_qt: add EplDebug.c in demo_sources

list

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch

Quoted 9 lines
package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +9 -0
+
+demo_mn_qt use EplGetEmergErrCodeStr()
+
+Signed-off-by: Romain Naour <[email protected]>
+---
+ Examples/X86/Generic/demo_mn_qt/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt

b/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch line 23

Quoted 7 lines
package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +7 -0
+index 9db2f7f..48ae9eb 100644
+--- a/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt
++++ b/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt
+@@ -78,6 +78,7 @@ SET(DEMO_SOURCES src/EplApi.cpp
+                  src/MainWindow.cpp
+                  src/NodeState.cpp
+

${POWERLINK_SOURCE_DIR}/ObjDicts/${OBJDICT}/EplApiProcessImageSetup.c

Review

Quoted 8 lines
package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +7 -0
++                 ${POWERLINK_SOURCE_DIR}/EplStack/EplDebug.c
+     )
+
+ # The TRACE macros need trace.c on the Windows platform
+--
+1.8.4
+
(quoted diff) +0 -0

openpowerlink.mk

package/openpowerlink/openpowerlink.mk

Quoted 6 lines

new file mode 100644
index 0000000..ac28de9

package/openpowerlink/openpowerlink.mk new file +0 -0
@@ -0,0 +1,93 @@

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

package/openpowerlink/openpowerlink.mk line 4

Quoted 4 lines
package/openpowerlink/openpowerlink.mk new file +3 -0
+#
+# openPOWERLINK
+#

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

package/openpowerlink/openpowerlink.mk

Quoted 4 lines
package/openpowerlink/openpowerlink.mk new file +4 -0
+
+OPENPOWERLINK_VERSION = V1.08.3
+OPENPOWERLINK_SOURCE = openPOWERLINK-$(OPENPOWERLINK_VERSION).zip
+OPENPOWERLINK_SITE =

http://downloads.sourceforge.net/project/openpowerlink/openPOWERLINK/V1.8.3

Quoted 8 lines
package/openpowerlink/openpowerlink.mk new file +8 -0
+
+OPENPOWERLINK_LICENSE = BSD-2c, GPLv2
+OPENPOWERLINK_LICENSE_FILES = license.txt
+OPENPOWERLINK_INSTALL_STAGING = YES
+
+ifeq ($(BR2_i386),y)
+OPENPOWERLINK_ARCH = x86
+endif

package/openpowerlink/openpowerlink.mk

Quoted 10 lines
package/openpowerlink/openpowerlink.mk new file +10 -0
+
+ifeq ($(BR2_x86_64),y)
+OPENPOWERLINK_ARCH = x86_64
+endif
+
+OPENPOWERLINK_CONF_OPT = -DCMAKE_SYSTEM_PROCESSOR=$(OPENPOWERLINK_ARCH)
+OPENPOWERLINK_CONF_OPT += -DCMAKE_BUILD_TYPE=Debug
+OPENPOWERLINK_CONF_OPT += -DCMAKE_INSTALL_PREFIX=/usr/
+
+OPENPOWERLINK_DEBUG_LEVEL = $(call

qstrip,$(BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL))

Quoted 53 lines
package/openpowerlink/openpowerlink.mk new file +53 -0
+
+ifeq ($(OPENPOWERLINK_DEBUG_LEVEL),)
+OPENPOWERLINK_CONF_OPT += -DCFG_DEBUG_LVL=0xEC000000L
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_DEBUG_LVL=$(OPENPOWERLINK_DEBUG_LEVEL)
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_LIBPCAP),y)
+#  use the user space stack (libpcap)
+OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_STACK=OFF
+OPENPOWERLINK_DEPENDENCIES = libpcap
+else
+# use the kernel stack
+OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_STACK=ON
+OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_DIR=$(LINUX_DIR)
+OPENPOWERLINK_CONF_OPT += -DCMAKE_SYSTEM_VERSION=$(LINUX_VERSION)
+OPENPOWERLINK_DEPENDENCIES = linux
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_82573),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=82573
+else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_RTL8139),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=8139
+else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_8255x),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=8255x
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_MN),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_MN=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_MN=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_CONSOLE=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_CONSOLE=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_QT),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_QT=ON
+OPENPOWERLINK_DEPENDENCIES += qt
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_QT=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_CN_CONSOLE=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_CN_CONSOLE=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_LINUX_KERNEL),y)

package/openpowerlink/openpowerlink.mk

Quoted 10 lines
package/openpowerlink/openpowerlink.mk new file +10 -0
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_LINUX_KERNEL=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_LINUX_KERNEL=OFF
+endif
+
+define OPENPOWERLINK_EXTRACT_CMDS
+       $(RM) -rf $(OPENPOWERLINK_DIR)
+       unzip -q -d $(BUILD_DIR)/ $(DL_DIR)/$(OPENPOWERLINK_SOURCE)
+       test -d $(OPENPOWERLINK_DIR) || \
+               mv $(BUILD_DIR)/$(subst .zip,,$(OPENPOWERLINK_SOURCE))

$(OPENPOWERLINK_DIR)

Quoted 5 lines
package/openpowerlink/openpowerlink.mk new file +3 -1
+endef
+
+$(eval $(cmake-package))
--

1.8.4

Thanks for mentioning the line wrapping problem, I wasn't aware. I think the problem only occurs when I send mail from the gmail app on my phone. I now changed a setting but I fear it will not affect outgoing mail. This is a test mail.
If it doesn't work I'll find a better mail app for android. Suggestions are welcome...

Thanks,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130921/3c1e7610/attachment-0001.html>

#6 lore raw

PATCH 1/1 Openpowerlink: new package

Dear Thomas De Schampheleire,

Quoted 4 lines · Thomas De Schampheleire

Thanks for mentioning the line wrapping problem, I wasn't aware. I think the problem only occurs when I send mail from the gmail app on my phone. I now changed a setting but I fear it will not affect outgoing mail. This is a test mail.

Your reply was line-wrapped.

Quoted 2 lines

If it doesn't work I'll find a better mail app for android. Suggestions are welcome...

Have you tried K9 ? I use it, but I admit only for reading e-mails. I find a phone so impractical to write stuff that I only ever send e-mails from my laptop.

Best regards,

Thomas

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

PATCH 1/1 Openpowerlink: new package

Hi Thomas,

Quoted 6 lines · Thomas Petazzoni
Quoted 2 lines

If it doesn't work I'll find a better mail app for android. Suggestions are welcome...

Have you tried K9 ? I use it, but I admit only for reading e-mails. I find a phone so impractical to write stuff that I only ever send e-mails from my laptop.

After your initial mail I tried K9, but those darn bastards also wrap at 72 lines! Luckily, K9 is open-source, and I found the offending code quite easily and filed a bug report here:
http://code.google.com/p/k9mail/issues/detail?id=5957
In the mean time, I'll try to compile it myself, haven't done any Android development before.

Best regards,
Thomas

#8 lore raw

PATCH 1/1 Openpowerlink: new package

Dear Thomas De Schampheleire,

Quoted 6 lines · Thomas De Schampheleire

After your initial mail I tried K9, but those darn bastards also wrap at 72 lines! Luckily, K9 is open-source, and I found the offending code quite easily and filed a bug report here:
http://code.google.com/p/k9mail/issues/detail?id=5957
In the mean time, I'll try to compile it myself, haven't done any Android development before.

Nice!

This is getting out-of-topic, but personally, I like the wrap or to not wrap question to be decided on a per e-mail basis. When I need to reply to a patch, I don't want the original e-mail to be wrapped. However, when I reply to a normal e-mail that has been sent with Outlook or some other crappy mail client that does not wrap at all, then I generally like wrapping such e-mails to have a nice formatting when replying.

Best regards,

Thomas

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

PATCH 1/1 Openpowerlink: new package

In reply to Romain Naour

Hi Thomas,

Quoted 255 lines · Romain Naour
---
 package/Config.in                                  |  1 +
 package/openpowerlink/Config.in                    | 92 +++++++++++++++++++++
 .../openpowerlink-FIX-demo_mn_qt.patch             | 27 +++++++
 package/openpowerlink/openpowerlink.mk             | 93 ++++++++++++++++++++++
 4 files changed, 213 insertions(+)
 create mode 100644 package/openpowerlink/Config.in
 create mode 100644 package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch
 create mode 100644 package/openpowerlink/openpowerlink.mk
package/Config.in +1 -0
index e1dfd5d..fdf9b55 100644
@@ -912,6 +912,7 @@ endmenu
 menu "Real-Time"
 source "package/xenomai/Config.in"
 source "package/rtai/Config.in"
+source "package/openpowerlink/Config.in"
 endmenu
 
 menu "Shell and utilities"
package/openpowerlink/Config.in new file +92 -0
new file mode 100644
index 0000000..42a6099
@@ -0,0 +1,92 @@
+comment "openpowerlink requires thread support in toolchain"
+       depends on !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_OPENPOWERLINK
+       bool "Openpowerlink"
+       depends on BR2_TOOLCHAIN_HAS_THREADS
+       depends on BR2_i386 || BR2_x86_64
+       help
+         openPOWERLINK is an Open Source Industrial Ethernet
+         stack implementing the POWERLINK protocol for Managing Node
+         (MN, POWERLINK Master) and Controlled Node (CN, POWERLINK Slave).
+
+         It is provided by SYSTEC electronic (http://www.systec-electronic.com),
+         B&R (http://www.br-automation.com) and
+         Kalycito (http://www.kalycito.com).
+
+if BR2_PACKAGE_OPENPOWERLINK
+
+choice
+       prompt "Openpowerlink mode"
+
+config BR2_PACKAGE_OPENPOWERLINK_LIBPCAP
+       bool "userspace stack"
+       select BR2_PACKAGE_LIBPCAP
+
+config BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE
+       bool "kernel stack"
+       depends on BR2_LINUX_KERNEL
+       help
+         You may select BR2_PACKAGE_PCIUTILS for lscpi, and BR2_PACKAGE_PROCPS for ps command.
+         These commands are used in EplLoad and EplUndload scripts.
+
+endchoice
+
+if BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE
+
+choice
+       prompt "Select Ethernet Powerlink Driver"
+
+config BR2_PACKAGE_OPENPOWERLINK_82573
+       bool "Intel 82573"
+
+config BR2_PACKAGE_OPENPOWERLINK_8255x
+       bool "Intel 8255x"
+
+config BR2_PACKAGE_OPENPOWERLINK_RTL8139
+       bool "Realteck RTL-8139"
+
+endchoice
+
+endif
+
+choice
+       prompt "Select MN/CN mode"
+
+       config BR2_PACKAGE_OPENPOWERLINK_MN
+       bool "MN"
+       help
+         Enable Managing Node mode
+
+       config BR2_PACKAGE_OPENPOWERLINK_CN
+       bool "CN"
+       help
+         Enable Controlled Node mode
+
+endchoice
+
+# Powerlink Demos
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE
+       bool "Console MN demo"
+       depends on BR2_PACKAGE_OPENPOWERLINK_MN
+
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_QT
+       bool "QT MN demo"
+       depends on BR2_PACKAGE_OPENPOWERLINK_MN
+       select BR2_PACKAGE_QT
+       select BR2_PACKAGE_QT_STL
+
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE
+       bool "Console CN demo"
+       depends on !BR2_PACKAGE_OPENPOWERLINK_MN
+
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_LINUX_KERNEL
+       bool "Kernel demo"
+       depends on BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE
+
+config BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL
+       string "Debug level for EPL"
+       help
+         default value: 0xEC000000L
+
+endif
package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +27 -0
new file mode 100644
index 0000000..a71298d
@@ -0,0 +1,27 @@
+From 8658075bd7c49a7481e8f6d0d7a13b0651e1dfd7 Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+Date: Wed, 18 Sep 2013 23:33:04 +0200
+Subject: [PATCH 1/1] [FIX] demo_mn_qt: add EplDebug.c in demo_sources list
+
+demo_mn_qt use EplGetEmergErrCodeStr()
+
+Signed-off-by: Romain Naour <[email protected]>
+---
+ Examples/X86/Generic/demo_mn_qt/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt b/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt
+index 9db2f7f..48ae9eb 100644
+--- a/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt
++++ b/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt
+@@ -78,6 +78,7 @@ SET(DEMO_SOURCES src/EplApi.cpp
+                  src/MainWindow.cpp
+                  src/NodeState.cpp
+                  ${POWERLINK_SOURCE_DIR}/ObjDicts/${OBJDICT}/EplApiProcessImageSetup.c
++                 ${POWERLINK_SOURCE_DIR}/EplStack/EplDebug.c
+     )
+
+ # The TRACE macros need trace.c on the Windows platform
+--
+1.8.4
+
package/openpowerlink/openpowerlink.mk new file +93 -1
new file mode 100644
index 0000000..ac28de9
@@ -0,0 +1,93 @@
+################################################################################
+#
+# openPOWERLINK
+#
+################################################################################
+
+OPENPOWERLINK_VERSION = V1.08.3
+OPENPOWERLINK_SOURCE = openPOWERLINK-$(OPENPOWERLINK_VERSION).zip
+OPENPOWERLINK_SITE = http://downloads.sourceforge.net/project/openpowerlink/openPOWERLINK/V1.8.3
+
+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_OPT = -DCMAKE_SYSTEM_PROCESSOR=$(OPENPOWERLINK_ARCH)
+OPENPOWERLINK_CONF_OPT += -DCMAKE_BUILD_TYPE=Debug
+OPENPOWERLINK_CONF_OPT += -DCMAKE_INSTALL_PREFIX=/usr/
+
+OPENPOWERLINK_DEBUG_LEVEL = $(call qstrip,$(BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL))
+
+ifeq ($(OPENPOWERLINK_DEBUG_LEVEL),)
+OPENPOWERLINK_CONF_OPT += -DCFG_DEBUG_LVL=0xEC000000L
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_DEBUG_LVL=$(OPENPOWERLINK_DEBUG_LEVEL)
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_LIBPCAP),y)
+#  use the user space stack (libpcap)
+OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_STACK=OFF
+OPENPOWERLINK_DEPENDENCIES = libpcap
+else
+# use the kernel stack
+OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_STACK=ON
+OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_DIR=$(LINUX_DIR)
+OPENPOWERLINK_CONF_OPT += -DCMAKE_SYSTEM_VERSION=$(LINUX_VERSION)
+OPENPOWERLINK_DEPENDENCIES = linux
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_82573),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=82573
+else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_RTL8139),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=8139
+else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_8255x),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=8255x
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_MN),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_MN=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_MN=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_CONSOLE=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_CONSOLE=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_QT),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_QT=ON
+OPENPOWERLINK_DEPENDENCIES += qt
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_QT=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_CN_CONSOLE=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_CN_CONSOLE=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_LINUX_KERNEL),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_LINUX_KERNEL=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_LINUX_KERNEL=OFF
+endif
+
+define OPENPOWERLINK_EXTRACT_CMDS
+       $(RM) -rf $(OPENPOWERLINK_DIR)
+       unzip -q -d $(BUILD_DIR)/ $(DL_DIR)/$(OPENPOWERLINK_SOURCE)
+       test -d $(OPENPOWERLINK_DIR) || \
+               mv $(BUILD_DIR)/$(subst .zip,,$(OPENPOWERLINK_SOURCE)) $(OPENPOWERLINK_DIR)
+endef
+
+$(eval $(cmake-package))
--
Quoted 2 lines

1.8.4

Hmm, that test didn't seem to work.
This test is from Gmail on desktop, just to be double-check that that is OK. Sorry for the spam by the way, don't know a better way to check it, because the gmail web interface does not show any bad line wrapping...

Best regards,
Thomas

#10 lore raw

PATCH 1/1 Openpowerlink: new package

Dear Thomas De Schampheleire,

Quoted 5 lines · Thomas De Schampheleire

Hmm, that test didn't seem to work.
This test is from Gmail on desktop, just to be double-check that that is OK. Sorry for the spam by the way, don't know a better way to check it, because the gmail web interface does not show any bad line wrapping...

This reply was correct, with no line-wrapping of the patch.

Thanks!

Thomas

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

PATCH 1/1 Openpowerlink: new package

In reply to Romain Naour

Romain Naour <[email protected]> schreef:

Quoted 266 lines

---
package/Config.in | 1 +
package/openpowerlink/Config.in | 92
+++++++++++++++++++++
.../openpowerlink-FIX-demo_mn_qt.patch | 27 +++++++
package/openpowerlink/openpowerlink.mk | 93
++++++++++++++++++++++

4 files changed, 213 insertions(+)

create mode 100644 package/openpowerlink/Config.in create mode 100644 package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch create mode 100644 package/openpowerlink/openpowerlink.mk

package/Config.in +0 -0
index e1dfd5d..fdf9b55 100644
@@ -912,6 +912,7 @@ endmenu

menu "Real-Time"
source "package/xenomai/Config.in"
source "package/rtai/Config.in"
+source "package/openpowerlink/Config.in"
endmenu

menu "Shell and utilities"

package/openpowerlink/Config.in new file +13 -0
new file mode 100644
index 0000000..42a6099
@@ -0,0 +1,92 @@
+comment "openpowerlink requires thread support in toolchain"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_OPENPOWERLINK
+	bool "Openpowerlink"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_i386 || BR2_x86_64
+	help
+	  openPOWERLINK is an Open Source Industrial Ethernet 
+	  stack implementing the POWERLINK protocol for Managing Node 
+	  (MN, POWERLINK Master) and Controlled Node (CN, POWERLINK Slave).
+
+	  It is provided by SYSTEC electronic

(http://www.systec-electronic.com),

package/openpowerlink/Config.in new file +17 -0
+	  B&R (http://www.br-automation.com) and 
+	  Kalycito (http://www.kalycito.com).
+
+if BR2_PACKAGE_OPENPOWERLINK
+
+choice
+	prompt "Openpowerlink mode"
+
+config BR2_PACKAGE_OPENPOWERLINK_LIBPCAP
+	bool "userspace stack"
+	select BR2_PACKAGE_LIBPCAP
+
+config BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE
+	bool "kernel stack"
+	depends on BR2_LINUX_KERNEL
+	help
+	  You may select BR2_PACKAGE_PCIUTILS for lscpi, and

BR2_PACKAGE_PROCPS for ps command.

package/openpowerlink/Config.in new file +62 -0
+	  These commands are used in EplLoad and EplUndload scripts.
+
+endchoice
+
+if BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE
+
+choice
+	prompt "Select Ethernet Powerlink Driver"
+
+config BR2_PACKAGE_OPENPOWERLINK_82573
+	bool "Intel 82573"
+
+config BR2_PACKAGE_OPENPOWERLINK_8255x
+	bool "Intel 8255x"
+
+config BR2_PACKAGE_OPENPOWERLINK_RTL8139
+	bool "Realteck RTL-8139"
+
+endchoice
+
+endif
+
+choice
+	prompt "Select MN/CN mode"
+
+	config BR2_PACKAGE_OPENPOWERLINK_MN
+	bool "MN"
+	help
+	  Enable Managing Node mode
+
+	config BR2_PACKAGE_OPENPOWERLINK_CN
+	bool "CN"
+	help
+	  Enable Controlled Node mode
+
+endchoice
+
+# Powerlink Demos
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE
+	bool "Console MN demo"
+	depends on BR2_PACKAGE_OPENPOWERLINK_MN
+
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_QT
+	bool "QT MN demo"
+	depends on BR2_PACKAGE_OPENPOWERLINK_MN
+	select BR2_PACKAGE_QT
+	select BR2_PACKAGE_QT_STL
+
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE
+	bool "Console CN demo"
+	depends on !BR2_PACKAGE_OPENPOWERLINK_MN
+
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_LINUX_KERNEL
+	bool "Kernel demo"
+	depends on BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE
+
+config BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL
+	string "Debug level for EPL"
+	help
+	  default value: 0xEC000000L
+
+endif
package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +4 -0
new file mode 100644
index 0000000..a71298d
@@ -0,0 +1,27 @@
+From 8658075bd7c49a7481e8f6d0d7a13b0651e1dfd7 Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+Date: Wed, 18 Sep 2013 23:33:04 +0200
+Subject: [PATCH 1/1] [FIX] demo_mn_qt: add EplDebug.c in demo_sources

list

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +9 -0
+
+demo_mn_qt use EplGetEmergErrCodeStr()
+
+Signed-off-by: Romain Naour <[email protected]>
+---
+ Examples/X86/Generic/demo_mn_qt/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt

b/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +7 -0
+index 9db2f7f..48ae9eb 100644
+--- a/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt
++++ b/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt
+@@ -78,6 +78,7 @@ SET(DEMO_SOURCES src/EplApi.cpp
+                  src/MainWindow.cpp
+                  src/NodeState.cpp
+                 

${POWERLINK_SOURCE_DIR}/ObjDicts/${OBJDICT}/EplApiProcessImageSetup.c
++ ${POWERLINK_SOURCE_DIR}/EplStack/EplDebug.c

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +6 -0
+     )
+ 
+ # The TRACE macros need trace.c on the Windows platform
+-- 
+1.8.4
+
package/openpowerlink/openpowerlink.mk new file +9 -0
new file mode 100644
index 0000000..ac28de9
@@ -0,0 +1,93 @@
+################################################################################
+#
+# openPOWERLINK
+#
+################################################################################
+
+OPENPOWERLINK_VERSION = V1.08.3
+OPENPOWERLINK_SOURCE = openPOWERLINK-$(OPENPOWERLINK_VERSION).zip
+OPENPOWERLINK_SITE =

http://downloads.sourceforge.net/project/openpowerlink/openPOWERLINK/V1.8.3

package/openpowerlink/openpowerlink.mk new file +18 -1
+
+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_OPT =
-DCMAKE_SYSTEM_PROCESSOR=$(OPENPOWERLINK_ARCH)
+OPENPOWERLINK_CONF_OPT += -DCMAKE_BUILD_TYPE=Debug
+OPENPOWERLINK_CONF_OPT += -DCMAKE_INSTALL_PREFIX=/usr/
+
+OPENPOWERLINK_DEBUG_LEVEL = $(call

qstrip,$(BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL))

package/openpowerlink/openpowerlink.mk new file +63 -0
+
+ifeq ($(OPENPOWERLINK_DEBUG_LEVEL),)
+OPENPOWERLINK_CONF_OPT += -DCFG_DEBUG_LVL=0xEC000000L
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_DEBUG_LVL=$(OPENPOWERLINK_DEBUG_LEVEL)
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_LIBPCAP),y)
+#  use the user space stack (libpcap)
+OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_STACK=OFF
+OPENPOWERLINK_DEPENDENCIES = libpcap
+else
+# use the kernel stack
+OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_STACK=ON
+OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_DIR=$(LINUX_DIR)
+OPENPOWERLINK_CONF_OPT += -DCMAKE_SYSTEM_VERSION=$(LINUX_VERSION)
+OPENPOWERLINK_DEPENDENCIES = linux
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_82573),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=82573
+else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_RTL8139),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=8139
+else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_8255x),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=8255x
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_MN),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_MN=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_MN=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_CONSOLE=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_CONSOLE=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_QT),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_QT=ON
+OPENPOWERLINK_DEPENDENCIES += qt
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_QT=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_CN_CONSOLE=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_CN_CONSOLE=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_LINUX_KERNEL),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_LINUX_KERNEL=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_LINUX_KERNEL=OFF
+endif
+
+define OPENPOWERLINK_EXTRACT_CMDS
+	$(RM) -rf $(OPENPOWERLINK_DIR)
+	unzip -q -d $(BUILD_DIR)/ $(DL_DIR)/$(OPENPOWERLINK_SOURCE)
+	test -d $(OPENPOWERLINK_DIR) || \
+		mv $(BUILD_DIR)/$(subst .zip,,$(OPENPOWERLINK_SOURCE))

$(OPENPOWERLINK_DIR)

package/openpowerlink/openpowerlink.mk line 93

Quoted 3 lines
package/openpowerlink/openpowerlink.mk new file +3 -0
+endef
+
+$(eval $(cmake-package))

Here it's another test from k9...

#12 lore raw

PATCH 1/1 Openpowerlink: new package

In reply to Romain Naour

Romain Naour <[email protected]> schreef:

Quoted 266 lines

---
package/Config.in | 1 +
package/openpowerlink/Config.in | 92
+++++++++++++++++++++
.../openpowerlink-FIX-demo_mn_qt.patch | 27 +++++++
package/openpowerlink/openpowerlink.mk | 93
++++++++++++++++++++++

4 files changed, 213 insertions(+)

create mode 100644 package/openpowerlink/Config.in create mode 100644 package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch create mode 100644 package/openpowerlink/openpowerlink.mk

package/Config.in +0 -0
index e1dfd5d..fdf9b55 100644
@@ -912,6 +912,7 @@ endmenu

menu "Real-Time"
source "package/xenomai/Config.in"
source "package/rtai/Config.in"
+source "package/openpowerlink/Config.in"
endmenu

menu "Shell and utilities"

package/openpowerlink/Config.in new file +13 -0
new file mode 100644
index 0000000..42a6099
@@ -0,0 +1,92 @@
+comment "openpowerlink requires thread support in toolchain"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_OPENPOWERLINK
+	bool "Openpowerlink"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_i386 || BR2_x86_64
+	help
+	  openPOWERLINK is an Open Source Industrial Ethernet 
+	  stack implementing the POWERLINK protocol for Managing Node 
+	  (MN, POWERLINK Master) and Controlled Node (CN, POWERLINK Slave).
+
+	  It is provided by SYSTEC electronic

(http://www.systec-electronic.com),

package/openpowerlink/Config.in new file +17 -0
+	  B&R (http://www.br-automation.com) and 
+	  Kalycito (http://www.kalycito.com).
+
+if BR2_PACKAGE_OPENPOWERLINK
+
+choice
+	prompt "Openpowerlink mode"
+
+config BR2_PACKAGE_OPENPOWERLINK_LIBPCAP
+	bool "userspace stack"
+	select BR2_PACKAGE_LIBPCAP
+
+config BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE
+	bool "kernel stack"
+	depends on BR2_LINUX_KERNEL
+	help
+	  You may select BR2_PACKAGE_PCIUTILS for lscpi, and

BR2_PACKAGE_PROCPS for ps command.

package/openpowerlink/Config.in new file +62 -0
+	  These commands are used in EplLoad and EplUndload scripts.
+
+endchoice
+
+if BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE
+
+choice
+	prompt "Select Ethernet Powerlink Driver"
+
+config BR2_PACKAGE_OPENPOWERLINK_82573
+	bool "Intel 82573"
+
+config BR2_PACKAGE_OPENPOWERLINK_8255x
+	bool "Intel 8255x"
+
+config BR2_PACKAGE_OPENPOWERLINK_RTL8139
+	bool "Realteck RTL-8139"
+
+endchoice
+
+endif
+
+choice
+	prompt "Select MN/CN mode"
+
+	config BR2_PACKAGE_OPENPOWERLINK_MN
+	bool "MN"
+	help
+	  Enable Managing Node mode
+
+	config BR2_PACKAGE_OPENPOWERLINK_CN
+	bool "CN"
+	help
+	  Enable Controlled Node mode
+
+endchoice
+
+# Powerlink Demos
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE
+	bool "Console MN demo"
+	depends on BR2_PACKAGE_OPENPOWERLINK_MN
+
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_QT
+	bool "QT MN demo"
+	depends on BR2_PACKAGE_OPENPOWERLINK_MN
+	select BR2_PACKAGE_QT
+	select BR2_PACKAGE_QT_STL
+
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE
+	bool "Console CN demo"
+	depends on !BR2_PACKAGE_OPENPOWERLINK_MN
+
+config BR2_PACKAGE_OPENPOWERLINK_DEMO_LINUX_KERNEL
+	bool "Kernel demo"
+	depends on BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE
+
+config BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL
+	string "Debug level for EPL"
+	help
+	  default value: 0xEC000000L
+
+endif
package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +4 -0
new file mode 100644
index 0000000..a71298d
@@ -0,0 +1,27 @@
+From 8658075bd7c49a7481e8f6d0d7a13b0651e1dfd7 Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+Date: Wed, 18 Sep 2013 23:33:04 +0200
+Subject: [PATCH 1/1] [FIX] demo_mn_qt: add EplDebug.c in demo_sources

list

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +9 -0
+
+demo_mn_qt use EplGetEmergErrCodeStr()
+
+Signed-off-by: Romain Naour <[email protected]>
+---
+ Examples/X86/Generic/demo_mn_qt/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt

b/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +7 -0
+index 9db2f7f..48ae9eb 100644
+--- a/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt
++++ b/Examples/X86/Generic/demo_mn_qt/CMakeLists.txt
+@@ -78,6 +78,7 @@ SET(DEMO_SOURCES src/EplApi.cpp
+                  src/MainWindow.cpp
+                  src/NodeState.cpp
+                 

${POWERLINK_SOURCE_DIR}/ObjDicts/${OBJDICT}/EplApiProcessImageSetup.c
++ ${POWERLINK_SOURCE_DIR}/EplStack/EplDebug.c

package/openpowerlink/openpowerlink-FIX-demo_mn_qt.patch new file +6 -0
+     )
+ 
+ # The TRACE macros need trace.c on the Windows platform
+-- 
+1.8.4
+
package/openpowerlink/openpowerlink.mk new file +9 -0
new file mode 100644
index 0000000..ac28de9
@@ -0,0 +1,93 @@
+################################################################################
+#
+# openPOWERLINK
+#
+################################################################################
+
+OPENPOWERLINK_VERSION = V1.08.3
+OPENPOWERLINK_SOURCE = openPOWERLINK-$(OPENPOWERLINK_VERSION).zip
+OPENPOWERLINK_SITE =

http://downloads.sourceforge.net/project/openpowerlink/openPOWERLINK/V1.8.3

package/openpowerlink/openpowerlink.mk new file +18 -1
+
+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_OPT =
-DCMAKE_SYSTEM_PROCESSOR=$(OPENPOWERLINK_ARCH)
+OPENPOWERLINK_CONF_OPT += -DCMAKE_BUILD_TYPE=Debug
+OPENPOWERLINK_CONF_OPT += -DCMAKE_INSTALL_PREFIX=/usr/
+
+OPENPOWERLINK_DEBUG_LEVEL = $(call

qstrip,$(BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL))

package/openpowerlink/openpowerlink.mk new file +63 -0
+
+ifeq ($(OPENPOWERLINK_DEBUG_LEVEL),)
+OPENPOWERLINK_CONF_OPT += -DCFG_DEBUG_LVL=0xEC000000L
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_DEBUG_LVL=$(OPENPOWERLINK_DEBUG_LEVEL)
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_LIBPCAP),y)
+#  use the user space stack (libpcap)
+OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_STACK=OFF
+OPENPOWERLINK_DEPENDENCIES = libpcap
+else
+# use the kernel stack
+OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_STACK=ON
+OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_DIR=$(LINUX_DIR)
+OPENPOWERLINK_CONF_OPT += -DCMAKE_SYSTEM_VERSION=$(LINUX_VERSION)
+OPENPOWERLINK_DEPENDENCIES = linux
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_82573),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=82573
+else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_RTL8139),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=8139
+else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_8255x),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=8255x
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_MN),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_MN=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_MN=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_CONSOLE=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_CONSOLE=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_QT),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_QT=ON
+OPENPOWERLINK_DEPENDENCIES += qt
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_QT=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_CN_CONSOLE=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_CN_CONSOLE=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_LINUX_KERNEL),y)
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_LINUX_KERNEL=ON
+else
+OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_LINUX_KERNEL=OFF
+endif
+
+define OPENPOWERLINK_EXTRACT_CMDS
+	$(RM) -rf $(OPENPOWERLINK_DIR)
+	unzip -q -d $(BUILD_DIR)/ $(DL_DIR)/$(OPENPOWERLINK_SOURCE)
+	test -d $(OPENPOWERLINK_DIR) || \
+		mv $(BUILD_DIR)/$(subst .zip,,$(OPENPOWERLINK_SOURCE))

$(OPENPOWERLINK_DIR)

package/openpowerlink/openpowerlink.mk line 93

Quoted 3 lines
package/openpowerlink/openpowerlink.mk new file +3 -0
+endef
+
+$(eval $(cmake-package))

Why is this so hard?