From f326bbdabba71d9dec6a3b8b81288422c2d8065e Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Mon, 1 Aug 2022 21:21:03 +0800 Subject: [PATCH 01/10] hostapd: fix dependency Signed-off-by: Tianling Shen --- package/network/services/hostapd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 9fbf7ca294..254f6c1af2 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -189,7 +189,7 @@ define Package/hostapd-basic-openssl $(call Package/hostapd/Default,$(1)) TITLE+= (WPA-PSK, 11r and 11w) VARIANT:=basic-openssl - DEPENDS+=+PACKAGE_hostapd-openssl:libopenssl + DEPENDS+=+PACKAGE_hostapd-basic-openssl:libopenssl endef define Package/hostapd-basic-openssl/description From bb6e7fea7452fc4bd9c75dd6b3022e26544b5113 Mon Sep 17 00:00:00 2001 From: Joel Low Date: Fri, 24 Jun 2022 18:47:20 +0800 Subject: [PATCH 02/10] wolfssl: add config flag for Curve448 This enables building WolfSSL with Curve448, which can be used by Strongswan. This has been tested on a Linksys E8450, running OpenWrt 22.03-rc4. This allows parity with OpenSSL, which already supports Curve448 in OpenWrt 21.02. Fixes openwrt/packages#18812. Signed-off-by: Joel Low (cherry picked from commit 925c73aab3c1514da9f4cec97badb91113631dbf) --- package/libs/wolfssl/Config.in | 4 ++++ package/libs/wolfssl/Makefile | 2 ++ 2 files changed, 6 insertions(+) diff --git a/package/libs/wolfssl/Config.in b/package/libs/wolfssl/Config.in index 025362ff6f..332a151550 100644 --- a/package/libs/wolfssl/Config.in +++ b/package/libs/wolfssl/Config.in @@ -52,6 +52,9 @@ config WOLFSSL_HAS_ECC25519 bool "Include ECC Curve 25519 support" default y +config WOLFSSL_HAS_ECC448 + bool "Include ECC Curve 448 support" + config WOLFSSL_HAS_OPENVPN bool "Include OpenVPN support" default y @@ -69,6 +72,7 @@ config WOLFSSL_ASM_CAPABLE choice prompt "Hardware Acceleration" + default WOLFSSL_HAS_CPU_CRYPTO if WOLFSSL_ASM_CAPABLE && !TARGET_armvirt default WOLFSSL_HAS_NO_HW config WOLFSSL_HAS_NO_HW diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index 06f1c57cad..5a6c5d5cea 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -32,6 +32,7 @@ PKG_CONFIG_DEPENDS:=\ CONFIG_WOLFSSL_HAS_DH \ CONFIG_WOLFSSL_HAS_DTLS \ CONFIG_WOLFSSL_HAS_ECC25519 \ + CONFIG_WOLFSSL_HAS_ECC448 \ CONFIG_WOLFSSL_HAS_OCSP \ CONFIG_WOLFSSL_HAS_OPENVPN CONFIG_WOLFSSL_ALT_NAMES \ CONFIG_WOLFSSL_HAS_SESSION_TICKET \ @@ -118,6 +119,7 @@ CONFIGURE_ARGS += \ --$(if $(CONFIG_WOLFSSL_HAS_SESSION_TICKET),enable,disable)-session-ticket \ --$(if $(CONFIG_WOLFSSL_HAS_DTLS),enable,disable)-dtls \ --$(if $(CONFIG_WOLFSSL_HAS_ECC25519),enable,disable)-curve25519 \ + --$(if $(CONFIG_WOLFSSL_HAS_ECC448),enable,disable)-curve448 \ --$(if $(CONFIG_WOLFSSL_HAS_AFALG),enable,disable)-afalg \ --$(if $(CONFIG_WOLFSSL_HAS_OPENVPN),enable,disable)-openvpn \ --enable-devcrypto=$(if $(CONFIG_WOLFSSL_HAS_DEVCRYPTO_CBC),cbc\ From 85ca48bd71a4fc076423238b9628ee4a206aec45 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Sat, 25 Jun 2022 23:24:40 +0200 Subject: [PATCH 03/10] firmware: intel-microcode: update to 20220510 Debians' changelog by Henrique de Moraes Holschuh : * New upstream microcode datafile 20220419 * Fixes errata APLI-11 in Atom E3900 series processors * Updated Microcodes: sig 0x000506ca, pf_mask 0x03, 2021-11-16, rev 0x0028, size 16384 * New upstream microcode datafile 20220510 * Fixes INTEL-SA-000617, CVE-2022-21151: Processor optimization removal or modification of security-critical code may allow an authenticated user to potentially enable information disclosure via local access (closes: #1010947) * Fixes several errata (functional issues) on Xeon Scalable, Atom C3000, Atom E3900 * New Microcodes: sig 0x00090672, pf_mask 0x03, 2022-03-03, rev 0x001f, size 212992 sig 0x00090675, pf_mask 0x03, 2022-03-03, rev 0x001f, size 212992 sig 0x000906a3, pf_mask 0x80, 2022-03-24, rev 0x041c, size 212992 sig 0x000906a4, pf_mask 0x80, 2022-03-24, rev 0x041c, size 212992 sig 0x000b06f2, pf_mask 0x03, 2022-03-03, rev 0x001f, size 212992 sig 0x000b06f5, pf_mask 0x03, 2022-03-03, rev 0x001f, size 212992 * Updated Microcodes: sig 0x00030679, pf_mask 0x0f, 2019-07-10, rev 0x090d, size 52224 sig 0x000406e3, pf_mask 0xc0, 2021-11-12, rev 0x00f0, size 106496 sig 0x00050653, pf_mask 0x97, 2021-11-13, rev 0x100015d, size 34816 sig 0x00050654, pf_mask 0xb7, 2021-11-13, rev 0x2006d05, size 43008 sig 0x00050656, pf_mask 0xbf, 2021-12-10, rev 0x4003302, size 37888 sig 0x00050657, pf_mask 0xbf, 2021-12-10, rev 0x5003302, size 37888 sig 0x0005065b, pf_mask 0xbf, 2021-11-19, rev 0x7002501, size 29696 sig 0x000506c9, pf_mask 0x03, 2021-11-16, rev 0x0048, size 17408 sig 0x000506e3, pf_mask 0x36, 2021-11-12, rev 0x00f0, size 109568 sig 0x000506f1, pf_mask 0x01, 2021-12-02, rev 0x0038, size 11264 sig 0x000606a6, pf_mask 0x87, 2022-03-30, rev 0xd000363, size 294912 sig 0x000706a1, pf_mask 0x01, 2021-11-22, rev 0x003a, size 75776 sig 0x000706a8, pf_mask 0x01, 2021-11-22, rev 0x001e, size 75776 sig 0x000706e5, pf_mask 0x80, 2022-03-09, rev 0x00b0, size 112640 sig 0x000806a1, pf_mask 0x10, 2022-03-26, rev 0x0031, size 34816 sig 0x000806c1, pf_mask 0x80, 2022-02-01, rev 0x00a4, size 109568 sig 0x000806c2, pf_mask 0xc2, 2021-12-07, rev 0x0026, size 97280 sig 0x000806d1, pf_mask 0xc2, 2021-12-07, rev 0x003e, size 102400 sig 0x000806e9, pf_mask 0x10, 2021-11-12, rev 0x00f0, size 105472 sig 0x000806e9, pf_mask 0xc0, 2021-11-12, rev 0x00f0, size 105472 sig 0x000806ea, pf_mask 0xc0, 2021-11-12, rev 0x00f0, size 105472 sig 0x000806eb, pf_mask 0xd0, 2021-11-15, rev 0x00f0, size 105472 sig 0x000806ec, pf_mask 0x94, 2021-11-17, rev 0x00f0, size 105472 sig 0x00090661, pf_mask 0x01, 2022-02-03, rev 0x0016, size 20480 sig 0x000906c0, pf_mask 0x01, 2022-02-19, rev 0x24000023, size 20480 sig 0x000906e9, pf_mask 0x2a, 2021-11-12, rev 0x00f0, size 108544 sig 0x000906ea, pf_mask 0x22, 2021-11-15, rev 0x00f0, size 104448 sig 0x000906eb, pf_mask 0x02, 2021-11-12, rev 0x00f0, size 105472 sig 0x000906ec, pf_mask 0x22, 2021-11-15, rev 0x00f0, size 104448 sig 0x000906ed, pf_mask 0x22, 2021-11-16, rev 0x00f0, size 104448 sig 0x000a0652, pf_mask 0x20, 2021-11-16, rev 0x00f0, size 96256 sig 0x000a0653, pf_mask 0x22, 2021-11-15, rev 0x00f0, size 97280 sig 0x000a0655, pf_mask 0x22, 2021-11-16, rev 0x00f0, size 96256 sig 0x000a0660, pf_mask 0x80, 2021-11-15, rev 0x00f0, size 96256 sig 0x000a0661, pf_mask 0x80, 2021-11-16, rev 0x00f0, size 96256 sig 0x000a0671, pf_mask 0x02, 2022-03-09, rev 0x0053, size 103424 Signed-off-by: Christian Lamparter (cherry picked from commit 2747a94f0977b36c4c29cc4596879b9127cfaf5f) --- package/firmware/intel-microcode/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/firmware/intel-microcode/Makefile b/package/firmware/intel-microcode/Makefile index e6f730fcb2..0d51730173 100644 --- a/package/firmware/intel-microcode/Makefile +++ b/package/firmware/intel-microcode/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=intel-microcode -PKG_VERSION:=20220207 +PKG_VERSION:=20220510 PKG_RELEASE:=1 PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).1.tar.xz PKG_SOURCE_URL:=@DEBIAN/pool/non-free/i/intel-microcode/ -PKG_HASH:=42f2ab3c14bda745ec64008cde5c0f416f32f40e838a9df04cf5ddf5fc87498b +PKG_HASH:=49752447c1b905dd130699cdef09fb2bba47b6f413d27787c98a5569273e283e PKG_BUILD_DIR:=$(BUILD_DIR)/intel-microcode-3.$(PKG_VERSION).1 PKG_BUILD_DEPENDS:=iucode-tool/host From f47d97977cade815465de8700c95b392d258187c Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 5 Jun 2022 20:02:08 +0200 Subject: [PATCH 04/10] nls.mk: clean up INTL flags gettext (libintl-stub) was removed in commit [1], so the libintl-stub lib and include directories aren't existing anymore. This commit cleans up the INTL flags for the BUILD_NLS=n case. [1] e6f569406ffe1d9e35b9b9ea36f38cdd5837728d Signed-off-by: Sebastian Kemper Reviewed-by: Rosen Penev (cherry picked from commit 92f0b7d4d25c8493270051298a4073f5b630bda3) --- include/nls.mk | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/include/nls.mk b/include/nls.mk index 163e480932..665ccb565d 100644 --- a/include/nls.mk +++ b/include/nls.mk @@ -15,7 +15,7 @@ else ICONV_PREFIX:=$(STAGING_DIR)/usr/lib/libiconv-stub ICONV_FULL:= - INTL_PREFIX:=$(STAGING_DIR)/usr/lib/libintl-stub + INTL_PREFIX:= INTL_FULL:= endif @@ -28,9 +28,15 @@ ICONV_CPPFLAGS:=-I$(ICONV_PREFIX)/include ICONV_LDFLAGS:=-L$(ICONV_PREFIX)/lib -Wl,-rpath-link=$(ICONV_PREFIX)/lib INTL_DEPENDS:=+BUILD_NLS:libintl-full -INTL_CFLAGS:=-I$(INTL_PREFIX)/include -INTL_CPPFLAGS:=-I$(INTL_PREFIX)/include -INTL_LDFLAGS:=-L$(INTL_PREFIX)/lib -Wl,-rpath-link=$(INTL_PREFIX)/lib +ifeq ($(CONFIG_BUILD_NLS),y) + INTL_CFLAGS:=-I$(INTL_PREFIX)/include + INTL_CPPFLAGS:=-I$(INTL_PREFIX)/include + INTL_LDFLAGS:=-L$(INTL_PREFIX)/lib -Wl,-rpath-link=$(INTL_PREFIX)/lib +else + INTL_CFLAGS:= + INTL_CPPFLAGS:= + INTL_LDFLAGS:= +endif TARGET_CFLAGS += $(ICONV_CFLAGS) $(INTL_CFLAGS) TARGET_CPPFLAGS += $(ICONV_CPPFLAGS) $(INTL_CPPFLAGS) From cab1e2e283d048f8f0fa3f31133510c86b30fd83 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Tue, 2 Aug 2022 00:12:14 +0800 Subject: [PATCH 05/10] kernel: nvme: add missing Kconfig Signed-off-by: Tianling Shen --- package/kernel/linux/modules/block.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/kernel/linux/modules/block.mk b/package/kernel/linux/modules/block.mk index 85dec215ca..b085a9c8fe 100644 --- a/package/kernel/linux/modules/block.mk +++ b/package/kernel/linux/modules/block.mk @@ -517,6 +517,7 @@ define KernelPackage/nvme KCONFIG:= \ CONFIG_NVME_CORE \ CONFIG_BLK_DEV_NVME \ + CONFIG_BLK_DEV_NVME_SCSI=n \ CONFIG_NVME_MULTIPATH=n \ CONFIG_NVME_HWMON=n FILES:= \ From 3a1aeb313e5a7b86b71bf989f553fc1881ac5313 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Sat, 6 Aug 2022 18:49:52 +0800 Subject: [PATCH 06/10] download.pl: remove broken mirror Signed-off-by: Tianling Shen (cherry picked from commit 9fbf1751eced799a4320fed8095b78fbde2d5116) --- scripts/download.pl | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/download.pl b/scripts/download.pl index d5c1e96763..dc65f39c88 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -288,7 +288,6 @@ foreach my $mirror (@ARGV) { } # push @mirrors, 'https://mirror01.download.immortalwrt.eu.org'; -push @mirrors, 'https://mirror2.immortalwrt.org/sources'; push @mirrors, 'https://mirror.immortalwrt.org/sources'; push @mirrors, 'https://sources.immortalwrt.org'; push @mirrors, 'https://sources.cdn.immortalwrt.org'; From 162632989b3cbdd682a469517e6ba18a1f83f200 Mon Sep 17 00:00:00 2001 From: Ilya Lipnitskiy Date: Tue, 7 Dec 2021 17:28:22 -0800 Subject: [PATCH 07/10] toolchain/gcc: replace revert with upstream fix This will make upgrade to v11.3.0 easier and follows upstream more closely. Fixes: #757 Signed-off-by: Ilya Lipnitskiy (cherry picked from commit 0dca1060fd48d261f4ffead6efebd16170014ee3) [Add fixes] Signed-off-by: Tianling Shen --- ...leanup-range-of-address-calculations.patch | 160 ------------------ .../11.3.0/930-fix-mips-noexecstack.patch | 111 ------------ 2 files changed, 271 deletions(-) delete mode 100644 toolchain/gcc/patches/11.3.0/001-Revert-Cleanup-range-of-address-calculations.patch delete mode 100644 toolchain/gcc/patches/11.3.0/930-fix-mips-noexecstack.patch diff --git a/toolchain/gcc/patches/11.3.0/001-Revert-Cleanup-range-of-address-calculations.patch b/toolchain/gcc/patches/11.3.0/001-Revert-Cleanup-range-of-address-calculations.patch deleted file mode 100644 index a97e061d6b..0000000000 --- a/toolchain/gcc/patches/11.3.0/001-Revert-Cleanup-range-of-address-calculations.patch +++ /dev/null @@ -1,160 +0,0 @@ -From: Felix Fietkau -Date: Tue, 16 Nov 2021 10:39:51 +0100 -Subject: [PATCH] Revert "Cleanup range of address calculations." - -This reverts commit 47923622c663ffad8b14aa93706183290d4f6791. -This commit is causing issues with offset of struct members. - -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103255 ---- - delete mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr78655.c - ---- a/gcc/gimple-range.cc -+++ b/gcc/gimple-range.cc -@@ -431,9 +431,8 @@ gimple_ranger::range_of_range_op (irange - m_cache.register_dependency (lhs, op2); - } - -- if (gimple_code (s) == GIMPLE_ASSIGN -- && gimple_assign_rhs_code (s) == ADDR_EXPR) -- return range_of_address (r, s); -+ if (range_of_non_trivial_assignment (r, s)) -+ return true; - - if (range_of_expr (range1, op1, s)) - { -@@ -447,84 +446,48 @@ gimple_ranger::range_of_range_op (irange - return true; - } - --// Calculate the range of an assignment containing an ADDR_EXPR. -+// Calculate the range of a non-trivial assignment. That is, is one -+// inolving arithmetic on an SSA name (for example, an ADDR_EXPR). - // Return the range in R. --// If a range cannot be calculated, set it to VARYING and return true. -+// -+// If a range cannot be calculated, return false. - - bool --gimple_ranger::range_of_address (irange &r, gimple *stmt) -+gimple_ranger::range_of_non_trivial_assignment (irange &r, gimple *stmt) - { -- gcc_checking_assert (gimple_code (stmt) == GIMPLE_ASSIGN); -- gcc_checking_assert (gimple_assign_rhs_code (stmt) == ADDR_EXPR); -+ if (gimple_code (stmt) != GIMPLE_ASSIGN) -+ return false; - -- bool strict_overflow_p; -- tree expr = gimple_assign_rhs1 (stmt); -- poly_int64 bitsize, bitpos; -- tree offset; -- machine_mode mode; -- int unsignedp, reversep, volatilep; -- tree base = get_inner_reference (TREE_OPERAND (expr, 0), &bitsize, -- &bitpos, &offset, &mode, &unsignedp, -- &reversep, &volatilep); -- -- -- if (base != NULL_TREE -- && TREE_CODE (base) == MEM_REF -- && TREE_CODE (TREE_OPERAND (base, 0)) == SSA_NAME) -+ tree base = gimple_range_base_of_assignment (stmt); -+ if (base) - { -- tree ssa = TREE_OPERAND (base, 0); -- gcc_checking_assert (irange::supports_type_p (TREE_TYPE (ssa))); -- range_of_expr (r, ssa, stmt); -- range_cast (r, TREE_TYPE (gimple_assign_rhs1 (stmt))); -- -- poly_offset_int off = 0; -- bool off_cst = false; -- if (offset == NULL_TREE || TREE_CODE (offset) == INTEGER_CST) -+ if (TREE_CODE (base) == MEM_REF) - { -- off = mem_ref_offset (base); -- if (offset) -- off += poly_offset_int::from (wi::to_poly_wide (offset), -- SIGNED); -- off <<= LOG2_BITS_PER_UNIT; -- off += bitpos; -- off_cst = true; -+ if (TREE_CODE (TREE_OPERAND (base, 0)) == SSA_NAME) -+ { -+ int_range_max range1; -+ tree ssa = TREE_OPERAND (base, 0); -+ if (range_of_expr (range1, ssa, stmt)) -+ { -+ tree type = TREE_TYPE (ssa); -+ range_operator *op = range_op_handler (POINTER_PLUS_EXPR, -+ type); -+ int_range<2> offset (TREE_OPERAND (base, 1), -+ TREE_OPERAND (base, 1)); -+ op->fold_range (r, type, range1, offset); -+ return true; -+ } -+ } -+ return false; - } -- /* If &X->a is equal to X, the range of X is the result. */ -- if (off_cst && known_eq (off, 0)) -- return true; -- else if (flag_delete_null_pointer_checks -- && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (expr))) -- { -- /* For -fdelete-null-pointer-checks -fno-wrapv-pointer we don't -- allow going from non-NULL pointer to NULL. */ -- if(!range_includes_zero_p (&r)) -- return true; -- } -- /* If MEM_REF has a "positive" offset, consider it non-NULL -- always, for -fdelete-null-pointer-checks also "negative" -- ones. Punt for unknown offsets (e.g. variable ones). */ -- if (!TYPE_OVERFLOW_WRAPS (TREE_TYPE (expr)) -- && off_cst -- && known_ne (off, 0) -- && (flag_delete_null_pointer_checks || known_gt (off, 0))) -+ if (gimple_assign_rhs_code (stmt) == ADDR_EXPR) - { -+ // Handle "= &a" and return non-zero. - r = range_nonzero (TREE_TYPE (gimple_assign_rhs1 (stmt))); - return true; - } -- r = int_range<2> (TREE_TYPE (gimple_assign_rhs1 (stmt))); -- return true; -- } -- -- // Handle "= &a". -- if (tree_single_nonzero_warnv_p (expr, &strict_overflow_p)) -- { -- r = range_nonzero (TREE_TYPE (gimple_assign_rhs1 (stmt))); -- return true; - } -- -- // Otherwise return varying. -- r = int_range<2> (TREE_TYPE (gimple_assign_rhs1 (stmt))); -- return true; -+ return false; - } - - // Calculate a range for phi statement S and return it in R. ---- a/gcc/gimple-range.h -+++ b/gcc/gimple-range.h -@@ -62,7 +62,7 @@ protected: - ranger_cache m_cache; - private: - bool range_of_phi (irange &r, gphi *phi); -- bool range_of_address (irange &r, gimple *s); -+ bool range_of_non_trivial_assignment (irange &r, gimple *s); - bool range_of_builtin_call (irange &r, gcall *call); - bool range_with_loop_info (irange &r, tree name); - void range_of_ssa_name_with_loop_info (irange &, tree, class loop *, ---- a/gcc/range-op.cc -+++ b/gcc/range-op.cc -@@ -3447,7 +3447,6 @@ pointer_table::pointer_table () - set (GT_EXPR, op_gt); - set (GE_EXPR, op_ge); - set (SSA_NAME, op_identity); -- set (INTEGER_CST, op_integer_cst); - set (ADDR_EXPR, op_addr); - set (NOP_EXPR, op_convert); - set (CONVERT_EXPR, op_convert); diff --git a/toolchain/gcc/patches/11.3.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches/11.3.0/930-fix-mips-noexecstack.patch deleted file mode 100644 index 591dfe5a50..0000000000 --- a/toolchain/gcc/patches/11.3.0/930-fix-mips-noexecstack.patch +++ /dev/null @@ -1,111 +0,0 @@ -From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 -From: Andrew McDonnell -Date: Fri, 3 Oct 2014 19:09:00 +0930 -Subject: Add .note.GNU-stack section - -See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html -Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html - -Re: [Patch, MIPS] Add .note.GNU-stack section - - From: Steve Ellcey - -On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote: -> -> -> On Wed, Sep 10, 2014 at 9:27 AM, wrote: - -> This works except you did not update the assembly files in -> libgcc or glibc. We (Cavium) have the same patch in our tree -> for a few released versions. - -> Mind just checking yours in then Andrew? - -> Thanks! -> -eric - -I talked to Andrew about what files he changed in GCC and created and -tested this new patch. Andrew also mentioned changing some assembly -files in glibc but I don't see any use of '.section .note.GNU-stack' in -any assembly files in glibc (for any platform) so I wasn't planning on -creating a glibc to add them to mips glibc assembly language files. - -OK to check in this patch? - -Steve Ellcey -sellcey@mips.com - - - -2014-09-26 Steve Ellcey ---- - gcc/config/mips/mips.c | 3 +++ - libgcc/config/mips/crti.S | 4 ++++ - libgcc/config/mips/crtn.S | 3 +++ - libgcc/config/mips/mips16.S | 4 ++++ - libgcc/config/mips/vr4120-div.S | 4 ++++ - 5 files changed, 18 insertions(+) - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -22890,6 +22890,9 @@ mips_asm_file_end (void) - #define TARGET_ASM_FILE_END mips_asm_file_end - - -+#undef TARGET_ASM_FILE_END -+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack -+ - struct gcc_target targetm = TARGET_INITIALIZER; - - #include "gt-mips.h" ---- a/libgcc/config/mips/crti.S -+++ b/libgcc/config/mips/crti.S -@@ -24,6 +24,10 @@ see the files COPYING3 and COPYING.RUNTI - /* An executable stack is *not* required for these functions. */ - #include "gnustack.h" - -+ -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/crtn.S -+++ b/libgcc/config/mips/crtn.S -@@ -24,6 +24,9 @@ see the files COPYING3 and COPYING.RUNTI - /* An executable stack is *not* required for these functions. */ - #include "gnustack.h" - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/mips16.S -+++ b/libgcc/config/mips/mips16.S -@@ -51,6 +51,10 @@ see the files COPYING3 and COPYING.RUNTI - values using the soft-float calling convention, but do the actual - operation using the hard floating point instructions. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64) - - /* This file contains 32-bit assembly code. */ ---- a/libgcc/config/mips/vr4120-div.S -+++ b/libgcc/config/mips/vr4120-div.S -@@ -29,6 +29,10 @@ see the files COPYING3 and COPYING.RUNTI - -mfix-vr4120. div and ddiv do not give the correct result when one - of the operands is negative. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - .set nomips16 - - #define DIV \ From af6bba0dd7534fe4303f6d81c4a4b7c951b33522 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Tue, 16 Aug 2022 22:26:21 +0800 Subject: [PATCH 08/10] r8101: add new driver Closes: #758 Signed-off-by: Tianling Shen (cherry picked from commit 8d2142217776340a41add6aa3108935972d41384) --- package/kernel/r8101/Makefile | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 package/kernel/r8101/Makefile diff --git a/package/kernel/r8101/Makefile b/package/kernel/r8101/Makefile new file mode 100644 index 0000000000..fcf4929af9 --- /dev/null +++ b/package/kernel/r8101/Makefile @@ -0,0 +1,39 @@ +# SPDX-License-Identifier: GPL-3.0-only +# +# Copyright (C) 2022 ImmortalWrt.org + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=r8101 +PKG_VERSION:=1.037.01 +PKG_RELEASE:=$(AUTORELEASE) + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@IMMORTALWRT +PKG_HASH:=62bb19848a87d2fe4de3fa9332225dcb5381f06cb93ec8931ea3fd894d492aea +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_MAINTAINER:=Tianling Shen +PKG_LICENSE:=GPL-2.0-only + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/r8101 + TITLE:=Driver for Realtek r8101 chipsets + SUBMENU:=Network Devices + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) + DEPENDS:=@PCI_SUPPORT + FILES:= $(PKG_BUILD_DIR)/src/r8101.ko + AUTOLOAD:=$(call AutoProbe,r8101) +endef + +define Package/r8101/description + This package contains a driver for Realtek r8101 chipsets. +endef + +define Build/Compile + +$(KERNEL_MAKE) M=$(PKG_BUILD_DIR)/src modules +endef + +$(eval $(call KernelPackage,r8101)) From a34f407374c3dfa5112ab8dafe4f8823c8ee64ba Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Tue, 16 Aug 2022 22:33:11 +0800 Subject: [PATCH 09/10] x86: include r8101 by default Signed-off-by: Tianling Shen (cherry picked from commit 0709140e0b40a90a2c6eeb6eaa6435f9320117d5) --- target/linux/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/x86/Makefile b/target/linux/x86/Makefile index f9d7486959..4946d94104 100644 --- a/target/linux/x86/Makefile +++ b/target/linux/x86/Makefile @@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/target.mk DEFAULT_PACKAGES += partx-utils mkf2fs fdisk e2fsprogs kmod-usb-hid kmod-rt2800-usb kmod-e1000e \ kmod-igb kmod-igbvf kmod-ixgbe kmod-pcnet32 kmod-tulip kmod-vmxnet3 kmod-i40e \ - kmod-i40evf kmod-r8125 kmod-r8168 kmod-8139cp kmod-8139too kmod-fs-f2fs \ + kmod-i40evf kmod-r8101 kmod-r8125 kmod-r8168 kmod-8139cp kmod-8139too kmod-fs-f2fs \ autocore-x86 kmod-sound-hda-core kmod-sound-hda-codec-realtek kmod-sound-hda-codec-via \ kmod-sound-via82xx kmod-sound-hda-intel kmod-sound-hda-codec-hdmi kmod-sound-i8x0 \ kmod-usb-audio kmod-usb-net kmod-usb-net-asix kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8150 \ From 8c8ba72a11a1fc5542575f30304575073e7c6e2f Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Tue, 12 Jul 2022 15:19:04 +0800 Subject: [PATCH 10/10] download.pl: add ImmortalWrt fallback Fixes: #759 Signed-off-by: Tianling Shen (cherry picked from commit a19080494926ad523e636d7e075717b69e2f3e47) --- include/download.mk | 2 +- scripts/download.pl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/download.mk b/include/download.mk index 76bd374cf7..68dc39bcd2 100644 --- a/include/download.mk +++ b/include/download.mk @@ -27,7 +27,7 @@ define dl_method $(strip \ $(if $(filter git,$(2)),$(call dl_method_git,$(1),$(2)), $(if $(2),$(2), \ - $(if $(filter @OPENWRT @APACHE/% @DEBIAN/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \ + $(if $(filter @OPENWRT @IMMORTALWRT @APACHE/% @DEBIAN/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \ $(if $(filter git://%,$(1)),$(call dl_method_git,$(1),$(2)), \ $(if $(filter svn://%,$(1)),svn, \ $(if $(filter cvs://%,$(1)),cvs, \ diff --git a/scripts/download.pl b/scripts/download.pl index dc65f39c88..22b0a25ac1 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -198,6 +198,8 @@ foreach my $mirror (@ARGV) { } } elsif ($mirror =~ /^\@OPENWRT$/) { # use OpenWrt source server directly + } elsif ($mirror =~ /^\@IMMORTALWRT$/) { + # use ImmortalWrt source server directly } elsif ($mirror =~ /^\@DEBIAN\/(.+)$/) { push @mirrors, "https://mirrors.tencent.com/debian/$1"; push @mirrors, "https://mirrors.aliyun.com/debian/$1";