From 630f4ab58276b6498413552eda0b6dc5b6b73b58 Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde Date: Thu, 30 Jun 2016 12:21:30 +0200 Subject: crda: version bump to 3.18 This is needed in order to work with the updated regulatory.bin from: 1fdfb3fd5602 crda: update to new regulatory.bin Signed-off-by: Marc Kleine-Budde --- .../0001-key2pub-Fix-ssl-keys.c-generation.patch | 34 ----- .../crda-3.13/0002-Pregenerate-keys-ssl.c.patch | 112 -------------- .../0003-udev-Fix-rule-for-initial-setup.patch | 20 --- .../crda-3.13/0004-Makefile-Fix-libreg-build.patch | 44 ------ patches/crda-3.13/0005-fix-linking-libreg.patch | 52 ------- patches/crda-3.13/series | 8 - .../0001-key2pub-Fix-ssl-keys.c-generation.patch | 34 +++++ .../crda-3.18/0002-Pregenerate-keys-ssl.c.patch | 168 +++++++++++++++++++++ .../0003-udev-Fix-rule-for-initial-setup.patch | 20 +++ .../crda-3.18/0004-Makefile-Fix-libreg-build.patch | 44 ++++++ patches/crda-3.18/0005-fix-linking-libreg.patch | 48 ++++++ patches/crda-3.18/series | 8 + rules/crda.make | 4 +- 13 files changed, 324 insertions(+), 272 deletions(-) delete mode 100644 patches/crda-3.13/0001-key2pub-Fix-ssl-keys.c-generation.patch delete mode 100644 patches/crda-3.13/0002-Pregenerate-keys-ssl.c.patch delete mode 100644 patches/crda-3.13/0003-udev-Fix-rule-for-initial-setup.patch delete mode 100644 patches/crda-3.13/0004-Makefile-Fix-libreg-build.patch delete mode 100644 patches/crda-3.13/0005-fix-linking-libreg.patch delete mode 100644 patches/crda-3.13/series create mode 100644 patches/crda-3.18/0001-key2pub-Fix-ssl-keys.c-generation.patch create mode 100644 patches/crda-3.18/0002-Pregenerate-keys-ssl.c.patch create mode 100644 patches/crda-3.18/0003-udev-Fix-rule-for-initial-setup.patch create mode 100644 patches/crda-3.18/0004-Makefile-Fix-libreg-build.patch create mode 100644 patches/crda-3.18/0005-fix-linking-libreg.patch create mode 100644 patches/crda-3.18/series 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 deleted file mode 100644 index e3fe28c75..000000000 --- a/patches/crda-3.13/0001-key2pub-Fix-ssl-keys.c-generation.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Markus Pargmann -Date: Thu, 17 Apr 2014 14:40:49 +0200 -Subject: [PATCH] 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 ---- - utils/key2pub.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/utils/key2pub.py b/utils/key2pub.py -index 3e84cd2a934d..7de45f7b9603 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 \n') -+ output.write('#include \n#include \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)) diff --git a/patches/crda-3.13/0002-Pregenerate-keys-ssl.c.patch b/patches/crda-3.13/0002-Pregenerate-keys-ssl.c.patch deleted file mode 100644 index 4d1a95854..000000000 --- a/patches/crda-3.13/0002-Pregenerate-keys-ssl.c.patch +++ /dev/null @@ -1,112 +0,0 @@ -From: Jan Luebbe -Date: Thu, 26 Jan 2012 15:33:36 +0100 -Subject: [PATCH] Pregenerate keys-ssl.c - -Note: The content is different for 32 and 64 bit systems so we need two -versions. - -Signed-off-by: Markus Pargmann -Signed-off-by: Michael Olbrich ---- - keys-ssl.c.32 | 42 ++++++++++++++++++++++++++++++++++++++++++ - keys-ssl.c.64 | 42 ++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 84 insertions(+) - create mode 100644 keys-ssl.c.32 - create mode 100644 keys-ssl.c.64 - -diff --git a/keys-ssl.c.32 b/keys-ssl.c.32 -new file mode 100644 -index 000000000000..593b06da7520 ---- /dev/null -+++ b/keys-ssl.c.32 -@@ -0,0 +1,42 @@ -+#include -+#include -+static BN_ULONG e_0[1] = { -+ 0x00010001, -+}; -+ -+#include -+#include -+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), -+}; -diff --git a/keys-ssl.c.64 b/keys-ssl.c.64 -new file mode 100644 -index 000000000000..ca0fc2978910 ---- /dev/null -+++ b/keys-ssl.c.64 -@@ -0,0 +1,42 @@ -+#include -+#include -+static BN_ULONG e_0[1] = { -+ 0x0000000000010001, -+}; -+ -+#include -+#include -+static BN_ULONG n_0[32] = { -+ 0x63a2705416a0d8e1, 0xdc9fca11c8ba757b, -+ 0xb9c06510cbcb35e3, 0x39e3dfebba941433, -+ 0x7bbae38a6c1fce9d, 0x205a5a73fefabba7, -+ 0x53ea3e5a97839a2e, 0xfec8f5b661dc0170, -+ 0xefe311d8d29a1004, 0x8c6a92d0a5156bb8, -+ 0x9067cc767a6eb5cc, 0xd103580b0bd5b1ff, -+ 0x4a563e848f3a2daf, 0xacd7cadb46b0943e, -+ 0x5fabb688ebd1e198, 0x7e70c1d35916f173, -+ 0xaaa8acc85d6ca84e, 0x1685c157e20fd4dc, -+ 0xf9e9c9c7ad933f64, 0xbe6272edc5f59824, -+ 0x585d9a7d53447bd1, 0x011a5b3f5b3bc30d, -+ 0xf312b966ffbbf0e9, 0x2203fb37482c131b, -+ 0x3e7c157d0dc38eab, 0xb04de1d6b39fcc8d, -+ 0x4d9f013707fc0d84, 0xb075a241e13b5ac5, -+ 0x0a9a9d488e56e153, 0xf2cff393f97054eb, -+ 0x2a2ead68376024f2, 0xd657997188d35dce, -+}; -+ -+ -+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), -+}; 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 deleted file mode 100644 index 551b84bf6..000000000 --- a/patches/crda-3.13/0003-udev-Fix-rule-for-initial-setup.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: Markus Pargmann -Date: Thu, 17 Apr 2014 11:59:59 +0200 -Subject: [PATCH] udev: Fix rule for initial setup - -Signed-off-by: Markus Pargmann ---- - udev/regulatory.rules | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/udev/regulatory.rules b/udev/regulatory.rules -index 3d6add895784..98296961f0ed 100644 ---- a/udev/regulatory.rules -+++ b/udev/regulatory.rules -@@ -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 deleted file mode 100644 index ef02358d6..000000000 --- a/patches/crda-3.13/0004-Makefile-Fix-libreg-build.patch +++ /dev/null @@ -1,44 +0,0 @@ -From: Markus Pargmann -Date: Thu, 17 Apr 2014 15:34:35 +0200 -Subject: [PATCH] Makefile: Fix libreg build - -Signed-off-by: Markus Pargmann ---- - Makefile | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/Makefile b/Makefile -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 - - 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 ' $@ diff --git a/patches/crda-3.13/0005-fix-linking-libreg.patch b/patches/crda-3.13/0005-fix-linking-libreg.patch deleted file mode 100644 index fdb78ceaa..000000000 --- a/patches/crda-3.13/0005-fix-linking-libreg.patch +++ /dev/null @@ -1,52 +0,0 @@ -From: Michael Olbrich -Date: Thu, 8 May 2014 12:15:11 +0200 -Subject: [PATCH] fix linking libreg - -Signed-off-by: Michael Olbrich ---- - Makefile | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -diff --git a/Makefile b/Makefile -index b07d8ad8b690..2d6747cd6cde 100644 ---- a/Makefile -+++ b/Makefile -@@ -28,10 +28,11 @@ RUNTIME_PUBKEY_DIR?=/etc/wireless-regdb/pubkeys - CFLAGS += -O2 -fpic - CFLAGS += -std=gnu99 -Wall -Werror -pedantic - CFLAGS += -Wall -g --LDLIBS += -lm -+LIBREGLIBS += -lm - LDLIBREG += -lreg - LIBREG += libreg.so --LDFLAGS += -L ./ $(LDLIBREG) -+LDFLAGS += -L ./ -+LDLIBS += $(LDLIBREG) - - all: all_noverify verify - -@@ -39,13 +40,13 @@ all_noverify: $(LIBREG) crda intersect regdbdump db2rd optimize - - ifeq ($(USE_OPENSSL),1) - CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl` --LDLIBS += `pkg-config --libs openssl` -+LIBREGLIBS += `pkg-config --libs openssl` - - $(LIBREG): keys-ssl.c - - else - CFLAGS += -DUSE_GCRYPT --LDLIBS += -lgcrypt -+LIBREGLIBS += -lgcrypt - - $(LIBREG): keys-gcrypt.c - -@@ -115,7 +116,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem) - - $(LIBREG): regdb.h reglib.h reglib.c - $(NQ) ' CC ' $@ -- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ -+ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(LIBREGLIBS) - - install-libreg-headers: - $(NQ) ' INSTALL libreg-headers' diff --git a/patches/crda-3.13/series b/patches/crda-3.13/series deleted file mode 100644 index b9a852d35..000000000 --- a/patches/crda-3.13/series +++ /dev/null @@ -1,8 +0,0 @@ -# generated by git-ptx-patches -#tag:base --start-number 1 -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 -0005-fix-linking-libreg.patch -# 9dcc6620d08511a73c701d4068e90869 - git-ptx-patches magic diff --git a/patches/crda-3.18/0001-key2pub-Fix-ssl-keys.c-generation.patch b/patches/crda-3.18/0001-key2pub-Fix-ssl-keys.c-generation.patch new file mode 100644 index 000000000..e3fe28c75 --- /dev/null +++ b/patches/crda-3.18/0001-key2pub-Fix-ssl-keys.c-generation.patch @@ -0,0 +1,34 @@ +From: Markus Pargmann +Date: Thu, 17 Apr 2014 14:40:49 +0200 +Subject: [PATCH] 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 +--- + utils/key2pub.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/utils/key2pub.py b/utils/key2pub.py +index 3e84cd2a934d..7de45f7b9603 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 \n') ++ output.write('#include \n#include \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)) diff --git a/patches/crda-3.18/0002-Pregenerate-keys-ssl.c.patch b/patches/crda-3.18/0002-Pregenerate-keys-ssl.c.patch new file mode 100644 index 000000000..eba0f335e --- /dev/null +++ b/patches/crda-3.18/0002-Pregenerate-keys-ssl.c.patch @@ -0,0 +1,168 @@ +From: Jan Luebbe +Date: Thu, 26 Jan 2012 15:33:36 +0100 +Subject: [PATCH] Pregenerate keys-ssl.c + +Note: The content is different for 32 and 64 bit systems so we need two +versions. + +Signed-off-by: Markus Pargmann +Signed-off-by: Michael Olbrich +--- + keys-ssl.c.32 | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + keys-ssl.c.64 | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 140 insertions(+) + create mode 100644 keys-ssl.c.32 + create mode 100644 keys-ssl.c.64 + +diff --git a/keys-ssl.c.32 b/keys-ssl.c.32 +new file mode 100644 +index 000000000000..024afeb20577 +--- /dev/null ++++ b/keys-ssl.c.32 +@@ -0,0 +1,70 @@ ++#include ++#include ++static BN_ULONG e_0[1] = { ++ 0x00010001, ++}; ++ ++#include ++#include ++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, ++}; ++ ++#include ++#include ++static BN_ULONG e_1[1] = { ++ 0x00010001, ++}; ++ ++#include ++#include ++static BN_ULONG n_1[64] = { ++ 0xc4ff951d, 0xa066f4da, 0xd5e1c45f, 0xe6e0d246, ++ 0x84e3c7a1, 0xe7fb4616, 0xf6e26899, 0x11151b7a, ++ 0xc5ee7852, 0x6c3f93fb, 0xd0d8dec8, 0x96790b2b, ++ 0xa129207c, 0xb1722bf4, 0x044137b1, 0x3673e797, ++ 0x2912661e, 0x18327707, 0x9a5ed820, 0xd37e005c, ++ 0x7568a1ea, 0x655b7f25, 0xa29c63c6, 0xe731f136, ++ 0xeeecac1e, 0x3036d253, 0xa5cb80c7, 0x85ef7a7f, ++ 0x45ebba27, 0x2ad91b73, 0xccd3df7d, 0x715756f6, ++ 0x36fa6823, 0x28900fac, 0x469b935f, 0xf1026fe9, ++ 0x21f0531f, 0x98b8d156, 0xb22dea88, 0x180b2895, ++ 0xa9fd602d, 0x8ad9fe76, 0x19da1044, 0x510cd145, ++ 0x1184fbca, 0x0b09f968, 0x1cfd24d5, 0x578b9616, ++ 0x146b61c4, 0x3b1b0817, 0x323d718b, 0x205bd497, ++ 0x1eb31270, 0x2d7e66f4, 0x52c2032a, 0x389f7c6a, ++ 0x3fd9d759, 0x7c68dd6f, 0x71257e90, 0xac7ea583, ++ 0x2c413815, 0xf239d766, 0x28843903, 0xb540e39c, ++}; ++ ++ ++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), ++ KEYS(e_1, n_1), ++}; +diff --git a/keys-ssl.c.64 b/keys-ssl.c.64 +new file mode 100644 +index 000000000000..15110e56058d +--- /dev/null ++++ b/keys-ssl.c.64 +@@ -0,0 +1,70 @@ ++#include ++#include ++static BN_ULONG e_0[1] = { ++ 0x0000000000010001, ++}; ++ ++#include ++#include ++static BN_ULONG n_0[32] = { ++ 0x63a2705416a0d8e1, 0xdc9fca11c8ba757b, ++ 0xb9c06510cbcb35e3, 0x39e3dfebba941433, ++ 0x7bbae38a6c1fce9d, 0x205a5a73fefabba7, ++ 0x53ea3e5a97839a2e, 0xfec8f5b661dc0170, ++ 0xefe311d8d29a1004, 0x8c6a92d0a5156bb8, ++ 0x9067cc767a6eb5cc, 0xd103580b0bd5b1ff, ++ 0x4a563e848f3a2daf, 0xacd7cadb46b0943e, ++ 0x5fabb688ebd1e198, 0x7e70c1d35916f173, ++ 0xaaa8acc85d6ca84e, 0x1685c157e20fd4dc, ++ 0xf9e9c9c7ad933f64, 0xbe6272edc5f59824, ++ 0x585d9a7d53447bd1, 0x011a5b3f5b3bc30d, ++ 0xf312b966ffbbf0e9, 0x2203fb37482c131b, ++ 0x3e7c157d0dc38eab, 0xb04de1d6b39fcc8d, ++ 0x4d9f013707fc0d84, 0xb075a241e13b5ac5, ++ 0x0a9a9d488e56e153, 0xf2cff393f97054eb, ++ 0x2a2ead68376024f2, 0xd657997188d35dce, ++}; ++ ++#include ++#include ++static BN_ULONG e_1[1] = { ++ 0x0000000000010001, ++}; ++ ++#include ++#include ++static BN_ULONG n_1[32] = { ++ 0xa066f4dac4ff951d, 0xe6e0d246d5e1c45f, ++ 0xe7fb461684e3c7a1, 0x11151b7af6e26899, ++ 0x6c3f93fbc5ee7852, 0x96790b2bd0d8dec8, ++ 0xb1722bf4a129207c, 0x3673e797044137b1, ++ 0x183277072912661e, 0xd37e005c9a5ed820, ++ 0x655b7f257568a1ea, 0xe731f136a29c63c6, ++ 0x3036d253eeecac1e, 0x85ef7a7fa5cb80c7, ++ 0x2ad91b7345ebba27, 0x715756f6ccd3df7d, ++ 0x28900fac36fa6823, 0xf1026fe9469b935f, ++ 0x98b8d15621f0531f, 0x180b2895b22dea88, ++ 0x8ad9fe76a9fd602d, 0x510cd14519da1044, ++ 0x0b09f9681184fbca, 0x578b96161cfd24d5, ++ 0x3b1b0817146b61c4, 0x205bd497323d718b, ++ 0x2d7e66f41eb31270, 0x389f7c6a52c2032a, ++ 0x7c68dd6f3fd9d759, 0xac7ea58371257e90, ++ 0xf239d7662c413815, 0xb540e39c28843903, ++}; ++ ++ ++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), ++ KEYS(e_1, n_1), ++}; diff --git a/patches/crda-3.18/0003-udev-Fix-rule-for-initial-setup.patch b/patches/crda-3.18/0003-udev-Fix-rule-for-initial-setup.patch new file mode 100644 index 000000000..551b84bf6 --- /dev/null +++ b/patches/crda-3.18/0003-udev-Fix-rule-for-initial-setup.patch @@ -0,0 +1,20 @@ +From: Markus Pargmann +Date: Thu, 17 Apr 2014 11:59:59 +0200 +Subject: [PATCH] udev: Fix rule for initial setup + +Signed-off-by: Markus Pargmann +--- + udev/regulatory.rules | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/udev/regulatory.rules b/udev/regulatory.rules +index 3d6add895784..98296961f0ed 100644 +--- a/udev/regulatory.rules ++++ b/udev/regulatory.rules +@@ -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.18/0004-Makefile-Fix-libreg-build.patch b/patches/crda-3.18/0004-Makefile-Fix-libreg-build.patch new file mode 100644 index 000000000..bb0708365 --- /dev/null +++ b/patches/crda-3.18/0004-Makefile-Fix-libreg-build.patch @@ -0,0 +1,44 @@ +From: Markus Pargmann +Date: Thu, 17 Apr 2014 15:34:35 +0200 +Subject: [PATCH] Makefile: Fix libreg build + +Signed-off-by: Markus Pargmann +--- + Makefile | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/Makefile b/Makefile +index a3ead30371c9..60a3182474e6 100644 +--- a/Makefile ++++ b/Makefile +@@ -5,8 +5,8 @@ REG_GIT?=git://git.kernel.org/pub/scm/linux/kernel/git/sforshee/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/ + +@@ -120,14 +120,14 @@ $(LIBREG): regdb.h reglib.h reglib.c + + install-libreg-headers: + $(NQ) ' INSTALL libreg-headers' +- $(Q)mkdir -p $(DESTDIR)/$(INCLUDE_DIR) +- $(Q)cp *.h $(DESTDIR)/$(INCLUDE_DIR)/ ++ $(Q)$(MKDIR) $(DESTDIR)/$(INCLUDE_DIR) ++ $(Q)$(INSTALL) -m 644 -t $(DESTDIR)/$(INCLUDE_DIR) *.h + + install-libreg: + $(NQ) ' INSTALL libreg' +- $(Q)mkdir -p $(DESTDIR)/$(LIBDIR) +- $(Q)cp $(LIBREG) $(DESTDIR)/$(LIBDIR)/ +- $(Q)ldconfig ++ $(Q)$(MKDIR) $(LIBDIR) ++ $(Q)$(INSTALL) -m 644 -t $(DESTDIR)/$(LIBDIR) $(LIBREG) ++# $(Q)ldconfig + + %.o: %.c regdb.h $(LIBREG) + $(NQ) ' CC ' $@ diff --git a/patches/crda-3.18/0005-fix-linking-libreg.patch b/patches/crda-3.18/0005-fix-linking-libreg.patch new file mode 100644 index 000000000..c98c35f6b --- /dev/null +++ b/patches/crda-3.18/0005-fix-linking-libreg.patch @@ -0,0 +1,48 @@ +From: Michael Olbrich +Date: Thu, 30 Jun 2016 12:20:16 +0200 +Subject: [PATCH] fix linking libreg + +Signed-off-by: Michael Olbrich +Signed-off-by: Marc Kleine-Budde +--- + Makefile | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 60a3182474e6..0bfded68a6c8 100644 +--- a/Makefile ++++ b/Makefile +@@ -30,7 +30,7 @@ CFLAGS += -std=gnu99 -Wall -Werror -pedantic + CFLAGS += -Wall -g + LDLIBREG += -lreg + LDLIBS += $(LDLIBREG) +-LDLIBS += -lm ++LIBREGLIBS += -lm + LIBREG += libreg.so + LDFLAGS += -L ./ + +@@ -40,13 +40,13 @@ all_noverify: $(LIBREG) crda intersect regdbdump db2rd optimize + + ifeq ($(USE_OPENSSL),1) + CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl` +-LDLIBS += `pkg-config --libs openssl` ++LIBREGLIBS += `pkg-config --libs openssl` + + $(LIBREG): keys-ssl.c + + else + CFLAGS += -DUSE_GCRYPT +-LDLIBS += -lgcrypt ++LIBREGLIBS += -lgcrypt + + $(LIBREG): keys-gcrypt.c + +@@ -116,7 +116,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem) + + $(LIBREG): regdb.h reglib.h reglib.c + $(NQ) ' CC ' $@ +- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ ++ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(LIBREGLIBS) + + install-libreg-headers: + $(NQ) ' INSTALL libreg-headers' diff --git a/patches/crda-3.18/series b/patches/crda-3.18/series new file mode 100644 index 000000000..b9a852d35 --- /dev/null +++ b/patches/crda-3.18/series @@ -0,0 +1,8 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +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 +0005-fix-linking-libreg.patch +# 9dcc6620d08511a73c701d4068e90869 - git-ptx-patches magic diff --git a/rules/crda.make b/rules/crda.make index a42c78390..87ca41446 100644 --- a/rules/crda.make +++ b/rules/crda.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_CRDA) += crda # # Paths and names # -CRDA_VERSION := 3.13 -CRDA_MD5 := 66b1b0417c1ad19f0009a5c0c0c1aebc +CRDA_VERSION := 3.18 +CRDA_MD5 := 0431fef3067bf503dfb464069f06163a CRDA := crda-$(CRDA_VERSION) CRDA_SUFFIX := tar.xz CRDA_URL := $(call ptx/mirror, KERNEL, ../software/network/crda/$(CRDA).$(CRDA_SUFFIX)) -- cgit v1.2.3