From b5191f3366c2bf09a8e0dfb08a4e0f5ca11bfd14 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Tue, 25 Aug 2020 23:54:44 +0200 Subject: [PATCH 01/16] curl: Fix build with wolfssl Backport a commit from upstream curl to fix a problem in configure with wolfssl. checking size of time_t... configure: error: cannot determine a size for time_t Signed-off-by: Hauke Mehrtens --- ...ure-fix-pkg-config-detecting-wolfssl.patch | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 package/network/utils/curl/patches/100-configure-fix-pkg-config-detecting-wolfssl.patch diff --git a/package/network/utils/curl/patches/100-configure-fix-pkg-config-detecting-wolfssl.patch b/package/network/utils/curl/patches/100-configure-fix-pkg-config-detecting-wolfssl.patch new file mode 100644 index 0000000000..a77e5c69df --- /dev/null +++ b/package/network/utils/curl/patches/100-configure-fix-pkg-config-detecting-wolfssl.patch @@ -0,0 +1,31 @@ +From 510d98157f21dee5793c4e975fde3317b6139267 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Mon, 24 Aug 2020 16:28:34 +0200 +Subject: [PATCH] configure: fix pkg-config detecting wolfssl + +When amending the include path with "/wolfssl", this now properly strips +off all whitespace from the path variable! Previously this would lead to +pkg-config builds creating bad command lines. + +Closes #5848 +--- + configure.ac | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -2474,8 +2474,12 @@ if test -z "$ssl_backends" -o "x$OPT_WOL + AC_DEFINE(HAVE_WOLFSSL_DES_ECB_ENCRYPT, 1, + [if you have wolfSSL_DES_ecb_encrypt]) + if test -n "$addcflags"; then +- CPPFLAGS="$addcflags/wolfssl $CPPFLAGS" +- AC_MSG_NOTICE([Add $addcflags/wolfssl to CPPFLAGS]) ++ dnl use a for loop to strip off whitespace ++ for f in $addcflags; do ++ CPPFLAGS="$f/wolfssl $CPPFLAGS" ++ AC_MSG_NOTICE([Add $f/wolfssl to CPPFLAGS]) ++ break ++ done + else + dnl user didn't give a path, so guess/hope they installed wolfssl + dnl headers to system default location From 2745f6afe6ee0ef1665f04fd9b9fb1fd33d7b65e Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Wed, 26 Aug 2020 00:10:20 +0200 Subject: [PATCH 02/16] curl: Use wolfssl by default Instead of using mbedtls by default use wolfssl. We now integrate wolfssl in the default build so use it also as default ssl library for curl. Signed-off-by: Hauke Mehrtens --- package/network/utils/curl/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/utils/curl/Config.in b/package/network/utils/curl/Config.in index 9afeb00bc7..05effa0e7b 100644 --- a/package/network/utils/curl/Config.in +++ b/package/network/utils/curl/Config.in @@ -4,7 +4,7 @@ comment "SSL support" choice prompt "Selected SSL library" - default LIBCURL_MBEDTLS + default LIBCURL_WOLFSSL config LIBCURL_MBEDTLS bool "mbed TLS" From 00722a720c778e623d6f37af3a3b4e43b29c3fe8 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 24 Aug 2020 12:11:29 +0200 Subject: [PATCH 03/16] wolfssl: Update to version 4.5.0 This fixes the following security problems: * In earlier versions of wolfSSL there exists a potential man in the middle attack on TLS 1.3 clients. * Denial of service attack on TLS 1.3 servers from repetitively sending ChangeCipherSpecs messages. (CVE-2020-12457) * Potential cache timing attacks on public key operations in builds that are not using SP (single precision). (CVE-2020-15309) * When using SGX with EC scalar multiplication the possibility of side- channel attacks are present. * Leak of private key in the case that PEM format private keys are bundled in with PEM certificates into a single file. * During the handshake, clear application_data messages in epoch 0 are processed and returned to the application. Full changelog: https://www.wolfssl.com/docs/wolfssl-changelog/ Fix a build error on big endian systems by backporting a pull request: https://github.com/wolfSSL/wolfssl/pull/3255 The size of the ipk increases on mips BE by 1.4% old: libwolfssl24_4.4.0-stable-2_mips_24kc.ipk: 386246 new: libwolfssl24_4.5.0-stable-1_mips_24kc.ipk: 391528 Signed-off-by: Hauke Mehrtens --- package/libs/wolfssl/Makefile | 6 ++--- .../patches/100-disable-hardening-check.patch | 2 +- .../patches/110-fix-build-on-big-endian.patch | 27 +++++++++++++++++++ 3 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 package/libs/wolfssl/patches/110-fix-build-on-big-endian.patch diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index 159cfbc53f..eb77caee33 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wolfssl -PKG_VERSION:=4.4.0-stable -PKG_RELEASE:=2 +PKG_VERSION:=4.5.0-stable +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION) -PKG_HASH:=7f854804c8ae0ca49cc77809e38e9a3b5a8c91ba7855ea928e6d6651b0d35f18 +PKG_HASH:=7de62300ce14daa0051bfefc7c4d6302f96cabc768b6ae49eda77523b118250c PKG_FIXUP:=libtool PKG_INSTALL:=1 diff --git a/package/libs/wolfssl/patches/100-disable-hardening-check.patch b/package/libs/wolfssl/patches/100-disable-hardening-check.patch index 5d83eca770..43337ba970 100644 --- a/package/libs/wolfssl/patches/100-disable-hardening-check.patch +++ b/package/libs/wolfssl/patches/100-disable-hardening-check.patch @@ -1,6 +1,6 @@ --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h -@@ -1930,7 +1930,7 @@ extern void uITRON4_free(void *p) ; +@@ -2128,7 +2128,7 @@ extern void uITRON4_free(void *p) ; #endif /* warning for not using harden build options (default with ./configure) */ diff --git a/package/libs/wolfssl/patches/110-fix-build-on-big-endian.patch b/package/libs/wolfssl/patches/110-fix-build-on-big-endian.patch new file mode 100644 index 0000000000..3838865559 --- /dev/null +++ b/package/libs/wolfssl/patches/110-fix-build-on-big-endian.patch @@ -0,0 +1,27 @@ +From b90acc91d0cd276befe7f08f87ba2dc5ee7122ff Mon Sep 17 00:00:00 2001 +From: Tesfa Mael +Date: Wed, 26 Aug 2020 10:13:06 -0700 +Subject: [PATCH] Make ByteReverseWords available for big and little endian + +--- + wolfcrypt/src/misc.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/wolfcrypt/src/misc.c ++++ b/wolfcrypt/src/misc.c +@@ -120,7 +120,6 @@ WC_STATIC WC_INLINE word32 ByteReverseWo + return rotlFixed(value, 16U); + #endif + } +-#if defined(LITTLE_ENDIAN_ORDER) + /* This routine performs a byte swap of words array of a given count. */ + WC_STATIC WC_INLINE void ByteReverseWords(word32* out, const word32* in, + word32 byteCount) +@@ -131,7 +130,6 @@ WC_STATIC WC_INLINE void ByteReverseWord + out[i] = ByteReverseWord32(in[i]); + + } +-#endif /* LITTLE_ENDIAN_ORDER */ + + #if defined(WORD64_AVAILABLE) && !defined(WOLFSSL_NO_WORD64_OPS) + From 561031921f987bde136854586d216ec1e0e50efc Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 24 Aug 2020 11:53:23 +0200 Subject: [PATCH 04/16] tools: mtd-utils: Update to version 2.1.2 The release notes says this: As already said, the changes since 2.1.1 are primarily bug fixes, addressing compiler warnings and issues reported by diagnostic tools, but also build failures for some configurations. https://lists.infradead.org/pipermail/linux-mtd/2020-July/081299.html Signed-off-by: Hauke Mehrtens --- tools/mtd-utils/Makefile | 5 +++-- tools/mtd-utils/patches/100-sscanf_fix.patch | 2 +- tools/mtd-utils/patches/110-portability.patch | 12 ++++++------ tools/mtd-utils/patches/130-lzma_jffs2.patch | 2 +- ...ubigen-add-ubigen_write_terminator-function.patch | 2 +- .../patches/320-mkfs.jffs2-SOURCE_DATE_EPOCH.patch | 8 ++++---- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/tools/mtd-utils/Makefile b/tools/mtd-utils/Makefile index e0e083d2b6..7eebcfb827 100644 --- a/tools/mtd-utils/Makefile +++ b/tools/mtd-utils/Makefile @@ -7,11 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mtd-utils -PKG_VERSION:=2.1.1 +PKG_VERSION:=2.1.2 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/mtd-utils/ -PKG_HASH:=8d15e8b70f036d6af1a66011f8ca0e048e9675fa7983d33bea92c24313a232d2 +PKG_HASH:=8ad4c5f34716d40646aa28724a2f5616d325a6f119254f914e26976f1f76e9d6 PKG_FIXUP:=autoreconf diff --git a/tools/mtd-utils/patches/100-sscanf_fix.patch b/tools/mtd-utils/patches/100-sscanf_fix.patch index ae6f86722b..a36be078d5 100644 --- a/tools/mtd-utils/patches/100-sscanf_fix.patch +++ b/tools/mtd-utils/patches/100-sscanf_fix.patch @@ -1,6 +1,6 @@ --- a/jffsX-utils/mkfs.jffs2.c +++ b/jffsX-utils/mkfs.jffs2.c -@@ -427,7 +427,7 @@ static int interpret_table_entry(struct +@@ -428,7 +428,7 @@ static int interpret_table_entry(struct if (sscanf (line, "%" SCANF_PREFIX "s %c %lo %lu %lu %lu %lu %lu %lu %lu", SCANF_STRING(name), &type, &mode, &uid, &gid, &major, &minor, diff --git a/tools/mtd-utils/patches/110-portability.patch b/tools/mtd-utils/patches/110-portability.patch index 067526171a..181e40653a 100644 --- a/tools/mtd-utils/patches/110-portability.patch +++ b/tools/mtd-utils/patches/110-portability.patch @@ -70,7 +70,7 @@ #include --- a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c +++ b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c -@@ -1503,6 +1503,7 @@ static int add_inode(struct stat *st, in +@@ -1549,6 +1549,7 @@ static int add_inode(struct stat *st, in if (c->default_compr != UBIFS_COMPR_NONE) use_flags |= UBIFS_COMPR_FL; @@ -78,7 +78,7 @@ if (flags & FS_COMPR_FL) use_flags |= UBIFS_COMPR_FL; if (flags & FS_SYNC_FL) -@@ -1515,6 +1516,7 @@ static int add_inode(struct stat *st, in +@@ -1561,6 +1562,7 @@ static int add_inode(struct stat *st, in use_flags |= UBIFS_DIRSYNC_FL; if (fctx) use_flags |= UBIFS_CRYPT_FL; @@ -86,7 +86,7 @@ memset(ino, 0, UBIFS_INO_NODE_SZ); ino_key_init(&key, inum); -@@ -1600,7 +1602,9 @@ static int add_dir_inode(const char *pat +@@ -1646,7 +1648,9 @@ static int add_dir_inode(const char *pat fd = dirfd(dir); if (fd == -1) return sys_err_msg("dirfd failed"); @@ -96,7 +96,7 @@ flags = 0; } -@@ -1811,6 +1815,7 @@ static int add_file(const char *path_nam +@@ -1857,6 +1861,7 @@ static int add_file(const char *path_nam dn->ch.node_type = UBIFS_DATA_NODE; key_write(&key, &dn->key); out_len = NODE_BUFFER_SIZE - UBIFS_DATA_NODE_SZ; @@ -104,7 +104,7 @@ if (c->default_compr == UBIFS_COMPR_NONE && !c->encrypted && (flags & FS_COMPR_FL)) #ifdef WITHOUT_LZO -@@ -1819,6 +1824,7 @@ static int add_file(const char *path_nam +@@ -1865,6 +1870,7 @@ static int add_file(const char *path_nam use_compr = UBIFS_COMPR_LZO; #endif else @@ -112,7 +112,7 @@ use_compr = c->default_compr; compr_type = compress_data(buf, bytes_read, &dn->data, &out_len, use_compr); -@@ -1876,7 +1882,9 @@ static int add_non_dir(const char *path_ +@@ -1924,7 +1930,9 @@ static int add_non_dir(const char *path_ if (fd == -1) return sys_err_msg("failed to open file '%s'", path_name); diff --git a/tools/mtd-utils/patches/130-lzma_jffs2.patch b/tools/mtd-utils/patches/130-lzma_jffs2.patch index d9cbfeebec..9778aa6d0a 100644 --- a/tools/mtd-utils/patches/130-lzma_jffs2.patch +++ b/tools/mtd-utils/patches/130-lzma_jffs2.patch @@ -5015,7 +5015,7 @@ +} --- a/jffsX-utils/mkfs.jffs2.c +++ b/jffsX-utils/mkfs.jffs2.c -@@ -1666,11 +1666,11 @@ int main(int argc, char **argv) +@@ -1667,11 +1667,11 @@ int main(int argc, char **argv) } erase_block_size *= units; diff --git a/tools/mtd-utils/patches/200-libubigen-add-ubigen_write_terminator-function.patch b/tools/mtd-utils/patches/200-libubigen-add-ubigen_write_terminator-function.patch index d95ece184c..90c951500f 100644 --- a/tools/mtd-utils/patches/200-libubigen-add-ubigen_write_terminator-function.patch +++ b/tools/mtd-utils/patches/200-libubigen-add-ubigen_write_terminator-function.patch @@ -77,7 +77,7 @@ out_free: --- a/include/libubigen.h +++ b/include/libubigen.h -@@ -188,6 +188,9 @@ int ubigen_write_layout_vol(const struct +@@ -187,6 +187,9 @@ int ubigen_write_layout_vol(const struct long long ec1, long long ec2, struct ubi_vtbl_record *vtbl, int fd); diff --git a/tools/mtd-utils/patches/320-mkfs.jffs2-SOURCE_DATE_EPOCH.patch b/tools/mtd-utils/patches/320-mkfs.jffs2-SOURCE_DATE_EPOCH.patch index 8e58059576..f3ba4d3276 100644 --- a/tools/mtd-utils/patches/320-mkfs.jffs2-SOURCE_DATE_EPOCH.patch +++ b/tools/mtd-utils/patches/320-mkfs.jffs2-SOURCE_DATE_EPOCH.patch @@ -9,7 +9,7 @@ int target_endian = __BYTE_ORDER; static uint32_t find_hardlink(struct filesystem_entry *e) -@@ -250,8 +250,8 @@ static struct filesystem_entry *add_host +@@ -251,8 +251,8 @@ static struct filesystem_entry *add_host mode &= ~(S_ISUID | S_ISGID); } } @@ -20,7 +20,7 @@ } entry = xcalloc(1, sizeof(struct filesystem_entry)); -@@ -1557,6 +1557,20 @@ static void parse_image(void){ +@@ -1558,6 +1558,20 @@ static void parse_image(void){ close(in_fd); } @@ -41,7 +41,7 @@ int main(int argc, char **argv) { int c, opt; -@@ -1575,6 +1589,7 @@ int main(int argc, char **argv) +@@ -1576,6 +1590,7 @@ int main(int argc, char **argv) warn_page_size = 1; /* warn user if page size not 4096 */ jffs2_compressors_init(); @@ -49,7 +49,7 @@ while ((opt = getopt_long(argc, argv, "D:d:r:s:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0) -@@ -1625,7 +1640,7 @@ int main(int argc, char **argv) +@@ -1626,7 +1641,7 @@ int main(int argc, char **argv) break; case 'f': From c1aa2d4411659d336d05a1886223d53d6bb2c330 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 24 Aug 2020 11:53:06 +0200 Subject: [PATCH 05/16] mtd-utils: Update to version 2.1.2 The release notes says this: As already said, the changes since 2.1.1 are primarily bug fixes, addressing compiler warnings and issues reported by diagnostic tools, but also build failures for some configurations. https://lists.infradead.org/pipermail/linux-mtd/2020-July/081299.html The size of the ubi-utils ipk increases on mips BE by 0.2% old: ubi-utils_2.1.1-1_mips_24kc.ipk: 70992 new: ubi-utils_2.1.2-1_mips_24kc.ipk: 71109 Signed-off-by: Hauke Mehrtens --- package/utils/mtd-utils/Makefile | 4 ++-- package/utils/mtd-utils/patches/130-lzma_jffs2.patch | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/utils/mtd-utils/Makefile b/package/utils/mtd-utils/Makefile index 8acd46747e..6e5e72783f 100644 --- a/package/utils/mtd-utils/Makefile +++ b/package/utils/mtd-utils/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mtd-utils -PKG_VERSION:=2.1.1 +PKG_VERSION:=2.1.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/mtd-utils/ -PKG_HASH:=8d15e8b70f036d6af1a66011f8ca0e048e9675fa7983d33bea92c24313a232d2 +PKG_HASH:=8ad4c5f34716d40646aa28724a2f5616d325a6f119254f914e26976f1f76e9d6 PKG_INSTALL:=1 PKG_FIXUP:=autoreconf diff --git a/package/utils/mtd-utils/patches/130-lzma_jffs2.patch b/package/utils/mtd-utils/patches/130-lzma_jffs2.patch index d9cbfeebec..9778aa6d0a 100644 --- a/package/utils/mtd-utils/patches/130-lzma_jffs2.patch +++ b/package/utils/mtd-utils/patches/130-lzma_jffs2.patch @@ -5015,7 +5015,7 @@ +} --- a/jffsX-utils/mkfs.jffs2.c +++ b/jffsX-utils/mkfs.jffs2.c -@@ -1666,11 +1666,11 @@ int main(int argc, char **argv) +@@ -1667,11 +1667,11 @@ int main(int argc, char **argv) } erase_block_size *= units; From adf830a3a5cc8dc1813457922452413894a5f948 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 21 Aug 2020 16:18:23 +0200 Subject: [PATCH 06/16] ramips: remove further mt7621 code from local ethernet driver While commit 734a8c46e703 focussed on removing stuff directly selected by the NET_RALINK_* symbols, this patch removes additional unused mt7621-specific code from the ethernet driver. As with the previous patch, the main reason is to reduce the amount of code we have to maintain and care about. Note that this patch still keeps a few lines with IS_ENABLED(CONFIG_SOC_MT7621) in mtk_eth_soc.h/.c, as this file is still selected for the mt7621 subtarget. Signed-off-by: Adrian Schmutzler --- .../drivers/net/ethernet/ralink/gsw_mt7620.h | 8 - .../drivers/net/ethernet/ralink/mt7530.c | 194 +----------------- .../drivers/net/ethernet/ralink/mt7530.h | 44 ---- .../drivers/net/ethernet/ralink/mtk_eth_soc.h | 9 - .../drivers/net/ethernet/ralink/soc_mt7620.c | 12 -- 5 files changed, 2 insertions(+), 265 deletions(-) diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.h b/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.h index 03d030446a..f10946a173 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.h +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.h @@ -17,11 +17,7 @@ #define GSW_REG_PHY_TIMEOUT (5 * HZ) -#ifdef CONFIG_SOC_MT7621 -#define MT7620A_GSW_REG_PIAC 0x0004 -#else #define MT7620A_GSW_REG_PIAC 0x7004 -#endif #define GSW_NUM_VLANS 16 #define GSW_NUM_VIDS 4096 @@ -65,11 +61,7 @@ #define PORT_IRQ_ST_CHG 0x7f -#ifdef CONFIG_SOC_MT7621 -#define ESW_PHY_POLLING 0x0000 -#else #define ESW_PHY_POLLING 0x7000 -#endif #define PMCR_IPG BIT(18) #define PMCR_MAC_MODE BIT(16) diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.c index 367b8d9ac4..be1b8a6d8e 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.c @@ -37,11 +37,7 @@ #define MT7530_CPU_PORT 6 #define MT7530_NUM_PORTS 8 -#ifdef CONFIG_SOC_MT7621 -#define MT7530_NUM_VLANS 4095 -#else #define MT7530_NUM_VLANS 16 -#endif #define MT7530_MAX_VID 4095 #define MT7530_MIN_VID 0 #define MT7530_NUM_ARL_RECORDS 2048 @@ -50,9 +46,6 @@ #define MT7530_PORT_MIB_TXB_ID 2 /* TxGOC */ #define MT7530_PORT_MIB_RXB_ID 6 /* RxGOC */ -#define MT7621_PORT_MIB_TXB_ID 18 /* TxByte */ -#define MT7621_PORT_MIB_RXB_ID 37 /* RxByte */ - /* registers */ #define REG_ESW_WT_MAC_MFC 0x10 @@ -159,50 +152,6 @@ static const struct mt7xxx_mib_desc mt7620_port_mibs[] = { MIB_DESC(1, MT7620_MIB_STATS_PORT_REPC2N, "RxEPC2") }; -static const struct mt7xxx_mib_desc mt7621_mibs[] = { - MIB_DESC(1, MT7621_STATS_TDPC, "TxDrop"), - MIB_DESC(1, MT7621_STATS_TCRC, "TxCRC"), - MIB_DESC(1, MT7621_STATS_TUPC, "TxUni"), - MIB_DESC(1, MT7621_STATS_TMPC, "TxMulti"), - MIB_DESC(1, MT7621_STATS_TBPC, "TxBroad"), - MIB_DESC(1, MT7621_STATS_TCEC, "TxCollision"), - MIB_DESC(1, MT7621_STATS_TSCEC, "TxSingleCol"), - MIB_DESC(1, MT7621_STATS_TMCEC, "TxMultiCol"), - MIB_DESC(1, MT7621_STATS_TDEC, "TxDefer"), - MIB_DESC(1, MT7621_STATS_TLCEC, "TxLateCol"), - MIB_DESC(1, MT7621_STATS_TXCEC, "TxExcCol"), - MIB_DESC(1, MT7621_STATS_TPPC, "TxPause"), - MIB_DESC(1, MT7621_STATS_TL64PC, "Tx64Byte"), - MIB_DESC(1, MT7621_STATS_TL65PC, "Tx65Byte"), - MIB_DESC(1, MT7621_STATS_TL128PC, "Tx128Byte"), - MIB_DESC(1, MT7621_STATS_TL256PC, "Tx256Byte"), - MIB_DESC(1, MT7621_STATS_TL512PC, "Tx512Byte"), - MIB_DESC(1, MT7621_STATS_TL1024PC, "Tx1024Byte"), - MIB_DESC(2, MT7621_STATS_TOC, "TxByte"), - MIB_DESC(1, MT7621_STATS_RDPC, "RxDrop"), - MIB_DESC(1, MT7621_STATS_RFPC, "RxFiltered"), - MIB_DESC(1, MT7621_STATS_RUPC, "RxUni"), - MIB_DESC(1, MT7621_STATS_RMPC, "RxMulti"), - MIB_DESC(1, MT7621_STATS_RBPC, "RxBroad"), - MIB_DESC(1, MT7621_STATS_RAEPC, "RxAlignErr"), - MIB_DESC(1, MT7621_STATS_RCEPC, "RxCRC"), - MIB_DESC(1, MT7621_STATS_RUSPC, "RxUnderSize"), - MIB_DESC(1, MT7621_STATS_RFEPC, "RxFragment"), - MIB_DESC(1, MT7621_STATS_ROSPC, "RxOverSize"), - MIB_DESC(1, MT7621_STATS_RJEPC, "RxJabber"), - MIB_DESC(1, MT7621_STATS_RPPC, "RxPause"), - MIB_DESC(1, MT7621_STATS_RL64PC, "Rx64Byte"), - MIB_DESC(1, MT7621_STATS_RL65PC, "Rx65Byte"), - MIB_DESC(1, MT7621_STATS_RL128PC, "Rx128Byte"), - MIB_DESC(1, MT7621_STATS_RL256PC, "Rx256Byte"), - MIB_DESC(1, MT7621_STATS_RL512PC, "Rx512Byte"), - MIB_DESC(1, MT7621_STATS_RL1024PC, "Rx1024Byte"), - MIB_DESC(2, MT7621_STATS_ROC, "RxByte"), - MIB_DESC(1, MT7621_STATS_RDPC_CTRL, "RxCtrlDrop"), - MIB_DESC(1, MT7621_STATS_RDPC_ING, "RxIngDrop"), - MIB_DESC(1, MT7621_STATS_RDPC_ARL, "RxARLDrop") -}; - enum { /* Global attributes. */ MT7530_ATTR_ENABLE_VLAN, @@ -510,14 +459,6 @@ mt7530_set_vid(struct switch_dev *dev, const struct switch_attr *attr, return 0; } -static int -mt7621_get_vid(struct switch_dev *dev, const struct switch_attr *attr, - struct switch_val *val) -{ - val->value.i = val->port_vlan; - return 0; -} - static int mt7530_get_vid(struct switch_dev *dev, const struct switch_attr *attr, struct switch_val *val) @@ -610,7 +551,6 @@ mt7530_write_vlan_entry(struct mt7530_priv *priv, int vlan, u16 vid, int port; u32 val; -#ifndef CONFIG_SOC_MT7621 /* vid of vlan */ val = mt7530_r32(priv, REG_ESW_VLAN_VTIM(vlan)); if (vlan % 2 == 0) { @@ -621,7 +561,6 @@ mt7530_write_vlan_entry(struct mt7530_priv *priv, int vlan, u16 vid, val |= (vid << 12); } mt7530_w32(priv, REG_ESW_VLAN_VTIM(vlan), val); -#endif /* vlan port membership */ if (ports) @@ -642,11 +581,7 @@ mt7530_write_vlan_entry(struct mt7530_priv *priv, int vlan, u16 vid, mt7530_w32(priv, REG_ESW_VLAN_VAWD2, val); /* write to vlan table */ -#ifdef CONFIG_SOC_MT7621 - mt7530_vtcr(priv, 1, vid); -#else mt7530_vtcr(priv, 1, vlan); -#endif } static int @@ -799,53 +734,6 @@ mt7530_get_port_link(struct switch_dev *dev, int port, return 0; } -static u64 get_mib_counter(struct mt7530_priv *priv, int i, int port) -{ - unsigned int port_base; - u64 lo; - - port_base = MT7621_MIB_COUNTER_BASE + - MT7621_MIB_COUNTER_PORT_OFFSET * port; - - lo = mt7530_r32(priv, port_base + mt7621_mibs[i].offset); - if (mt7621_mibs[i].size == 2) { - u64 hi; - - hi = mt7530_r32(priv, port_base + mt7621_mibs[i].offset + 4); - lo |= hi << 32; - } - - return lo; -} - -static int mt7621_sw_get_port_mib(struct switch_dev *dev, - const struct switch_attr *attr, - struct switch_val *val) -{ - static char buf[4096]; - struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); - int i, len = 0; - - if (val->port_vlan >= MT7530_NUM_PORTS) - return -EINVAL; - - len += snprintf(buf + len, sizeof(buf) - len, - "Port %d MIB counters\n", val->port_vlan); - - for (i = 0; i < ARRAY_SIZE(mt7621_mibs); ++i) { - u64 counter; - len += snprintf(buf + len, sizeof(buf) - len, - "%-11s: ", mt7621_mibs[i].name); - counter = get_mib_counter(priv, i, val->port_vlan); - len += snprintf(buf + len, sizeof(buf) - len, "%llu\n", - counter); - } - - val->value.s = buf; - val->len = len; - return 0; -} - static u64 get_mib_counter_7620(struct mt7530_priv *priv, int i) { return mt7530_r32(priv, MT7620_MIB_COUNTER_BASE + mt7620_mibs[i].offset); @@ -1019,20 +907,6 @@ static int mt7530_get_port_stats(struct switch_dev *dev, int port, return 0; } -static int mt7621_get_port_stats(struct switch_dev *dev, int port, - struct switch_port_stats *stats) -{ - struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); - - if (port < 0 || port >= MT7530_NUM_PORTS) - return -EINVAL; - - stats->tx_bytes = get_mib_counter(priv, MT7621_PORT_MIB_TXB_ID, port); - stats->rx_bytes = get_mib_counter(priv, MT7621_PORT_MIB_RXB_ID, port); - - return 0; -} - static const struct switch_attr mt7530_global[] = { { .type = SWITCH_TYPE_INT, @@ -1065,41 +939,6 @@ static const struct switch_attr mt7530_global[] = { }, }; -static const struct switch_attr mt7621_port[] = { - { - .type = SWITCH_TYPE_STRING, - .name = "mib", - .description = "Get MIB counters for port", - .get = mt7621_sw_get_port_mib, - .set = NULL, - }, { - .type = SWITCH_TYPE_INT, - .name = "enable_mirror_rx", - .description = "Enable mirroring of RX packets", - .set = mt7530_set_port_mirror_rx, - .get = mt7530_get_port_mirror_rx, - .max = 1, - }, { - .type = SWITCH_TYPE_INT, - .name = "enable_mirror_tx", - .description = "Enable mirroring of TX packets", - .set = mt7530_set_port_mirror_tx, - .get = mt7530_get_port_mirror_tx, - .max = 1, - }, -}; - -static const struct switch_attr mt7621_vlan[] = { - { - .type = SWITCH_TYPE_INT, - .name = "vid", - .description = "VLAN ID (0-4094)", - .set = mt7530_set_vid, - .get = mt7621_get_vid, - .max = 4094, - }, -}; - static const struct switch_attr mt7530_port[] = { { .type = SWITCH_TYPE_STRING, @@ -1135,29 +974,6 @@ static const struct switch_attr mt7530_vlan[] = { }, }; -static const struct switch_dev_ops mt7621_ops = { - .attr_global = { - .attr = mt7530_global, - .n_attr = ARRAY_SIZE(mt7530_global), - }, - .attr_port = { - .attr = mt7621_port, - .n_attr = ARRAY_SIZE(mt7621_port), - }, - .attr_vlan = { - .attr = mt7621_vlan, - .n_attr = ARRAY_SIZE(mt7621_vlan), - }, - .get_vlan_ports = mt7530_get_vlan_ports, - .set_vlan_ports = mt7530_set_vlan_ports, - .get_port_pvid = mt7530_get_port_pvid, - .set_port_pvid = mt7530_set_port_pvid, - .get_port_link = mt7530_get_port_link, - .get_port_stats = mt7621_get_port_stats, - .apply_config = mt7530_apply_config, - .reset_switch = mt7530_reset_switch, -}; - static const struct switch_dev_ops mt7530_ops = { .attr_global = { .attr = mt7530_global, @@ -1201,9 +1017,6 @@ mt7530_probe(struct device *dev, void __iomem *base, struct mii_bus *bus, int vl if (bus) { swdev->alias = "mt7530"; swdev->name = "mt7530"; - } else if (IS_ENABLED(CONFIG_SOC_MT7621)) { - swdev->alias = "mt7621"; - swdev->name = "mt7621"; } else { swdev->alias = "mt7620"; swdev->name = "mt7620"; @@ -1211,10 +1024,7 @@ mt7530_probe(struct device *dev, void __iomem *base, struct mii_bus *bus, int vl swdev->cpu_port = MT7530_CPU_PORT; swdev->ports = MT7530_NUM_PORTS; swdev->vlans = MT7530_NUM_VLANS; - if (IS_ENABLED(CONFIG_SOC_MT7621)) - swdev->ops = &mt7621_ops; - else - swdev->ops = &mt7530_ops; + swdev->ops = &mt7530_ops; ret = register_switch(swdev, NULL); if (ret) { @@ -1229,7 +1039,7 @@ mt7530_probe(struct device *dev, void __iomem *base, struct mii_bus *bus, int vl mt7530_apply_config(swdev); /* magic vodoo */ - if (!IS_ENABLED(CONFIG_SOC_MT7621) && bus && mt7530_r32(mt7530, REG_HWTRAP) != 0x1117edf) { + if (bus && mt7530_r32(mt7530, REG_HWTRAP) != 0x1117edf) { dev_info(dev, "fixing up MHWTRAP register - bootloader probably played with it\n"); mt7530_w32(mt7530, REG_HWTRAP, 0x1117edf); } diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.h b/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.h index cf725c2f2b..53e1d2ce55 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.h +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.h @@ -137,50 +137,6 @@ /* Rx Event Packet Counter of Port n */ #define MT7620_MIB_STATS_PORT_REPC2N 0x30 -#define MT7621_MIB_COUNTER_BASE 0x4000 -#define MT7621_MIB_COUNTER_PORT_OFFSET 0x100 -#define MT7621_STATS_TDPC 0x00 -#define MT7621_STATS_TCRC 0x04 -#define MT7621_STATS_TUPC 0x08 -#define MT7621_STATS_TMPC 0x0C -#define MT7621_STATS_TBPC 0x10 -#define MT7621_STATS_TCEC 0x14 -#define MT7621_STATS_TSCEC 0x18 -#define MT7621_STATS_TMCEC 0x1C -#define MT7621_STATS_TDEC 0x20 -#define MT7621_STATS_TLCEC 0x24 -#define MT7621_STATS_TXCEC 0x28 -#define MT7621_STATS_TPPC 0x2C -#define MT7621_STATS_TL64PC 0x30 -#define MT7621_STATS_TL65PC 0x34 -#define MT7621_STATS_TL128PC 0x38 -#define MT7621_STATS_TL256PC 0x3C -#define MT7621_STATS_TL512PC 0x40 -#define MT7621_STATS_TL1024PC 0x44 -#define MT7621_STATS_TOC 0x48 -#define MT7621_STATS_RDPC 0x60 -#define MT7621_STATS_RFPC 0x64 -#define MT7621_STATS_RUPC 0x68 -#define MT7621_STATS_RMPC 0x6C -#define MT7621_STATS_RBPC 0x70 -#define MT7621_STATS_RAEPC 0x74 -#define MT7621_STATS_RCEPC 0x78 -#define MT7621_STATS_RUSPC 0x7C -#define MT7621_STATS_RFEPC 0x80 -#define MT7621_STATS_ROSPC 0x84 -#define MT7621_STATS_RJEPC 0x88 -#define MT7621_STATS_RPPC 0x8C -#define MT7621_STATS_RL64PC 0x90 -#define MT7621_STATS_RL65PC 0x94 -#define MT7621_STATS_RL128PC 0x98 -#define MT7621_STATS_RL256PC 0x9C -#define MT7621_STATS_RL512PC 0xA0 -#define MT7621_STATS_RL1024PC 0xA4 -#define MT7621_STATS_ROC 0xA8 -#define MT7621_STATS_RDPC_CTRL 0xB0 -#define MT7621_STATS_RDPC_ING 0xB4 -#define MT7621_STATS_RDPC_ARL 0xB8 - int mt7530_probe(struct device *dev, void __iomem *base, struct mii_bus *bus, int vlan); #endif diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.h b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.h index 2f6fe1724c..00f1a0e7e6 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.h +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.h @@ -519,14 +519,5 @@ static inline void *priv_netdev(struct fe_priv *priv) return (char *)priv - ALIGN(sizeof(struct net_device), NETDEV_ALIGN); } -int mtk_ppe_probe(struct fe_priv *eth); -void mtk_ppe_remove(struct fe_priv *eth); -int mtk_flow_offload(struct fe_priv *eth, - enum flow_offload_type type, - struct flow_offload *flow, - struct flow_offload_hw_path *src, - struct flow_offload_hw_path *dest); -int mtk_offload_check_rx(struct fe_priv *eth, struct sk_buff *skb, u32 rxd4); - #endif /* FE_ETH_H */ diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7620.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7620.c index c4684d02d6..f442d558e1 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7620.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7620.c @@ -27,16 +27,11 @@ #define MT7620A_CDMA_CSG_CFG 0x400 #define MT7620_DMA_VID (MT7620A_CDMA_CSG_CFG | 0x30) -#define MT7621_CDMP_IG_CTRL (MT7620A_CDMA_CSG_CFG + 0x00) -#define MT7621_CDMP_EG_CTRL (MT7620A_CDMA_CSG_CFG + 0x04) #define MT7620A_RESET_FE BIT(21) -#define MT7621_RESET_FE BIT(6) #define MT7620A_RESET_ESW BIT(23) #define MT7620_L4_VALID BIT(23) -#define MT7621_L4_VALID BIT(24) #define MT7620_TX_DMA_UDF BIT(15) -#define MT7621_TX_DMA_UDF BIT(19) #define TX_DMA_FP_BMAP ((0xff) << 19) #define CDMA_ICS_EN BIT(2) @@ -53,11 +48,6 @@ #define MT7620_GDM1_TX_GBCNT (MT7620_REG_MIB_OFFSET + 0x300) #define MT7620_GDM2_TX_GBCNT (MT7620_GDM1_TX_GBCNT + 0x40) -#define MT7621_REG_MIB_OFFSET 0x2000 -#define MT7621_PPE_AC_BCNT0 (MT7621_REG_MIB_OFFSET + 0x00) -#define MT7621_GDM1_TX_GBCNT (MT7621_REG_MIB_OFFSET + 0x400) -#define MT7621_GDM2_TX_GBCNT (MT7621_GDM1_TX_GBCNT + 0x40) - #define GSW_REG_GDMA1_MAC_ADRL 0x508 #define GSW_REG_GDMA1_MAC_ADRH 0x50C @@ -68,8 +58,6 @@ * but after test it should be BIT(13). */ #define MT7620_FE_GDM1_AF BIT(13) -#define MT7621_FE_GDM1_AF BIT(28) -#define MT7621_FE_GDM2_AF BIT(29) static const u16 mt7620_reg_table[FE_REG_COUNT] = { [FE_REG_PDMA_GLO_CFG] = RT5350_PDMA_GLO_CFG, From e9b6dd3151232d13b7df013d70d8c3e1b0b4d3a2 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Thu, 27 Aug 2020 00:34:29 +0200 Subject: [PATCH 07/16] pistachio: Use kernel 5.4 by default Kernel 5.4 should be stable enough. Signed-off-by: Hauke Mehrtens --- target/linux/pistachio/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/linux/pistachio/Makefile b/target/linux/pistachio/Makefile index 0bf04dcc56..672cd3f629 100644 --- a/target/linux/pistachio/Makefile +++ b/target/linux/pistachio/Makefile @@ -13,8 +13,7 @@ FEATURES:=fpu usb usbgadget squashfs targz nand CPU_TYPE:=24kc CPU_SUBTYPE:=24kf -KERNEL_PATCHVER:=4.14 -KERNEL_TESTING_PATCHVER:=5.4 +KERNEL_PATCHVER:=5.4 include $(INCLUDE_DIR)/target.mk From bc19481826e0da9119945eaae4f25736306f023b Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Thu, 27 Aug 2020 12:09:58 +0200 Subject: [PATCH 08/16] hostapd: Fix compile errors after wolfssl update This fixes the following compile errors after the wolfssl 4.5.0 update: LD wpa_cli ../src/crypto/tls_wolfssl.c: In function 'tls_match_alt_subject': ../src/crypto/tls_wolfssl.c:610:11: error: 'GEN_EMAIL' undeclared (first use in this function); did you mean 'ENAVAIL'? type = GEN_EMAIL; ^~~~~~~~~ ENAVAIL ../src/crypto/tls_wolfssl.c:610:11: note: each undeclared identifier is reported only once for each function it appears in ../src/crypto/tls_wolfssl.c:613:11: error: 'GEN_DNS' undeclared (first use in this function) type = GEN_DNS; ^~~~~~~ ../src/crypto/tls_wolfssl.c:616:11: error: 'GEN_URI' undeclared (first use in this function) type = GEN_URI; ^~~~~~~ ../src/crypto/tls_wolfssl.c: In function 'wolfssl_tls_cert_event': ../src/crypto/tls_wolfssl.c:902:20: error: 'GEN_EMAIL' undeclared (first use in this function); did you mean 'ENAVAIL'? if (gen->type != GEN_EMAIL && ^~~~~~~~~ ENAVAIL ../src/crypto/tls_wolfssl.c:903:20: error: 'GEN_DNS' undeclared (first use in this function) gen->type != GEN_DNS && ^~~~~~~ ../src/crypto/tls_wolfssl.c:904:20: error: 'GEN_URI' undeclared (first use in this function) gen->type != GEN_URI) ^~~~~~~ Makefile:2029: recipe for target '../src/crypto/tls_wolfssl.o' failed Fixes: 00722a720c77 ("wolfssl: Update to version 4.5.0") Reported-by: Andre Heider Signed-off-by: Hauke Mehrtens --- .../hostapd/patches/110-wolfssl-compile-fix.patch | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 package/network/services/hostapd/patches/110-wolfssl-compile-fix.patch diff --git a/package/network/services/hostapd/patches/110-wolfssl-compile-fix.patch b/package/network/services/hostapd/patches/110-wolfssl-compile-fix.patch new file mode 100644 index 0000000000..a7b5409602 --- /dev/null +++ b/package/network/services/hostapd/patches/110-wolfssl-compile-fix.patch @@ -0,0 +1,10 @@ +--- a/src/crypto/tls_wolfssl.c ++++ b/src/crypto/tls_wolfssl.c +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + #if defined(EAP_FAST) || defined(EAP_FAST_DYNAMIC) || defined(EAP_SERVER_FAST) + #define HAVE_AESGCM From 6e936591f0737d4e5735973807aa9f088fc49927 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Thu, 27 Aug 2020 16:10:38 +0200 Subject: [PATCH 09/16] at91: explicitly set CONFIG_USB_SUPPORT for sam9x subtarget The at91 target sets FEATURES:=usb usbgadget ... in the target Makefile, which sets CONFIG_USB_SUPPORT=y in the .config file for both subtargets. However, when building with all kmods, the build fails with the following error message: ERROR: module [...]/drivers/bluetooth/btusb.ko is missing. It appears that only a part of the bluetooth files are compiled. The package depends @USB_SUPPORT. This can be easily healed by adding CONFIG_USB_SUPPORT=y to the sam9x subtarget configuration. Before the 4.14->5.4 bump, the same was also set in the target's config-4.14 file along with several other USB config options that are not reimplemented. Still, it remains a mystery to me why setting the same symbol via target kernel config creates a different result than the feature setting the same symbol in target-metadata.pl. Signed-off-by: Adrian Schmutzler --- target/linux/at91/sam9x/config-default | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/at91/sam9x/config-default b/target/linux/at91/sam9x/config-default index 43e2a02dd9..a05831fe17 100644 --- a/target/linux/at91/sam9x/config-default +++ b/target/linux/at91/sam9x/config-default @@ -181,6 +181,7 @@ CONFIG_TIMER_PROBE=y CONFIG_TINY_SRCU=y CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" CONFIG_UNWINDER_ARM=y +CONFIG_USB_SUPPORT=y CONFIG_USE_OF=y # CONFIG_VFP is not set CONFIG_ZBOOT_ROM_BSS=0x0 From ff5dd32164bb430b7a5966a36291f5a8636e7af8 Mon Sep 17 00:00:00 2001 From: Andrew Freeman Date: Tue, 16 Jun 2020 09:20:25 +0500 Subject: [PATCH 10/16] ramips: add support for TP-Link TL-WR850N v2 This patch adds support for the TP-Link TL-WR850N v2. This device is very similar to TP-Link TL-WR840 v4 and TP-Link TL-WR841 v13. Specifications: SOC: MediaTek MT7628NN Flash: 8 MiB SPI RAM: 64 MiB WLAN: MediaTek MT7628NN Ethernet: 5 ports (100M) Installation Using the integrated tftp capability of the router: 1. Turn off the router. 2. Connect pc to one of the router LAN ports. 3. Set your PC IPv4 address to 192.168.0.66/24. 4. Run any TFTP server on the PC. 5. Put the recovery firmware on the root directory of TFTP server and name the file tp_recovery.bin 6. Start the router by pressing power button while holding the WPS/Reset button (or both WPS/Reset and WIFI buttons) 7. Router connects to your PC with IPv4 address 192.168.0.2, downloads the firmware, installs it and reboots. LEDs are flashing. Now you have OpenWrt installed. 8. Change your IPv4 PC address to something in 192.168.1.0/24 network or use DHCP to get an address from your OpenWrt router. 9. Done! You can login to your router via ssh. Forum link: https://forum.openwrt.org/t/add-support-for-tp-link-tl-wr850n-v2/66899 Signed-off-by: Andrew Freeman [squash an tidy up commits, sort nodes] Signed-off-by: Darsh Patel [minor commit message adjustments] Signed-off-by: Adrian Schmutzler --- .../dts/mt7628an_tplink_tl-wr850n-v2.dts | 67 +++++++++++++++++++ target/linux/ramips/image/mt76x8.mk | 13 ++++ .../mt76x8/base-files/etc/board.d/01_leds | 3 +- .../mt76x8/base-files/etc/board.d/02_network | 4 +- 4 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 target/linux/ramips/dts/mt7628an_tplink_tl-wr850n-v2.dts diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr850n-v2.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr850n-v2.dts new file mode 100644 index 0000000000..192b0aaaf0 --- /dev/null +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr850n-v2.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7628an_tplink_8m.dtsi" + +/ { + compatible = "tplink,tl-wr850n-v2", "mediatek,mt7628an-soc"; + model = "TP-Link TL-WR850N v2"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 38 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "tl-wr850n-v2:green:power"; + gpios = <&gpio 36 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "tl-wr850n-v2:green:wps"; + gpios = <&gpio 37 GPIO_ACTIVE_LOW>; + }; + + lan { + label = "tl-wr850n-v2:green:lan"; + gpios = <&gpio 41 GPIO_ACTIVE_LOW>; + }; + + wan { + label = "tl-wr850n-v2:green:wan"; + gpios = <&gpio 43 GPIO_ACTIVE_LOW>; + }; + + wlan { + label = "tl-wr850n-v2:green:wlan"; + gpios = <&gpio 44 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + }; +}; + +&state_default { + gpio { + groups = "p0led_an", "p2led_an", "perst", "refclk", "wdt", "wled_an"; + function = "gpio"; + }; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index 908e2df529..4e30100c63 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -553,6 +553,19 @@ define Device/tplink_tl-wr842n-v5 endef TARGET_DEVICES += tplink_tl-wr842n-v5 +define Device/tplink_tl-wr850n-v2 + $(Device/tplink-v2) + IMAGE_SIZE := 7808k + DEVICE_MODEL := TL-WR850N + DEVICE_VARIANT := v2 + TPLINK_FLASHLAYOUT := 8Mmtk + TPLINK_HWID := 0x08500002 + TPLINK_HWREVADD := 0x2 + IMAGES := sysupgrade.bin tftp-recovery.bin + IMAGE/tftp-recovery.bin := pad-extra 128k | $$(IMAGE/factory.bin) +endef +TARGET_DEVICES += tplink_tl-wr850n-v2 + define Device/tplink_tl-wr902ac-v3 $(Device/tplink-v2) IMAGE_SIZE := 7808k diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds index 94c5cb5d49..52be48e1ef 100755 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds @@ -94,7 +94,8 @@ tplink,tl-wr841n-v13) ucidef_set_led_switch "lan4" "lan4" "$boardname:green:lan4" "switch0" "0x10" ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01" ;; -tplink,tl-wr841n-v14) +tplink,tl-wr841n-v14|\ +tplink,tl-wr850n-v2) ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e" ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01" ;; diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network index 5a5ba587d5..f1687c7108 100755 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network @@ -73,6 +73,7 @@ ramips_setup_interfaces() tplink,tl-wr841n-v13|\ tplink,tl-wr841n-v14|\ tplink,tl-wr842n-v5|\ + tplink,tl-wr850n-v2|\ unielec,u7628-01-16m|\ wrtnode,wrtnode2p|\ wrtnode,wrtnode2r|\ @@ -203,7 +204,8 @@ ramips_setup_macs() tplink,tl-wr840n-v5|\ tplink,tl-wr841n-v13|\ tplink,tl-wr841n-v14|\ - tplink,tl-wr842n-v5) + tplink,tl-wr842n-v5|\ + tplink,tl-wr850n-v2) wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0xf100)" 1) ;; tplink,archer-c20-v5|\ From 395c848d16c3b15ae08f59d8e4d2daed49c2d6bb Mon Sep 17 00:00:00 2001 From: Hannu Nyman Date: Mon, 24 Aug 2020 19:44:47 +0300 Subject: [PATCH 11/16] tools/mpc: update to 1.2.0 Update mpc to version 1.2.0. Signed-off-by: Hannu Nyman --- tools/mpc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/mpc/Makefile b/tools/mpc/Makefile index 70dca2637d..27e9a01c4b 100644 --- a/tools/mpc/Makefile +++ b/tools/mpc/Makefile @@ -7,11 +7,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mpc -PKG_VERSION:=1.1.0 +PKG_VERSION:=1.2.0 PKG_SOURCE_URL:=@GNU/mpc/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e +PKG_HASH:=e90f2d99553a9c19911abdb4305bf8217106a957e3994436428572c8dfe8fda6 HOST_BUILD_PARALLEL:=1 From a5d030a54f671e52e4dd20460b350482a568ddb3 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Wed, 26 Aug 2020 22:08:38 -1000 Subject: [PATCH 12/16] curl: move package to packages.git curl is replaced by uclient-fetch within the OpenWrt build system and we can therefore move curl to packages.git. This is based on the Hamburg 2019 decision that non essential packages should move outside base. Signed-off-by: Paul Spooren --- package/network/utils/curl/Config.in | 160 --------------- package/network/utils/curl/Makefile | 189 ------------------ ...ure-fix-pkg-config-detecting-wolfssl.patch | 31 --- .../curl/patches/200-no_docs_tests.patch | 22 -- 4 files changed, 402 deletions(-) delete mode 100644 package/network/utils/curl/Config.in delete mode 100644 package/network/utils/curl/Makefile delete mode 100644 package/network/utils/curl/patches/100-configure-fix-pkg-config-detecting-wolfssl.patch delete mode 100644 package/network/utils/curl/patches/200-no_docs_tests.patch diff --git a/package/network/utils/curl/Config.in b/package/network/utils/curl/Config.in deleted file mode 100644 index 05effa0e7b..0000000000 --- a/package/network/utils/curl/Config.in +++ /dev/null @@ -1,160 +0,0 @@ -if PACKAGE_libcurl - -comment "SSL support" - -choice - prompt "Selected SSL library" - default LIBCURL_WOLFSSL - - config LIBCURL_MBEDTLS - bool "mbed TLS" - - config LIBCURL_WOLFSSL - bool "wolfSSL" - - config LIBCURL_OPENSSL - bool "OpenSSL" - - config LIBCURL_GNUTLS - bool "GNUTLS" - - config LIBCURL_NOSSL - bool "No SSL support" - -endchoice - -comment "Supported protocols" - -config LIBCURL_DICT - bool "DICT protocol" - default n - -config LIBCURL_FILE - bool "FILE protocol" - default y - -config LIBCURL_FTP - bool "FTP / FTPS protocol" - default y - -config LIBCURL_GOPHER - bool "Gopher protocol" - default n - -config LIBCURL_HTTP - bool "HTTP / HTTPS protocol" - default y - -config LIBCURL_COOKIES - bool "Enable Cookies support" - depends on LIBCURL_HTTP - default y - -config LIBCURL_IMAP - bool "IMAP / IMAPS protocol" - default n - -config LIBCURL_LDAP - bool "LDAP protocol" - default n - -config LIBCURL_LDAPS - bool "Enable LDAPS support" - depends on LIBCURL_LDAP && !LIBCURL_NOSSL - default y - -config LIBCURL_POP3 - bool "POP3 / POP3S protocol" - default n - -config LIBCURL_RTSP - bool "RTSP protocol" - depends on LIBCURL_HTTP - default n -config LIBCURL_NO_RTSP - string "RTSP require HTTP protocol" - depends on !LIBCURL_HTTP - default "!" - -config LIBCURL_SSH2 - bool "SCP / SFTP protocol" - default n - -config LIBCURL_SMB - bool "SMB protocol (CIFS)" - depends on LIBCURL_CRYPTO_AUTH && (LIBCURL_GNUTLS || LIBCURL_OPENSSL) - default n -config LIBCURL_NO_SMB - string "SMB require 'cryptographic authentication' and either 'GnuTLS' or 'OpenSSL'" - depends on !LIBCURL_CRYPTO_AUTH || (!LIBCURL_GNUTLS && !LIBCURL_OPENSSL) - default "!" - -config LIBCURL_SMTP - bool "SMTP / SMTPS protocol" - default n - -config LIBCURL_TELNET - bool "TELNET protocol" - default n - -config LIBCURL_TFTP - bool "TFTP protocol" - default n - -config LIBCURL_NGHTTP2 - bool "HTTP2 protocol" - default n - -comment "Miscellaneous" - -config LIBCURL_PROXY - bool "Enable proxy support" - default y - -config LIBCURL_CRYPTO_AUTH - bool "Enable cryptographic authentication" - default n - -config LIBCURL_TLS_SRP - bool "Enable TLS-SRP authentication" - default n - -config LIBCURL_LIBIDN2 - bool "Enable IDN2 support" - default n - -config LIBCURL_THREADED_RESOLVER - bool "Enable threaded DNS resolver" - default n - help - Enable POSIX threaded asynchronous DNS resolution - -config LIBCURL_ZLIB - bool "Enable zlib support" - default n - -config LIBCURL_UNIX_SOCKETS - bool "Enable unix domain socket support" - default n - help - Enable HTTP over unix domain sockets. - To use this with the curl command line, you specify the socket path to the new --unix-domain option. - This feature is actually not limited to HTTP, you can do all the TCP-based protocols - except FTP over the unix domain socket, but it is only HTTP that is regularly used this way. - The reason FTP isn't supported is of course its use of two connections - which would be even weirder to do like this. - -config LIBCURL_LIBCURL_OPTION - bool "Enable generation of C code" - default n - -config LIBCURL_VERBOSE - bool "Enable verbose error strings" - default n - -config LIBCURL_NTLM - bool "Enable NTLM support" - depends on LIBCURL_CRYPTO_AUTH && !LIBCURL_NOSSL - default n - -endif diff --git a/package/network/utils/curl/Makefile b/package/network/utils/curl/Makefile deleted file mode 100644 index c70bfdff20..0000000000 --- a/package/network/utils/curl/Makefile +++ /dev/null @@ -1,189 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=curl -PKG_VERSION:=7.72.0 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=https://dl.uxnr.de/mirror/curl/ \ - https://curl.mirror.anstey.ca/ \ - https://curl.askapache.com/download/ \ - https://curl.haxx.se/download/ -PKG_HASH:=0ded0808c4d85f2ee0db86980ae610cc9d165e9ca9da466196cc73c346513713 - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:haxx:libcurl - -PKG_FIXUP:=autoreconf -PKG_BUILD_PARALLEL:=1 - -PKG_CONFIG_DEPENDS:= \ - CONFIG_IPV6 \ - \ - CONFIG_LIBCURL_WOLFSSL \ - CONFIG_LIBCURL_GNUTLS \ - CONFIG_LIBCURL_OPENSSL \ - CONFIG_LIBCURL_MBEDTLS \ - CONFIG_LIBCURL_NOSSL \ - \ - CONFIG_LIBCURL_LIBIDN2 \ - CONFIG_LIBCURL_SSH2 \ - CONFIG_LIBCURL_ZLIB \ - \ - CONFIG_LIBCURL_DICT \ - CONFIG_LIBCURL_FILE \ - CONFIG_LIBCURL_FTP \ - CONFIG_LIBCURL_GOPHER \ - CONFIG_LIBCURL_HTTP \ - CONFIG_LIBCURL_IMAP \ - CONFIG_LIBCURL_LDAP \ - CONFIG_LIBCURL_LDAPS \ - CONFIG_LIBCURL_POP3 \ - CONFIG_LIBCURL_RTSP \ - CONFIG_LIBCURL_NO_RTSP \ - CONFIG_LIBCURL_SMB \ - CONFIG_LIBCURL_NO_SMB \ - CONFIG_LIBCURL_SMTP \ - CONFIG_LIBCURL_TELNET \ - CONFIG_LIBCURL_TFTP \ - CONFIG_LIBCURL_NGHTTP2 \ - \ - CONFIG_LIBCURL_COOKIES \ - CONFIG_LIBCURL_CRYPTO_AUTH \ - CONFIG_LIBCURL_LIBCURL_OPTION \ - CONFIG_LIBCURL_PROXY \ - CONFIG_LIBCURL_THREADED_RESOLVER \ - CONFIG_LIBCURL_TLS_SRP \ - CONFIG_LIBCURL_UNIX_SOCKETS \ - CONFIG_LIBCURL_VERBOSE \ - CONFIG_LIBCURL_NTLM \ - $(if $(CONFIG_LIBCURL_OPENSSL), \ - CONFIG_OPENSSL_ENGINE \ - CONFIG_OPENSSL_WITH_COMPRESSION \ - CONFIG_OPENSSL_WITH_NPN) - -include $(INCLUDE_DIR)/package.mk - -define Package/curl/Default - SECTION:=net - CATEGORY:=Network - URL:=http://curl.haxx.se/ - MAINTAINER:=Imre Kaloz -endef - -define Package/curl - $(call Package/curl/Default) - SUBMENU:=File Transfer - DEPENDS:=+libcurl - TITLE:=A client-side URL transfer utility -endef - -define Package/libcurl - $(call Package/curl/Default) - SECTION:=libs - CATEGORY:=Libraries - DEPENDS:= +LIBCURL_WOLFSSL:libwolfssl +LIBCURL_OPENSSL:libopenssl +LIBCURL_GNUTLS:libgnutls +LIBCURL_MBEDTLS:libmbedtls - DEPENDS += +LIBCURL_ZLIB:zlib +LIBCURL_THREADED_RESOLVER:libpthread +LIBCURL_LDAP:libopenldap +LIBCURL_LIBIDN2:libidn2 - DEPENDS += +LIBCURL_SSH2:libssh2 +LIBCURL_NGHTTP2:libnghttp2 +ca-bundle - TITLE:=A client-side URL transfer library - MENU:=1 - ABI_VERSION:=4 -endef - -define Package/libcurl/config - source "$(SOURCE)/Config.in" -endef - -TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -TARGET_CPPFLAGS += $(if $(CONFIG_LIBCURL_NTLM),,-DCURL_DISABLE_NTLM) -TARGET_LDFLAGS += -Wl,--gc-sections - -CONFIGURE_ARGS += \ - --disable-debug \ - --disable-ares \ - --enable-shared \ - --enable-static \ - --disable-manual \ - --without-nss \ - --without-libmetalink \ - --without-librtmp \ - --without-libidn \ - --without-ca-path \ - --without-libpsl \ - --without-zstd \ - --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt \ - \ - $(call autoconf_bool,CONFIG_IPV6,ipv6) \ - \ - $(if $(CONFIG_LIBCURL_WOLFSSL),--with-wolfssl="$(STAGING_DIR)/usr",--without-wolfssl) \ - $(if $(CONFIG_LIBCURL_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr",--without-gnutls) \ - $(if $(CONFIG_LIBCURL_OPENSSL),--with-ssl="$(STAGING_DIR)/usr",--without-ssl) \ - $(if $(CONFIG_LIBCURL_MBEDTLS),--with-mbedtls="$(STAGING_DIR)/usr",--without-mbedtls) \ - \ - $(if $(CONFIG_LIBCURL_LIBIDN2),--with-libidn2="$(STAGING_DIR)/usr",--without-libidn2) \ - $(if $(CONFIG_LIBCURL_SSH2),--with-libssh2="$(STAGING_DIR)/usr",--without-libssh2) \ - $(if $(CONFIG_LIBCURL_ZLIB),--with-zlib="$(STAGING_DIR)/usr",--without-zlib) \ - $(if $(CONFIG_LIBCURL_NGHTTP2),--with-nghttp2="$(STAGING_DIR)/usr",--without-nghttp2) \ - \ - $(call autoconf_bool,CONFIG_LIBCURL_DICT,dict) \ - $(call autoconf_bool,CONFIG_LIBCURL_FILE,file) \ - $(call autoconf_bool,CONFIG_LIBCURL_FTP,ftp) \ - $(call autoconf_bool,CONFIG_LIBCURL_GOPHER,gopher) \ - $(call autoconf_bool,CONFIG_LIBCURL_HTTP,http) \ - $(call autoconf_bool,CONFIG_LIBCURL_IMAP,imap) \ - $(call autoconf_bool,CONFIG_LIBCURL_LDAP,ldap) \ - $(call autoconf_bool,CONFIG_LIBCURL_LDAPS,ldaps) \ - $(call autoconf_bool,CONFIG_LIBCURL_POP3,pop3) \ - $(call autoconf_bool,CONFIG_LIBCURL_RTSP,rtsp) \ - $(call autoconf_bool,CONFIG_LIBCURL_SMB,smb) \ - $(call autoconf_bool,CONFIG_LIBCURL_SMTP,smtp) \ - $(call autoconf_bool,CONFIG_LIBCURL_TELNET,telnet) \ - $(call autoconf_bool,CONFIG_LIBCURL_TFTP,tftp) \ - \ - $(call autoconf_bool,CONFIG_LIBCURL_COOKIES,cookies) \ - $(call autoconf_bool,CONFIG_LIBCURL_CRYPTO_AUTH,crypto-auth) \ - $(call autoconf_bool,CONFIG_LIBCURL_LIBCURL_OPTION,libcurl-option) \ - $(call autoconf_bool,CONFIG_LIBCURL_PROXY,proxy) \ - $(call autoconf_bool,CONFIG_LIBCURL_THREADED_RESOLVER,threaded-resolver) \ - $(call autoconf_bool,CONFIG_LIBCURL_TLS_SRP,tls-srp) \ - $(call autoconf_bool,CONFIG_LIBCURL_UNIX_SOCKETS,unix-sockets) \ - $(call autoconf_bool,CONFIG_LIBCURL_VERBOSE,verbose) \ - -define Build/Compile - +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - CC="$(TARGET_CC)" \ - install -endef - -define Build/InstallDev - $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl-config $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/curl $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.{a,so*} $(1)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/libcurl.pc $(1)/usr/lib/pkgconfig/ - $(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/curl-config - [ -n "$(TARGET_LDFLAGS)" ] && $(SED) 's#$(TARGET_LDFLAGS)##g' $(1)/usr/lib/pkgconfig/libcurl.pc || true - $(LN) $(STAGING_DIR)/usr/bin/curl-config $(2)/bin/ -endef - -define Package/curl/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl $(1)/usr/bin/ -endef - -define Package/libcurl/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,curl)) -$(eval $(call BuildPackage,libcurl)) diff --git a/package/network/utils/curl/patches/100-configure-fix-pkg-config-detecting-wolfssl.patch b/package/network/utils/curl/patches/100-configure-fix-pkg-config-detecting-wolfssl.patch deleted file mode 100644 index a77e5c69df..0000000000 --- a/package/network/utils/curl/patches/100-configure-fix-pkg-config-detecting-wolfssl.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 510d98157f21dee5793c4e975fde3317b6139267 Mon Sep 17 00:00:00 2001 -From: Daniel Stenberg -Date: Mon, 24 Aug 2020 16:28:34 +0200 -Subject: [PATCH] configure: fix pkg-config detecting wolfssl - -When amending the include path with "/wolfssl", this now properly strips -off all whitespace from the path variable! Previously this would lead to -pkg-config builds creating bad command lines. - -Closes #5848 ---- - configure.ac | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - ---- a/configure.ac -+++ b/configure.ac -@@ -2474,8 +2474,12 @@ if test -z "$ssl_backends" -o "x$OPT_WOL - AC_DEFINE(HAVE_WOLFSSL_DES_ECB_ENCRYPT, 1, - [if you have wolfSSL_DES_ecb_encrypt]) - if test -n "$addcflags"; then -- CPPFLAGS="$addcflags/wolfssl $CPPFLAGS" -- AC_MSG_NOTICE([Add $addcflags/wolfssl to CPPFLAGS]) -+ dnl use a for loop to strip off whitespace -+ for f in $addcflags; do -+ CPPFLAGS="$f/wolfssl $CPPFLAGS" -+ AC_MSG_NOTICE([Add $f/wolfssl to CPPFLAGS]) -+ break -+ done - else - dnl user didn't give a path, so guess/hope they installed wolfssl - dnl headers to system default location diff --git a/package/network/utils/curl/patches/200-no_docs_tests.patch b/package/network/utils/curl/patches/200-no_docs_tests.patch deleted file mode 100644 index b5f92b58c8..0000000000 --- a/package/network/utils/curl/patches/200-no_docs_tests.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/Makefile.am -+++ b/Makefile.am -@@ -192,7 +192,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) - bin_SCRIPTS = curl-config - - SUBDIRS = lib src --DIST_SUBDIRS = $(SUBDIRS) tests packages scripts include docs -+DIST_SUBDIRS = $(SUBDIRS) packages include - - pkgconfigdir = $(libdir)/pkgconfig - pkgconfig_DATA = libcurl.pc -@@ -303,8 +303,8 @@ cygwinbin: - # We extend the standard install with a custom hook: - install-data-hook: - (cd include && $(MAKE) install) -- (cd docs && $(MAKE) install) -- (cd docs/libcurl && $(MAKE) install) -+ #(cd docs && $(MAKE) install) -+ #(cd docs/libcurl && $(MAKE) install) - - # We extend the standard uninstall with a custom hook: - uninstall-hook: From 51b653de94e7e5006b5480df33d5dfd9de824cc7 Mon Sep 17 00:00:00 2001 From: Georgi Vlaev Date: Tue, 25 Aug 2020 11:26:21 +0300 Subject: [PATCH 13/16] ramips: add support for Wavlink WL-WN531A6 This patch adds support for Wavlink WL-WN531A6 (Quantum D6). Specifications: -------------- * SoC: Mediatek MT7621AT 2C2T, 880MHz * RAM: 128MB DDR3, Nanya NT5CB64M16GP-EK * Flash: 16MB SPI NOR flash, GigaDevice GD25Q127CSIG * WiFi 5GHz: Mediatek MT7615N (4x4:4) on mini PCIE slot. * WiFi 2.4GHz: Mediatek MT7603EN (2x2:2) on mini PCIE slot. * Ethernet: MT7630, 5x 1000Base-T * LED: Power, WAN, LAN(x4), WiFi, WPS, dual color "WAVLINK" LED logo on the top cover. * Buttons: Reset, WPS, "Turbo", touch button on the top cover via RH6015C touch sensor. * UART: UART1: serial console (57600 8n1) on the J4 header located below the top heatsink. UART2: J12 header, located on the right side of the board. * USB: One USB3 port. * I2C: J9 header, located below the top heatsink. Backup the OEM Firmware: ----------------------- There isn't any firmware released for the WL-WN531A6 on the Wavlink web site. Reverting back to the OEM firmware is not possible unless we have a backup of the original OEM firmware. The OEM firmware is stored on /dev/mtd4 ("Kernel"). 1) Plug a FAT32 formatted USB flash drive into the USB port. 2) Navigate to "Setup->USB Storage". Under the "Available Network folder" you can see part of the mount point of the newly mounted flash drive filesystem - e.g "sda1". The full mount point is prefixed with "/media", so in this case the mount point becomes "/media/sda1". 3) Go to http://192.168.10.1/webcmd.shtml . 4) Type the following line in the "Command" input box: dd if=/dev/mtd4ro of=/media/sda1/firmware.bin 5) Click "Apply" 6) After few seconds, in the text area should appear this output: 30080+0 records in 30080+0 records out 7) Type "sync" in the "Command" input box and click "Apply". 8) At this point the OEM firmware is stored on the flash drive as "firmware.bin". The size of the file is 15040 KB. Installation: ------------ * Flashing instructions (OEM web interface): The OEM web interface accepts only files with names containing "WN531A6". It's also impossible to flash the *-sysupgrade.bin image, so we have to flash the *-initramfs-kernel.bin first and use the OpenWrt's upgrade interface to write the sysupgrade image. 1) Rename openwrt-ramips-mt7621-wavlink_wl-wn531a6-initramfs-kernel.bin to WN531A6.bin. 2) Connect your computer to the one of the LAN ports of the router with an Ethernet cable and open http://192.168.10.1 3) Browse to Setup -> Firmware Upgrade interface. 4) Upload the (renamed) OpenWrt image - WN531A6.bin. 5) Proceed with the firmware installation and give the device a few minutes to finish and reboot. 6) After reboot wait for the "WAVLINK" logo on the top cover to turn solid blue, and open http://192.168.1.1 7) Use the OpenWrt's "Flash Firmware" interface to write the OpenWrt sysupgrade image: openwrt-ramips-mt7621-wavlink_wl-wn531a6-squashfs-sysupgrade.bin * Flashing instructions (u-boot TFTP): 1) Configure a TFTP server on your computer and set its IP to 192.168.10.100 2) Rename the OpenWrt sysupgrade image to firmware.bin and place it in the root folder of the TFTP server. 3) Power off the device and connect an Ethernet cable from one of its LAN ports your computer. 4) Press the "Reset" button (and keep it pressed) 5) Power on the device. 6) After a few seconds, when the connected port LAN LED stops blinking fast, release the "Reset" button. 7) Flashing OpenWrt takes less than a minute, system will reboot automatically. 8) After reboot the WAVLINK logo on the top cover will indicate the current OpenWrt running status (wait until the logo tunrs solid blue). Revert to the OEM Firmware: -------------------------- * U-boot TFTP: Follow "Flashing instructions (u-boot TFTP)" and use the "firmware.bin" backup image. * OpenWrt "Flash Firmware" interface: Upload the "firmware.bin" backup image and select "Force update" before continuing. Notes: ----- * The MAC address shown on the label at the back of the device is assigned to the 2.4G WiFi adapter. MAC addresses assigned by the OEM firmware: 2.4G: *:XX (label): factory@0x0004 5G: *:XX + 1 : factory@0x8004 WAN: *:XX - 1 : factory@0xe006 LAN: *:XX - 2 : factory@0xe000 * The I2C bus and UART2 are fully functional. The headers are not populated. Signed-off-by: Georgi Vlaev --- .../ramips/dts/mt7621_wavlink_wl-wn531a6.dts | 184 ++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 9 + .../mt7621/base-files/etc/board.d/02_network | 1 + 3 files changed, 194 insertions(+) create mode 100644 target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts diff --git a/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts b/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts new file mode 100644 index 0000000000..0f017fd829 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts @@ -0,0 +1,184 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "wavlink,wl-wn531a6", "mediatek,mt7621-soc"; + model = "Wavlink WL-WN531A6"; + + aliases { + led-boot = &led_status_red; + led-failsafe = &led_status_red; + led-running = &led_status_blue; + led-upgrade = &led_status_red; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "Reset Button"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + touch { /* RH6015C touch sensor -> GPIO 14 */ + label = "Touch Button"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + turbo { + label = "Turbo Button"; + gpios = <&gpio 25 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "WPS Button"; + gpios = <&gpio 24 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_status_blue: status_blue { + label = "wl-wn531a6:blue:power"; + gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; + }; + + led_status_red: status_red { + label = "wl-wn531a6:red:power"; + gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; + }; + + wifi2g { + label = "wl-wn531a6:blue:wifi2g"; + gpios = <&gpio 23 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + }; +}; + +&i2c { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <40000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "config"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xeb0000>; + }; + + partition@f00000 { + label = "vendor"; + reg = <0xf00000 0x100000>; + read-only; + }; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + mt76@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0>; + ieee80211-freq-limit = <2400000 2500000>; + }; +}; + +&pcie1 { + mt76@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&gmac0 { + mtd-mac-address = <&factory 0xe000>; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan1"; + }; + + port@1 { + status = "okay"; + label = "lan2"; + }; + + port@2 { + status = "okay"; + label = "lan3"; + }; + + port@3 { + status = "okay"; + label = "lan4"; + }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; + }; +}; + +&state_default { + gpio { + groups = "rgmii2", "jtag", "wdt"; + function = "gpio"; + }; +}; + +&uartlite2 { + status = "okay"; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 896a27324b..d2d41be269 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -1093,6 +1093,15 @@ define Device/unielec_u7621-06-64m endef TARGET_DEVICES += unielec_u7621-06-64m +define Device/wavlink_wl-wn531a6 + $(Device/dsa-migration) + DEVICE_VENDOR := Wavlink + DEVICE_MODEL := WL-WN531A6 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware kmod-usb3 + IMAGE_SIZE := 15040k +endef +TARGET_DEVICES += wavlink_wl-wn531a6 + define Device/wevo_11acnas $(Device/dsa-migration) IMAGE_SIZE := 16064k diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index cf3df76c08..1c1d0e4ab7 100755 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -118,6 +118,7 @@ ramips_setup_macs() wan_mac=$label_mac lan_mac=$(macaddr_add $label_mac 1) ;; + wavlink,wl-wn531a6|\ winstars,ws-wn583a6|\ zbtlink,zbt-we1326|\ zbtlink,zbt-wg3526-16m|\ From 09faa73c53bd097666cbbe68176dd46cfcf80ee8 Mon Sep 17 00:00:00 2001 From: Perry Melange Date: Wed, 26 Aug 2020 13:46:23 +0200 Subject: [PATCH 14/16] ramips: rt3883: use lzma-loader for DIR-645 The DIR-645 fails to boot if the kernel is large. Enabling lzma-loader resolves the issue. Run-tested on D-Link DIR-645. Signed-off-by: Perry Melange --- target/linux/ramips/image/rt3883.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ramips/image/rt3883.mk b/target/linux/ramips/image/rt3883.mk index 8f4c22097b..f434172c50 100644 --- a/target/linux/ramips/image/rt3883.mk +++ b/target/linux/ramips/image/rt3883.mk @@ -33,6 +33,7 @@ TARGET_DEVICES += belkin_f9k1109v1 define Device/dlink_dir-645 $(Device/seama) + $(Device/uimage-lzma-loader) SOC := rt3662 BLOCKSIZE := 4k IMAGE_SIZE := 7872k From 59c200ca0adec1759f09b129424361cca1643f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez=20Cabanelas?= Date: Fri, 28 Aug 2020 11:20:36 +0200 Subject: [PATCH 15/16] mvebu: backport linkstation-poweroff upstream driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport the Linkstation poweroff driver from the kernel upstream (commit a7f79f99541ef) This driver is required by the Buffalo LinkStation LS421DE for a correct power off operation. It also allows to use the WoL feature. Signed-off-by: Daniel González Cabanelas --- target/linux/mvebu/modules.mk | 21 +++ .../030-linkstation-poweroff.patch | 177 ++++++++++++++++++ 2 files changed, 198 insertions(+) create mode 100644 target/linux/mvebu/modules.mk create mode 100644 target/linux/mvebu/patches-5.4/030-linkstation-poweroff.patch diff --git a/target/linux/mvebu/modules.mk b/target/linux/mvebu/modules.mk new file mode 100644 index 0000000000..3a5e316788 --- /dev/null +++ b/target/linux/mvebu/modules.mk @@ -0,0 +1,21 @@ +define KernelPackage/linkstation-poweroff + SUBMENU:=$(OTHER_MENU) + DEPENDS:=@TARGET_mvebu + TITLE:=Buffalo LinkStation power off driver + KCONFIG:= \ + CONFIG_POWER_RESET=y \ + CONFIG_POWER_RESET_LINKSTATION \ + CONFIG_POWER_RESET_QNAP=n + + FILES:=$(LINUX_DIR)/drivers/power/reset/linkstation-poweroff.ko + AUTOLOAD:=$(call AutoLoad,31,linkstation-poweroff,1) +endef + +define KernelPackage/linkstation-poweroff/description + This driver supports turning off some Buffalo LinkStations by + setting an output pin at the ethernet PHY to the correct state. + It also makes the device compatible with the WoL function. + Say Y here if you have a Buffalo LinkStation LS421D/E. +endef + +$(eval $(call KernelPackage,linkstation-poweroff)) diff --git a/target/linux/mvebu/patches-5.4/030-linkstation-poweroff.patch b/target/linux/mvebu/patches-5.4/030-linkstation-poweroff.patch new file mode 100644 index 0000000000..e4dee5c09e --- /dev/null +++ b/target/linux/mvebu/patches-5.4/030-linkstation-poweroff.patch @@ -0,0 +1,177 @@ +--- a/drivers/power/reset/Kconfig ++++ b/drivers/power/reset/Kconfig +@@ -99,6 +99,17 @@ + help + Reboot support for Hisilicon boards. + ++config POWER_RESET_LINKSTATION ++ tristate "Buffalo LinkStation power-off driver" ++ depends on ARCH_MVEBU || COMPILE_TEST ++ depends on OF_MDIO && PHYLIB ++ help ++ This driver supports turning off some Buffalo LinkStations by ++ setting an output pin at the ethernet PHY to the correct state. ++ It also makes the device compatible with the WoL function. ++ ++ Say Y here if you have a Buffalo LinkStation LS421D/E. ++ + config POWER_RESET_MSM + bool "Qualcomm MSM power-off driver" + depends on ARCH_QCOM +--- a/drivers/power/reset/Makefile ++++ b/drivers/power/reset/Makefile +@@ -10,6 +10,7 @@ + obj-$(CONFIG_POWER_RESET_GPIO) += gpio-poweroff.o + obj-$(CONFIG_POWER_RESET_GPIO_RESTART) += gpio-restart.o + obj-$(CONFIG_POWER_RESET_HISI) += hisi-reboot.o ++obj-${CONFIG_POWER_RESET_LINKSTATION} += linkstation-poweroff.o + obj-$(CONFIG_POWER_RESET_MSM) += msm-poweroff.o + obj-$(CONFIG_POWER_RESET_QCOM_PON) += qcom-pon.o + obj-$(CONFIG_POWER_RESET_OCELOT_RESET) += ocelot-reset.o +--- a/dev/null ++++ b/drivers/power/reset/linkstation-poweroff.c +@@ -0,0 +1,144 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * LinkStation power off restart driver ++ * Copyright (C) 2020 Daniel González Cabanelas ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* Defines from the eth phy Marvell driver */ ++#define MII_MARVELL_COPPER_PAGE 0 ++#define MII_MARVELL_LED_PAGE 3 ++#define MII_MARVELL_WOL_PAGE 17 ++#define MII_MARVELL_PHY_PAGE 22 ++ ++#define MII_PHY_LED_CTRL 16 ++#define MII_88E1318S_PHY_LED_TCR 18 ++#define MII_88E1318S_PHY_WOL_CTRL 16 ++#define MII_M1011_IEVENT 19 ++ ++#define MII_88E1318S_PHY_LED_TCR_INTn_ENABLE BIT(7) ++#define MII_88E1318S_PHY_LED_TCR_FORCE_INT BIT(15) ++#define MII_88E1318S_PHY_WOL_CTRL_CLEAR_WOL_STATUS BIT(12) ++#define LED2_FORCE_ON (0x8 << 8) ++#define LEDMASK GENMASK(11,8) ++ ++static struct phy_device *phydev; ++ ++static void mvphy_reg_intn(u16 data) ++{ ++ int rc = 0, saved_page; ++ ++ saved_page = phy_select_page(phydev, MII_MARVELL_LED_PAGE); ++ if (saved_page < 0) ++ goto err; ++ ++ /* Force manual LED2 control to let INTn work */ ++ __phy_modify(phydev, MII_PHY_LED_CTRL, LEDMASK, LED2_FORCE_ON); ++ ++ /* Set the LED[2]/INTn pin to the required state */ ++ __phy_modify(phydev, MII_88E1318S_PHY_LED_TCR, ++ MII_88E1318S_PHY_LED_TCR_FORCE_INT, ++ MII_88E1318S_PHY_LED_TCR_INTn_ENABLE | data); ++ ++ if (!data) { ++ /* Clear interrupts to ensure INTn won't be holded in high state */ ++ __phy_write(phydev, MII_MARVELL_PHY_PAGE, MII_MARVELL_COPPER_PAGE); ++ __phy_read(phydev, MII_M1011_IEVENT); ++ ++ /* If WOL was enabled and a magic packet was received before powering ++ * off, we won't be able to wake up by sending another magic packet. ++ * Clear WOL status. ++ */ ++ __phy_write(phydev, MII_MARVELL_PHY_PAGE, MII_MARVELL_WOL_PAGE); ++ __phy_set_bits(phydev, MII_88E1318S_PHY_WOL_CTRL, ++ MII_88E1318S_PHY_WOL_CTRL_CLEAR_WOL_STATUS); ++ } ++err: ++ rc = phy_restore_page(phydev, saved_page, rc); ++ if (rc < 0) ++ dev_err(&phydev->mdio.dev, "Write register failed, %d\n", rc); ++ ++ if (!data) { ++ /* Slow down the PHY to save energy */ ++ rc= phy_speed_down(phydev, false); ++ if (rc < 0) ++ dev_err(&phydev->mdio.dev, "PHY speed down failed, %d\n", rc); ++ } ++} ++ ++static int linkstation_reboot_notifier(struct notifier_block *nb, ++ unsigned long action, void *unused) ++{ ++ if (action == SYS_RESTART) ++ mvphy_reg_intn(MII_88E1318S_PHY_LED_TCR_FORCE_INT); ++ ++ return NOTIFY_DONE; ++} ++ ++static struct notifier_block linkstation_reboot_nb = { ++ .notifier_call = linkstation_reboot_notifier, ++}; ++ ++static void linkstation_poweroff(void) ++{ ++ unregister_reboot_notifier(&linkstation_reboot_nb); ++ mvphy_reg_intn(0); ++ ++ kernel_restart("Power off"); ++} ++ ++static const struct of_device_id ls_poweroff_of_match[] = { ++ { .compatible = "buffalo,ls421d" }, ++ { .compatible = "buffalo,ls421de" }, ++ { }, ++}; ++ ++static int __init linkstation_poweroff_init(void) ++{ ++ struct mii_bus *bus; ++ struct device_node *dn; ++ ++ dn = of_find_matching_node(NULL, ls_poweroff_of_match); ++ if (!dn) ++ return -ENODEV; ++ of_node_put(dn); ++ ++ dn = of_find_node_by_name(NULL, "mdio"); ++ if (!dn) ++ return -ENODEV; ++ ++ bus = of_mdio_find_bus(dn); ++ of_node_put(dn); ++ if (!bus) ++ return -EPROBE_DEFER; ++ ++ phydev = phy_find_first(bus); ++ if (!phydev) ++ return -EPROBE_DEFER; ++ ++ register_reboot_notifier(&linkstation_reboot_nb); ++ pm_power_off = linkstation_poweroff; ++ ++ pr_info("LinkStation power off driver registered\n"); ++ return 0; ++} ++ ++static void __exit linkstation_poweroff_exit(void) ++{ ++ pm_power_off = NULL; ++ unregister_reboot_notifier(&linkstation_reboot_nb); ++} ++ ++module_init(linkstation_poweroff_init); ++module_exit(linkstation_poweroff_exit); ++ ++MODULE_AUTHOR("Daniel González Cabanelas "); ++MODULE_DESCRIPTION("LinkStation power off driver"); ++MODULE_LICENSE("GPL v2"); From 42d14ace3e381ec04a7c8fa233eaaff8fa3a0820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez=20Cabanelas?= Date: Fri, 28 Aug 2020 11:20:46 +0200 Subject: [PATCH 16/16] mvebu: LS421DE: add linkstation poweroff driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compile the Linkstation poweroff module for the Buffalo LS421DE. Without this driver the device remains forever halted if a power off command is executed. The driver will also allow to use the WoL feature, which wasn't availabe in the stock firmware. Signed-off-by: Daniel González Cabanelas --- .../arm/boot/dts/armada-370-buffalo-ls421de.dts | 13 ------------- target/linux/mvebu/image/cortexa9.mk | 4 ++-- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts b/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts index ea392f9e41..e0c0cb55a0 100644 --- a/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts +++ b/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts @@ -209,12 +209,6 @@ gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>; }; }; - - /* FIXME: this driver needs to be aware of the LED2 eth phy use, - which must be set to off state before shutting down the machine */ - restart_poweroff { - compatible = "restart-poweroff"; - }; }; ð1 { @@ -243,13 +237,6 @@ ethphy0: ethernet-phy@0 { /* Marvell 88E1518 */ reg = <0>; - /* - * LED2 is used to inform, at restart time, if the power - * switch was slided to the "off" position. - * Page 0x3, Register 0x10, bits 8-11: - * 0x800: LED2 off, power off the machine - * 0x900: LED2 on, boot the machine - */ marvell,reg-init = <0x3 0x10 0x1 0x1991>, /* LED function */ <0x3 0x11 0x1 0x4401>, /* LED polarity */ <0x3 0x12 0x1 0x4905>; /* LED timer */ diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk index 7c2069ed2f..824f142a8b 100644 --- a/target/linux/mvebu/image/cortexa9.mk +++ b/target/linux/mvebu/image/cortexa9.mk @@ -24,8 +24,8 @@ define Device/buffalo_ls421de DEVICE_DTS := armada-370-buffalo-ls421de DEVICE_PACKAGES := \ kmod-rtc-rs5c372a kmod-hwmon-gpiofan kmod-hwmon-drivetemp kmod-usb3 \ - kmod-md-raid0 kmod-md-raid1 kmod-md-mod kmod-fs-xfs mkf2fs e2fsprogs \ - partx-utils + kmod-linkstation-poweroff kmod-md-raid0 kmod-md-raid1 kmod-md-mod \ + kmod-fs-xfs mkf2fs e2fsprogs partx-utils endef TARGET_DEVICES += buffalo_ls421de