Skip to contentSkip to conversation

Pull request for branch ethercat

GIT PULL New Thomas Petazzoni 4 participants 6 messages Nov 30, 2011 – Dec 1, 2011

lore
Share & tools
lore
#0 lore raw

The following changes since commit 47c46ea1fc4a4c18be830f9092a8b9d8b3feda38:

linux: update stable kernel to 3.1.4 (2011-11-29 09:18:30 +0100)

are available in the git repository at:
http://free-electrons.com/~thomas/buildroot.git ethercat

Thomas Petazzoni (1):
igh-ethercat: new package

 package/Config.in                    |    1 +
 package/igh-ethercat/Config.in       |   23 +++++++++++++++++++++++
 package/igh-ethercat/igh-ethercat.mk |   34 ++++++++++++++++++++++++++++++++++
 3 files changed, 58 insertions(+), 0 deletions(-)
 create mode 100644 package/igh-ethercat/Config.in
 create mode 100644 package/igh-ethercat/igh-ethercat.mk

Thanks,

Signature · 1 line
Thomas Petazzoni
#1 lore raw

PATCH 1/1 igh-ethercat: new package

---
 package/Config.in                    |    1 +
 package/igh-ethercat/Config.in       |   23 +++++++++++++++++++++++
 package/igh-ethercat/igh-ethercat.mk |   34 ++++++++++++++++++++++++++++++++++
 3 files changed, 58 insertions(+), 0 deletions(-)
 create mode 100644 package/igh-ethercat/Config.in
 create mode 100644 package/igh-ethercat/igh-ethercat.mk
package/Config.in +1 -0
index 4b5e5d8..2ccdc1d 100644
@@ -412,6 +412,7 @@ source "package/dhcpdump/Config.in"
 source "package/dnsmasq/Config.in"
 source "package/dropbear/Config.in"
 source "package/ebtables/Config.in"
+source "package/igh-ethercat/Config.in"
 source "package/ethtool/Config.in"
 source "package/hostapd/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
package/igh-ethercat/Config.in new file +23 -0
new file mode 100644
index 0000000..764a021
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_IGH_ETHERCAT
+	bool "igh-ethercat"
+	depends on BR2_LINUX_KERNEL
+	help
+	  IgH EtherCAT Master for Linux.
+
+	  http://www.etherlab.org/en/ethercat/index.php
+
+if BR2_PACKAGE_IGH_ETHERCAT
+
+config BR2_PACKAGE_IGH_ETHERCAT_8139TOO
+	bool "8139too driver"
+
+config BR2_PACKAGE_IGH_ETHERCAT_E100
+	bool "e100 driver"
+
+config BR2_PACKAGE_IGH_ETHERCAT_E1000
+	bool "e1000 driver"
+
+config BR2_PACKAGE_IGH_ETHERCAT_R8169
+	bool "r8169 driver"
+
+endif
package/igh-ethercat/igh-ethercat.mk new file +34 -0
new file mode 100644
index 0000000..eb49591
@@ -0,0 +1,34 @@
+IGH_ETHERCAT_VERSION = stable-1.5
+IGH_ETHERCAT_SITE    = http://etherlabmaster.hg.sourceforge.net/hgweb/etherlabmaster/etherlabmaster/archive/
+IGH_ETHERCAT_SOURCE  = $(IGH_ETHERCAT_VERSION).tar.bz2
+IGH_ETHERCAT_AUTORECONF = YES
+IGH_ETHERCAT_DEPENDENCIES = linux
+IGH_ETHERCAT_INSTALL_STAGING = YES
+
+IGH_ETHERCAT_CONF_OPT = \
+	--with-linux-dir=$(LINUX_DIR)
+
+IGH_ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_IGH_ETHERCAT_8139TOO),--enable-8139too,--disable-8139too)
+IGH_ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_IGH_ETHERCAT_E100),--enable-e100,--disable-e100)
+IGH_ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_IGH_ETHERCAT_E1000),--enable-e1000,--disable-e1000)
+IGH_ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_IGH_ETHERCAT_R8169),--enable-r8169,--disable-r8169)
+
+define IGH_ETHERCAT_CREATE_CHANGELOG
+	touch $(@D)/ChangeLog
+endef
+
+IGH_ETHERCAT_POST_PATCH_HOOKS += IGH_ETHERCAT_CREATE_CHANGELOG
+
+define IGH_ETHERCAT_BUILD_MODULES
+	$(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) modules
+endef
+
+IGH_ETHERCAT_POST_BUILD_HOOKS += IGH_ETHERCAT_BUILD_MODULES
+
+define IGH_ETHERCAT_INSTALL_MODULES
+	$(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) modules_install
+endef
+
+IGH_ETHERCAT_POST_INSTALL_TARGET_HOOKS += IGH_ETHERCAT_INSTALL_MODULES
+
+$(eval $(call AUTOTARGETS))
\ No newline at end of file
Signature · 1 line
1.7.4.1
#2 lore raw

PATCH 1/1 igh-ethercat: new package

Hi Thomas,

First of all: nice work.
I was about to attempt creating a .mk file myself as well, but you beat me :-)

Quoted 1 line · Thomas Petazzoni
Quoted 13 lines

---

?package/Config.in ? ? ? ? ? ? ? ? ? ?| ? ?1 +
?package/igh-ethercat/Config.in ? ? ? | ? 23 +++++++++++++++++++++++
?package/igh-ethercat/igh-ethercat.mk | ? 34 ++++++++++++++++++++++++++++++++++

?3 files changed, 58 insertions(+), 0 deletions(-) ?create mode 100644 package/igh-ethercat/Config.in ?create mode 100644 package/igh-ethercat/igh-ethercat.mk

package/Config.in +0 -0
index 4b5e5d8..2ccdc1d 100644
@@ -412,6 +412,7 @@ source "package/dhcpdump/Config.in"
Quoted 7 lines

?source "package/dnsmasq/Config.in"
?source "package/dropbear/Config.in"
?source "package/ebtables/Config.in"
+source "package/igh-ethercat/Config.in"
?source "package/ethtool/Config.in"
?source "package/hostapd/Config.in"
?if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS

It seems you renamed the package later, as the alphabetical order is not correct anymore.

Quoted 45 lines
package/igh-ethercat/Config.in new file +23 -0
new file mode 100644
index 0000000..764a021
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_IGH_ETHERCAT
+ ? ? ? bool "igh-ethercat"
+ ? ? ? depends on BR2_LINUX_KERNEL
+ ? ? ? help
+ ? ? ? ? IgH EtherCAT Master for Linux.
+
+ ? ? ? ? http://www.etherlab.org/en/ethercat/index.php
+
+if BR2_PACKAGE_IGH_ETHERCAT
+
+config BR2_PACKAGE_IGH_ETHERCAT_8139TOO
+ ? ? ? bool "8139too driver"
+
+config BR2_PACKAGE_IGH_ETHERCAT_E100
+ ? ? ? bool "e100 driver"
+
+config BR2_PACKAGE_IGH_ETHERCAT_E1000
+ ? ? ? bool "e1000 driver"
+
+config BR2_PACKAGE_IGH_ETHERCAT_R8169
+ ? ? ? bool "r8169 driver"
+
+endif
package/igh-ethercat/igh-ethercat.mk new file +10 -0
new file mode 100644
index 0000000..eb49591
@@ -0,0 +1,34 @@
+IGH_ETHERCAT_VERSION = stable-1.5
+IGH_ETHERCAT_SITE ? ?= http://etherlabmaster.hg.sourceforge.net/hgweb/etherlabmaster/etherlabmaster/archive/
+IGH_ETHERCAT_SOURCE ?= $(IGH_ETHERCAT_VERSION).tar.bz2
+IGH_ETHERCAT_AUTORECONF = YES
+IGH_ETHERCAT_DEPENDENCIES = linux
+IGH_ETHERCAT_INSTALL_STAGING = YES
+
+IGH_ETHERCAT_CONF_OPT = \
+ ? ? ? --with-linux-dir=$(LINUX_DIR)
+

package/igh-ethercat/igh-ethercat.mk line 20

Quoted 10 lines
package/igh-ethercat/igh-ethercat.mk new file +10 -0
+IGH_ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_IGH_ETHERCAT_8139TOO),--enable-8139too,--disable-8139too)
+IGH_ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_IGH_ETHERCAT_E100),--enable-e100,--disable-e100)
+IGH_ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_IGH_ETHERCAT_E1000),--enable-e1000,--disable-e1000)
+IGH_ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_IGH_ETHERCAT_R8169),--enable-r8169,--disable-r8169)
+
+define IGH_ETHERCAT_CREATE_CHANGELOG
+ ? ? ? touch $(@D)/ChangeLog
+endef
+
+IGH_ETHERCAT_POST_PATCH_HOOKS += IGH_ETHERCAT_CREATE_CHANGELOG

Maybe it's a good idea to add a comment here, e.g.
# Since we download ethercat from source control, we have to emulate the bootstrap script that creates ChangeLog.
# We don't want to run that script directly, as it also runs 'autoreconf' which will be done by the autotargets infrastructure.

Quoted 5 lines
package/igh-ethercat/igh-ethercat.mk new file +5 -0
+
+define IGH_ETHERCAT_BUILD_MODULES
+ ? ? ? $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) modules
+endef
+

package/igh-ethercat/igh-ethercat.mk line 34

Quoted 10 lines
package/igh-ethercat/igh-ethercat.mk new file +9 -0
+IGH_ETHERCAT_POST_BUILD_HOOKS += IGH_ETHERCAT_BUILD_MODULES
+
+define IGH_ETHERCAT_INSTALL_MODULES
+ ? ? ? $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) modules_install
+endef
+
+IGH_ETHERCAT_POST_INSTALL_TARGET_HOOKS += IGH_ETHERCAT_INSTALL_MODULES
+
+$(eval $(call AUTOTARGETS))
\ No newline at end of file

Shouldn't there be a newline here?

Best regards,
Thomas

#3 lore raw

PATCH 1/1 igh-ethercat: new package

In reply to Thomas Petazzoni

I tried taking the results of the patch and putting them in the .mk file that I was using with buildroot-2011.11 (I really don't want to have to find out why 2011.11 has that filesystem problem, so can someone please help with this makefile?).

I do not see the application get built, nor do I see the kernel modules get built. I notice that the new .mk file that Thomas make doesn't have the $eval. Perhaps I need that back in? If so, can someone tell me the right one (gentargets versus autotargets).

Please help.

Here is the .mk file:

#############################################################
#
# EtherCAT
#
#############################################################
ETHERCAT_VERSION = 1.0
ETHERCAT_SOURCE = etherlabmaster-1.0.tar.bz2 ###ETHERCAT_SITE = file:///home/user1/Desktop/EtherCAT4Atmel/ ETHERCAT_SITE = http://127.0.0.1/home/user1/Desktop/EtherCAT4Atmel/
ETHERCAT_AUTORECONF = YES
ETHERCAT_DEPENDENCIES = linux
ETHERCAT_INSTALL_STAGING = YES

#ETHERCAT_INSTALL_TARGET = YES
#ETHERCAT_CONF_OPT = --enable-generic

ETHERCAT_CONF_OPT = \
	--with-linux-dir=$(LINUX_DIR)

ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_ETHERCAT_8139TOO),--enable-8139too,--disable-8139too) ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_ETHERCAT_E100),--enable-e100,--disable-e100) ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_ETHERCAT_E1000),--enable-e1000,--disable-e1000) ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_ETHERCAT_R8169),--enable-r8169,--disable-r8169)

define ETHERCAT_CREATE_CHANGELOG

	touch $(@D)/ChangeLog

endef

ETHERCAT_POST_PATCH_HOOKS += ETHERCAT_CREATE_CHANGELOG

define ETHERCAT_BUILD_MODULES

	$(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) modules

endef

ETHERCAT_POST_BUILD_HOOKS += ETHERCAT_BUILD_MODULES

define ETHERCAT_INSTALL_MODULES

	$(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) modules_install

endef

ETHERCAT_POST_INSTALL_TARGET_HOOKS += ETHERCAT_INSTALL_MODULES

###These next two lines were a part of building the kernel module. #ETHERCAT_DEPENDENCIES = linux #ETHERCAT_INSTALL_MOD_DIR = ethercat

# From here to the GENTARGETS line is part of building the kernel module. #define ETHERCAT_BUILD_CMDS
# $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) M=$(@D) modules
#endef
#
#define ETHERCAT_INSTALL_TARGET_CMDS
# $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) M=$(@D) \

#               INSTALL_MOD_STRIP=1 \
#               INSTALL_MOD_DIR=$(ETHERCAT_INSTALL_MOD_DIR) \
#               modules_install

#endef
#
#define ETHERCAT_UNINSTALL_TARGET_CMDS
# rm -rf
$(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/$(ETHERCAT_INSTALL_MOD_D IR)
#endef

# $(eval $(call GENTARGETS,package,ethercat))

# This is the $eval that was used when making the application. It didn't appear to work when used

# with the above $eval (the above one is for making the kernel module).
# $(eval $(call AUTOTARGETS,package,ethercat))
#4 lore raw

PATCH 1/1 igh-ethercat: new package

Quoted 10 lines · Jeff Krasky

I tried taking the results of the patch and putting them in the .mk file that I was using with buildroot-2011.11 (I really don't want to have to find out why 2011.11 has that filesystem problem, so can someone please help with this makefile?).

I do not see the application get built, nor do I see the kernel modules get built. I notice that the new .mk file that Thomas make doesn't have the $eval. Perhaps I need that back in? If so, can someone tell me the right one (gentargets versus autotargets).

This is what his patch looked like:
http://lists.busybox.net/pipermail/buildroot/2011-November/047920.html
Note that there is an "eval" at the end of it.

Note that it isn't in git (yet) but when it gets there (no pun intended):
http://git.buildroot.net/buildroot/
You should be able to pull a plain text file from that web interface without e-mail mangling.

Mike

Quoted 85 lines

Please help.

Here is the .mk file:

#############################################################
#
# EtherCAT
#
#############################################################
ETHERCAT_VERSION = 1.0
ETHERCAT_SOURCE = etherlabmaster-1.0.tar.bz2 ###ETHERCAT_SITE = file:///home/user1/Desktop/EtherCAT4Atmel/ ETHERCAT_SITE = http://127.0.0.1/home/user1/Desktop/EtherCAT4Atmel/
ETHERCAT_AUTORECONF = YES
ETHERCAT_DEPENDENCIES = linux
ETHERCAT_INSTALL_STAGING = YES

#ETHERCAT_INSTALL_TARGET = YES
#ETHERCAT_CONF_OPT = --enable-generic

ETHERCAT_CONF_OPT = \
	--with-linux-dir=$(LINUX_DIR)

ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_ETHERCAT_8139TOO),--enable-8139too,--disable-8139too) ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_ETHERCAT_E100),--enable-e100,--disable-e100) ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_ETHERCAT_E1000),--enable-e1000,--disable-e1000) ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_ETHERCAT_R8169),--enable-r8169,--disable-r8169)

define ETHERCAT_CREATE_CHANGELOG

	touch $(@D)/ChangeLog

endef

ETHERCAT_POST_PATCH_HOOKS += ETHERCAT_CREATE_CHANGELOG

define ETHERCAT_BUILD_MODULES

	$(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) modules

endef

ETHERCAT_POST_BUILD_HOOKS += ETHERCAT_BUILD_MODULES

define ETHERCAT_INSTALL_MODULES

	$(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) modules_install

endef

ETHERCAT_POST_INSTALL_TARGET_HOOKS += ETHERCAT_INSTALL_MODULES

###These next two lines were a part of building the kernel module. #ETHERCAT_DEPENDENCIES = linux #ETHERCAT_INSTALL_MOD_DIR = ethercat

# From here to the GENTARGETS line is part of building the kernel module. #define ETHERCAT_BUILD_CMDS
# $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) M=$(@D) modules
#endef
#
#define ETHERCAT_INSTALL_TARGET_CMDS
# $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) M=$(@D) \

#               INSTALL_MOD_STRIP=1 \
#               INSTALL_MOD_DIR=$(ETHERCAT_INSTALL_MOD_DIR) \
#               modules_install

#endef
#
#define ETHERCAT_UNINSTALL_TARGET_CMDS
# rm -rf
$(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/$(ETHERCAT_INSTALL_MOD_D IR)
#endef

# $(eval $(call GENTARGETS,package,ethercat))

# This is the $eval that was used when making the application. It didn't appear to work when used

# with the above $eval (the above one is for making the kernel module).
# $(eval $(call AUTOTARGETS,package,ethercat))

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

#5 lore raw

PATCH 1/1 igh-ethercat: new package

Quoted 8 lines

This is what his patch looked like:
http://lists.busybox.net/pipermail/buildroot/2011-November/047920.html
Note that there is an "eval" at the end of it.

Note that it isn't in git (yet) but when it gets there (no pun intended):
http://git.buildroot.net/buildroot/
You should be able to pull a plain text file from that web interface without e-mail mangling.

Ok, so far no build today has resulted in both EtherCAT application and EtherCAT kernel module. Actually, since I've started using the new patch, no EtherCAT stuff gets built into the image. Since I can't get the image to even boot when I use 2011.11, I revert back to what I was using yesterday, 2011.05. Can someone please step me through this. I have to be pretty close. I feel I am providing the relevant details. I just removed "IGH_" from the names and use the local copy of ethercat (see .mk file). Using the local copy should be ok because it worked yesterday in that it would result in either application or kernel module, just not both. So the issue should be with the following files. I feel I am attaching good details. Can someone please comment so I can get this thing running?

1) I applied the patch in 2011.11 just so that I could get the proper Config.in and .mk files. I got this message after applying the patch as copied from the website mentioned above using Firefox on Linux:

user1 at dhcppc15:~/buildroot-2011.11> cat ethercat.patch | patch -p1 patching file package/Config.in
patching file package/igh-ethercat/Config.in
patching file package/igh-ethercat/igh-ethercat.mk
patch unexpectedly ends in middle of line
user1 at dhcppc15:~/buildroot-2011.11>

Is that ok? It seemed to generate the files.

2) I already had package/Config.in with ethercat, but here is what it looks like. I am showing the lines surrounding the ethercat part - the whole thing is much larger:

user1 at linux-0mmn:~/buildroot-2011.05> more package/Config.in menu "Package Selection for the target"

source "package/busybox/Config.in"
source "package/customize/Config.in"
source "package/ethercat/Config.in"

# Audio and video applications

3) Here is ethercat's Config.in:

user1 at dhcppc15:~/buildroot-2011.05/package/ethercat> more Config.in config BR2_PACKAGE_ETHERCAT
bool "ethercat"
depends on BR2_LINUX_KERNEL
help
IgH EtherCAT Master for Linux.

http://www.etherlab.org/en/ethercat/index.php

if BR2_PACKAGE_ETHERCAT

config BR2_PACKAGE_ETHERCAT_8139TOO

	bool "8139too driver"

config BR2_PACKAGE_ETHERCAT_E100

	bool "e100 driver"

config BR2_PACKAGE_ETHERCAT_E1000

	bool "e1000 driver"

config BR2_PACKAGE_ETHERCAT_R8169

	bool "r8169 driver"

endif
user1 at dhcppc15:~/buildroot-2011.05/package/ethercat>

4) Here is ethercat's .mk file:

user1 at dhcppc15:~/buildroot-2011.05/package/ethercat> more ethercat.mk #IGH_ETHERCAT_VERSION = stable-1.5
#IGH_ETHERCAT_SITE =
http://etherlabmaster.hg.sourceforge.net/hgweb/etherlabmaster/etherlabmaster
/archive/
#IGH_ETHERCAT_SOURCE = $(IGH_ETHERCAT_VERSION).tar.bz2

ETHERCAT_VERSION = 1.0
ETHERCAT_SOURCE = etherlabmaster-1.0.tar.bz2 ETHERCAT_SITE = http://127.0.0.1/home/user1/Desktop/EtherCAT4Atmel/

ETHERCAT_AUTORECONF = YES
ETHERCAT_DEPENDENCIES = linux
ETHERCAT_INSTALL_STAGING = YES

ETHERCAT_CONF_OPT = \
	--with-linux-dir=$(LINUX_DIR)

ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_ETHERCAT_8139TOO),--enable-8139too,--disable-8139too) ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_ETHERCAT_E100),--enable-e100,--disable-e100) ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_ETHERCAT_E1000),--enable-e1000,--disable-e1000) ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_ETHERCAT_R8169),--enable-r8169,--disable-r8169)

define ETHERCAT_CREATE_CHANGELOG

	touch $(@D)/ChangeLog

endef

ETHERCAT_POST_PATCH_HOOKS += ETHERCAT_CREATE_CHANGELOG

define ETHERCAT_BUILD_MODULES

	$(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) modules

endef

ETHERCAT_POST_BUILD_HOOKS += ETHERCAT_BUILD_MODULES

define ETHERCAT_INSTALL_MODULES

	$(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) modules_install

endef

ETHERCAT_POST_INSTALL_TARGET_HOOKS += ETHERCAT_INSTALL_MODULES

$(eval $(call AUTOTARGETS))
user1 at dhcppc15:~/buildroot-2011.05/package/ethercat>