mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/4] radvd: Initial commit
@ 2014-06-17  8:25 Markus Pargmann
  2014-06-17  8:25 ` [ptxdist] [PATCH 2/4] alfred: " Markus Pargmann
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Markus Pargmann @ 2014-06-17  8:25 UTC (permalink / raw)
  To: ptxdist; +Cc: Markus Pargmann

Add radvd as package to ptxdist. Version 1.12 is used. A necessary patch
for not continous time is added which is not mainline yet.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 ...ime-Use-clock_gettime-and-monotonic-clock.patch | 269 +++++++++++++++++++++
 patches/radvd-1.12/series                          |   4 +
 rules/radvd.in                                     |   8 +
 rules/radvd.make                                   |  67 +++++
 4 files changed, 348 insertions(+)
 create mode 100644 patches/radvd-1.12/0001-time-Use-clock_gettime-and-monotonic-clock.patch
 create mode 100644 patches/radvd-1.12/series
 create mode 100644 rules/radvd.in
 create mode 100644 rules/radvd.make

diff --git a/patches/radvd-1.12/0001-time-Use-clock_gettime-and-monotonic-clock.patch b/patches/radvd-1.12/0001-time-Use-clock_gettime-and-monotonic-clock.patch
new file mode 100644
index 000000000000..76636ed33d93
--- /dev/null
+++ b/patches/radvd-1.12/0001-time-Use-clock_gettime-and-monotonic-clock.patch
@@ -0,0 +1,269 @@
+From b65ed3db454d35053bfe40d3216a14c8a1b33eda Mon Sep 17 00:00:00 2001
+From: Markus Pargmann <mpa@pengutronix.de>
+Date: Fri, 13 Jun 2014 16:11:32 +0200
+Subject: [PATCH for 1.12] time: Use clock_gettime and monotonic clock
+
+Currently the system time is used to calculate the timeout in
+milliseconds for the poll function. This can lead to bugs as soon as the
+time of the system changes through NTP. For example starting radvd
+before NTP can lead to a 44 year jump, resulting in a poll timeout of
+10^6 seconds.
+
+This patch replaces all gettimeofday() usage by the better clock_gettime
+call using a monotonic clock which avoids those situations.
+
+Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
+---
+
+This is the patch for 1.12, in case there is some stable release in the future.
+I will send a patch for 2.0 later.
+
+Regards,
+
+Markus
+
+
+ includes.h |  1 +
+ process.c  | 12 ++++++------
+ radvd.c    |  8 ++++----
+ radvd.h    | 12 ++++++------
+ send.c     | 24 ++++++------------------
+ timer.c    | 35 +++++++++++++++++++----------------
+ 6 files changed, 42 insertions(+), 50 deletions(-)
+
+diff --git a/includes.h b/includes.h
+index 2111e6651d31..d621b5ee585e 100644
+--- a/includes.h
++++ b/includes.h
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <time.h>
+ #include <syslog.h>
+ #include <unistd.h>
+diff --git a/process.c b/process.c
+index 53a1150c2091..91011d036528 100644
+--- a/process.c
++++ b/process.c
+@@ -119,7 +119,7 @@ static void process_rs(struct Interface *iface, unsigned char *msg, int len, str
+ {
+ 	double delay;
+ 	double next;
+-	struct timeval tv;
++	struct timespec ts;
+ 	uint8_t *opt_str;
+ 
+ 	/* validation */
+@@ -154,22 +154,22 @@ static void process_rs(struct Interface *iface, unsigned char *msg, int len, str
+ 		opt_str += optlen;
+ 	}
+ 
+-	gettimeofday(&tv, NULL);
++	clock_gettime(CLOCK_MONOTONIC, &ts);
+ 
+ 	delay = MAX_RA_DELAY_TIME * rand() / (RAND_MAX + 1.0);
+ 
+ 	if (iface->UnicastOnly) {
+ 		send_ra_forall(iface, &addr->sin6_addr);
+-	} else if (timevaldiff(&tv, &iface->last_multicast) / 1000.0 < iface->MinDelayBetweenRAs) {
++	} else if (timespecdiff(&ts, &iface->last_multicast) / 1000.0 < iface->MinDelayBetweenRAs) {
+ 		/* last RA was sent only a few moments ago, don't send another immediately. */
+ 		next =
+-		    iface->MinDelayBetweenRAs - (tv.tv_sec + tv.tv_usec / 1000000.0) + (iface->last_multicast.tv_sec + iface->last_multicast.tv_usec / 1000000.0) + delay / 1000.0;
+-		iface->next_multicast = next_timeval(next);
++		    iface->MinDelayBetweenRAs - (ts.tv_sec + ts.tv_nsec / 1000000000.0) + (iface->last_multicast.tv_sec + iface->last_multicast.tv_nsec / 1000000000.0) + delay / 1000.0;
++		iface->next_multicast = next_timespec(next);
+ 	} else {
+ 		/* no RA sent in a while, send a multicast reply */
+ 		send_ra_forall(iface, NULL);
+ 		next = rand_between(iface->MinRtrAdvInterval, iface->MaxRtrAdvInterval);
+-		iface->next_multicast = next_timeval(next);
++		iface->next_multicast = next_timespec(next);
+ 	}
+ }
+ 
+diff --git a/radvd.c b/radvd.c
+index ab275efee40f..fcea72a2eea0 100644
+--- a/radvd.c
++++ b/radvd.c
+@@ -470,7 +470,7 @@ void timer_handler(void *data)
+ 		next = min(MAX_INITIAL_RTR_ADVERT_INTERVAL, next);
+ 	}
+ 
+-	iface->next_multicast = next_timeval(next);
++	iface->next_multicast = next_timespec(next);
+ }
+ 
+ void config_interface(void)
+@@ -499,12 +499,12 @@ void kickoff_adverts(void)
+ 	for (iface = IfaceList; iface; iface = iface->next) {
+ 		double next;
+ 
+-		gettimeofday(&iface->last_ra_time, NULL);
++		clock_gettime(CLOCK_MONOTONIC, &iface->last_ra_time);
+ 
+ 		if (iface->UnicastOnly)
+ 			continue;
+ 
+-		gettimeofday(&iface->last_multicast, NULL);
++		clock_gettime(CLOCK_MONOTONIC, &iface->last_multicast);
+ 
+ 		/* TODO: AdvSendAdvert is being checked in send_ra now so it can be removed here. */
+ 		if (!iface->AdvSendAdvert)
+@@ -516,7 +516,7 @@ void kickoff_adverts(void)
+ 			iface->init_racount++;
+ 
+ 			next = min(MAX_INITIAL_RTR_ADVERT_INTERVAL, iface->MaxRtrAdvInterval);
+-			iface->next_multicast = next_timeval(next);
++			iface->next_multicast = next_timespec(next);
+ 		}
+ 	}
+ }
+diff --git a/radvd.h b/radvd.h
+index d3b6957cff24..8db4b9dbe1c6 100644
+--- a/radvd.h
++++ b/radvd.h
+@@ -50,7 +50,7 @@ struct Interface {
+ 
+ 	int cease_adv;
+ 
+-	struct timeval last_ra_time;
++	struct timespec last_ra_time;
+ 
+ 	int IgnoreIfMissing;
+ 	int AdvSendAdvert;
+@@ -87,8 +87,8 @@ struct Interface {
+ 	struct AdvRDNSS *AdvRDNSSList;
+ 	struct AdvDNSSL *AdvDNSSLList;
+ 	struct Clients *ClientList;
+-	struct timeval last_multicast;
+-	struct timeval next_multicast;
++	struct timespec last_multicast;
++	struct timespec next_multicast;
+ 
+ 	/* Info whether this interface has failed in the past (and may need to be reinitialized) */
+ 	int HasFailed;
+@@ -212,9 +212,9 @@ void reload_config(void);
+ void reset_prefix_lifetimes(void);
+ 
+ /* timer.c */
+-struct timeval next_timeval(double next);
+-int timevaldiff(struct timeval const *a, struct timeval const *b);
+-int next_time_msec(struct Interface const *iface);
++struct timespec next_timespec(double next);
++int64_t timespecdiff(struct timespec const *a, struct timespec const *b);
++uint64_t next_time_msec(struct Interface const *iface);
+ int expired(struct Interface const *iface);
+ 
+ /* device.c */
+diff --git a/send.c b/send.c
+index fb14184d9d84..eaa9506bf6a0 100644
+--- a/send.c
++++ b/send.c
+@@ -76,18 +76,6 @@ static void send_ra_inc_len(size_t * len, int add)
+ 	}
+ }
+ 
+-static time_t time_diff_secs(const struct timeval *time_x, const struct timeval *time_y)
+-{
+-	time_t secs_diff;
+-
+-	secs_diff = time_x->tv_sec - time_y->tv_sec;
+-	if ((time_x->tv_usec - time_y->tv_usec) >= 500000)
+-		secs_diff++;
+-
+-	return secs_diff;
+-
+-}
+-
+ static void decrement_lifetime(const time_t secs, uint32_t * lifetime)
+ {
+ 
+@@ -118,8 +106,8 @@ int send_ra(struct Interface *iface, struct in6_addr *dest)
+ 	struct AdvDNSSL *dnssl;
+ 	struct AdvLowpanCo *lowpanco;
+ 	struct AdvAbro *abroo;
+-	struct timeval time_now;
+-	time_t secs_since_last_ra;
++	struct timespec time_now;
++	int64_t secs_since_last_ra;
+ 	char addr_str[INET6_ADDRSTRLEN];
+ 
+ 	unsigned char buff[MSG_SIZE_SEND];
+@@ -167,14 +155,14 @@ int send_ra(struct Interface *iface, struct in6_addr *dest)
+ 
+ 	if (dest == NULL) {
+ 		dest = (struct in6_addr *)all_hosts_addr;
+-		gettimeofday(&iface->last_multicast, NULL);
++		clock_gettime(CLOCK_MONOTONIC, &iface->last_multicast);
+ 	}
+ 
+-	gettimeofday(&time_now, NULL);
+-	secs_since_last_ra = time_diff_secs(&time_now, &iface->last_ra_time);
++	clock_gettime(CLOCK_MONOTONIC, &time_now);
++	secs_since_last_ra = timespecdiff(&time_now, &iface->last_ra_time) / 1000;
+ 	if (secs_since_last_ra < 0) {
+ 		secs_since_last_ra = 0;
+-		flog(LOG_WARNING, "gettimeofday() went backwards!");
++		flog(LOG_WARNING, "clock_gettime(CLOCK_MONOTONIC) went backwards!");
+ 	}
+ 	iface->last_ra_time = time_now;
+ 
+diff --git a/timer.c b/timer.c
+index ede0c36de499..622034290601 100644
+--- a/timer.c
++++ b/timer.c
+@@ -16,29 +16,32 @@
+ #include "config.h"
+ #include "radvd.h"
+ 
+-struct timeval next_timeval(double next)
++struct timespec next_timespec(double next)
+ {
+-	struct timeval tv;
+-	gettimeofday(&tv, NULL);
+-	tv.tv_sec += (int)next;
+-	tv.tv_usec += 1000000 * (next - (int)next);
+-	return tv;
++	struct timespec ts;
++
++	clock_gettime(CLOCK_MONOTONIC, &ts);
++	ts.tv_sec += (int)next;
++	ts.tv_nsec += 1000000000ULL * (next - (int)next);
++	return ts;
+ }
+ 
+-int timevaldiff(struct timeval const *a, struct timeval const *b)
++int64_t timespecdiff(struct timespec const *a, struct timespec const *b)
+ {
+-	int msec;
+-	msec = (a->tv_sec - b->tv_sec) * 1000;
+-	msec += (a->tv_usec - b->tv_usec) / 1000;
++	int64_t msec;
++	msec = ((int64_t)a->tv_sec - b->tv_sec) * 1000;
++	msec += ((int64_t)a->tv_nsec - b->tv_nsec) / (1000 * 1000);
+ 	return msec;
+ }
+ 
+ /* Returns when the next time should expire in milliseconds. */
+-int next_time_msec(struct Interface const *iface)
++uint64_t next_time_msec(struct Interface const *iface)
+ {
+-	struct timeval tv;
+-	int retval;
+-	gettimeofday(&tv, NULL);
+-	retval = timevaldiff(&iface->next_multicast, &tv);
+-	return retval >= 1 ? retval : 1;
++	struct timespec ts;
++	int64_t diff_ms;
++	clock_gettime(CLOCK_MONOTONIC, &ts);
++	diff_ms = timespecdiff(&iface->next_multicast, &ts);
++	if (diff_ms <= 0)
++		return 0;
++	return (uint64_t)diff_ms;
+ }
+-- 
+2.0.0.rc2
+
diff --git a/patches/radvd-1.12/series b/patches/radvd-1.12/series
new file mode 100644
index 000000000000..06b25c75bb01
--- /dev/null
+++ b/patches/radvd-1.12/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-time-Use-clock_gettime-and-monotonic-clock.patch
+# 7520c46047013d8255e352f310f0e087  - git-ptx-patches magic
diff --git a/rules/radvd.in b/rules/radvd.in
new file mode 100644
index 000000000000..fc653fa79022
--- /dev/null
+++ b/rules/radvd.in
@@ -0,0 +1,8 @@
+## SECTION=networking
+
+config RADVD
+	bool
+	prompt "radvd"
+	select LIBDAEMON
+	help
+	  Router Advertisement Daemon
diff --git a/rules/radvd.make b/rules/radvd.make
new file mode 100644
index 000000000000..6109130cf0a3
--- /dev/null
+++ b/rules/radvd.make
@@ -0,0 +1,67 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2014 by Markus Pargmann <mpa@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_RADVD) += radvd
+
+#
+# Paths and names
+#
+RADVD_VERSION	:= 1.12
+RADVD		:= radvd-$(RADVD_VERSION)
+RADVD_SUFFIX	:= tar.xz
+RADVD_MD5	:= baddc38a5f26ca46a9ce7e778b59c1ae
+RADVD_URL	:= http://www.litech.org/radvd/dist/$(RADVD).$(RADVD_SUFFIX)
+RADVD_DIR	:= $(BUILDDIR)/$(RADVD)
+RADVD_BUILD_OOT	:= NO
+RADVD_SOURCE	:= $(SRCDIR)/$(RADVD).$(RADVD_SUFFIX)
+RADVD_LICENSE	:= BSD
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/radvd.extract: $(STATEDIR)/autogen-tools
+
+$(STATEDIR)/radvd.extract:
+	@$(call targetinfo)
+	@$(call clean, $(RADVD_DIR))
+	@$(call extract, RADVD)
+	cd $(RADVD_DIR) && [ -f configure ] || sh autogen.sh
+	@$(call patchin, RADVD)
+	@$(call touch)
+
+#
+# autoconf
+#
+RADVD_CONF_TOOL	:= autoconf
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/radvd.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, radvd)
+	@$(call install_fixup, radvd, PRIORITY, optional)
+	@$(call install_fixup, radvd, SECTION, base)
+	@$(call install_fixup, radvd, AUTHOR, "Markus Pargmann <mpa@pengutronix.de>")
+	@$(call install_fixup, radvd, DESCRIPTION, missing)
+
+	@$(call install_copy, radvd, 0, 0, 0755, -, /usr/sbin/radvd)
+
+	@$(call install_finish, radvd)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.0.0


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ptxdist] [PATCH 2/4] alfred: Initial commit
  2014-06-17  8:25 [ptxdist] [PATCH 1/4] radvd: Initial commit Markus Pargmann
@ 2014-06-17  8:25 ` Markus Pargmann
  2014-06-17  8:25 ` [ptxdist] [PATCH 3/4] crda: Fix udev rule Markus Pargmann
  2014-06-17  8:25 ` [ptxdist] [PATCH 4/4] cppzmq: zmq header for C++ Markus Pargmann
  2 siblings, 0 replies; 6+ messages in thread
From: Markus Pargmann @ 2014-06-17  8:25 UTC (permalink / raw)
  To: ptxdist; +Cc: Markus Pargmann

Add A.L.F.R.E.D. daemon to ptxdist. It is used to distribute data
between nodes of batman mesh networks.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 rules/alfred.in   |  8 +++++++
 rules/alfred.make | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 73 insertions(+)
 create mode 100644 rules/alfred.in
 create mode 100644 rules/alfred.make

diff --git a/rules/alfred.in b/rules/alfred.in
new file mode 100644
index 000000000000..f262081606af
--- /dev/null
+++ b/rules/alfred.in
@@ -0,0 +1,8 @@
+## SECTION=project_specific
+
+config ALFRED
+	tristate
+	prompt "A.L.F.R.E.D."
+	help
+	  Alfred is a distributed data distribution service which is used for
+	  batman mesh networks.
diff --git a/rules/alfred.make b/rules/alfred.make
new file mode 100644
index 000000000000..9db95e0401e8
--- /dev/null
+++ b/rules/alfred.make
@@ -0,0 +1,65 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2014 by Markus Pargmann <mpa@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_ALFRED) += alfred
+
+#
+# Paths and names
+#
+ALFRED_VERSION	:= 2014.1.0
+ALFRED_MD5		:= aaee0fbbc3aa011ba9c0a1d3f3b2801e
+ALFRED		:= alfred-$(ALFRED_VERSION)
+ALFRED_SUFFIX	:= tar.gz
+ALFRED_URL		:= http://downloads.open-mesh.org/batman/stable/sources/alfred/$(ALFRED).$(ALFRED_SUFFIX)
+ALFRED_SOURCE	:= $(SRCDIR)/$(ALFRED).$(ALFRED_SUFFIX)
+ALFRED_DIR		:= $(BUILDDIR)/$(ALFRED)
+ALFRED_LICENSE	:= unknown
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+ALFRED_CONF_TOOL	:= NO
+ALFRED_MAKE_ENV	:= $(CROSS_ENV) CONFIG_ALFRED_GPSD=n
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/alfred.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, alfred)
+	@$(call install_fixup, alfred,PRIORITY,optional)
+	@$(call install_fixup, alfred,SECTION,base)
+	@$(call install_fixup, alfred,AUTHOR,"Markus Pargmann <mpa@pengutronix.de>")
+	@$(call install_fixup, alfred,DESCRIPTION,missing)
+
+	@$(call install_copy, alfred, 0, 0, 0755, $(ALFRED_DIR)/alfred, /usr/bin/alfred)
+	@$(call install_copy, alfred, 0, 0, 0755, $(ALFRED_DIR)/vis/batadv-vis, /usr/bin/batadv-vis)
+
+	@$(call install_finish, alfred)
+
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/alfred.clean:
+	@$(call targetinfo)
+	@-cd $(ALFRED_DIR) && \
+		$(ALFRED_ENV) $(ALFRED_PATH) $(MAKE) clean
+	@$(call clean_pkg, ALFRED)
+
+# vim: syntax=make
-- 
2.0.0


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ptxdist] [PATCH 3/4] crda: Fix udev rule
  2014-06-17  8:25 [ptxdist] [PATCH 1/4] radvd: Initial commit Markus Pargmann
  2014-06-17  8:25 ` [ptxdist] [PATCH 2/4] alfred: " Markus Pargmann
@ 2014-06-17  8:25 ` Markus Pargmann
  2014-06-17  8:25 ` [ptxdist] [PATCH 4/4] cppzmq: zmq header for C++ Markus Pargmann
  2 siblings, 0 replies; 6+ messages in thread
From: Markus Pargmann @ 2014-06-17  8:25 UTC (permalink / raw)
  To: ptxdist; +Cc: Markus Pargmann

The first udev event that is received by udev, is called without a
COUNTRY environment variable. This udev rule change fixes this
behavior by setting the COUNTRY environment variable for add events to
00, world regulatory domain.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 patches/crda-3.13/0001-key2pub-Fix-ssl-keys.c-generation.patch | 2 +-
 patches/crda-3.13/0002-Pregenerate-keys-ssl.c.patch            | 2 +-
 patches/crda-3.13/0003-udev-Fix-rule-for-initial-setup.patch   | 9 +++++----
 patches/crda-3.13/0004-Makefile-Fix-libreg-build.patch         | 2 +-
 patches/crda-3.13/0005-fix-linking-libreg.patch                | 2 +-
 5 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/patches/crda-3.13/0001-key2pub-Fix-ssl-keys.c-generation.patch b/patches/crda-3.13/0001-key2pub-Fix-ssl-keys.c-generation.patch
index 74473b0c4a38..e3fe28c75b5b 100644
--- a/patches/crda-3.13/0001-key2pub-Fix-ssl-keys.c-generation.patch
+++ b/patches/crda-3.13/0001-key2pub-Fix-ssl-keys.c-generation.patch
@@ -11,7 +11,7 @@ Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/utils/key2pub.py b/utils/key2pub.py
-index 3e84cd2..7de45f7 100755
+index 3e84cd2a934d..7de45f7b9603 100755
 --- a/utils/key2pub.py
 +++ b/utils/key2pub.py
 @@ -59,7 +59,7 @@ def print_ssl_32(output, name, val):
diff --git a/patches/crda-3.13/0002-Pregenerate-keys-ssl.c.patch b/patches/crda-3.13/0002-Pregenerate-keys-ssl.c.patch
index c6405de89dc9..813ad4275984 100644
--- a/patches/crda-3.13/0002-Pregenerate-keys-ssl.c.patch
+++ b/patches/crda-3.13/0002-Pregenerate-keys-ssl.c.patch
@@ -10,7 +10,7 @@ Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
 
 diff --git a/keys-ssl.c b/keys-ssl.c
 new file mode 100644
-index 0000000..7318c03
+index 000000000000..7318c036a1f9
 --- /dev/null
 +++ b/keys-ssl.c
 @@ -0,0 +1,41 @@
diff --git a/patches/crda-3.13/0003-udev-Fix-rule-for-initial-setup.patch b/patches/crda-3.13/0003-udev-Fix-rule-for-initial-setup.patch
index 68e85094880d..551b84bf68ad 100644
--- a/patches/crda-3.13/0003-udev-Fix-rule-for-initial-setup.patch
+++ b/patches/crda-3.13/0003-udev-Fix-rule-for-initial-setup.patch
@@ -4,16 +4,17 @@ Subject: [PATCH] udev: Fix rule for initial setup
 
 Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
 ---
- udev/regulatory.rules | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ udev/regulatory.rules | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/udev/regulatory.rules b/udev/regulatory.rules
-index 3d6add8..90ac539 100644
+index 3d6add895784..98296961f0ed 100644
 --- a/udev/regulatory.rules
 +++ b/udev/regulatory.rules
-@@ -2,4 +2,4 @@
+@@ -2,4 +2,5 @@
  # For more information see:
  # http://wireless.kernel.org/en/developers/Regulatory/CRDA
  
 -KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="$(SBINDIR)crda"
++KERNEL=="regulatory*", ACTION=="add", SUBSYSTEM=="platform", ENV{COUNTRY}="00"
 +KERNEL=="regulatory*", ACTION=="add|change", SUBSYSTEM=="platform", RUN+="$(SBINDIR)crda"
diff --git a/patches/crda-3.13/0004-Makefile-Fix-libreg-build.patch b/patches/crda-3.13/0004-Makefile-Fix-libreg-build.patch
index ceaa19f2ef75..ef02358d6e4e 100644
--- a/patches/crda-3.13/0004-Makefile-Fix-libreg-build.patch
+++ b/patches/crda-3.13/0004-Makefile-Fix-libreg-build.patch
@@ -8,7 +8,7 @@ Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
  1 file changed, 7 insertions(+), 7 deletions(-)
 
 diff --git a/Makefile b/Makefile
-index 4a351c6..b07d8ad 100644
+index 4a351c645bf4..b07d8ad8b690 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -5,8 +5,8 @@ REG_GIT?=git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-regdb.g
diff --git a/patches/crda-3.13/0005-fix-linking-libreg.patch b/patches/crda-3.13/0005-fix-linking-libreg.patch
index 0229c09f24ce..fdb78ceaade2 100644
--- a/patches/crda-3.13/0005-fix-linking-libreg.patch
+++ b/patches/crda-3.13/0005-fix-linking-libreg.patch
@@ -8,7 +8,7 @@ Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
  1 file changed, 6 insertions(+), 5 deletions(-)
 
 diff --git a/Makefile b/Makefile
-index b07d8ad..2d6747c 100644
+index b07d8ad8b690..2d6747cd6cde 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -28,10 +28,11 @@ RUNTIME_PUBKEY_DIR?=/etc/wireless-regdb/pubkeys
-- 
2.0.0


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ptxdist] [PATCH 4/4] cppzmq: zmq header for C++
  2014-06-17  8:25 [ptxdist] [PATCH 1/4] radvd: Initial commit Markus Pargmann
  2014-06-17  8:25 ` [ptxdist] [PATCH 2/4] alfred: " Markus Pargmann
  2014-06-17  8:25 ` [ptxdist] [PATCH 3/4] crda: Fix udev rule Markus Pargmann
@ 2014-06-17  8:25 ` Markus Pargmann
  2014-06-17 12:26   ` Alexander Aring
  2 siblings, 1 reply; 6+ messages in thread
From: Markus Pargmann @ 2014-06-17  8:25 UTC (permalink / raw)
  To: ptxdist; +Cc: Markus Pargmann

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 rules/cppzmq.in   |  8 ++++++++
 rules/cppzmq.make | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+)
 create mode 100644 rules/cppzmq.in
 create mode 100644 rules/cppzmq.make

diff --git a/rules/cppzmq.in b/rules/cppzmq.in
new file mode 100644
index 000000000000..8494cfbe10af
--- /dev/null
+++ b/rules/cppzmq.in
@@ -0,0 +1,8 @@
+## SECTION=networking
+
+config CPPZMQ
+	tristate
+	prompt "cppzmq"
+	select LIBZMQ
+	help
+	  C++ lib zmq bindings
diff --git a/rules/cppzmq.make b/rules/cppzmq.make
new file mode 100644
index 000000000000..91aa1f4afb55
--- /dev/null
+++ b/rules/cppzmq.make
@@ -0,0 +1,51 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2014 by Markus Pargmann <mpa@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_CPPZMQ) += cppzmq
+
+#
+# Paths and names
+#
+CPPZMQ_VERSION	:= ee47ae4cddc3
+CPPZMQ_MD5	:= cf5d2f77caaa0749e522c143fd5260c8
+CPPZMQ		:= cppzmq-$(CPPZMQ_VERSION)
+CPPZMQ_SUFFIX	:= tar.gz
+CPPZMQ_URL	:= https://github.com/zeromq/cppzmq.git;tag=$(CPPZMQ_VERSION)
+CPPZMQ_SOURCE	:= $(SRCDIR)/$(CPPZMQ).$(CPPZMQ_SUFFIX)
+CPPZMQ_DIR	:= $(BUILDDIR)/$(CPPZMQ)
+CPPZMQ_LICENSE	:= unknown
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+CPPZMQ_CONF_TOOL	:= NO
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/cppzmq.compile:
+	@$(call targetinfo)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/cppzmq.install:
+	@$(call targetinfo)
+	install -D -m 0644 $(CPPZMQ_DIR)/zmq.hpp $(CPPZMQ_PKGDIR)/usr/include/zmq.hpp
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.0.0


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH 4/4] cppzmq: zmq header for C++
  2014-06-17  8:25 ` [ptxdist] [PATCH 4/4] cppzmq: zmq header for C++ Markus Pargmann
@ 2014-06-17 12:26   ` Alexander Aring
  2014-06-18  9:09     ` Markus Pargmann
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Aring @ 2014-06-17 12:26 UTC (permalink / raw)
  To: ptxdist; +Cc: Markus Pargmann

Hi Markus,

maybe we should patch LIBZMQ to install a header file which is
compatible with LIBZMQ_VERSION.

It's sad that they don't ship a cpp header with the libzmq.

- Alex

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH 4/4] cppzmq: zmq header for C++
  2014-06-17 12:26   ` Alexander Aring
@ 2014-06-18  9:09     ` Markus Pargmann
  0 siblings, 0 replies; 6+ messages in thread
From: Markus Pargmann @ 2014-06-18  9:09 UTC (permalink / raw)
  To: Alexander Aring; +Cc: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 707 bytes --]

Hi Alex,

On Tue, Jun 17, 2014 at 02:26:45PM +0200, Alexander Aring wrote:
> Hi Markus,
> 
> maybe we should patch LIBZMQ to install a header file which is
> compatible with LIBZMQ_VERSION.

I think we should keep it in a seperate package for the moment, as it is
easier to maintain it as a seperate package. If we notice any issues we
can still move to patches.

Regards,

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-06-18  9:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-17  8:25 [ptxdist] [PATCH 1/4] radvd: Initial commit Markus Pargmann
2014-06-17  8:25 ` [ptxdist] [PATCH 2/4] alfred: " Markus Pargmann
2014-06-17  8:25 ` [ptxdist] [PATCH 3/4] crda: Fix udev rule Markus Pargmann
2014-06-17  8:25 ` [ptxdist] [PATCH 4/4] cppzmq: zmq header for C++ Markus Pargmann
2014-06-17 12:26   ` Alexander Aring
2014-06-18  9:09     ` Markus Pargmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox