summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Luebbe <jlu@pengutronix.de>2012-01-26 16:23:22 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2012-01-30 17:46:16 +0100
commit83f969bee74d9eaaeafe97cbfc18cbbfbf767b9c (patch)
treecaf1fd214d8ca025fa9a7e0a503f68728f3e8851
parentee1878ee67094de474bb06d86f4552c4bd124716 (diff)
downloadptxdist-83f969bee74d9eaaeafe97cbfc18cbbfbf767b9c.tar.gz
ptxdist-83f969bee74d9eaaeafe97cbfc18cbbfbf767b9c.tar.xz
crda: add package (Central Regulatory Domain Agent)
Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--generic/usr/lib/crda/regulatory.binbin0 -> 3268 bytes
-rw-r--r--patches/crda-1.1.2/0001-Pregenerate-keys-ssl.c.patch73
-rw-r--r--patches/crda-1.1.2/series4
-rw-r--r--rules/crda.in13
-rw-r--r--rules/crda.make71
5 files changed, 161 insertions, 0 deletions
diff --git a/generic/usr/lib/crda/regulatory.bin b/generic/usr/lib/crda/regulatory.bin
new file mode 100644
index 000000000..62b4262db
--- /dev/null
+++ b/generic/usr/lib/crda/regulatory.bin
Binary files differ
diff --git a/patches/crda-1.1.2/0001-Pregenerate-keys-ssl.c.patch b/patches/crda-1.1.2/0001-Pregenerate-keys-ssl.c.patch
new file mode 100644
index 000000000..0fda5d19a
--- /dev/null
+++ b/patches/crda-1.1.2/0001-Pregenerate-keys-ssl.c.patch
@@ -0,0 +1,73 @@
+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.2/series b/patches/crda-1.1.2/series
new file mode 100644
index 000000000..348caf1c5
--- /dev/null
+++ b/patches/crda-1.1.2/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Pregenerate-keys-ssl.c.patch
+# aa6be6d26b37ec911763a7e1eefe3128 - git-ptx-patches magic
diff --git a/rules/crda.in b/rules/crda.in
new file mode 100644
index 000000000..e02c76fdf
--- /dev/null
+++ b/rules/crda.in
@@ -0,0 +1,13 @@
+## SECTION=networking
+
+config CRDA
+ tristate
+ select LIBNL
+ select OPENSSL
+ select OPENSSL_SHARED
+ prompt "crda"
+ help
+ CRDA acts as the udev helper for communication between the kernel and
+ userspace for regulatory compliance. It relies on nl80211 for communication.
+ CRDA is intended to be run only through udev communication from the kernel.
+ The user should never have to run it manually except if debugging udev issues.
diff --git a/rules/crda.make b/rules/crda.make
new file mode 100644
index 000000000..944c57e05
--- /dev/null
+++ b/rules/crda.make
@@ -0,0 +1,71 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2012 by Jan Luebbe <jlu@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_CRDA) += crda
+
+#
+# Paths and names
+#
+CRDA_VERSION := 1.1.2
+CRDA_MD5 := 5226f65aebacf94baaf820f8b4e06df4
+CRDA := crda-$(CRDA_VERSION)
+CRDA_SUFFIX := tar.bz2
+CRDA_URL := http://linuxwireless.org/download/crda/$(CRDA).$(CRDA_SUFFIX)
+CRDA_SOURCE := $(SRCDIR)/$(CRDA).$(CRDA_SUFFIX)
+CRDA_DIR := $(BUILDDIR)/$(CRDA)
+CRDA_LICENSE := unknown
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+CRDA_CONF_TOOL := NO
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+CRDA_MAKE_ENV := \
+ $(CROSS_ENV) \
+ USE_OPENSSL=1
+
+CRDA_MAKE_OPT := all_noverify
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/crda.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, crda)
+ @$(call install_fixup, crda,PRIORITY,optional)
+ @$(call install_fixup, crda,SECTION,base)
+ @$(call install_fixup, crda,AUTHOR,"Jan Luebbe <jlu@pengutronix.de>")
+ @$(call install_fixup, crda,DESCRIPTION,missing)
+
+ @$(call install_copy, crda, 0, 0, 0755, -, /sbin/crda)
+ @$(call install_copy, crda, 0, 0, 0755, -, /sbin/regdbdump)
+ @$(call install_copy, crda, 0, 0, 0644, -, \
+ /lib/udev/rules.d/85-regulatory.rules)
+
+ # regulatory.bin was downloaded from:
+ # git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-regdb.git
+ @$(call install_alternative, crda, 0, 0, 0644, \
+ /usr/lib/crda/regulatory.bin)
+
+ @$(call install_finish, crda)
+
+ @$(call touch)
+
+# vim: syntax=make