diff options
3 files changed, 98 insertions, 1 deletions
diff --git a/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch b/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch new file mode 100644 index 0000000000..93c836cf34 --- /dev/null +++ b/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | From 8d2164a090f17286ea8291f30a123595cf447dc3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Haiqing Bai <Haiqing.Bai@windriver.com> | ||
| 3 | Date: Wed, 30 Nov 2016 10:27:36 +0800 | ||
| 4 | Subject: [PATCH] crda: fix issues when 'USE_OPENSSL=1'. | ||
| 5 | |||
| 6 | Fxed the below issues if configured with 'USE_OPENSSL=1': | ||
| 7 | a. keys-ssl.c uses BN_ULONG but doesn't include the openssl headers leading | ||
| 8 | to build failures: | ||
| 9 | keys-ssl.c:2:8: error: unknown type name 'BN_ULONG' | ||
| 10 | static BN_ULONG e_0[1] = { | ||
| 11 | |||
| 12 | b. The large unqualified constants also break building: | ||
| 13 | keys-ssl.c:8:2: warning: overflow in implicit constant conversion [-Woverflow] | ||
| 14 | 0x63a2705416a0d8e1, 0xdc9fca11c8ba757b, | ||
| 15 | |||
| 16 | c. keys-ssl.c: error: 'keys' defined but not used [-Werror=unused-variable] | ||
| 17 | static struct pubkey keys[] = { | ||
| 18 | |||
| 19 | Signed-off-by: Mike Frysinger <vapier@gentoo.org> | ||
| 20 | Upsteam-Status: Pending | ||
| 21 | Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com> | ||
| 22 | --- | ||
| 23 | utils/key2pub.py | 5 +++-- | ||
| 24 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
| 25 | |||
| 26 | diff --git a/utils/key2pub.py b/utils/key2pub.py | ||
| 27 | index 401d58a..3ae00b8 100755 | ||
| 28 | --- a/utils/key2pub.py | ||
| 29 | +++ b/utils/key2pub.py | ||
| 30 | @@ -24,7 +24,7 @@ def print_ssl_64(output, name, val): | ||
| 31 | for v1, v2, v3, v4, v5, v6, v7, v8 in vnew: | ||
| 32 | if not idx: | ||
| 33 | output.write('\t') | ||
| 34 | - output.write('0x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x, ' % (ord(v1), ord(v2), ord(v3), ord(v4), ord(v5), ord(v6), ord(v7), ord(v8))) | ||
| 35 | + output.write('0x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2xULL, ' % (ord(v1), ord(v2), ord(v3), ord(v4), ord(v5), ord(v6), ord(v7), ord(v8))) | ||
| 36 | idx += 1 | ||
| 37 | if idx == 2: | ||
| 38 | idx = 0 | ||
| 39 | @@ -60,6 +60,7 @@ def print_ssl_32(output, name, val): | ||
| 40 | def print_ssl(output, name, val): | ||
| 41 | import os | ||
| 42 | output.write('#include <stdint.h>\n') | ||
| 43 | + output.write('#include <openssl/bn.h>\n') | ||
| 44 | if os.getenv('TARGET_BITS') == '64': | ||
| 45 | return print_ssl_64(output, name, val) | ||
| 46 | else: | ||
| 47 | @@ -78,7 +79,7 @@ struct pubkey { | ||
| 48 | |||
| 49 | #define KEYS(e,n) { KEY(e), KEY(n), } | ||
| 50 | |||
| 51 | -static struct pubkey keys[] = { | ||
| 52 | +static struct pubkey keys[] __attribute__((unused))= { | ||
| 53 | ''') | ||
| 54 | for n in xrange(n + 1): | ||
| 55 | output.write(' KEYS(e_%d, n_%d),\n' % (n, n)) | ||
| 56 | -- | ||
| 57 | 1.9.1 | ||
| 58 | |||
diff --git a/meta-networking/recipes-connectivity/crda/crda/use-target-word-size-instead-of-host-s.patch b/meta-networking/recipes-connectivity/crda/crda/use-target-word-size-instead-of-host-s.patch new file mode 100644 index 0000000000..100b765f2d --- /dev/null +++ b/meta-networking/recipes-connectivity/crda/crda/use-target-word-size-instead-of-host-s.patch | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | From c1c42513edd27c97341f2033af77c13a4724eb8f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Haiqing Bai <Haiqing.Bai@windriver.com> | ||
| 3 | Date: Fri, 25 Nov 2016 16:48:01 +0800 | ||
| 4 | Subject: [PATCH] crda: Use target word size instead of host's. | ||
| 5 | |||
| 6 | In key2pub.py, the codes check the wordsize | ||
| 7 | of the host machine but not the target's, this fix | ||
| 8 | fetches the wordsize of target from the build system. | ||
| 9 | |||
| 10 | Upstream-Status: Pending | ||
| 11 | Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com> | ||
| 12 | --- | ||
| 13 | utils/key2pub.py | 4 ++-- | ||
| 14 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/utils/key2pub.py b/utils/key2pub.py | ||
| 17 | index 3e84cd2..401d58a 100755 | ||
| 18 | --- a/utils/key2pub.py | ||
| 19 | +++ b/utils/key2pub.py | ||
| 20 | @@ -58,9 +58,9 @@ def print_ssl_32(output, name, val): | ||
| 21 | output.write('};\n\n') | ||
| 22 | |||
| 23 | def print_ssl(output, name, val): | ||
| 24 | - import struct | ||
| 25 | + import os | ||
| 26 | output.write('#include <stdint.h>\n') | ||
| 27 | - if len(struct.pack('@L', 0)) == 8: | ||
| 28 | + if os.getenv('TARGET_BITS') == '64': | ||
| 29 | return print_ssl_64(output, name, val) | ||
| 30 | else: | ||
| 31 | return print_ssl_32(output, name, val) | ||
| 32 | -- | ||
| 33 | 1.9.1 | ||
| 34 | |||
diff --git a/meta-networking/recipes-connectivity/crda/crda_3.18.bb b/meta-networking/recipes-connectivity/crda/crda_3.18.bb index 4b704fe5bf..dbddd55cba 100644 --- a/meta-networking/recipes-connectivity/crda/crda_3.18.bb +++ b/meta-networking/recipes-connectivity/crda/crda_3.18.bb | |||
| @@ -4,7 +4,7 @@ SECTION = "net" | |||
| 4 | LICENSE = "copyleft-next-0.3.0" | 4 | LICENSE = "copyleft-next-0.3.0" |
| 5 | LIC_FILES_CHKSUM = "file://copyleft-next-0.3.0;md5=8743a2c359037d4d329a31e79eabeffe" | 5 | LIC_FILES_CHKSUM = "file://copyleft-next-0.3.0;md5=8743a2c359037d4d329a31e79eabeffe" |
| 6 | 6 | ||
| 7 | DEPENDS = "python-m2crypto-native python-native libgcrypt libnl" | 7 | DEPENDS = "python-m2crypto-native python-native libgcrypt libnl openssl" |
| 8 | 8 | ||
| 9 | SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz \ | 9 | SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz \ |
| 10 | file://do-not-run-ldconfig-if-destdir-is-set.patch \ | 10 | file://do-not-run-ldconfig-if-destdir-is-set.patch \ |
| @@ -12,6 +12,8 @@ SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz \ | |||
| 12 | file://fix-gcc-6-unused-variables.patch \ | 12 | file://fix-gcc-6-unused-variables.patch \ |
| 13 | file://0001-Makefile-respect-LDFLAGS-for-libreg.patch \ | 13 | file://0001-Makefile-respect-LDFLAGS-for-libreg.patch \ |
| 14 | file://make.patch \ | 14 | file://make.patch \ |
| 15 | file://use-target-word-size-instead-of-host-s.patch \ | ||
| 16 | file://fix-issues-when-USE_OPENSSL-1.patch \ | ||
| 15 | " | 17 | " |
| 16 | SRC_URI[md5sum] = "0431fef3067bf503dfb464069f06163a" | 18 | SRC_URI[md5sum] = "0431fef3067bf503dfb464069f06163a" |
| 17 | SRC_URI[sha256sum] = "43fcb9679f8b75ed87ad10944a506292def13e4afb194afa7aa921b01e8ecdbf" | 19 | SRC_URI[sha256sum] = "43fcb9679f8b75ed87ad10944a506292def13e4afb194afa7aa921b01e8ecdbf" |
| @@ -19,6 +21,9 @@ SRC_URI[sha256sum] = "43fcb9679f8b75ed87ad10944a506292def13e4afb194afa7aa921b01e | |||
| 19 | inherit python-dir pythonnative | 21 | inherit python-dir pythonnative |
| 20 | # Recursive make problem | 22 | # Recursive make problem |
| 21 | EXTRA_OEMAKE = "MAKEFLAGS= DESTDIR=${D} LIBDIR=${libdir}/crda LDLIBREG='-Wl,-rpath,${libdir}/crda -lreg'" | 23 | EXTRA_OEMAKE = "MAKEFLAGS= DESTDIR=${D} LIBDIR=${libdir}/crda LDLIBREG='-Wl,-rpath,${libdir}/crda -lreg'" |
| 24 | EXTRA_OEMAKE_append = " USE_OPENSSL=1" | ||
| 25 | TARGET_BITS = "${SITEINFO_BITS}" | ||
| 26 | export TARGET_BITS | ||
| 22 | 27 | ||
| 23 | do_compile() { | 28 | do_compile() { |
| 24 | oe_runmake all_noverify | 29 | oe_runmake all_noverify |
