Update buildroot 2020.02.01 (#622)
* Update buildroot 2020.02.01 Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch> * Fix LN * Fix wpa Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch> * Fix lint Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch> * fix-network Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch> * Fix script Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
From d9c7cbb3660d8a2da9ce42e4d1b58642a256a91a Mon Sep 17 00:00:00 2001
|
||||
From: Giulio Benetti <giulio.benetti@benettiengineering.com>
|
||||
Date: Sun, 9 Feb 2020 10:15:16 +0100
|
||||
Subject: [PATCH] Bug 1614183 - Check if PPC __has_include(<sys/auxv.h>)
|
||||
|
||||
Some build environment doesn't provide <sys/auxv.h> and this causes
|
||||
build failure, so let's check if that header exists by using
|
||||
__has_include() helper.
|
||||
|
||||
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
|
||||
---
|
||||
nss/lib/freebl/blinit.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/nss/lib/freebl/blinit.c b/nss/lib/freebl/blinit.c
|
||||
index 7e8adfc64..d4921aaee 100644
|
||||
--- a/nss/lib/freebl/blinit.c
|
||||
+++ b/nss/lib/freebl/blinit.c
|
||||
@@ -431,8 +431,14 @@ ppc_crypto_support()
|
||||
|
||||
#if defined(__powerpc__)
|
||||
|
||||
+#ifndef __has_include
|
||||
+#define __has_include(x) 0
|
||||
+#endif
|
||||
+
|
||||
#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 12)
|
||||
+#if __has_include(<sys/auxv.h>)
|
||||
#include <sys/auxv.h>
|
||||
+#endif
|
||||
#elif (defined(__FreeBSD__) && __FreeBSD__ < 12)
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
@@ -449,10 +455,14 @@ CheckPPCSupport()
|
||||
|
||||
unsigned long hwcaps = 0;
|
||||
#if defined(__linux__)
|
||||
+#if __has_include(<sys/auxv.h>)
|
||||
hwcaps = getauxval(AT_HWCAP2);
|
||||
+#endif
|
||||
#elif defined(__FreeBSD__)
|
||||
#if __FreeBSD__ >= 12
|
||||
+#if __has_include(<sys/auxv.h>)
|
||||
elf_aux_info(AT_HWCAP2, &hwcaps, sizeof(hwcaps));
|
||||
+#endif
|
||||
#else
|
||||
size_t len = sizeof(hwcaps);
|
||||
sysctlbyname("hw.cpu_features2", &hwcaps, &len, NULL, 0);
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
Fix build with uClibc-ng
|
||||
|
||||
The elf.h header in uClibc-ng is missing the AT_HWCAP2 definition. Add it in
|
||||
the code.
|
||||
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
---
|
||||
Upstream status: Not upstreamable; uClibc needs to update elf.h
|
||||
|
||||
diff -Nuar nss-3.38.orig/nss/lib/freebl/blinit.c nss-3.38/nss/lib/freebl/blinit.c
|
||||
--- nss-3.38.orig/nss/lib/freebl/blinit.c 2018-06-21 12:24:45.000000000 +0300
|
||||
+++ nss-3.38/nss/lib/freebl/blinit.c 2018-06-26 13:13:55.636434720 +0300
|
||||
@@ -100,6 +100,9 @@
|
||||
defined(__GNUC__) && __GNUC__ >= 2 && defined(__ELF__)
|
||||
#include <sys/auxv.h>
|
||||
extern unsigned long getauxval(unsigned long type) __attribute__((weak));
|
||||
+#ifndef AT_HWCAP2
|
||||
+#define AT_HWCAP2 26
|
||||
+#endif
|
||||
#else
|
||||
static unsigned long (*getauxval)(unsigned long) = NULL;
|
||||
#define AT_HWCAP2 0
|
||||
@@ -1,49 +0,0 @@
|
||||
Add ZLIB_INCLUDE_DIR variable
|
||||
|
||||
On Linux platform[1], the build system forces to use zlib from the
|
||||
system instead of compiling the one located intree.
|
||||
|
||||
The following error is raised when the zlib header is installed
|
||||
somewhere else than in the default system include path:
|
||||
|
||||
ssl3con.c:39:18: fatal error: zlib.h: No such file or directory
|
||||
#include "zlib.h"
|
||||
|
||||
The same trick setup for sqlite include directory is reproduced for
|
||||
zlib. The build system disallows in any manner to give arguments to the
|
||||
compiler explicity.
|
||||
|
||||
The variable ZLIB_INCLUDE_DIR point to the directory where the zlib
|
||||
header is located.
|
||||
|
||||
[1]: https://hg.mozilla.org/projects/nss/file/NSS_3_33_BRANCH/coreconf/Linux.mk#l180
|
||||
[2]: https://hg.mozilla.org/projects/nss/file/NSS_3_33_BRANCH/lib/softoken/manifest.mn#l17
|
||||
|
||||
Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com>
|
||||
|
||||
--- libnss-3.33.orig/nss/lib/ssl/manifest.mn 2017-09-20 02:47:27.000000000 -0400
|
||||
+++ libnss-3.33/nss/lib/ssl/manifest.mn 2018-02-16 16:45:41.512709898 -0500
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
# DEFINES = -DTRACE
|
||||
|
||||
+ifdef ZLIB_INCLUDE_DIR
|
||||
+INCLUDES += -I$(ZLIB_INCLUDE_DIR)
|
||||
+endif
|
||||
+
|
||||
EXPORTS = \
|
||||
ssl.h \
|
||||
sslt.h \
|
||||
--- host-libnss-3.33.orig/nss/cmd/signtool/manifest.mn.orig 2018-02-16 17:08:58.474777871 -0500
|
||||
+++ host-libnss-3.33/nss/cmd/signtool/manifest.mn 2018-02-16 17:09:22.603710963 -0500
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
MODULE = nss
|
||||
|
||||
+ifdef ZLIB_INCLUDE_DIR
|
||||
+INCLUDES += -I$(ZLIB_INCLUDE_DIR)
|
||||
+endif
|
||||
+
|
||||
EXPORTS =
|
||||
|
||||
CSRCS = signtool.c \
|
||||
@@ -1,50 +0,0 @@
|
||||
From c915be634cbfb90eb7880ec9efbdba9b98c6d4c1 Mon Sep 17 00:00:00 2001
|
||||
From: Giulio Benetti <giulio.benetti@benettiengineering.com>
|
||||
Date: Wed, 23 Oct 2019 11:47:03 +0200
|
||||
Subject: [PATCH] Bug 1590676 - Fix build if arm doesn't support NEON
|
||||
|
||||
At the moment NSS assumes that ARM supports NEON extension but this is
|
||||
not true and leads to build failure on ARM without NEON extension.
|
||||
Add check to assure USE_HW_AES is not defined if ARM without NEON
|
||||
extension is used.
|
||||
|
||||
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
|
||||
---
|
||||
nss/lib/freebl/aes-armv8.c | 5 +++--
|
||||
nss/lib/freebl/rijndael.c | 3 ++-
|
||||
2 files changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/nss/lib/freebl/aes-armv8.c b/nss/lib/freebl/aes-armv8.c
|
||||
index 40d5e2d34..057d1aed3 100644
|
||||
--- a/nss/lib/freebl/aes-armv8.c
|
||||
+++ b/nss/lib/freebl/aes-armv8.c
|
||||
@@ -5,9 +5,10 @@
|
||||
#include "secerr.h"
|
||||
#include "rijndael.h"
|
||||
|
||||
-#if (defined(__clang__) || \
|
||||
+#if ((defined(__clang__) || \
|
||||
(defined(__GNUC__) && defined(__GNUC_MINOR__) && \
|
||||
- (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 8))))
|
||||
+ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 8)))) && \
|
||||
+ (defined(__ARM_NEON) || defined(__ARM_NEON__)))
|
||||
|
||||
#ifndef __ARM_FEATURE_CRYPTO
|
||||
#error "Compiler option is invalid"
|
||||
diff --git a/nss/lib/freebl/rijndael.c b/nss/lib/freebl/rijndael.c
|
||||
index 26bd58ee0..6d77d942d 100644
|
||||
--- a/nss/lib/freebl/rijndael.c
|
||||
+++ b/nss/lib/freebl/rijndael.c
|
||||
@@ -20,7 +20,8 @@
|
||||
#include "gcm.h"
|
||||
#include "mpi.h"
|
||||
|
||||
-#if !defined(IS_LITTLE_ENDIAN) && !defined(NSS_X86_OR_X64)
|
||||
+#if (!defined(IS_LITTLE_ENDIAN) && !defined(NSS_X86_OR_X64)) || \
|
||||
+ (defined(__arm__) && !defined(__ARM_NEON) && !defined(__ARM_NEON__))
|
||||
// not test yet on big endian platform of arm
|
||||
#undef USE_HW_AES
|
||||
#endif
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -3,7 +3,6 @@ config BR2_PACKAGE_LIBNSS
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # libnspr
|
||||
depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnspr
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85862
|
||||
select BR2_PACKAGE_LIBNSPR
|
||||
select BR2_PACKAGE_SQLITE
|
||||
select BR2_PACKAGE_ZLIB
|
||||
@@ -16,9 +15,18 @@ config BR2_PACKAGE_LIBNSS
|
||||
|
||||
http://www.mozilla.org/projects/security/pki/nss/
|
||||
|
||||
if BR2_PACKAGE_LIBNSS
|
||||
|
||||
config BR2_PACKAGE_LIBNSS_ARCH
|
||||
string
|
||||
default "aarch64" if BR2_aarch64_be
|
||||
default "ppc" if BR2_powerpc
|
||||
default "ppc64" if BR2_powerpc64
|
||||
default "ppc64le" if BR2_powerpc64le
|
||||
default BR2_ARCH
|
||||
|
||||
endif
|
||||
|
||||
comment "libnss needs a toolchain w/ threads, dynamic library"
|
||||
depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
|
||||
|
||||
comment "libnss needs a toolchain not affected by GCC bug 85862"
|
||||
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_85862
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# From https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_46_1_RTM/src/SHA256SUMS
|
||||
sha256 1ae3d1cb1de345b258788f2ef6b10a460068034c3fd64f42427a183d8342a6fb nss-3.47.1.tar.gz
|
||||
# From https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_50_RTM/src/SHA256SUMS
|
||||
sha256 185df319775243f5f5daa9d49b7f9cc5f2b389435be3247c3376579bee063ba7 nss-3.50.tar.gz
|
||||
# Locally calculated
|
||||
sha256 a20c1a32d1f8102432360b42e932869f7c11c7cdbacf9cac554c422132af47f4 nss/COPYING
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBNSS_VERSION = 3.47.1
|
||||
LIBNSS_VERSION = 3.50
|
||||
LIBNSS_SOURCE = nss-$(LIBNSS_VERSION).tar.gz
|
||||
LIBNSS_SITE = https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_$(subst .,_,$(LIBNSS_VERSION))_RTM/src
|
||||
LIBNSS_DISTDIR = dist
|
||||
@@ -13,9 +13,15 @@ LIBNSS_DEPENDENCIES = libnspr sqlite zlib
|
||||
LIBNSS_LICENSE = MPL-2.0
|
||||
LIBNSS_LICENSE_FILES = nss/COPYING
|
||||
|
||||
LIBNSS_CFLAGS = $(TARGET_CFLAGS)
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85862),y)
|
||||
LIBNSS_CFLAGS += -O0
|
||||
endif
|
||||
|
||||
# Need to pass down TARGET_CFLAGS and TARGET_LDFLAGS
|
||||
define LIBNSS_FIXUP_LINUX_MK
|
||||
echo 'OS_CFLAGS += $(TARGET_CFLAGS)' >> $(@D)/nss/coreconf/Linux.mk
|
||||
echo 'OS_CFLAGS += $(LIBNSS_CFLAGS)' >> $(@D)/nss/coreconf/Linux.mk
|
||||
echo 'LDFLAGS += $(TARGET_LDFLAGS)' >> $(@D)/nss/coreconf/Linux.mk
|
||||
endef
|
||||
|
||||
@@ -31,12 +37,6 @@ endef
|
||||
LIBNSS_PRE_CONFIGURE_HOOKS += LIBNSS_DROP_GC_SECTIONS
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_aarch64_be),y)
|
||||
LIBNSS_ARCH = aarch64
|
||||
else
|
||||
LIBNSS_ARCH = $(ARCH)
|
||||
endif
|
||||
|
||||
LIBNSS_BUILD_VARS = \
|
||||
MOZILLA_CLIENT=1 \
|
||||
NSPR_INCLUDE_DIR=$(STAGING_DIR)/usr/include/nspr \
|
||||
@@ -47,13 +47,12 @@ LIBNSS_BUILD_VARS = \
|
||||
NATIVE_CC="$(HOSTCC)" \
|
||||
OS_ARCH="Linux" \
|
||||
OS_RELEASE="2.6" \
|
||||
OS_TEST="$(LIBNSS_ARCH)" \
|
||||
OS_TEST=$(BR2_PACKAGE_LIBNSS_ARCH) \
|
||||
NSS_ENABLE_WERROR=0
|
||||
|
||||
# #pragma usage needs gcc >= 4.8
|
||||
# See https://bugzilla.mozilla.org/show_bug.cgi?id=1226179
|
||||
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_8),)
|
||||
LIBNSS_BUILD_VARS += NSS_ENABLE_WERROR=0
|
||||
ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),)
|
||||
# Disable Altivec if not supported
|
||||
LIBNSS_BUILD_VARS += NSS_DISABLE_ALTIVEC=1
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_ARCH_IS_64),y)
|
||||
@@ -74,7 +73,7 @@ define LIBNSS_BUILD_CMDS
|
||||
SOURCE_MD_DIR=$(@D)/$(LIBNSS_DISTDIR) \
|
||||
DIST=$(@D)/$(LIBNSS_DISTDIR) \
|
||||
CHECKLOC= \
|
||||
$(LIBNSS_BUILD_VARS) NATIVE_FLAGS="$(HOST_CFLAGS)"
|
||||
$(LIBNSS_BUILD_VARS) NATIVE_FLAGS="$(HOST_CFLAGS) -DLINUX"
|
||||
endef
|
||||
|
||||
define LIBNSS_INSTALL_STAGING_CMDS
|
||||
|
||||
Reference in New Issue
Block a user