Merge Official Source

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen
2022-07-08 12:44:26 +08:00
14 changed files with 118 additions and 22 deletions

View File

@@ -414,6 +414,14 @@ config KERNEL_DEBUG_LL
help
ARM low level debugging.
config KERNEL_DEBUG_VIRTUAL
bool "Compile the kernel with VM translations debugging"
select KERNEL_DEBUG_KERNEL
default n
help
Enable checks sanity checks to catch invalid uses of
virt_to_phys()/phys_to_virt() against the non-linear address space.
config KERNEL_DYNAMIC_DEBUG
bool "Compile the kernel with dynamic printk"
select KERNEL_DEBUG_FS

View File

@@ -53,6 +53,13 @@ $(eval $(call TestHostCommand,ncurses, \
Please install ncurses. (Missing libncurses.so or ncurses.h), \
echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \
gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out - -lncurses))
$(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \
git --exec-path | xargs -I % -- grep -q -- --recursive %/git-submodule, \
git submodule --help | grep -- --recursive))
$(eval $(call SetupHostCommand,rsync,Please install 'rsync', \
rsync --version </dev/null))
endif # IB
ifeq ($(HOST_OS),Linux)
@@ -181,16 +188,9 @@ $(eval $(call TestHostCommand,python3-distutils, \
Please install the Python3 distutils module, \
$(STAGING_DIR_HOST)/bin/python3 -c 'import distutils'))
$(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \
git --exec-path | xargs -I % -- grep -q -- --recursive %/git-submodule, \
git submodule --help | grep -- --recursive))
$(eval $(call SetupHostCommand,file,Please install the 'file' package, \
file --version 2>&1 | grep file))
$(eval $(call SetupHostCommand,rsync,Please install 'rsync', \
rsync --version </dev/null))
$(eval $(call SetupHostCommand,which,Please install 'which', \
/usr/bin/which which, \
/bin/which which, \

View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=openssl
PKG_BASE:=1.1.1
PKG_BUGFIX:=p
PKG_BUGFIX:=q
PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
PKG_RELEASE:=$(AUTORELEASE)
PKG_USE_MIPS16:=0
@@ -27,7 +27,7 @@ PKG_SOURCE_URL:= \
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/old/$(PKG_BASE)/
PKG_HASH:=bf61b62aaa66c7c7639942a94de4c9ae8280c08f17d4eac2e44644d9fc8ace6f
PKG_HASH:=d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca
PKG_LICENSE:=OpenSSL
PKG_LICENSE_FILES:=LICENSE

View File

@@ -43,6 +43,7 @@ config WOLFSSL_HAS_OCSP
config WOLFSSL_HAS_WPAS
bool "Include wpa_supplicant support"
select WOLFSSL_HAS_ARC4
select WOLFSSL_HAS_DH
select WOLFSSL_HAS_OCSP
select WOLFSSL_HAS_SESSION_TICKET
default y
@@ -71,7 +72,7 @@ config WOLFSSL_ASM_CAPABLE
choice
prompt "Hardware Acceleration"
default WOLFSSL_HAS_CPU_CRYPTO if WOLFSSL_ASM_CAPABLE && !x86_64
default WOLFSSL_HAS_CPU_CRYPTO if WOLFSSL_ASM_CAPABLE
default WOLFSSL_HAS_NO_HW
config WOLFSSL_HAS_NO_HW
@@ -83,7 +84,6 @@ choice
help
This will use Intel AESNI insturctions or armv8 Crypto Extensions.
Either of them should easily outperform hardware crypto in WolfSSL.
Beware that for Intel, the CPU has to support SSE4 instructions.
config WOLFSSL_HAS_AFALG
bool "AF_ALG"
@@ -100,9 +100,5 @@ choice
bool "/dev/crypto - full"
select WOLFSSL_HAS_DEVCRYPTO
endchoice
if x86_64 && WOLFSSL_HAS_CPU_CRYPTO
comment "WARNING: make sure your CPU supports SSE4 instructions"
comment "WolfSSL may crash with an invalid opcode exception"
endif
endif

View File

@@ -0,0 +1,44 @@
From 9ba77300f9f5dea9f53aed00bf6c33d10b7b2fce Mon Sep 17 00:00:00 2001
From: Sean Parkinson <sean@wolfssl.com>
Date: Thu, 7 Jul 2022 09:30:48 +1000
Subject: [PATCH] AESNI: fix configure to use minimal compiler flags
diff --git a/configure.ac b/configure.ac
index df97ac75c..6abb0c744 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2142,21 +2142,19 @@ then
if test "$ENABLED_AESNI" = "yes" || test "$ENABLED_INTELASM" = "yes"
then
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AESNI"
- if test "$GCC" = "yes"
+ if test "$CC" != "icc"
then
- # clang needs these flags
- if test "$CC" = "clang"
- then
- AM_CFLAGS="$AM_CFLAGS -maes -mpclmul"
- else
- # GCC needs these flags, icc doesn't
- # opt levels greater than 2 may cause problems on systems w/o
- # aesni
- if test "$CC" != "icc"
- then
- AM_CFLAGS="$AM_CFLAGS -maes -msse4 -mpclmul"
- fi
- fi
+ case $host_os in
+ mingw*)
+ # Windows uses intrinsics for GCM which uses SSE4 instructions.
+ # MSVC has own build files.
+ AM_CFLAGS="$AM_CFLAGS -maes -msse4 -mpclmul"
+ ;;
+ *)
+ # Intrinsics used in AES_set_decrypt_key (TODO: rework)
+ AM_CFLAGS="$AM_CFLAGS -maes"
+ ;;
+ esac
fi
AS_IF([test "x$ENABLED_AESGCM" != "xno"],[AM_CCASFLAGS="$AM_CCASFLAGS -DHAVE_AESGCM"])
fi

View File

@@ -12,9 +12,11 @@ PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_VERSION))
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_BUILD_DEPENDS:=bpf-headers
PKG_FLAGS:=nonshared
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/bpf.mk
include $(INCLUDE_DIR)/nls.mk
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
@@ -75,6 +77,8 @@ define Package/xdpdump/description
xdpdump - a simple tcpdump like tool for capturing packets at the XDP layer
endef
TARGET_LDFLAGS += $(INTL_LDFLAGS)
CONFIGURE_VARS += \
FORCE_SYSTEM_LIBBPF=1 \
CC="$(TARGET_CC)" \

View File

@@ -0,0 +1,29 @@
--- a/configure
+++ b/configure
@@ -138,7 +138,7 @@ int main(int argc, char **argv) {
return 0;
}
EOF
- libpcap_err=$($CC -o $TMPDIR/libpcaptest $TMPDIR/libpcaptest.c $LIBPCAP_CFLAGS $LIBPCAP_LDLIBS 2>&1)
+ libpcap_err=$($CC -o $TMPDIR/libpcaptest $TMPDIR/libpcaptest.c $LIBPCAP_CFLAGS $LIBPCAP_LDLIBS $LDFLAGS 2>&1)
if [ "$?" -eq "0" ]; then
echo "HAVE_PCAP:=y" >>$CONFIG
[ -n "$LIBPCAP_CFLAGS" ] && echo 'CFLAGS += ' $LIBPCAP_CFLAGS >> $CONFIG
@@ -186,7 +186,7 @@ int main(int argc, char **argv) {
return 0;
}
EOF
- libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
+ libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS $LDFLAGS 2>&1)
if [ "$?" -eq "0" ]; then
echo "HAVE_FEATURES+=${config_var}" >>"$CONFIG"
echo "yes"
@@ -253,7 +253,7 @@ int main(int argc, char **argv) {
}
EOF
- libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
+ libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS $LDFLAGS 2>&1)
if [ "$?" -eq "0" ]; then
echo "SYSTEM_LIBBPF:=y" >>$CONFIG
echo "LIBBPF_VERSION=$LIBBPF_VERSION" >>$CONFIG

View File

@@ -1099,6 +1099,7 @@ CONFIG_CRYPTO_CTR=y
# CONFIG_CRYPTO_DEV_HISI_ZIP is not set
# CONFIG_CRYPTO_DEV_IMGTEC_HASH is not set
# CONFIG_CRYPTO_DEV_MARVELL_CESA is not set
# CONFIG_CRYPTO_DEV_MEDIATEK is not set
# CONFIG_CRYPTO_DEV_MV_CESA is not set
# CONFIG_CRYPTO_DEV_MXC_SCC is not set
# CONFIG_CRYPTO_DEV_MXS_DCP is not set
@@ -3220,6 +3221,7 @@ CONFIG_MAY_USE_DEVLINK=y
# CONFIG_MDIO_XPCS is not set
# CONFIG_MD_FAULTY is not set
# CONFIG_MEDIATEK_GE_PHY is not set
# CONFIG_MEDIATEK_MT6577_AUXADC is not set
# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set
# CONFIG_MEDIA_ATTACH is not set
# CONFIG_MEDIA_CAMERA_SUPPORT is not set
@@ -3721,6 +3723,7 @@ CONFIG_MTD_SPLIT_SUPPORT=y
# CONFIG_MTD_VIRT_CONCAT is not set
# CONFIG_MTK_MMC is not set
# CONFIG_MTK_MMSYS is not set
# CONFIG_MTK_THERMAL is not set
# CONFIG_MULTIPLEXER is not set
CONFIG_MULTIUSER=y
# CONFIG_MUTEX_SPIN_ON_OWNER is not set

View File

@@ -1129,6 +1129,7 @@ CONFIG_CRYPTO_CTR=y
# CONFIG_CRYPTO_DEV_HISI_ZIP is not set
# CONFIG_CRYPTO_DEV_IMGTEC_HASH is not set
# CONFIG_CRYPTO_DEV_MARVELL_CESA is not set
# CONFIG_CRYPTO_DEV_MEDIATEK is not set
# CONFIG_CRYPTO_DEV_MV_CESA is not set
# CONFIG_CRYPTO_DEV_MXC_SCC is not set
# CONFIG_CRYPTO_DEV_MXS_DCP is not set
@@ -3325,6 +3326,7 @@ CONFIG_MAY_USE_DEVLINK=y
# CONFIG_MDM_GCC_9607 is not set
# CONFIG_MD_FAULTY is not set
# CONFIG_MEDIATEK_GE_PHY is not set
# CONFIG_MEDIATEK_MT6577_AUXADC is not set
# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set
# CONFIG_MEDIA_ATTACH is not set
# CONFIG_MEDIA_CAMERA_SUPPORT is not set
@@ -3865,6 +3867,7 @@ CONFIG_MTD_SPLIT_SUPPORT=y
# CONFIG_MTK_DEVAPC is not set
# CONFIG_MTK_MMC is not set
# CONFIG_MTK_MMSYS is not set
# CONFIG_MTK_THERMAL is not set
# CONFIG_MULTIPLEXER is not set
CONFIG_MULTIUSER=y
# CONFIG_MUTEX_SPIN_ON_OWNER is not set

View File

@@ -80,6 +80,15 @@
regulator-always-on;
};
reg_5v: regulator-5v {
compatible = "regulator-fixed";
regulator-name = "fixed-5V";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-boot-on;
regulator-always-on;
};
rtkgsw: rtkgsw@0 {
compatible = "mediatek,rtk-gsw";
mediatek,ethsys = <&ethsys>;
@@ -312,6 +321,7 @@
&ssusb {
vusb33-supply = <&reg_3p3v>;
vbus-supply = <&reg_5v>;
status = "okay";
};

View File

@@ -166,7 +166,6 @@ CONFIG_MACH_MT7629=y
CONFIG_MDIO_BUS=y
CONFIG_MDIO_DEVICE=y
CONFIG_MDIO_DEVRES=y
# CONFIG_MEDIATEK_MT6577_AUXADC is not set
CONFIG_MEDIATEK_WATCHDOG=y
CONFIG_MEMFD_CREATE=y
CONFIG_MFD_SYSCON=y
@@ -193,7 +192,6 @@ CONFIG_MTK_INFRACFG=y
# CONFIG_MTK_PMIC_WRAP is not set
CONFIG_MTK_SCPSYS=y
CONFIG_MTK_SCPSYS_PM_DOMAINS=y
# CONFIG_MTK_THERMAL is not set
CONFIG_MTK_TIMER=y
CONFIG_MUTEX_SPIN_ON_OWNER=y
CONFIG_NEED_DMA_MAP_STATE=y

View File

@@ -55,7 +55,7 @@
read-only;
};
partition@c0000 {
label = "u-boot-env2";
label = "board-name";
reg = <0x000c0000 0x40000>;
};
partition@280000 {

View File

@@ -5,12 +5,13 @@
get_device_irq() {
local device="$1"
local line
local seconds
local seconds="0"
# wait up to 10 seconds for the irq/device to appear
for seconds in $(seq 0 9); do
while [ "${seconds}" -le 10 ]; do
line=$(grep -m 1 "${device}\$" /proc/interrupts) && break
sleep 1
seconds="$(( seconds + 2 ))"
sleep 2
done
echo ${line} | sed 's/:.*//'
}

View File

@@ -119,7 +119,7 @@ GCC_CONFIGURE:= \
--disable-decimal-float \
--with-diagnostics-color=auto-if-env \
--enable-__cxa_atexit \
--disable-libstdcxx-dual-abi \
--enable-libstdcxx-dual-abi \
--with-default-libstdcxx-abi=new
ifneq ($(CONFIG_mips)$(CONFIG_mipsel),)
GCC_CONFIGURE += --with-mips-plt