diff --git a/config/Config-kernel.in b/config/Config-kernel.in index 7cd7906dc9..f1ee919ee3 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -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 diff --git a/include/prereq-build.mk b/include/prereq-build.mk index 80d549af39..7428c21e16 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -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 = 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 +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 diff --git a/package/network/utils/xdp-tools/Makefile b/package/network/utils/xdp-tools/Makefile index 3b93a13163..7d831d0fec 100644 --- a/package/network/utils/xdp-tools/Makefile +++ b/package/network/utils/xdp-tools/Makefile @@ -12,9 +12,11 @@ PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_VERSION)) PKG_MAINTAINER:=Daniel Golle 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)" \ diff --git a/package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch b/package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch new file mode 100644 index 0000000000..b3454548f8 --- /dev/null +++ b/package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch @@ -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 diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10 index 2f811f15c9..f9bf84c0f1 100644 --- a/target/linux/generic/config-5.10 +++ b/target/linux/generic/config-5.10 @@ -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 diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15 index 063ebb758d..33495c2c12 100644 --- a/target/linux/generic/config-5.15 +++ b/target/linux/generic/config-5.15 @@ -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 diff --git a/target/linux/mediatek/dts/mt7622-totolink-a8000ru.dts b/target/linux/mediatek/dts/mt7622-totolink-a8000ru.dts index d67fb4efbf..b634e28783 100644 --- a/target/linux/mediatek/dts/mt7622-totolink-a8000ru.dts +++ b/target/linux/mediatek/dts/mt7622-totolink-a8000ru.dts @@ -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 = <ðsys>; @@ -312,6 +321,7 @@ &ssusb { vusb33-supply = <®_3p3v>; + vbus-supply = <®_5v>; status = "okay"; }; diff --git a/target/linux/mediatek/mt7629/config-5.15 b/target/linux/mediatek/mt7629/config-5.15 index 0ec40b4807..ea8239197d 100644 --- a/target/linux/mediatek/mt7629/config-5.15 +++ b/target/linux/mediatek/mt7629/config-5.15 @@ -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 diff --git a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210.dtsi b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210.dtsi index 312a36c1a8..aaaa872162 100644 --- a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210.dtsi +++ b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210.dtsi @@ -55,7 +55,7 @@ read-only; }; partition@c0000 { - label = "u-boot-env2"; + label = "board-name"; reg = <0x000c0000 0x40000>; }; partition@280000 { diff --git a/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity b/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity index 106a269b1b..bb119b9185 100644 --- a/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity +++ b/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity @@ -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/:.*//' } diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index 8fa9459f50..926418f4a7 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -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