From: Markus Pargmann <mpa@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Markus Pargmann <mpa@pengutronix.de>
Subject: [ptxdist] [PATCH 4/8] crda: version bump 1.1.3 -> 3.13
Date: Wed, 30 Apr 2014 11:59:12 +0200 [thread overview]
Message-ID: <1398851956-18885-5-git-send-email-mpa@pengutronix.de> (raw)
In-Reply-To: <1398851956-18885-1-git-send-email-mpa@pengutronix.de>
There are some problems in the new version which get fixed by the
additional patches.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
.../crda-1.1.3/0001-Pregenerate-keys-ssl.c.patch | 73 ----------------------
patches/crda-1.1.3/series | 4 --
.../0001-key2pub-Fix-ssl-keys.c-generation.patch | 38 +++++++++++
.../crda-3.13/0002-Pregenerate-keys-ssl.c.patch | 61 ++++++++++++++++++
.../0003-udev-Fix-rule-for-initial-setup.patch | 23 +++++++
.../crda-3.13/0004-Makefile-Fix-libreg-build.patch | 48 ++++++++++++++
patches/crda-3.13/series | 4 ++
rules/crda.make | 9 +--
8 files changed, 179 insertions(+), 81 deletions(-)
delete mode 100644 patches/crda-1.1.3/0001-Pregenerate-keys-ssl.c.patch
delete mode 100644 patches/crda-1.1.3/series
create mode 100644 patches/crda-3.13/0001-key2pub-Fix-ssl-keys.c-generation.patch
create mode 100644 patches/crda-3.13/0002-Pregenerate-keys-ssl.c.patch
create mode 100644 patches/crda-3.13/0003-udev-Fix-rule-for-initial-setup.patch
create mode 100644 patches/crda-3.13/0004-Makefile-Fix-libreg-build.patch
create mode 100644 patches/crda-3.13/series
diff --git a/patches/crda-1.1.3/0001-Pregenerate-keys-ssl.c.patch b/patches/crda-1.1.3/0001-Pregenerate-keys-ssl.c.patch
deleted file mode 100644
index 0fda5d1..0000000
--- a/patches/crda-1.1.3/0001-Pregenerate-keys-ssl.c.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From: Jan Luebbe <jlu@pengutronix.de>
-Date: Thu, 26 Jan 2012 15:33:36 +0100
-Subject: [PATCH] Pregenerate keys-ssl.c
-
----
- Makefile | 8 ++++----
- keys-ssl.c | 38 ++++++++++++++++++++++++++++++++++++++
- 2 files changed, 42 insertions(+), 4 deletions(-)
- create mode 100644 keys-ssl.c
-
-diff --git a/Makefile b/Makefile
-index 084d8e5..80e3539 100644
---- a/Makefile
-+++ b/Makefile
-@@ -93,10 +93,10 @@ $(REG_BIN):
- $(NQ)
- $(Q) exit 1
-
--keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem)
-- $(NQ) ' GEN ' $@
-- $(NQ) ' Trusted pubkeys:' $(wildcard $(PUBKEY_DIR)/*.pem)
-- $(Q)./utils/key2pub.py --$* $(wildcard $(PUBKEY_DIR)/*.pem) $@
-+#keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem)
-+# $(NQ) ' GEN ' $@
-+# $(NQ) ' Trusted pubkeys:' $(wildcard $(PUBKEY_DIR)/*.pem)
-+# $(Q)./utils/key2pub.py --$* $(wildcard $(PUBKEY_DIR)/*.pem) $@
-
- %.o: %.c regdb.h
- $(NQ) ' CC ' $@
-diff --git a/keys-ssl.c b/keys-ssl.c
-new file mode 100644
-index 0000000..a8c1b7e
---- /dev/null
-+++ b/keys-ssl.c
-@@ -0,0 +1,38 @@
-+static BN_ULONG e_0[1] = {
-+ 0x00010001,
-+};
-+
-+static BN_ULONG n_0[64] = {
-+ 0x16a0d8e1, 0x63a27054, 0xc8ba757b, 0xdc9fca11,
-+ 0xcbcb35e3, 0xb9c06510, 0xba941433, 0x39e3dfeb,
-+ 0x6c1fce9d, 0x7bbae38a, 0xfefabba7, 0x205a5a73,
-+ 0x97839a2e, 0x53ea3e5a, 0x61dc0170, 0xfec8f5b6,
-+ 0xd29a1004, 0xefe311d8, 0xa5156bb8, 0x8c6a92d0,
-+ 0x7a6eb5cc, 0x9067cc76, 0x0bd5b1ff, 0xd103580b,
-+ 0x8f3a2daf, 0x4a563e84, 0x46b0943e, 0xacd7cadb,
-+ 0xebd1e198, 0x5fabb688, 0x5916f173, 0x7e70c1d3,
-+ 0x5d6ca84e, 0xaaa8acc8, 0xe20fd4dc, 0x1685c157,
-+ 0xad933f64, 0xf9e9c9c7, 0xc5f59824, 0xbe6272ed,
-+ 0x53447bd1, 0x585d9a7d, 0x5b3bc30d, 0x011a5b3f,
-+ 0xffbbf0e9, 0xf312b966, 0x482c131b, 0x2203fb37,
-+ 0x0dc38eab, 0x3e7c157d, 0xb39fcc8d, 0xb04de1d6,
-+ 0x07fc0d84, 0x4d9f0137, 0xe13b5ac5, 0xb075a241,
-+ 0x8e56e153, 0x0a9a9d48, 0xf97054eb, 0xf2cff393,
-+ 0x376024f2, 0x2a2ead68, 0x88d35dce, 0xd6579971,
-+};
-+
-+
-+struct pubkey {
-+ struct bignum_st e, n;
-+};
-+
-+#define KEY(data) { \
-+ .d = data, \
-+ .top = sizeof(data)/sizeof(data[0]), \
-+}
-+
-+#define KEYS(e,n) { KEY(e), KEY(n), }
-+
-+static struct pubkey keys[] = {
-+ KEYS(e_0, n_0),
-+};
diff --git a/patches/crda-1.1.3/series b/patches/crda-1.1.3/series
deleted file mode 100644
index 348caf1..0000000
--- a/patches/crda-1.1.3/series
+++ /dev/null
@@ -1,4 +0,0 @@
-# generated by git-ptx-patches
-#tag:base --start-number 1
-0001-Pregenerate-keys-ssl.c.patch
-# aa6be6d26b37ec911763a7e1eefe3128 - git-ptx-patches magic
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
new file mode 100644
index 0000000..b67e801
--- /dev/null
+++ b/patches/crda-3.13/0001-key2pub-Fix-ssl-keys.c-generation.patch
@@ -0,0 +1,38 @@
+From 7394c6f238fccd893f0927ef4e768165e561c3d2 Mon Sep 17 00:00:00 2001
+From: Markus Pargmann <mpa@pengutronix.de>
+Date: Thu, 17 Apr 2014 14:40:49 +0200
+Subject: [PATCH 1/4] key2pub: Fix ssl-keys.c generation
+
+This patch fixes the generated ssl-keys.c file. Without these fixes,
+crda does not compile with ssl.
+
+Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
+---
+ utils/key2pub.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/utils/key2pub.py b/utils/key2pub.py
+index 3e84cd2..7de45f7 100755
+--- a/utils/key2pub.py
++++ b/utils/key2pub.py
+@@ -59,7 +59,7 @@ def print_ssl_32(output, name, val):
+
+ def print_ssl(output, name, val):
+ import struct
+- output.write('#include <stdint.h>\n')
++ output.write('#include <stdint.h>\n#include <openssl/bn.h>\n')
+ if len(struct.pack('@L', 0)) == 8:
+ return print_ssl_64(output, name, val)
+ else:
+@@ -78,7 +78,7 @@ struct pubkey {
+
+ #define KEYS(e,n) { KEY(e), KEY(n), }
+
+-static struct pubkey keys[] = {
++__attribute__((unused)) static struct pubkey keys[] = {
+ ''')
+ for n in xrange(n + 1):
+ output.write(' KEYS(e_%d, n_%d),\n' % (n, n))
+--
+1.9.0
+
diff --git a/patches/crda-3.13/0002-Pregenerate-keys-ssl.c.patch b/patches/crda-3.13/0002-Pregenerate-keys-ssl.c.patch
new file mode 100644
index 0000000..10c19a2
--- /dev/null
+++ b/patches/crda-3.13/0002-Pregenerate-keys-ssl.c.patch
@@ -0,0 +1,61 @@
+From a314b1075e456268abe3f571fd00fd63e9a59c9b Mon Sep 17 00:00:00 2001
+From: Jan Luebbe <jlu@pengutronix.de>
+Date: Thu, 26 Jan 2012 15:33:36 +0100
+Subject: [PATCH 2/4] Pregenerate keys-ssl.c
+
+Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
+---
+ keys-ssl.c | 41 +++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 41 insertions(+)
+ create mode 100644 keys-ssl.c
+
+diff --git a/keys-ssl.c b/keys-ssl.c
+new file mode 100644
+index 0000000..7318c03
+--- /dev/null
++++ b/keys-ssl.c
+@@ -0,0 +1,41 @@
++#include <stdint.h>
++#include <openssl/bn.h>
++
++static BN_ULONG e_0[1] = {
++ 0x00010001,
++};
++
++static BN_ULONG n_0[64] = {
++ 0x16a0d8e1, 0x63a27054, 0xc8ba757b, 0xdc9fca11,
++ 0xcbcb35e3, 0xb9c06510, 0xba941433, 0x39e3dfeb,
++ 0x6c1fce9d, 0x7bbae38a, 0xfefabba7, 0x205a5a73,
++ 0x97839a2e, 0x53ea3e5a, 0x61dc0170, 0xfec8f5b6,
++ 0xd29a1004, 0xefe311d8, 0xa5156bb8, 0x8c6a92d0,
++ 0x7a6eb5cc, 0x9067cc76, 0x0bd5b1ff, 0xd103580b,
++ 0x8f3a2daf, 0x4a563e84, 0x46b0943e, 0xacd7cadb,
++ 0xebd1e198, 0x5fabb688, 0x5916f173, 0x7e70c1d3,
++ 0x5d6ca84e, 0xaaa8acc8, 0xe20fd4dc, 0x1685c157,
++ 0xad933f64, 0xf9e9c9c7, 0xc5f59824, 0xbe6272ed,
++ 0x53447bd1, 0x585d9a7d, 0x5b3bc30d, 0x011a5b3f,
++ 0xffbbf0e9, 0xf312b966, 0x482c131b, 0x2203fb37,
++ 0x0dc38eab, 0x3e7c157d, 0xb39fcc8d, 0xb04de1d6,
++ 0x07fc0d84, 0x4d9f0137, 0xe13b5ac5, 0xb075a241,
++ 0x8e56e153, 0x0a9a9d48, 0xf97054eb, 0xf2cff393,
++ 0x376024f2, 0x2a2ead68, 0x88d35dce, 0xd6579971,
++};
++
++
++struct pubkey {
++ struct bignum_st e, n;
++};
++
++#define KEY(data) { \
++ .d = data, \
++ .top = sizeof(data)/sizeof(data[0]), \
++}
++
++#define KEYS(e,n) { KEY(e), KEY(n), }
++
++__attribute__((unused)) static struct pubkey keys[] = {
++ KEYS(e_0, n_0),
++};
+--
+1.9.0
+
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
new file mode 100644
index 0000000..e91b154
--- /dev/null
+++ b/patches/crda-3.13/0003-udev-Fix-rule-for-initial-setup.patch
@@ -0,0 +1,23 @@
+From 2634bae34b4cb0870ee1f4f1cea228897307fe4c Mon Sep 17 00:00:00 2001
+From: Markus Pargmann <mpa@pengutronix.de>
+Date: Thu, 17 Apr 2014 11:59:59 +0200
+Subject: [PATCH 3/4] 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(-)
+
+diff --git a/udev/regulatory.rules b/udev/regulatory.rules
+index 3d6add8..90ac539 100644
+--- a/udev/regulatory.rules
++++ b/udev/regulatory.rules
+@@ -2,4 +2,4 @@
+ # 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|change", SUBSYSTEM=="platform", RUN+="$(SBINDIR)crda"
+--
+1.9.0
+
diff --git a/patches/crda-3.13/0004-Makefile-Fix-libreg-build.patch b/patches/crda-3.13/0004-Makefile-Fix-libreg-build.patch
new file mode 100644
index 0000000..3ca3ae7
--- /dev/null
+++ b/patches/crda-3.13/0004-Makefile-Fix-libreg-build.patch
@@ -0,0 +1,48 @@
+From c0074b4554322f16f3547e647cf2b15613e6f7bb Mon Sep 17 00:00:00 2001
+From: Markus Pargmann <mpa@pengutronix.de>
+Date: Thu, 17 Apr 2014 15:34:35 +0200
+Subject: [PATCH 4/4] Makefile: Fix libreg build
+
+Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
+---
+ Makefile | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 4a351c6..b07d8ad 100644
+--- a/Makefile
++++ b/Makefile
+@@ -5,8 +5,8 @@ REG_GIT?=git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-regdb.g
+
+ PREFIX ?= /usr/
+ MANDIR ?= $(PREFIX)/share/man/
+-INCLUDE_DIR ?= $(PREFIX)/include/reglib/
+-LIBDIR ?= $(PREFIX)/lib
++INCLUDE_DIR ?= /include/reglib/
++LIBDIR ?= /lib/
+
+ SBINDIR ?= /sbin/
+
+@@ -119,14 +119,14 @@ $(LIBREG): regdb.h reglib.h reglib.c
+
+ install-libreg-headers:
+ $(NQ) ' INSTALL libreg-headers'
+- $(Q)mkdir -p $(INCLUDE_DIR)
+- $(Q)cp *.h $(INCLUDE_DIR)/
++ $(Q)$(MKDIR) $(DESTDIR)/$(INCLUDE_DIR)
++ $(Q)$(INSTALL) -m 644 -t $(DESTDIR)/$(INCLUDE_DIR) *.h
+
+ install-libreg:
+ $(NQ) ' INSTALL libreg'
+- $(Q)mkdir -p $(LIBDIR)
+- $(Q)cp $(LIBREG) $(LIBDIR)/
+- $(Q)ldconfig
++ $(Q)$(MKDIR) $(LIBDIR)
++ $(Q)$(INSTALL) -m 644 -t $(DESTDIR)/$(LIBDIR) $(LIBREG)
++# $(Q)ldconfig
+
+ %.o: %.c regdb.h $(LIBREG)
+ $(NQ) ' CC ' $@
+--
+1.9.0
+
diff --git a/patches/crda-3.13/series b/patches/crda-3.13/series
new file mode 100644
index 0000000..ae68329
--- /dev/null
+++ b/patches/crda-3.13/series
@@ -0,0 +1,4 @@
+0001-key2pub-Fix-ssl-keys.c-generation.patch
+0002-Pregenerate-keys-ssl.c.patch
+0003-udev-Fix-rule-for-initial-setup.patch
+0004-Makefile-Fix-libreg-build.patch
diff --git a/rules/crda.make b/rules/crda.make
index 18069e1..e9b8db9 100644
--- a/rules/crda.make
+++ b/rules/crda.make
@@ -16,11 +16,11 @@ PACKAGES-$(PTXCONF_CRDA) += crda
#
# Paths and names
#
-CRDA_VERSION := 1.1.3
-CRDA_MD5 := 29579185e06a75675507527243d28e5c
+CRDA_VERSION := 3.13
+CRDA_MD5 := 66b1b0417c1ad19f0009a5c0c0c1aebc
CRDA := crda-$(CRDA_VERSION)
-CRDA_SUFFIX := tar.bz2
-CRDA_URL := http://linuxwireless.org/download/crda/$(CRDA).$(CRDA_SUFFIX)
+CRDA_SUFFIX := tar.xz
+CRDA_URL := $(call ptx/mirror, KERNEL, ../software/network/crda/$(CRDA).$(CRDA_SUFFIX))
CRDA_SOURCE := $(SRCDIR)/$(CRDA).$(CRDA_SUFFIX)
CRDA_DIR := $(BUILDDIR)/$(CRDA)
CRDA_LICENSE := unknown
@@ -58,6 +58,7 @@ $(STATEDIR)/crda.targetinstall:
@$(call install_copy, crda, 0, 0, 0755, -, /sbin/regdbdump)
@$(call install_copy, crda, 0, 0, 0644, -, \
/lib/udev/rules.d/85-regulatory.rules)
+ @$(call install_lib, crda, 0, 0, 0644, libreg)
# regulatory.bin was downloaded from:
# git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-regdb.git
--
1.9.1
--
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2014-04-30 9:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-30 9:59 [ptxdist] [PATCH 0/8] network packages updates Markus Pargmann
2014-04-30 9:59 ` [ptxdist] [PATCH 1/8] iproute2: version bump 3.9.0 -> 3.14.0 Markus Pargmann
2014-04-30 9:59 ` [ptxdist] [PATCH 2/8] iw: version bump 3.3 -> 3.14 Markus Pargmann
2014-04-30 9:59 ` [ptxdist] [PATCH 3/8] network: Add batctl Markus Pargmann
2014-04-30 9:59 ` Markus Pargmann [this message]
2014-04-30 9:59 ` [ptxdist] [PATCH 5/8] dnsmasq: version bump 2.47 -> 2.69 Markus Pargmann
2014-04-30 9:59 ` [ptxdist] [PATCH 6/8] iperf: version bump 2.0.4 -> 2.0.5 Markus Pargmann
2014-04-30 9:59 ` [ptxdist] [PATCH 7/8] wireshark: version bump 1.10.5 -> 1.10.6 Markus Pargmann
2014-04-30 9:59 ` [ptxdist] [PATCH 8/8] libjpeg: version bump 8a -> 9a, add binaries Markus Pargmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1398851956-18885-5-git-send-email-mpa@pengutronix.de \
--to=mpa@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox