From e18534f90558882bd9cbaa55bd64d775035c6556 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 18 Sep 2020 17:28:30 +0200 Subject: [PATCH 01/17] mt76: update to the latest version 3b946a6dc588 mt76: dma: cache dma map address/len in struct mt76_queue_entry c4c8b6a20d3b mt76: mt7915: fix HE BSS info 15391c1c947f mt76: fix tx hang on non-AQL frame limit 72c8a81e64e8 mt76: mt7915: fix encap offload multicast traffic with 4-address mode 69b3f868d14b mt76: mt7915: use napi_consume_skb to bulk-free tx skbs 5f080033ec7d mt76: move txwi handling code to dma.c, since it is mmio specific b1f425686125 mt76: mt7915: fix VHT LDPC capability 8f48855f5d14 mt76: mt7915: simplify mt7915_lmac_mapping cfaf40858718 mt76: mt7915: fix queue/tid mapping for airtime reporting 115b62efac21 mt76: remove retry_q from struct mt76_txq and related code e22c65cdc585 mt76: mt7915: simplify checks for the 802.3 offload path bab866a01e4f mt76: mt7915: fix unexpected firmware mode 0fc3c5eb61d0 mt76: dma: queue more rx frames internally before passing them to the stack 130e5de09364 Revert "mt76: dma: queue more rx frames internally before passing them to the stack" e3af31409d41 update mt7915 firmware to the latest version e2b8a4ec9891 mt76: testmode: add a limit for queued tx_frames packets 146488631f7b mt76: mt7615: Remove set but unused variable 'index' 0b7d2b76288e mt76: mt7615: fix VHT LDPC capability 848f4a6334a8 mt76: mt7622: fix fw hang on mt7622 0a955d944bd0 mt76: mt7663s: do not use altx for ctl/mgmt traffic 13b96411513b mt76: mt7663s: split mt7663s_tx_update_sched in mt7663s_tx_{pick,update}_quota d62ba15b1bbf mt76: mt7663s: introduce __mt7663s_xmit_queue routine fdf14d1b6aec mt76: move pad estimation out of mt76_skb_adjust_pad d048f8e87ba0 mt76: mt7663s: fix possible quota leak in mt7663s_refill_sched_quota 979c0fdc5d27 mt76: mt7663s: introduce sdio tx aggregation 56e77a3a3ade mt76: mt7663: check isr read return value in mt7663s_rx_work f96cffa03e57 mt76: mt7615: unlock dfs bands 1ccd31bbe1f4 mt76: Use fallthrough pseudo-keyword 448cd2d36ee2 mt76: mt76x0: Move tables used only by init.c to their own header file 17ba3432f5af Revert "mt76: mt7615: unlock dfs bands" fee1f4a8e87f mt76: mt7915: fix possible memory leak in mt7915_mcu_add_beacon 5b78e5292777 mt76: Fix unsigned expressions compared with zero ec84891a4d23 mt76: mt7915: convert to use le16_add_cpu() Signed-off-by: Felix Fietkau --- package/kernel/mt76/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 54a77bda3a..93214aa84c 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2020-08-25 -PKG_SOURCE_VERSION:=b36d7ae096a3d8c7d6a8a246f2e8a471a467041e -PKG_MIRROR_HASH:=da35e999f1bd50ce7061125ccb976129c8485e3593521206831380846953d3cf +PKG_SOURCE_DATE:=2020-09-18 +PKG_SOURCE_VERSION:=ec84891a4d23efcab2ea91980c4933601cb017bd +PKG_MIRROR_HASH:=55c4103d1d1a62c7401ad0e163773b209c63335a133fd9dd3bcd06e5ada93c1b PKG_MAINTAINER:=Felix Fietkau PKG_BUILD_PARALLEL:=1 From 649e098ec085abad1ac08b545e03db882fbfcc17 Mon Sep 17 00:00:00 2001 From: Yuan Tao Date: Sun, 13 Sep 2020 03:50:36 +0800 Subject: [PATCH 02/17] tools/libressl: update to 3.2.1 libressl update to 3.2.1 Delete 001-dont-build-tests-man.patch Add configure args : --enable-static --disable-tests The patch (001-dont-build-tests-man.patch) no longer works with the current version. Follow the patch notes: Adding the --enable-static and --disable-tests parameters should replace the patch. Signed-off-by: Yuan Tao --- tools/libressl/Makefile | 6 +++--- tools/libressl/patches/001-dont-build-tests-man.patch | 11 ----------- 2 files changed, 3 insertions(+), 14 deletions(-) delete mode 100644 tools/libressl/patches/001-dont-build-tests-man.patch diff --git a/tools/libressl/Makefile b/tools/libressl/Makefile index 1a497935e7..0cc26a930c 100644 --- a/tools/libressl/Makefile +++ b/tools/libressl/Makefile @@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libressl -PKG_VERSION:=3.0.2 -PKG_HASH:=df7b172bf79b957dd27ef36dcaa1fb162562c0e8999e194aa8c1a3df2f15398e +PKG_VERSION:=3.2.1 +PKG_HASH:=d28db224cfb6d18009b2a7e8cb213cd5c943bbec87550062fef6a38479250315 PKG_RELEASE:=1 PKG_CPE_ID:=cpe:/a:openbsd:libressl @@ -23,7 +23,7 @@ HOST_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/host-build.mk -HOST_CONFIGURE_ARGS += --disable-shared +HOST_CONFIGURE_ARGS += --enable-static --disable-shared --disable-tests HOST_CFLAGS += $(FPIC) ifeq ($(GNU_HOST_NAME),x86_64-linux-gnux32) diff --git a/tools/libressl/patches/001-dont-build-tests-man.patch b/tools/libressl/patches/001-dont-build-tests-man.patch deleted file mode 100644 index bd09818d43..0000000000 --- a/tools/libressl/patches/001-dont-build-tests-man.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile.in -+++ b/Makefile.in -@@ -361,7 +361,7 @@ target_alias = @target_alias@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --SUBDIRS = crypto ssl tls include apps tests man -+SUBDIRS = crypto ssl tls include apps - ACLOCAL_AMFLAGS = -I m4 - pkgconfigdir = $(libdir)/pkgconfig - pkgconfig_DATA = libcrypto.pc libssl.pc libtls.pc openssl.pc From 4742ba41d0a9b4af23437182162b2ce7c7558d97 Mon Sep 17 00:00:00 2001 From: Tan Zien Date: Fri, 11 Sep 2020 01:21:23 +0800 Subject: [PATCH 03/17] kernel: add module support Intel Ethernet Controller I225 Series add kernel module igc support Intel Ethernet Controller I225 Series. Signed-off-by: Tan Zien --- package/kernel/linux/modules/netdevices.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 0db3e3569c..72fbb4e4e3 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -1219,3 +1219,18 @@ define KernelPackage/sfp/description endef $(eval $(call KernelPackage,sfp)) + +define KernelPackage/igc + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=Intel(R) Ethernet Controller I225 Series support + DEPENDS:=@PCI_SUPPORT @!LINUX_4_19 + KCONFIG:=CONFIG_IGC + FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/igc/igc.ko + AUTOLOAD:=$(call AutoProbe,igc) +endef + +define KernelPackage/igc/description + Kernel modules for Intel(R) Ethernet Controller I225 Series +endef + +$(eval $(call KernelPackage,igc)) From b0aff40ae3490c1c08cfc615522d5743effc45ad Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Sun, 6 Sep 2020 23:28:54 +0200 Subject: [PATCH 04/17] kernel: drop kmod-bmp085, kmod-bmp085-i2c and kmod-bmp085-spi CONFIG_BMP085* is replaced by CONFIG_BMP280 since 4.9[1] and this package is empty. OpenWRT also has kmod-iio-bmp280* package and we can drop old packages. 1. [ misc: retire the old BMP085 driver ] (https://github.com/torvalds/linux/commit/832c8232dd7be4977ae9fb9c7cbc4decce19a8fc#diff-5000d544d790c669405eb2a6775e5981) Signed-off-by: Aleksander Jan Bajkowski --- package/kernel/linux/modules/other.mk | 47 --------------------------- 1 file changed, 47 deletions(-) diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index ade5f13ee8..77054aec8d 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -1119,53 +1119,6 @@ endef $(eval $(call KernelPackage,echo)) -define KernelPackage/bmp085 - SUBMENU:=$(OTHER_MENU) - TITLE:=BMP085/BMP18x pressure sensor - DEPENDS:= +kmod-regmap-core - KCONFIG:= CONFIG_BMP085 - FILES:= $(LINUX_DIR)/drivers/misc/bmp085.ko -endef - -define KernelPackage/bmp085/description - This driver adds support for Bosch Sensortec's digital pressure - sensors BMP085 and BMP18x. -endef - -$(eval $(call KernelPackage,bmp085)) - - -define KernelPackage/bmp085-i2c - SUBMENU:=$(OTHER_MENU) - TITLE:=BMP085/BMP18x pressure sensor I2C - DEPENDS:= +kmod-bmp085 - KCONFIG:= CONFIG_BMP085_I2C - FILES:= $(LINUX_DIR)/drivers/misc/bmp085-i2c.ko - AUTOLOAD:=$(call AutoProbe,bmp085-i2c) -endef -define KernelPackage/bmp085-i2c/description - This driver adds support for Bosch Sensortec's digital pressure - sensor connected via I2C. -endef - -$(eval $(call KernelPackage,bmp085-i2c)) - - -define KernelPackage/bmp085-spi - SUBMENU:=$(OTHER_MENU) - TITLE:=BMP085/BMP18x pressure sensor SPI - DEPENDS:= +kmod-bmp085 - KCONFIG:= CONFIG_BMP085_SPI - FILES:= $(LINUX_DIR)/drivers/misc/bmp085-spi.ko - AUTOLOAD:=$(call AutoProbe,bmp085-spi) -endef -define KernelPackage/bmp085-spi/description - This driver adds support for Bosch Sensortec's digital pressure - sensor connected via SPI. -endef - -$(eval $(call KernelPackage,bmp085-spi)) - define KernelPackage/tpm SUBMENU:=$(OTHER_MENU) TITLE:=TPM Hardware Support From 182c7d955f872cb712f6d16d4b5cc0824bf4cc67 Mon Sep 17 00:00:00 2001 From: Tan Zien Date: Tue, 8 Sep 2020 23:41:44 +0800 Subject: [PATCH 05/17] firmware: amd64-microcode: update to 20191218 amd64-microcode (3.20191218.1) * New microcode update packages from AMD upstream: + Removed Microcode updates (known to cause issues): sig 0x00830f10, patch id 0x08301025, 2019-07-11 * README: update for new release amd64-microcode (3.20191021.1) * New microcode update packages from AMD upstream: + New Microcodes: sig 0x00830f10, patch id 0x08301025, 2019-07-11 + Updated Microcodes: sig 0x00800f12, patch id 0x08001250, 2019-04-16 sig 0x00800f82, patch id 0x0800820d, 2019-04-16 amd64-microcode (3.20181128.1) * New microcode update packages from AMD upstream: + New Microcodes: sig 0x00800f82, patch id 0x0800820b, 2018-06-20 Signed-off-by: Tan Zien --- package/firmware/amd64-microcode/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/firmware/amd64-microcode/Makefile b/package/firmware/amd64-microcode/Makefile index 4fd3d04610..cf21aba569 100644 --- a/package/firmware/amd64-microcode/Makefile +++ b/package/firmware/amd64-microcode/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=amd64-microcode -PKG_VERSION:=20180524 +PKG_VERSION:=20191218 PKG_RELEASE:=1 PKG_SOURCE:=amd64-microcode_3.$(PKG_VERSION).$(PKG_RELEASE).tar.xz PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/non-free/a/amd64-microcode/ -PKG_HASH:=7c389c357c242e7161f6872bf4e12011a71e4c0683f06fb1bcfad650a78bf0a9 +PKG_HASH:=f469b79348097c5f04641b67a39d0ee5a2a1916c9556281626c04f2275d4132d PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.$(PKG_VERSION).$(PKG_RELEASE) PKG_LICENSE_FILE:=LICENSE.amd-ucode From e826e007658911df91385935e74621889abbda24 Mon Sep 17 00:00:00 2001 From: Tan Zien Date: Tue, 8 Sep 2020 23:52:23 +0800 Subject: [PATCH 06/17] firmware: intel-microcode: update to 20200616 intel-microcode (3.20200616.1) * New upstream microcode datafile 20200616 + Downgraded microcodes (to a previously shipped revision): sig 0x000406e3, pf_mask 0xc0, 2019-10-03, rev 0x00d6, size 101376 sig 0x000506e3, pf_mask 0x36, 2019-10-03, rev 0x00d6, size 101376 * Works around hangs on boot on Skylake-U/Y and Skylake Xeon E3, * This update *removes* the SRBDS mitigations from the above processors * Note that Debian had already downgraded 0x406e3 in release 3.20200609.2 intel-microcode (3.20200609.2) * REGRESSION FIX: 0x406e3: rollback to rev 0xd6 and document regression * Microcode rollbacks (closes: LP#1883002) sig 0x000406e3, pf_mask 0xc0, 2019-10-03, rev 0x00d6, size 101376 * THIS REMOVES THE SECURITY FIXES FOR SKYLAKE-U/Y PROCESSORS * Avoid hangs on boot on (some?) Skylake-U/Y processors, * ucode-blacklist: blacklist models 0x8e and 0x9e from late-loading, just in case. Note that Debian does not do late loading by itself. Refer to LP#1883002 for the report, 0x806ec hangs upon late load. intel-microcode (3.20200609.1) * SECURITY UPDATE * For most processors: SRBDS and/or VRDS, L1DCES mitigations depending on the processor model * For Skylake HEDT and Skylake Xeons with signature 0x50654: VRDS and L1DCES mitigations, plus mitigations described in the changelog entry for package release 3.20191112.1. * Expect some performance impact, the mitigations are enabled by default. A Linux kernel update will be issued that allows one to selectively disable the mitigations. * New upstream microcode datafile 20200609 * Implements mitigation for CVE-2020-0543 Special Register Buffer Data Sampling (SRBDS), INTEL-SA-00320, CROSSTalk * Implements mitigation for CVE-2020-0548 Vector Register Data Sampling (VRDS), INTEL-SA-00329 * Implements mitigation for CVE-2020-0549 L1D Cache Eviction Sampling (L1DCES), INTEL-SA-00329 * Known to fix the regression introduced in release 2019-11-12 (sig 0x50564, rev. 0x2000065), which would cause several systems with Skylake Xeon, Skylake HEDT processors to hang while rebooting * Updated Microcodes: sig 0x000306c3, pf_mask 0x32, 2019-11-12, rev 0x0028, size 23552 sig 0x000306d4, pf_mask 0xc0, 2019-11-12, rev 0x002f, size 19456 sig 0x00040651, pf_mask 0x72, 2019-11-12, rev 0x0026, size 22528 sig 0x00040661, pf_mask 0x32, 2019-11-12, rev 0x001c, size 25600 sig 0x00040671, pf_mask 0x22, 2019-11-12, rev 0x0022, size 14336 sig 0x000406e3, pf_mask 0xc0, 2020-04-27, rev 0x00dc, size 104448 sig 0x00050653, pf_mask 0x97, 2020-04-24, rev 0x1000157, size 32768 sig 0x00050654, pf_mask 0xb7, 2020-04-24, rev 0x2006906, size 34816 sig 0x00050656, pf_mask 0xbf, 2020-04-23, rev 0x4002f01, size 52224 sig 0x00050657, pf_mask 0xbf, 2020-04-23, rev 0x5002f01, size 52224 sig 0x000506e3, pf_mask 0x36, 2020-04-27, rev 0x00dc, size 104448 sig 0x000806e9, pf_mask 0x10, 2020-04-27, rev 0x00d6, size 103424 sig 0x000806e9, pf_mask 0xc0, 2020-04-27, rev 0x00d6, size 103424 sig 0x000806ea, pf_mask 0xc0, 2020-04-27, rev 0x00d6, size 103424 sig 0x000806eb, pf_mask 0xd0, 2020-04-27, rev 0x00d6, size 103424 sig 0x000806ec, pf_mask 0x94, 2020-04-23, rev 0x00d6, size 103424 sig 0x000906e9, pf_mask 0x2a, 2020-04-23, rev 0x00d6, size 103424 sig 0x000906ea, pf_mask 0x22, 2020-04-27, rev 0x00d6, size 102400 sig 0x000906eb, pf_mask 0x02, 2020-04-23, rev 0x00d6, size 103424 sig 0x000906ec, pf_mask 0x22, 2020-04-27, rev 0x00d6, size 102400 sig 0x000906ed, pf_mask 0x22, 2020-04-23, rev 0x00d6, size 103424 * Restores the microcode-level fixes that were reverted by release 3.20191115.2 for sig 0x50654 (Skylake Xeon, Skylake HEDT) intel-microcode (3.20200520.1) * New upstream microcode datafile 20200520 + Updated Microcodes: sig 0x000206d6, pf_mask 0x6d, 2020-03-04, rev 0x0621, size 18432 sig 0x000206d7, pf_mask 0x6d, 2020-03-24, rev 0x071a, size 19456 intel-microcode (3.20200508.1) * New upstream microcode datafile 20200508 + Updated Microcodes: sig 0x000706e5, pf_mask 0x80, 2020-03-12, rev 0x0078, size 107520 * Likely fixes several critical errata on IceLake-U/Y causing system hangs intel-microcode (3.20191115.2) * Microcode rollbacks (closes: #946515, LP#1854764): sig 0x00050654, pf_mask 0xb7, 2019-07-31, rev 0x2000064, size 33792 * Avoids hangs on warm reboots (cold boots work fine) on HEDT and Xeon processors with signature 0x50654. intel-microcode (3.20191115.1) * New upstream microcode datafile 20191115 + Updated Microcodes: sig 0x000406e3, pf_mask 0xc0, 2019-10-03, rev 0x00d6, size 101376 sig 0x000506e3, pf_mask 0x36, 2019-10-03, rev 0x00d6, size 101376 sig 0x000806e9, pf_mask 0x10, 2019-10-15, rev 0x00ca, size 100352 sig 0x000806e9, pf_mask 0xc0, 2019-09-26, rev 0x00ca, size 100352 sig 0x000806ea, pf_mask 0xc0, 2019-10-03, rev 0x00ca, size 100352 sig 0x000806eb, pf_mask 0xd0, 2019-10-03, rev 0x00ca, size 100352 sig 0x000806ec, pf_mask 0x94, 2019-10-03, rev 0x00ca, size 100352 sig 0x000906e9, pf_mask 0x2a, 2019-10-03, rev 0x00ca, size 100352 sig 0x000906ea, pf_mask 0x22, 2019-10-03, rev 0x00ca, size 99328 sig 0x000906eb, pf_mask 0x02, 2019-10-03, rev 0x00ca, size 100352 sig 0x000906ec, pf_mask 0x22, 2019-10-03, rev 0x00ca, size 99328 sig 0x000906ed, pf_mask 0x22, 2019-10-03, rev 0x00ca, size 100352 sig 0x000a0660, pf_mask 0x80, 2019-10-03, rev 0x00ca, size 91136 intel-microcode (3.20191113.1) * New upstream microcode datafile 20191113 + SECURITY UPDATE, refer to the 3.20191112.1 changelog entry for details Adds microcode update for CFL-S (Coffe Lake Desktop) INTEL-SA-00270, CVE-2019-11135, CVE-2019-0117 + Updated Microcodes (previously removed): sig 0x000906ec, pf_mask 0x22, 2019-08-14, rev 0x00c6, size 99328 intel-microcode (3.20191112.1) * New upstream microcode datafile 20191112 + SECURITY UPDATE - Implements MDS mitigation (TSX TAA), INTEL-SA-00270, CVE-2019-11135 - Implements TA Indirect Sharing mitigation, and improves the MDS mitigation (VERW) - Fixes FIVR (Xeon Voltage Modulation) vulnerability, INTEL-SA-00271, CVE-2019-11139 - Fixes SGX vulnerabilities and errata (including CVE-2019-0117) + CRITICAL ERRATA FIXES - Fixes Jcc conditional jump macro-fusion erratum (Skylake+, except Ice Lake), causes a 0-3% typical perforance hit (can be as bad as 10%). But ensures the processor will actually jump where it should, so don't even *dream* of not applying this fix. - Fixes AVX SHUF* instruction implementation flaw erratum + Removed Microcodes: sig 0x000906ec, pf_mask 0x22, 2019-02-14, rev 0x00ae, size 98304 + New Microcodes: sig 0x000406d8, pf_mask 0x01, 2019-09-16, rev 0x012d, size 84992 sig 0x00050656, pf_mask 0xbf, 2019-09-05, rev 0x400002c, size 51200 sig 0x00060663, pf_mask 0x80, 2018-04-17, rev 0x002a, size 87040 sig 0x000706a8, pf_mask 0x01, 2019-08-29, rev 0x0016, size 74752 sig 0x000706e5, pf_mask 0x80, 2019-09-05, rev 0x0046, size 102400 sig 0x000a0660, pf_mask 0x80, 2019-08-27, rev 0x00c6, size 91136 + Updated Microcodes: sig 0x000406e3, pf_mask 0xc0, 2019-08-14, rev 0x00d4, size 101376 sig 0x00050654, pf_mask 0xb7, 2019-09-05, rev 0x2000065, size 34816 sig 0x00050657, pf_mask 0xbf, 2019-09-05, rev 0x500002c, size 51200 sig 0x000506e3, pf_mask 0x36, 2019-08-14, rev 0x00d4, size 101376 sig 0x000706a1, pf_mask 0x01, 2019-08-28, rev 0x0032, size 73728 sig 0x000806e9, pf_mask 0x10, 2019-08-14, rev 0x00c6, size 99328 sig 0x000806e9, pf_mask 0xc0, 2019-08-14, rev 0x00c6, size 100352 sig 0x000806ea, pf_mask 0xc0, 2019-08-14, rev 0x00c6, size 99328 sig 0x000806eb, pf_mask 0xd0, 2019-08-14, rev 0x00c6, size 100352 sig 0x000806ec, pf_mask 0x94, 2019-08-14, rev 0x00c6, size 100352 sig 0x000906e9, pf_mask 0x2a, 2019-08-14, rev 0x00c6, size 100352 sig 0x000906ea, pf_mask 0x22, 2019-08-14, rev 0x00c6, size 99328 sig 0x000906eb, pf_mask 0x02, 2019-08-14, rev 0x00c6, size 100352 sig 0x000906ed, pf_mask 0x22, 2019-08-14, rev 0x00c6, size 99328 + Updated Microcodes (previously removed): sig 0x00050653, pf_mask 0x97, 2019-09-09, rev 0x1000151, size 32768 Signed-off-by: Tan Zien --- 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 de501622de..b3c3674f87 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:=20190918 +PKG_VERSION:=20200616 PKG_RELEASE:=1 PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).$(PKG_RELEASE).tar.xz PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/non-free/i/intel-microcode/ -PKG_HASH:=b7ecb5dd30d71e9b3c2ab184693a876171392e0d80d138c3560c662e5f2a2247 +PKG_HASH:=bcc3b81c452fe4649a948c022475d76c1cdfbb730f36749a082f412f1406a3b9 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.$(PKG_VERSION).$(PKG_RELEASE) PKG_BUILD_DEPENDS:=iucode-tool/host From 5582fbd6135f7db4ba8bd887c360007f3b18dba1 Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Sun, 30 Aug 2020 15:54:51 -0700 Subject: [PATCH 07/17] bpftools: support NLS, fix ppc build and update to 5.8.9 With global NLS support enabled (CONFIG_BUILD_NLS), the linked libelf.so and libbfd.so libraries will depend on libintl.so. Import the nls.mk helper to set library prefixes and flags accordingly, and also conditionally add "-lintl" as link-time library. Fix a build error on ppc due to a EDEADLOCK redefinition in errno.h. Use upstream stable kernel 5.8.9, and fix overriding of feature detection to only allow/hide detected features. Also refresh existing patches. Fixes: 2f0d672088 ("bpftools: add utility and library packages supporting eBPF usage") Signed-off-by: Tony Ambardar --- package/network/utils/bpftools/Makefile | 15 +++-- ...o-local-symbols-counted-in-ABI-check.patch | 7 +-- ...-failure-from-uninitialized-variable.patch | 9 +-- ...llow-passing-BPFTOOL_VERSION-to-make.patch | 5 -- ...l-use-only-ftw-for-file-tree-parsing.patch | 13 +---- ...pc-fix-EDEADLOCK-redefinition-errors.patch | 56 +++++++++++++++++++ 6 files changed, 72 insertions(+), 33 deletions(-) create mode 100644 package/network/utils/bpftools/patches/005-tools-arch-powerpc-fix-EDEADLOCK-redefinition-errors.patch diff --git a/package/network/utils/bpftools/Makefile b/package/network/utils/bpftools/Makefile index 156dc8a4fa..e760d50c5e 100644 --- a/package/network/utils/bpftools/Makefile +++ b/package/network/utils/bpftools/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bpftools -PKG_VERSION:=5.8.3 +PKG_VERSION:=5.8.9 PKG_RELEASE:=1 PKG_SOURCE:=linux-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/kernel/v5.x -PKG_HASH:=8ea27e1ed38981f772cc6d5f16ab8dbb8052c3800ba0494bd798fbb95dcc1779 +PKG_HASH:=99d8bc1b82f17d7d79f9af4a94af4c0e3772159e9e6e278761bde8569f93e15f PKG_MAINTAINER:=Tony Ambardar @@ -32,6 +32,7 @@ TAR_OPTIONS+= \ $(addprefix $(LINUX_TLD)/,$(BPF_FILES)) include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk define Package/bpftool/Default SECTION:=net @@ -92,6 +93,10 @@ ifneq ($(BUILD_VARIANT),lib) TARGET_LDFLAGS += -Wl,--gc-sections endif +ifneq ($(INTL_FULL),) + TARGET_LDFLAGS += -Wl,-lintl +endif + MAKE_FLAGS += \ EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS)" \ @@ -125,9 +130,9 @@ define Build/Configure $(MAKE_FLAGS) FEATURES_DUMP= $(PKG_BUILD_DIR)//libbpf/libbpf.a (cd $(PKG_BUILD_DIR); cat FEATURE-DUMP.bpftool libbpf/FEATURE-DUMP.libbpf \ | sort | uniq > FEATURE-DUMP.openwrt) - $(SED) 's/feature-libbfd=[01]/feature-libbfd=$(HAVE_LIBBFD)/' \ - -e 's/feature-libcap=[01]/feature-libcap=$(HAVE_LIBCAP)/' \ - -e 's/feature-clang-bpf-global-var=[01]/feature-clang-bpf-global-var=$(HAVE_CLANG)/' \ + $(SED) 's/feature-libbfd=1/feature-libbfd=$(HAVE_LIBBFD)/' \ + -e 's/feature-libcap=1/feature-libcap=$(HAVE_LIBCAP)/' \ + -e 's/feature-clang-bpf-global-var=1/feature-clang-bpf-global-var=$(HAVE_CLANG)/' \ $(PKG_BUILD_DIR)/FEATURE-DUMP.openwrt endef diff --git a/package/network/utils/bpftools/patches/001-libbpf-ensure-no-local-symbols-counted-in-ABI-check.patch b/package/network/utils/bpftools/patches/001-libbpf-ensure-no-local-symbols-counted-in-ABI-check.patch index 0b223644dc..18000b6940 100644 --- a/package/network/utils/bpftools/patches/001-libbpf-ensure-no-local-symbols-counted-in-ABI-check.patch +++ b/package/network/utils/bpftools/patches/001-libbpf-ensure-no-local-symbols-counted-in-ABI-check.patch @@ -11,11 +11,9 @@ Signed-off-by: Tony Ambardar tools/lib/bpf/Makefile | 2 ++ 1 file changed, 2 insertions(+) -diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile -index bf8ed134cb8a..c820b0be9d63 100644 --- a/tools/lib/bpf/Makefile +++ b/tools/lib/bpf/Makefile -@@ -152,6 +152,7 @@ GLOBAL_SYM_COUNT = $(shell readelf -s --wide $(BPF_IN_SHARED) | \ +@@ -152,6 +152,7 @@ GLOBAL_SYM_COUNT = $(shell readelf -s -- awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $$NF}' | \ sort -u | wc -l) VERSIONED_SYM_COUNT = $(shell readelf --dyn-syms --wide $(OUTPUT)libbpf.so | \ @@ -31,6 +29,3 @@ index bf8ed134cb8a..c820b0be9d63 100644 grep -Eo '[^ ]+@LIBBPF_' | cut -d@ -f1 | \ sort -u > $(OUTPUT)libbpf_versioned_syms.tmp; \ diff -u $(OUTPUT)libbpf_global_syms.tmp \ --- -2.25.1 - diff --git a/package/network/utils/bpftools/patches/002-libbpf-fix-build-failure-from-uninitialized-variable.patch b/package/network/utils/bpftools/patches/002-libbpf-fix-build-failure-from-uninitialized-variable.patch index a61d0930f8..96ab2084b7 100644 --- a/package/network/utils/bpftools/patches/002-libbpf-fix-build-failure-from-uninitialized-variable.patch +++ b/package/network/utils/bpftools/patches/002-libbpf-fix-build-failure-from-uninitialized-variable.patch @@ -27,12 +27,10 @@ Signed-off-by: Tony Ambardar tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c -index 11e4725b8b1c..a72296797357 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c -@@ -5028,8 +5028,8 @@ static int bpf_object__collect_map_relos(struct bpf_object *obj, - int i, j, nrels, new_sz, ptr_sz = sizeof(void *); +@@ -5030,8 +5030,8 @@ static int bpf_object__collect_map_relos + int i, j, nrels, new_sz; const struct btf_var_secinfo *vi = NULL; const struct btf_type *sec, *var, *def; + struct bpf_map *map = NULL, *targ_map; @@ -41,6 +39,3 @@ index 11e4725b8b1c..a72296797357 100644 const char *name, *mname; Elf_Data *symbols; unsigned int moff; --- -2.25.1 - diff --git a/package/network/utils/bpftools/patches/003-bpftool-allow-passing-BPFTOOL_VERSION-to-make.patch b/package/network/utils/bpftools/patches/003-bpftool-allow-passing-BPFTOOL_VERSION-to-make.patch index 9423824ee8..1c569afe6b 100644 --- a/package/network/utils/bpftools/patches/003-bpftool-allow-passing-BPFTOOL_VERSION-to-make.patch +++ b/package/network/utils/bpftools/patches/003-bpftool-allow-passing-BPFTOOL_VERSION-to-make.patch @@ -8,8 +8,6 @@ Signed-off-by: Tony Ambardar tools/bpf/bpftool/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile -index 9e85f101be85..d9d821736c31 100644 --- a/tools/bpf/bpftool/Makefile +++ b/tools/bpf/bpftool/Makefile @@ -25,7 +25,7 @@ endif @@ -21,6 +19,3 @@ index 9e85f101be85..d9d821736c31 100644 $(LIBBPF): FORCE $(if $(LIBBPF_OUTPUT),@mkdir -p $(LIBBPF_OUTPUT)) --- -2.25.1 - diff --git a/package/network/utils/bpftools/patches/004-v5.9-bpftool-use-only-ftw-for-file-tree-parsing.patch b/package/network/utils/bpftools/patches/004-v5.9-bpftool-use-only-ftw-for-file-tree-parsing.patch index 7767b5f595..99ce513723 100644 --- a/package/network/utils/bpftools/patches/004-v5.9-bpftool-use-only-ftw-for-file-tree-parsing.patch +++ b/package/network/utils/bpftools/patches/004-v5.9-bpftool-use-only-ftw-for-file-tree-parsing.patch @@ -26,8 +26,6 @@ Link: https://lore.kernel.org/bpf/20200721024817.13701-1-Tony.Ambardar@gmail.com tools/bpf/bpftool/main.h | 4 +- 2 files changed, 82 insertions(+), 59 deletions(-) -diff --git a/tools/bpf/bpftool/common.c b/tools/bpf/bpftool/common.c -index 88264abaa738..d8bb4dd18c8a 100644 --- a/tools/bpf/bpftool/common.c +++ b/tools/bpf/bpftool/common.c @@ -1,10 +1,11 @@ @@ -86,7 +84,7 @@ index 88264abaa738..d8bb4dd18c8a 100644 { enum bpf_obj_type type; int fd; -@@ -353,71 +365,82 @@ void print_hex_data_json(uint8_t *data, size_t len) +@@ -330,71 +342,82 @@ void print_hex_data_json(uint8_t *data, jsonw_end_array(json_wtr); } @@ -218,11 +216,9 @@ index 88264abaa738..d8bb4dd18c8a 100644 } void delete_pinned_obj_table(struct pinned_obj_table *tab) -diff --git a/tools/bpf/bpftool/main.h b/tools/bpf/bpftool/main.h -index af9ad56c303a..b02e763f1e9c 100644 --- a/tools/bpf/bpftool/main.h +++ b/tools/bpf/bpftool/main.h -@@ -140,8 +140,8 @@ int cmd_select(const struct cmd *cmds, int argc, char **argv, +@@ -196,8 +196,8 @@ int cmd_select(const struct cmd *cmds, i int get_fd_type(int fd); const char *get_fd_type_name(enum bpf_obj_type type); char *get_fdinfo(int fd, const char *key); @@ -231,8 +227,5 @@ index af9ad56c303a..b02e763f1e9c 100644 +int open_obj_pinned(const char *path, bool quiet); +int open_obj_pinned_any(const char *path, enum bpf_obj_type exp_type); int mount_bpffs_for_pin(const char *name); - int do_pin_any(int argc, char **argv, int (*get_fd_by_id)(__u32)); + int do_pin_any(int argc, char **argv, int (*get_fd_by_id)(int *, char ***)); int do_pin_fd(int fd, const char *name); --- -2.17.1 - diff --git a/package/network/utils/bpftools/patches/005-tools-arch-powerpc-fix-EDEADLOCK-redefinition-errors.patch b/package/network/utils/bpftools/patches/005-tools-arch-powerpc-fix-EDEADLOCK-redefinition-errors.patch new file mode 100644 index 0000000000..66c00a325f --- /dev/null +++ b/package/network/utils/bpftools/patches/005-tools-arch-powerpc-fix-EDEADLOCK-redefinition-errors.patch @@ -0,0 +1,56 @@ +From afe3f4c765b17ced23811fe652c7f7adf7a0c0cf Mon Sep 17 00:00:00 2001 +From: Tony Ambardar +Date: Mon, 14 Sep 2020 23:05:26 -0700 +Subject: [PATCH] tools/arch/powerpc: fix EDEADLOCK redefinition errors in + errno.h + +A few archs like powerpc have different errno.h values for macros +EDEADLOCK and EDEADLK. In code including both libc and linux versions of +errno.h, this can result in multiple definitions of EDEADLOCK in the +include chain. Definitions to the same value (e.g. seen with mips) do +not raise warnings, but on powerpc there are redefinitions changing the +value, which raise warnings and errors (with "-Werror"). + +Guard against these redefinitions to avoid build errors like the following, +first seen cross-compiling libbpf v5.8.9 for powerpc using GCC 8.4.0 with +musl 1.1.24: + + In file included from ../../arch/powerpc/include/uapi/asm/errno.h:5, + from ../../include/linux/err.h:8, + from libbpf.c:29: + ../../include/uapi/asm-generic/errno.h:40: error: "EDEADLOCK" redefined [-Werror] + #define EDEADLOCK EDEADLK + + In file included from toolchain-powerpc_8540_gcc-8.4.0_musl/include/errno.h:10, + from libbpf.c:26: + toolchain-powerpc_8540_gcc-8.4.0_musl/include/bits/errno.h:58: note: this is the location of the previous definition + #define EDEADLOCK 58 + + cc1: all warnings being treated as errors + make[5]: *** [target-powerpc_8540_musl/bpftools-5.8.9/tools/build/Makefile.build:97: /home/kodidev/openwrt-project/build_dir/target-powerpc_8540_musl/bpftools-minimal/bpftools-5.8.9//libbpf/staticobjs/libbpf.o] Error 1 + +Fixes: 95f28190aa01 ("tools include arch: Grab a copy of errno.h for arch's + supported by perf") +Fixes: c3617f72036c ("UAPI: (Scripted) Disintegrate arch/powerpc/include/asm") + +Reported-by: Rosen Penev +Signed-off-by: Tony Ambardar +--- + tools/arch/powerpc/include/uapi/asm/errno.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tools/arch/powerpc/include/uapi/asm/errno.h b/tools/arch/powerpc/include/uapi/asm/errno.h +index cc79856896a1..4ba87de32be0 100644 +--- a/tools/arch/powerpc/include/uapi/asm/errno.h ++++ b/tools/arch/powerpc/include/uapi/asm/errno.h +@@ -2,6 +2,7 @@ + #ifndef _ASM_POWERPC_ERRNO_H + #define _ASM_POWERPC_ERRNO_H + ++#undef EDEADLOCK + #include + + #undef EDEADLOCK +-- +2.25.1 + From ae2e521b34ca3504e7f32898dcd7e1c71707d206 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Wed, 19 Aug 2020 17:54:58 +0200 Subject: [PATCH 08/17] uboot-mvebu: update to v2020.10-rc4 TODO: switch to release v2020.10 once released. Remove one merged patch, refresh the rest. Signed-off-by: Andre Heider --- package/boot/uboot-mvebu/Makefile | 4 +- ...add_support_for_macronix_mx25u12835f.patch | 4 +- ...mada-37xx.h_increase_max_gunzip_size.patch | 2 +- .../patches/210-link-libcrypto-static.patch | 8 ++-- ...witch-default-PHY-speed-to-3.125Gbit.patch | 43 ------------------- 5 files changed, 9 insertions(+), 52 deletions(-) delete mode 100644 package/boot/uboot-mvebu/patches/220-arm-dts-uDPU-switch-default-PHY-speed-to-3.125Gbit.patch diff --git a/package/boot/uboot-mvebu/Makefile b/package/boot/uboot-mvebu/Makefile index 6a1cd3379e..8db3c1272d 100644 --- a/package/boot/uboot-mvebu/Makefile +++ b/package/boot/uboot-mvebu/Makefile @@ -8,10 +8,10 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2019.04 +PKG_VERSION:=2020.10-rc4 PKG_RELEASE:=1 -PKG_HASH:=76b7772d156b3ddd7644c8a1736081e55b78828537ff714065d21dbade229bef +PKG_HASH:=0a7bdd2c7df2c14daf2730fcf3277fd917aadfaae935529e29c7412314bbf260 include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/boot/uboot-mvebu/patches/100-add_support_for_macronix_mx25u12835f.patch b/package/boot/uboot-mvebu/patches/100-add_support_for_macronix_mx25u12835f.patch index 79b1b66e76..f1a292694d 100644 --- a/package/boot/uboot-mvebu/patches/100-add_support_for_macronix_mx25u12835f.patch +++ b/package/boot/uboot-mvebu/patches/100-add_support_for_macronix_mx25u12835f.patch @@ -1,7 +1,7 @@ --- a/drivers/mtd/spi/spi-nor-ids.c +++ b/drivers/mtd/spi/spi-nor-ids.c -@@ -136,6 +136,7 @@ const struct flash_info spi_nor_ids[] = - { INFO("mx25u1635e", 0xc22535, 0, 64 * 1024, 32, SECT_4K) }, +@@ -151,6 +151,7 @@ const struct flash_info spi_nor_ids[] = + { INFO("mx25u3235f", 0xc22536, 0, 4 * 1024, 1024, SECT_4K) }, { INFO("mx25u6435f", 0xc22537, 0, 64 * 1024, 128, SECT_4K) }, { INFO("mx25l12805d", 0xc22018, 0, 64 * 1024, 256, 0) }, + { INFO("mx25u12835f", 0xc22538, 0, 64 * 1024, 256, SECT_4K) }, diff --git a/package/boot/uboot-mvebu/patches/120-mvebu_armada-37xx.h_increase_max_gunzip_size.patch b/package/boot/uboot-mvebu/patches/120-mvebu_armada-37xx.h_increase_max_gunzip_size.patch index 580270a70f..c543e5126a 100644 --- a/package/boot/uboot-mvebu/patches/120-mvebu_armada-37xx.h_increase_max_gunzip_size.patch +++ b/package/boot/uboot-mvebu/patches/120-mvebu_armada-37xx.h_increase_max_gunzip_size.patch @@ -9,5 +9,5 @@ This is required in order to boot itb images. #define CONFIG_SYS_SDRAM_BASE 0x00000000 +#define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */ - #define CONFIG_NR_DRAM_BANKS 1 + /* auto boot */ diff --git a/package/boot/uboot-mvebu/patches/210-link-libcrypto-static.patch b/package/boot/uboot-mvebu/patches/210-link-libcrypto-static.patch index ee6c73f469..eb0b05e4c6 100644 --- a/package/boot/uboot-mvebu/patches/210-link-libcrypto-static.patch +++ b/package/boot/uboot-mvebu/patches/210-link-libcrypto-static.patch @@ -3,10 +3,10 @@ needed dependencies are added too. --- a/tools/Makefile +++ b/tools/Makefile -@@ -145,7 +145,7 @@ endif - # MXSImage needs LibSSL - ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_ARMADA_38X)$(CONFIG_ARMADA_39X)$(CONFIG_FIT_SIGNATURE),) - HOSTLOADLIBES_mkimage += \ +@@ -158,7 +158,7 @@ ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CON + HOSTCFLAGS_kwbimage.o += \ + $(shell pkg-config --cflags libssl libcrypto 2> /dev/null || echo "") + HOSTLDLIBS_mkimage += \ - $(shell pkg-config --libs libssl libcrypto 2> /dev/null || echo "-lssl -lcrypto") + $(shell pkg-config --libs --static libssl libcrypto 2> /dev/null || echo "-lssl -lpthread -lcrypto") diff --git a/package/boot/uboot-mvebu/patches/220-arm-dts-uDPU-switch-default-PHY-speed-to-3.125Gbit.patch b/package/boot/uboot-mvebu/patches/220-arm-dts-uDPU-switch-default-PHY-speed-to-3.125Gbit.patch deleted file mode 100644 index 0e10b2c767..0000000000 --- a/package/boot/uboot-mvebu/patches/220-arm-dts-uDPU-switch-default-PHY-speed-to-3.125Gbit.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- a/arch/arm/dts/armada-3720-uDPU.dts -+++ b/arch/arm/dts/armada-3720-uDPU.dts -@@ -109,11 +109,11 @@ - &comphy { - phy0 { - phy-type = ; -- phy-speed = ; -+ phy-speed = ; - }; - phy1 { - phy-type = ; -- phy-speed = ; -+ phy-speed = ; - }; - - phy2 { -@@ -125,22 +125,16 @@ - ð0 { - pinctrl-0 = <&pcie_pins>; - status = "okay"; -- phy-mode = "sgmii"; -+ phy-mode = "sgmii-2500"; -+ managed = "in-band-status"; - phy = <ðphy0>; -- fixed-link { -- speed = <1000>; -- full-duplex; -- }; - }; - - ð1 { - status = "okay"; -- phy-mode = "sgmii"; -+ phy-mode = "sgmii-2500"; -+ managed = "in-band-status"; - phy = <ðphy1>; -- fixed-link { -- speed = <1000>; -- full-duplex; -- }; - }; - - &i2c0 { From 72bb66caad5ac79294c92cb1ca115942b59080e1 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sat, 2 Nov 2019 13:14:08 +0100 Subject: [PATCH 09/17] uboot-mvebu: add support for espressobin This builds two u-boot binaries: one for boards without eMMC and one with. Signed-off-by: Andre Heider --- package/boot/uboot-mvebu/Makefile | 17 + ...Add-missing-common-host-capabilities.patch | 43 ++ ...-3720-espressobin-use-Linux-model-co.patch | 45 +++ ...-3720-espressobin-split-common-parts.patch | 369 ++++++++++++++++++ ...add-support-for-boards-with-populate.patch | 89 +++++ ...sobin-Set-environment-variable-fdtfi.patch | 100 +++++ 6 files changed, 663 insertions(+) create mode 100644 package/boot/uboot-mvebu/patches/130-mmc-xenon_sdhci-Add-missing-common-host-capabilities.patch create mode 100644 package/boot/uboot-mvebu/patches/131-arm64-dts-armada-3720-espressobin-use-Linux-model-co.patch create mode 100644 package/boot/uboot-mvebu/patches/132-arm64-dts-armada-3720-espressobin-split-common-parts.patch create mode 100644 package/boot/uboot-mvebu/patches/133-arm64-dts-a3720-add-support-for-boards-with-populate.patch create mode 100644 package/boot/uboot-mvebu/patches/134-arm-mvebu-Espressobin-Set-environment-variable-fdtfi.patch diff --git a/package/boot/uboot-mvebu/Makefile b/package/boot/uboot-mvebu/Makefile index 8db3c1272d..9a1b5ed63d 100644 --- a/package/boot/uboot-mvebu/Makefile +++ b/package/boot/uboot-mvebu/Makefile @@ -36,6 +36,21 @@ define U-Boot/helios4 UBOOT_IMAGE:=u-boot-spl.kwb endef +define U-Boot/espressobin + NAME:=Marvell ESPRESSObin + BUILD_DEVICES:=globalscale_espressobin globalscale_espressobin-v7 + BUILD_SUBTARGET:=cortexa53 + UBOOT_CONFIG:=mvebu_espressobin-88f3720 +endef + +define U-Boot/espressobin-emmc + NAME:=Marvell ESPRESSObin + BUILD_DEVICES:=globalscale_espressobin-emmc globalscale_espressobin-v7-emmc + BUILD_SUBTARGET:=cortexa53 + UBOOT_CONFIG:=mvebu_espressobin-88f3720 + UBOOT_MAKE_FLAGS+=DEVICE_TREE=armada-3720-espressobin-emmc +endef + define U-Boot/uDPU NAME:=Methode uDPU BUILD_DEVICES:=methode_udpu @@ -45,6 +60,8 @@ endef UBOOT_TARGETS:= \ clearfog \ helios4 \ + espressobin \ + espressobin-emmc \ uDPU Build/Exports:=$(Host/Exports) diff --git a/package/boot/uboot-mvebu/patches/130-mmc-xenon_sdhci-Add-missing-common-host-capabilities.patch b/package/boot/uboot-mvebu/patches/130-mmc-xenon_sdhci-Add-missing-common-host-capabilities.patch new file mode 100644 index 0000000000..fa41f01526 --- /dev/null +++ b/package/boot/uboot-mvebu/patches/130-mmc-xenon_sdhci-Add-missing-common-host-capabilities.patch @@ -0,0 +1,43 @@ +From 264c45575ec6a3d507dc4e43954b8a78283aca6c Mon Sep 17 00:00:00 2001 +From: Andre Heider +Date: Thu, 10 Sep 2020 17:58:43 +0200 +Subject: [PATCH] mmc: xenon_sdhci: Add missing common host capabilities + +Use mmc_of_parse() to set the common host properties. That includes +"bus-width", so parsing it can be removed from the driver. + +But more importantly, "non-removable" is now respected, which fixes +the usage of eMMC. + +Signed-off-by: Andre Heider +--- + drivers/mmc/xenon_sdhci.c | 18 ++++-------------- + 1 file changed, 4 insertions(+), 14 deletions(-) + +--- a/drivers/mmc/xenon_sdhci.c ++++ b/drivers/mmc/xenon_sdhci.c +@@ -485,20 +485,10 @@ static int xenon_sdhci_probe(struct udev + armada_3700_soc_pad_voltage_set(host); + + host->host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_DDR_52MHz; +- switch (fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "bus-width", +- 1)) { +- case 8: +- host->host_caps |= MMC_MODE_8BIT; +- break; +- case 4: +- host->host_caps |= MMC_MODE_4BIT; +- break; +- case 1: +- break; +- default: +- printf("Invalid \"bus-width\" value\n"); +- return -EINVAL; +- } ++ ++ ret = mmc_of_parse(dev, &plat->cfg); ++ if (ret) ++ return ret; + + host->ops = &xenon_sdhci_ops; + diff --git a/package/boot/uboot-mvebu/patches/131-arm64-dts-armada-3720-espressobin-use-Linux-model-co.patch b/package/boot/uboot-mvebu/patches/131-arm64-dts-armada-3720-espressobin-use-Linux-model-co.patch new file mode 100644 index 0000000000..1aef9db900 --- /dev/null +++ b/package/boot/uboot-mvebu/patches/131-arm64-dts-armada-3720-espressobin-use-Linux-model-co.patch @@ -0,0 +1,45 @@ +From 753947e2c374820dcbc9c86626812aeb7d460653 Mon Sep 17 00:00:00 2001 +From: Andre Heider +Date: Fri, 4 Sep 2020 16:34:22 +0200 +Subject: [PATCH] arm64: dts: armada-3720-espressobin: use Linux + model/compatible strings + +Fix the actual board vendor and ease synching dts files from Linux. +--- + arch/arm/dts/armada-3720-espressobin.dts | 4 ++-- + board/Marvell/mvebu_armada-37xx/board.c | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +--- a/arch/arm/dts/armada-3720-espressobin.dts ++++ b/arch/arm/dts/armada-3720-espressobin.dts +@@ -50,8 +50,8 @@ + #include "armada-372x.dtsi" + + / { +- model = "Marvell Armada 3720 Community Board ESPRESSOBin"; +- compatible = "marvell,armada-3720-espressobin", "marvell,armada3720", "marvell,armada3710"; ++ model = "Globalscale Marvell ESPRESSOBin Board"; ++ compatible = "globalscale,espressobin", "marvell,armada3720", "marvell,armada3710"; + + chosen { + stdout-path = "serial0:115200n8"; +--- a/board/Marvell/mvebu_armada-37xx/board.c ++++ b/board/Marvell/mvebu_armada-37xx/board.c +@@ -201,7 +201,7 @@ static int mii_multi_chip_mode_write(str + /* Bring-up board-specific network stuff */ + int board_network_enable(struct mii_dev *bus) + { +- if (!of_machine_is_compatible("marvell,armada-3720-espressobin")) ++ if (!of_machine_is_compatible("globalscale,espressobin")) + return 0; + + /* +@@ -253,7 +253,7 @@ int ft_board_setup(void *blob, struct bd + int part_off; + + /* Fill SPI MTD partitions for Linux kernel on Espressobin */ +- if (!of_machine_is_compatible("marvell,armada-3720-espressobin")) ++ if (!of_machine_is_compatible("globalscale,espressobin")) + return 0; + + spi_off = fdt_node_offset_by_compatible(blob, -1, "jedec,spi-nor"); diff --git a/package/boot/uboot-mvebu/patches/132-arm64-dts-armada-3720-espressobin-split-common-parts.patch b/package/boot/uboot-mvebu/patches/132-arm64-dts-armada-3720-espressobin-split-common-parts.patch new file mode 100644 index 0000000000..d3af221c01 --- /dev/null +++ b/package/boot/uboot-mvebu/patches/132-arm64-dts-armada-3720-espressobin-split-common-parts.patch @@ -0,0 +1,369 @@ +From ee59573dd531df96de0d9dc8e79b34ed3716c864 Mon Sep 17 00:00:00 2001 +From: Andre Heider +Date: Fri, 4 Sep 2020 15:38:58 +0200 +Subject: [PATCH] arm64: dts: armada-3720-espressobin: split common parts to + .dtsi + +Move most of the dts to the new common +arch/arm/dts/armada-3720-espressobin.dtsi file, just like Linux has. + +The dts itself is imported from Linux. + +Signed-off-by: Andre Heider +--- + arch/arm/dts/armada-3720-espressobin.dts | 190 ++---------------- + ...sobin.dts => armada-3720-espressobin.dtsi} | 3 - + 2 files changed, 20 insertions(+), 173 deletions(-) + rewrite arch/arm/dts/armada-3720-espressobin.dts (95%) + copy arch/arm/dts/{armada-3720-espressobin.dts => armada-3720-espressobin.dtsi} (96%) + +--- a/arch/arm/dts/armada-3720-espressobin.dts ++++ b/arch/arm/dts/armada-3720-espressobin.dts +@@ -1,170 +1,20 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + /* +- * Device Tree file for Marvell Armada 3720 community board +- * (ESPRESSOBin) ++ * Device Tree file for Globalscale Marvell ESPRESSOBin Board + * Copyright (C) 2016 Marvell + * +- * Gregory CLEMENT +- * Konstantin Porotchkin ++ * Romain Perier + * +- * This file is dual-licensed: you can use it either under the terms +- * of the GPL or the X11 license, at your option. Note that this dual +- * licensing only applies to this file, and not this project as a +- * whole. +- * +- * a) This file is free software; you can redistribute it and/or +- * modify it under the terms of the GNU General Public License as +- * published by the Free Software Foundation; either version 2 of the +- * License, or (at your option) any later version. +- * +- * This file is distributed in the hope that it will be useful +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * Or, alternatively +- * +- * b) Permission is hereby granted, free of charge, to any person +- * obtaining a copy of this software and associated documentation +- * files (the "Software"), to deal in the Software without +- * restriction, including without limitation the rights to use +- * copy, modify, merge, publish, distribute, sublicense, and/or +- * sell copies of the Software, and to permit persons to whom the +- * Software is furnished to do so, subject to the following +- * conditions: +- * +- * The above copyright notice and this permission notice shall be +- * included in all copies or substantial portions of the Software. +- * +- * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY +- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +- * OTHER DEALINGS IN THE SOFTWARE. ++ */ ++/* ++ * Schematic available at http://espressobin.net/wp-content/uploads/2017/08/ESPRESSObin_V5_Schematics.pdf + */ + + /dts-v1/; + +-#include "armada-372x.dtsi" ++#include "armada-3720-espressobin.dtsi" + + / { + model = "Globalscale Marvell ESPRESSOBin Board"; + compatible = "globalscale,espressobin", "marvell,armada3720", "marvell,armada3710"; +- +- chosen { +- stdout-path = "serial0:115200n8"; +- }; +- +- aliases { +- ethernet0 = ð0; +- i2c0 = &i2c0; +- spi0 = &spi0; +- }; +- +- memory { +- device_type = "memory"; +- reg = <0x00000000 0x00000000 0x00000000 0x20000000>; +- }; +- +- vcc_sd_reg0: regulator@0 { +- compatible = "regulator-gpio"; +- regulator-name = "vcc_sd0"; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <3300000>; +- regulator-type = "voltage"; +- states = <1800000 0x1 +- 3300000 0x0>; +- gpios = <&gpionb 4 GPIO_ACTIVE_HIGH>; +- }; +-}; +- +-&comphy { +- max-lanes = <3>; +- phy0 { +- phy-type = ; +- phy-speed = ; +- }; +- +- phy1 { +- phy-type = ; +- phy-speed = ; +- }; +- +- phy2 { +- phy-type = ; +- phy-speed = ; +- }; +-}; +- +-ð0 { +- status = "okay"; +- pinctrl-names = "default"; +- pinctrl-0 = <&rgmii_pins>, <&smi_pins>; +- phy-mode = "rgmii"; +- phy_addr = <0x1>; +- fixed-link { +- speed = <1000>; +- full-duplex; +- }; +-}; +- +-&i2c0 { +- pinctrl-names = "default"; +- pinctrl-0 = <&i2c1_pins>; +- status = "okay"; +-}; +- +-/* CON3 */ +-&sata { +- status = "okay"; +-}; +- +-&sdhci0 { +- pinctrl-names = "default"; +- pinctrl-0 = <&sdio_pins>; +- bus-width = <4>; +- cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>; +- vqmmc-supply = <&vcc_sd_reg0>; +- status = "okay"; +-}; +- +-&spi0 { +- status = "okay"; +- pinctrl-names = "default"; +- pinctrl-0 = <&spi_quad_pins>; +- +- spi-flash@0 { +- #address-cells = <1>; +- #size-cells = <1>; +- compatible = "st,m25p128", "jedec,spi-nor"; +- reg = <0>; /* Chip select 0 */ +- spi-max-frequency = <50000000>; +- m25p,fast-read; +- }; +-}; +- +-/* Exported on the micro USB connector CON32 through an FTDI */ +-&uart0 { +- pinctrl-names = "default"; +- pinctrl-0 = <&uart1_pins>; +- status = "okay"; +-}; +- +-/* CON29 */ +-&usb2 { +- status = "okay"; +-}; +- +-/* CON31 */ +-&usb3 { +- status = "okay"; +-}; +- +-&pcie0 { +- pinctrl-names = "default"; +- pinctrl-0 = <&pcie_pins>; +- reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>; +- status = "okay"; + }; +--- /dev/null ++++ b/arch/arm/dts/armada-3720-espressobin.dtsi +@@ -0,0 +1,167 @@ ++/* ++ * Device Tree file for Marvell Armada 3720 community board ++ * (ESPRESSOBin) ++ * Copyright (C) 2016 Marvell ++ * ++ * Gregory CLEMENT ++ * Konstantin Porotchkin ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) This file is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This file is distributed in the hope that it will be useful ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * Or, alternatively ++ * ++ * b) Permission is hereby granted, free of charge, to any person ++ * obtaining a copy of this software and associated documentation ++ * files (the "Software"), to deal in the Software without ++ * restriction, including without limitation the rights to use ++ * copy, modify, merge, publish, distribute, sublicense, and/or ++ * sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following ++ * conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ++ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++/dts-v1/; ++ ++#include "armada-372x.dtsi" ++ ++/ { ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ aliases { ++ ethernet0 = ð0; ++ i2c0 = &i2c0; ++ spi0 = &spi0; ++ }; ++ ++ memory { ++ device_type = "memory"; ++ reg = <0x00000000 0x00000000 0x00000000 0x20000000>; ++ }; ++ ++ vcc_sd_reg0: regulator@0 { ++ compatible = "regulator-gpio"; ++ regulator-name = "vcc_sd0"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-type = "voltage"; ++ states = <1800000 0x1 ++ 3300000 0x0>; ++ gpios = <&gpionb 4 GPIO_ACTIVE_HIGH>; ++ }; ++}; ++ ++&comphy { ++ max-lanes = <3>; ++ phy0 { ++ phy-type = ; ++ phy-speed = ; ++ }; ++ ++ phy1 { ++ phy-type = ; ++ phy-speed = ; ++ }; ++ ++ phy2 { ++ phy-type = ; ++ phy-speed = ; ++ }; ++}; ++ ++ð0 { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rgmii_pins>, <&smi_pins>; ++ phy-mode = "rgmii"; ++ phy_addr = <0x1>; ++ fixed-link { ++ speed = <1000>; ++ full-duplex; ++ }; ++}; ++ ++&i2c0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_pins>; ++ status = "okay"; ++}; ++ ++/* CON3 */ ++&sata { ++ status = "okay"; ++}; ++ ++&sdhci0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sdio_pins>; ++ bus-width = <4>; ++ cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>; ++ vqmmc-supply = <&vcc_sd_reg0>; ++ status = "okay"; ++}; ++ ++&spi0 { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spi_quad_pins>; ++ ++ spi-flash@0 { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ compatible = "st,m25p128", "jedec,spi-nor"; ++ reg = <0>; /* Chip select 0 */ ++ spi-max-frequency = <50000000>; ++ m25p,fast-read; ++ }; ++}; ++ ++/* Exported on the micro USB connector CON32 through an FTDI */ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart1_pins>; ++ status = "okay"; ++}; ++ ++/* CON29 */ ++&usb2 { ++ status = "okay"; ++}; ++ ++/* CON31 */ ++&usb3 { ++ status = "okay"; ++}; ++ ++&pcie0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pcie_pins>; ++ reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>; ++ status = "okay"; ++}; diff --git a/package/boot/uboot-mvebu/patches/133-arm64-dts-a3720-add-support-for-boards-with-populate.patch b/package/boot/uboot-mvebu/patches/133-arm64-dts-a3720-add-support-for-boards-with-populate.patch new file mode 100644 index 0000000000..f35b45d0e1 --- /dev/null +++ b/package/boot/uboot-mvebu/patches/133-arm64-dts-a3720-add-support-for-boards-with-populate.patch @@ -0,0 +1,89 @@ +From 83908b6e2e5a7d7b0f4d040ffb4bf3ce6807b8fe Mon Sep 17 00:00:00 2001 +From: Andre Heider +Date: Fri, 4 Sep 2020 15:44:41 +0200 +Subject: [PATCH] arm64: dts: a3720: add support for boards with populated emmc + +Import armada-3720-espressobin-emmc.dts from Linux, but use sdhc1 for +emmc, since sdhc0 is used for the sd card. + +Signed-off-by: Andre Heider +--- + arch/arm/dts/Makefile | 1 + + arch/arm/dts/armada-3720-espressobin-emmc.dts | 44 +++++++++++++++++++ + doc/README.marvell | 7 ++- + 3 files changed, 50 insertions(+), 2 deletions(-) + create mode 100644 arch/arm/dts/armada-3720-espressobin-emmc.dts + +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -202,6 +202,7 @@ dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harm + dtb-$(CONFIG_ARCH_MVEBU) += \ + armada-3720-db.dtb \ + armada-3720-espressobin.dtb \ ++ armada-3720-espressobin-emmc.dtb \ + armada-3720-turris-mox.dtb \ + armada-3720-uDPU.dtb \ + armada-375-db.dtb \ +--- /dev/null ++++ b/arch/arm/dts/armada-3720-espressobin-emmc.dts +@@ -0,0 +1,44 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Device Tree file for Globalscale Marvell ESPRESSOBin Board with eMMC ++ * Copyright (C) 2018 Marvell ++ * ++ * Romain Perier ++ * Konstantin Porotchkin ++ * ++ */ ++/* ++ * Schematic available at http://espressobin.net/wp-content/uploads/2017/08/ESPRESSObin_V5_Schematics.pdf ++ */ ++ ++/dts-v1/; ++ ++#include "armada-3720-espressobin.dtsi" ++ ++/ { ++ model = "Globalscale Marvell ESPRESSOBin Board (eMMC)"; ++ compatible = "globalscale,espressobin-emmc", "globalscale,espressobin", ++ "marvell,armada3720", "marvell,armada3710"; ++}; ++ ++/* U11 */ ++&sdhci1 { ++ non-removable; ++ bus-width = <8>; ++ mmc-ddr-1_8v; ++ mmc-hs400-1_8v; ++ marvell,xenon-emmc; ++ marvell,xenon-tun-count = <9>; ++ marvell,pad-type = "fixed-1-8v"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc_pins>; ++ status = "okay"; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mmccard: mmccard@0 { ++ compatible = "mmc-card"; ++ reg = <0>; ++ }; ++}; +--- a/doc/README.marvell ++++ b/doc/README.marvell +@@ -43,8 +43,11 @@ Build Procedure + In order to prevent this, the required device-tree MUST be set during compilation. + All device-tree files are located in ./arch/arm/dts/ folder. + +- For other DB boards (MacchiatoBin, EspressoBin and 3700 DB board) compile u-boot with +- just default device-tree from defconfig using: ++ For the EspressoBin board with populated eMMC device use ++ # make DEVICE_TREE=armada-3720-espressobin-emmc ++ ++ For other DB boards (MacchiatoBin, EspressoBin without soldered eMMC and 3700 DB board) ++ compile u-boot with just default device-tree from defconfig using: + + # make + diff --git a/package/boot/uboot-mvebu/patches/134-arm-mvebu-Espressobin-Set-environment-variable-fdtfi.patch b/package/boot/uboot-mvebu/patches/134-arm-mvebu-Espressobin-Set-environment-variable-fdtfi.patch new file mode 100644 index 0000000000..fd270ddae2 --- /dev/null +++ b/package/boot/uboot-mvebu/patches/134-arm-mvebu-Espressobin-Set-environment-variable-fdtfi.patch @@ -0,0 +1,100 @@ +From d59406482c1847959305a986376b35e57da28e69 Mon Sep 17 00:00:00 2001 +From: Andre Heider +Date: Sat, 5 Sep 2020 12:45:59 +0200 +Subject: [PATCH] arm: mvebu: Espressobin: Set environment variable fdtfile + +Required for the generic distro mechanism. + +Linux ships with 4 variants: +marvell/armada-3720-espressobin-v7-emmc.dtb +marvell/armada-3720-espressobin-v7.dtb +marvell/armada-3720-espressobin-emmc.dtb +marvell/armada-3720-espressobin.dtb + +Use available information to determine the appropriate filename. + +Tested on a v5 board without eMMC. + +Signed-off-by: Andre Heider +--- + board/Marvell/mvebu_armada-37xx/board.c | 47 +++++++++++++++++++++ + configs/mvebu_espressobin-88f3720_defconfig | 1 + + 2 files changed, 48 insertions(+) + +--- a/board/Marvell/mvebu_armada-37xx/board.c ++++ b/board/Marvell/mvebu_armada-37xx/board.c +@@ -5,6 +5,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -50,6 +51,22 @@ DECLARE_GLOBAL_DATA_PTR; + #define MVEBU_G2_SMI_PHY_CMD_REG (24) + #define MVEBU_G2_SMI_PHY_DATA_REG (25) + ++/* ++ * Memory Controller Registers ++ * ++ * Assembled based on public information: ++ * https://gitlab.nic.cz/turris/mox-boot-builder/-/blob/master/wtmi/main.c#L332-336 ++ * https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell/blob/mv_ddr-armada-18.12/drivers/mv_ddr_mc6.h#L309-L332 ++ * ++ * And checked against the written register values for the various topologies: ++ * https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell/blob/mv_ddr-armada-atf-mainline/a3700/mv_ddr_tim.h ++ */ ++#define A3700_CH0_MC_CTRL2_REG MVEBU_REGISTER(0x002c4) ++#define A3700_MC_CTRL2_SDRAM_TYPE_MASK 0xf ++#define A3700_MC_CTRL2_SDRAM_TYPE_OFFS 4 ++#define A3700_MC_CTRL2_SDRAM_TYPE_DDR3 2 ++#define A3700_MC_CTRL2_SDRAM_TYPE_DDR4 3 ++ + int board_early_init_f(void) + { + return 0; +@@ -63,6 +80,36 @@ int board_init(void) + return 0; + } + ++#ifdef CONFIG_BOARD_LATE_INIT ++int board_late_init(void) ++{ ++ bool ddr4, emmc; ++ ++ if (env_get("fdtfile")) ++ return 0; ++ ++ if (!of_machine_is_compatible("globalscale,espressobin")) ++ return 0; ++ ++ /* If the memory controller has been configured for DDR4, we're running on v7 */ ++ ddr4 = ((readl(A3700_CH0_MC_CTRL2_REG) >> A3700_MC_CTRL2_SDRAM_TYPE_OFFS) ++ & A3700_MC_CTRL2_SDRAM_TYPE_MASK) == A3700_MC_CTRL2_SDRAM_TYPE_DDR4; ++ ++ emmc = of_machine_is_compatible("globalscale,espressobin-emmc"); ++ ++ if (ddr4 && emmc) ++ env_set("fdtfile", "marvell/armada-3720-espressobin-v7-emmc.dtb"); ++ else if (ddr4) ++ env_set("fdtfile", "marvell/armada-3720-espressobin-v7.dtb"); ++ else if (emmc) ++ env_set("fdtfile", "marvell/armada-3720-espressobin-emmc.dtb"); ++ else ++ env_set("fdtfile", "marvell/armada-3720-espressobin.dtb"); ++ ++ return 0; ++} ++#endif ++ + /* Board specific AHCI / SATA enable code */ + int board_ahci_enable(void) + { +--- a/configs/mvebu_espressobin-88f3720_defconfig ++++ b/configs/mvebu_espressobin-88f3720_defconfig +@@ -84,3 +84,4 @@ CONFIG_USB_ETHER_RTL8152=y + CONFIG_USB_ETHER_SMSC95XX=y + CONFIG_SHA1=y + CONFIG_SHA256=y ++CONFIG_BOARD_LATE_INIT=y From 847b5927c62c7d73f966001ebcc80fb37ce0d141 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Wed, 19 Aug 2020 20:30:25 +0200 Subject: [PATCH 10/17] arm-trusted-firmware-mvebu: reuse default prepare target Don't wipe internal state files, fixes e.g. refreshing patches. Signed-off-by: Andre Heider --- package/boot/arm-trusted-firmware-mvebu/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package/boot/arm-trusted-firmware-mvebu/Makefile b/package/boot/arm-trusted-firmware-mvebu/Makefile index 239c6dd33c..73daee1bba 100644 --- a/package/boot/arm-trusted-firmware-mvebu/Makefile +++ b/package/boot/arm-trusted-firmware-mvebu/Makefile @@ -81,8 +81,7 @@ define Build/Prepare $(eval $(call Download,mv-ddr-marvell)) $(eval $(call Download,gcc-linaro)) - rm -rf $(PKG_BUILD_DIR) - $(TAR) -C $(BUILD_DIR) -xf $(DL_DIR)/$(PKG_SOURCE) + $(call Build/Prepare/Default,) mkdir -p $(STAGING_DIR_IMAGE) $(TAR) -C $(STAGING_DIR_IMAGE) -xf $(DL_DIR)/$(A3700_UTILS_SOURCE) From 53065b2dee23eba0da89f3c44da8936ae393cdfc Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Thu, 20 Aug 2020 07:51:41 +0200 Subject: [PATCH 11/17] arm-trusted-firmware-mvebu: fix compiler spam Gets rid of these warnings: cc1: note: someone does not honour COPTS correctly, passed 0 times Signed-off-by: Andre Heider --- package/boot/arm-trusted-firmware-mvebu/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/boot/arm-trusted-firmware-mvebu/Makefile b/package/boot/arm-trusted-firmware-mvebu/Makefile index 73daee1bba..7f829f94c6 100644 --- a/package/boot/arm-trusted-firmware-mvebu/Makefile +++ b/package/boot/arm-trusted-firmware-mvebu/Makefile @@ -89,6 +89,8 @@ define Build/Prepare $(TAR) -C $(STAGING_DIR_IMAGE) -xf $(DL_DIR)/$(LINARO_SOURCE) endef +export GCC_HONOUR_COPTS=s + TARGET_CFLAGS = "" MAKE_VARS= \ From 75e9d8e6e7dab768e0d3eafe601c96deb0499aec Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Thu, 20 Aug 2020 07:53:41 +0200 Subject: [PATCH 12/17] arm-trusted-firmware-mvebu: install to own subdir Lift the dependency on the build order, where flash-image.bin may be missing from the u-boot dir. While at it, also install the uart images for rescue purposes. Signed-off-by: Andre Heider --- package/boot/arm-trusted-firmware-mvebu/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/boot/arm-trusted-firmware-mvebu/Makefile b/package/boot/arm-trusted-firmware-mvebu/Makefile index 7f829f94c6..068fe507e9 100644 --- a/package/boot/arm-trusted-firmware-mvebu/Makefile +++ b/package/boot/arm-trusted-firmware-mvebu/Makefile @@ -107,7 +107,9 @@ MAKE_FLAGS = \ fip define Build/InstallDev - $(CP) $(PKG_BUILD_DIR)/build/$(PLAT)/release/flash-image.bin $(BIN_DIR)/u-boot-$(BOARDNAME)/ + $(INSTALL_DIR) $(BIN_DIR)/flash-image-$(BOARDNAME) + $(CP) $(PKG_BUILD_DIR)/build/$(PLAT)/release/flash-image.bin $(BIN_DIR)/flash-image-$(BOARDNAME)/ + $(CP) $(PKG_BUILD_DIR)/build/$(PLAT)/release/uart-images.tgz $(BIN_DIR)/flash-image-$(BOARDNAME)/ endef $(eval $(call BuildPackage,arm-trusted-firmware-mvebu/uDPU)) From 65c1c91942cbb1297e0cdbd5ff75c3fc7ed43770 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Wed, 19 Aug 2020 17:54:51 +0200 Subject: [PATCH 13/17] arm-trusted-firmware-mvebu: update to v2.3 Switch to release tarballs and add missing license information while here. Signed-off-by: Andre Heider --- .../boot/arm-trusted-firmware-mvebu/Makefile | 18 +++++++++-------- .../patches/200-hostssl.patch | 20 +++++++++++++++++++ 2 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 package/boot/arm-trusted-firmware-mvebu/patches/200-hostssl.patch diff --git a/package/boot/arm-trusted-firmware-mvebu/Makefile b/package/boot/arm-trusted-firmware-mvebu/Makefile index 068fe507e9..b97eb5877e 100644 --- a/package/boot/arm-trusted-firmware-mvebu/Makefile +++ b/package/boot/arm-trusted-firmware-mvebu/Makefile @@ -8,15 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=arm-trusted-firmware-mvebu -PKG_VERSION:=2.2 -PKG_RELEASE:=2 +PKG_VERSION:=2.3 +PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE:=$(PKG_NAME)-$(PKG_RELEASE).tar.xz -PKG_SOURCE_URL:=https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git -PKG_SOURCE_DATE:=2020-01-21 -PKG_SOURCE_VERSION:=3b3d406ebc6f5dae6b5c9170c674183026e7301b -PKG_MIRROR_HASH:=7c63da237c52808e1fe49458d5a4ac804a8eb4c365e26c6b2b709256e8fc041f +PKG_SOURCE:=trusted-firmware-a-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot +PKG_HASH:=37f917922bcef181164908c470a2f941006791c0113d738c498d39d95d543b21 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/trusted-firmware-a-$(PKG_VERSION) + +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=docs/license.rst PKG_MAINTAINER:=Vladimir Vid @@ -97,6 +98,7 @@ MAKE_VARS= \ CROSS_COMPILE="$(TARGET_CROSS)" MAKE_FLAGS = \ + OPENSSL_DIR=$(STAGING_DIR_HOST) \ CROSS_CM3=$(STAGING_DIR_IMAGE)/$(LINARO_NAME)-$(LINARO_RELEASE).$(LINARO_VERSION)/bin/arm-linux-gnueabi- \ BL33=$(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.bin \ MV_DDR_PATH=$(STAGING_DIR_IMAGE)/$(MV_DDR_NAME) \ diff --git a/package/boot/arm-trusted-firmware-mvebu/patches/200-hostssl.patch b/package/boot/arm-trusted-firmware-mvebu/patches/200-hostssl.patch new file mode 100644 index 0000000000..fc1a24a8ff --- /dev/null +++ b/package/boot/arm-trusted-firmware-mvebu/patches/200-hostssl.patch @@ -0,0 +1,20 @@ +--- a/tools/fiptool/Makefile ++++ b/tools/fiptool/Makefile +@@ -19,7 +19,7 @@ ifeq (${DEBUG},1) + else + HOSTCCFLAGS += -O2 + endif +-LDLIBS := -lcrypto ++LDLIBS := -L${OPENSSL_DIR}/lib -lcrypto + + ifeq (${V},0) + Q := @ +@@ -27,7 +27,7 @@ else + Q := + endif + +-INCLUDE_PATHS := -I../../include/tools_share ++INCLUDE_PATHS := -I../../include/tools_share -I${OPENSSL_DIR}/include + + HOSTCC ?= gcc + From f6378b9e5394dd8723eaa2f30f35c2e72b024c46 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sun, 30 Aug 2020 06:52:59 +0200 Subject: [PATCH 14/17] arm-trusted-firmware-mvebu: update a3700-utils Update to current head of the branch A3700_utils-armada-18.12-fixed: 0967979 ddr: Add DDR3 2CS layout for EspressoBin v5 2GB board 486523e ddr: fix typo for ESPRESSObin 2GB layout 490b2b3 TBB: Fix building for Crypto++ 6.0 and later 0141dd1 TBB: Split INCDIR from LIBDIR Signed-off-by: Andre Heider --- package/boot/arm-trusted-firmware-mvebu/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/boot/arm-trusted-firmware-mvebu/Makefile b/package/boot/arm-trusted-firmware-mvebu/Makefile index b97eb5877e..1071cf35ba 100644 --- a/package/boot/arm-trusted-firmware-mvebu/Makefile +++ b/package/boot/arm-trusted-firmware-mvebu/Makefile @@ -40,15 +40,15 @@ $(call Package/arm-trusted-firmware-mvebu) endef A3700_UTILS_NAME:=a3700-utils -A3700_UTILS_RELEASE:=18.12.1 +A3700_UTILS_RELEASE:=09679790 A3700_UTILS_SOURCE=$(A3700_UTILS_NAME)-$(A3700_UTILS_RELEASE).tar.bz2 define Download/a3700-utils FILE:=$(A3700_UTILS_SOURCE) PROTO:=git URL:=https://github.com/MarvellEmbeddedProcessors/A3700-utils-marvell.git - VERSION:=e6bb176fb9936d9160e53ae09275000dc6440686 - MIRROR_HASH:=c3edf71cbf1fc2e5482d36e36a34c79d682d2c87fdfb909b4dc6327a171e7bd4 + VERSION:=096797908ddd69a679fd55595c41fc02809829a9 + MIRROR_HASH:=9276d63d41b2e221c2fd5cceee988ca26eff5005747787f084868b3940173b7a SUBDIR:=$(A3700_UTILS_NAME) endef From 8cfb839907ad3b18decc053771d619a7fff9f99b Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sat, 2 Nov 2019 13:14:08 +0100 Subject: [PATCH 15/17] arm-trusted-firmware-mvebu: add support for espressobin Use build variants to cover all 11 hardware options [0]: espressobin-512mb espressobin-v3-v5-1gb-1cs espressobin-v3-v5-1gb-1cs-emmc espressobin-v3-v5-1gb-2cs espressobin-v3-v5-1gb-2cs-emmc espressobin-v3-v5-2gb espressobin-v3-v5-2gb-emmc espressobin-v7-1gb espressobin-v7-1gb-emmc espressobin-v7-2gb espressobin-v7-2gb-emmc CLOCKSPRESET is set to CPU_800_DDR_800 for all builds, which is the only stable configuration. That actually matches what Globalscale shipped as CPU_1000_DDR_800 combined with kernel versions < v4.19.42. [1][2]. [0] https://github.com/ARM-software/arm-trusted-firmware/blob/master/docs/plat/marvell/armada/build.rst [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8db82563451f976597ab7b282ec655e4390a4088 [2] https://forum.armbian.com/topic/10335-espressobin-update-to-585-results-in-kernel-panic/?tab=comments#comment-79916 Signed-off-by: Andre Heider --- .../boot/arm-trusted-firmware-mvebu/Makefile | 170 +++++++++++++++--- 1 file changed, 147 insertions(+), 23 deletions(-) diff --git a/package/boot/arm-trusted-firmware-mvebu/Makefile b/package/boot/arm-trusted-firmware-mvebu/Makefile index 1071cf35ba..9e917545a7 100644 --- a/package/boot/arm-trusted-firmware-mvebu/Makefile +++ b/package/boot/arm-trusted-firmware-mvebu/Makefile @@ -26,15 +26,126 @@ include $(INCLUDE_DIR)/package.mk define Package/arm-trusted-firmware-mvebu SECTION:=boot CATEGORY:=Boot Loaders - TITLE:=ARM Trusted Firmware for mvebu devices + DEPENDS:=@TARGET_mvebu_cortexa53 + VARIANT:=$(subst arm-trusted-firmware-mvebu-,,$(1)) endef -define Package/arm-trusted-firmware-mvebu/uDPU -$(call Package/arm-trusted-firmware-mvebu) - BOARDNAME:=uDPU +define Package/arm-trusted-firmware-mvebu-espressobin-512mb + $(Package/arm-trusted-firmware-mvebu) + TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin (512MB) + DEPENDS:=+u-boot-espressobin + UBOOT:=espressobin + DDR_TOPOLOGY:=0 + CLOCKSPRESET:=CPU_800_DDR_800 + PLAT:=a3700 +endef + +define Package/arm-trusted-firmware-mvebu-espressobin-v3-v5-1gb-1cs + $(Package/arm-trusted-firmware-mvebu) + TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V3-V5 (1GB 1CS) + DEPENDS:=+u-boot-espressobin + UBOOT:=espressobin + DDR_TOPOLOGY:=2 + CLOCKSPRESET:=CPU_800_DDR_800 + PLAT:=a3700 +endef + +define Package/arm-trusted-firmware-mvebu-espressobin-v3-v5-1gb-1cs-emmc + $(Package/arm-trusted-firmware-mvebu) + TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V3-V5 (1GB 1CS, eMMC) + DEPENDS:=+u-boot-espressobin-emmc + UBOOT:=espressobin-emmc + DDR_TOPOLOGY:=4 + CLOCKSPRESET:=CPU_800_DDR_800 + PLAT:=a3700 +endef + +define Package/arm-trusted-firmware-mvebu-espressobin-v3-v5-1gb-2cs + $(Package/arm-trusted-firmware-mvebu) + TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V3-V5 (1GB, 2CS) + DEPENDS:=+u-boot-espressobin + UBOOT:=espressobin + DDR_TOPOLOGY:=2 + CLOCKSPRESET:=CPU_800_DDR_800 + PLAT:=a3700 +endef + +define Package/arm-trusted-firmware-mvebu-espressobin-v3-v5-1gb-2cs-emmc + $(Package/arm-trusted-firmware-mvebu) + TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V3-V5 (1GB 2CS, eMMC) + DEPENDS:=+u-boot-espressobin-emmc + UBOOT:=espressobin-emmc + DDR_TOPOLOGY:=2 + CLOCKSPRESET:=CPU_800_DDR_800 + PLAT:=a3700 +endef + +define Package/arm-trusted-firmware-mvebu-espressobin-v3-v5-2gb + $(Package/arm-trusted-firmware-mvebu) + TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V3-V5 (2GB) + DEPENDS:=+u-boot-espressobin + UBOOT:=espressobin + DDR_TOPOLOGY:=7 + CLOCKSPRESET:=CPU_800_DDR_800 + PLAT:=a3700 +endef + +define Package/arm-trusted-firmware-mvebu-espressobin-v3-v5-2gb-emmc + $(Package/arm-trusted-firmware-mvebu) + TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V3-V5 (2GB, eMMC) + DEPENDS:=+u-boot-espressobin-emmc + UBOOT:=espressobin-emmc + DDR_TOPOLOGY:=7 + CLOCKSPRESET:=CPU_800_DDR_800 + PLAT:=a3700 +endef + +define Package/arm-trusted-firmware-mvebu-espressobin-v7-1gb + $(Package/arm-trusted-firmware-mvebu) + TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V7 (1GB) + DEPENDS:=+u-boot-espressobin + UBOOT:=espressobin + DDR_TOPOLOGY:=5 + CLOCKSPRESET:=CPU_800_DDR_800 + PLAT:=a3700 +endef + +define Package/arm-trusted-firmware-mvebu-espressobin-v7-1gb-emmc + $(Package/arm-trusted-firmware-mvebu) + TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V7 (1GB, eMMC) + DEPENDS:=+u-boot-espressobin + UBOOT:=espressobin-emmc + DDR_TOPOLOGY:=5 + CLOCKSPRESET:=CPU_800_DDR_800 + PLAT:=a3700 +endef + +define Package/arm-trusted-firmware-mvebu-espressobin-v7-2gb + $(Package/arm-trusted-firmware-mvebu) + TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V7 (2GB) + DEPENDS:=+u-boot-espressobin + UBOOT:=espressobin + DDR_TOPOLOGY:=6 + CLOCKSPRESET:=CPU_800_DDR_800 + PLAT:=a3700 +endef + +define Package/arm-trusted-firmware-mvebu-espressobin-v7-2gb-emmc + $(Package/arm-trusted-firmware-mvebu) + TITLE:=ARM Trusted Firmware for Marvell ESPRESSObin V7 (2GB, eMMC) + DEPENDS:=+u-boot-espressobin + UBOOT:=espressobin-emmc + DDR_TOPOLOGY:=6 + CLOCKSPRESET:=CPU_800_DDR_800 + PLAT:=a3700 +endef + +define Package/arm-trusted-firmware-mvebu-udpu + $(Package/arm-trusted-firmware-mvebu) TITLE:=ARM Trusted Firmware for Methode uDPU DEPENDS:=+u-boot-uDPU UBOOT:=uDPU + DDR_TOPOLOGY:=0 CLOCKSPRESET:=CPU_1000_DDR_800 PLAT:=a3700 endef @@ -94,24 +205,37 @@ export GCC_HONOUR_COPTS=s TARGET_CFLAGS = "" -MAKE_VARS= \ - CROSS_COMPILE="$(TARGET_CROSS)" - -MAKE_FLAGS = \ - OPENSSL_DIR=$(STAGING_DIR_HOST) \ - CROSS_CM3=$(STAGING_DIR_IMAGE)/$(LINARO_NAME)-$(LINARO_RELEASE).$(LINARO_VERSION)/bin/arm-linux-gnueabi- \ - BL33=$(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.bin \ - MV_DDR_PATH=$(STAGING_DIR_IMAGE)/$(MV_DDR_NAME) \ - WTP=$(STAGING_DIR_IMAGE)/$(A3700_UTILS_NAME) \ - CLOCKSPRESET=$(CLOCKSPRESET) \ - PLAT=$(PLAT) \ - all \ - fip - -define Build/InstallDev - $(INSTALL_DIR) $(BIN_DIR)/flash-image-$(BOARDNAME) - $(CP) $(PKG_BUILD_DIR)/build/$(PLAT)/release/flash-image.bin $(BIN_DIR)/flash-image-$(BOARDNAME)/ - $(CP) $(PKG_BUILD_DIR)/build/$(PLAT)/release/uart-images.tgz $(BIN_DIR)/flash-image-$(BOARDNAME)/ +define Build/Compile + $(eval $(Package/arm-trusted-firmware-mvebu-$(BUILD_VARIANT))) \ + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + CROSS_COMPILE=$(TARGET_CROSS) \ + OPENSSL_DIR=$(STAGING_DIR_HOST) \ + CROSS_CM3=$(STAGING_DIR_IMAGE)/$(LINARO_NAME)-$(LINARO_RELEASE).$(LINARO_VERSION)/bin/arm-linux-gnueabi- \ + BL33=$(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.bin \ + MV_DDR_PATH=$(STAGING_DIR_IMAGE)/$(MV_DDR_NAME) \ + WTP=$(STAGING_DIR_IMAGE)/$(A3700_UTILS_NAME) \ + DDR_TOPOLOGY=$(DDR_TOPOLOGY) \ + CLOCKSPRESET=$(CLOCKSPRESET) \ + PLAT=$(PLAT) \ + all \ + fip endef -$(eval $(call BuildPackage,arm-trusted-firmware-mvebu/uDPU)) +define Build/InstallDev + $(INSTALL_DIR) $(BIN_DIR)/flash-image-$(BUILD_VARIANT) + $(CP) $(PKG_BUILD_DIR)/build/$(PLAT)/release/flash-image.bin $(BIN_DIR)/flash-image-$(BUILD_VARIANT)/ + $(CP) $(PKG_BUILD_DIR)/build/$(PLAT)/release/uart-images.tgz $(BIN_DIR)/flash-image-$(BUILD_VARIANT)/ +endef + +$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-512mb)) +$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v3-v5-1gb-1cs)) +$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v3-v5-1gb-1cs-emmc)) +$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v3-v5-1gb-2cs)) +$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v3-v5-1gb-2cs-emmc)) +$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v3-v5-2gb)) +$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v3-v5-2gb-emmc)) +$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v7-1gb)) +$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v7-1gb-emmc)) +$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v7-2gb)) +$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-espressobin-v7-2gb-emmc)) +$(eval $(call BuildPackage,arm-trusted-firmware-mvebu-udpu)) From bf2870c1d9e162f27925e9c40eca9e0069096f3b Mon Sep 17 00:00:00 2001 From: John Thomson Date: Thu, 6 Aug 2020 07:13:54 +1000 Subject: [PATCH 16/17] kernel: fix mtd partition erase < parent_erasesize writes This bug applied where mtd partition end address, or erase start address, was not cleanly divisible by parent mtd erasesize. This error would cause the bits following the end of the partition to the next erasesize block boundary to be erased, and this partition-overflow data to be written to the partition erase address (missing additional partition offset address) of the mtd (top) parent device. Fixes: FS#2428 Signed-off-by: John Thomson Tested-by: Tomasz Maciej Nowak [shorten commit title, add Fixes, fix kernel 4.19 as well] Signed-off-by: Adrian Schmutzler --- .../411-mtd-partial_eraseblock_write.patch | 13 ++++++------- .../412-mtd-partial_eraseblock_unlock.patch | 2 +- .../411-mtd-partial_eraseblock_write.patch | 13 ++++++------- .../412-mtd-partial_eraseblock_unlock.patch | 2 +- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/target/linux/generic/pending-4.19/411-mtd-partial_eraseblock_write.patch b/target/linux/generic/pending-4.19/411-mtd-partial_eraseblock_write.patch index f3a314ae02..f945122149 100644 --- a/target/linux/generic/pending-4.19/411-mtd-partial_eraseblock_write.patch +++ b/target/linux/generic/pending-4.19/411-mtd-partial_eraseblock_write.patch @@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau /* Our partition linked list */ static LIST_HEAD(mtd_partitions); static DEFINE_MUTEX(mtd_partitions_mutex); -@@ -220,6 +222,53 @@ static int part_erase(struct mtd_info *m +@@ -220,11 +222,77 @@ static int part_erase(struct mtd_info *m { struct mtd_part *part = mtd_to_part(mtd); int ret; @@ -73,10 +73,9 @@ Signed-off-by: Felix Fietkau instr->addr += part->offset; ret = part->parent->_erase(part->parent, instr); -@@ -227,6 +276,24 @@ static int part_erase(struct mtd_info *m + if (instr->fail_addr != MTD_FAIL_ADDR_UNKNOWN) instr->fail_addr -= part->offset; - instr->addr -= part->offset; - ++ + if (mtd->flags & MTD_ERASE_PARTIAL) { + if (partial_start) { + part->parent->_write(part->parent, @@ -95,10 +94,10 @@ Signed-off-by: Felix Fietkau + kfree(erase_buf); + } + - return ret; - } + instr->addr -= part->offset; -@@ -539,19 +606,22 @@ static struct mtd_part *allocate_partiti + return ret; +@@ -539,19 +607,22 @@ static struct mtd_part *allocate_partiti remainder = do_div(tmp, wr_alignment); if ((slave->mtd.flags & MTD_WRITEABLE) && remainder) { /* Doesn't start on a boundary of major erase size */ diff --git a/target/linux/generic/pending-4.19/412-mtd-partial_eraseblock_unlock.patch b/target/linux/generic/pending-4.19/412-mtd-partial_eraseblock_unlock.patch index a54603a0f8..e038c4e60c 100644 --- a/target/linux/generic/pending-4.19/412-mtd-partial_eraseblock_unlock.patch +++ b/target/linux/generic/pending-4.19/412-mtd-partial_eraseblock_unlock.patch @@ -20,7 +20,7 @@ Signed-off-by: Tim Harvey --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c -@@ -306,7 +306,16 @@ static int part_lock(struct mtd_info *mt +@@ -307,7 +307,16 @@ static int part_lock(struct mtd_info *mt static int part_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) { struct mtd_part *part = mtd_to_part(mtd); diff --git a/target/linux/generic/pending-5.4/411-mtd-partial_eraseblock_write.patch b/target/linux/generic/pending-5.4/411-mtd-partial_eraseblock_write.patch index b46c3f5ed4..c48a144d3d 100644 --- a/target/linux/generic/pending-5.4/411-mtd-partial_eraseblock_write.patch +++ b/target/linux/generic/pending-5.4/411-mtd-partial_eraseblock_write.patch @@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau /* Our partition linked list */ static LIST_HEAD(mtd_partitions); static DEFINE_MUTEX(mtd_partitions_mutex); -@@ -206,6 +208,53 @@ static int part_erase(struct mtd_info *m +@@ -206,11 +208,77 @@ static int part_erase(struct mtd_info *m { struct mtd_part *part = mtd_to_part(mtd); int ret; @@ -73,10 +73,9 @@ Signed-off-by: Felix Fietkau instr->addr += part->offset; ret = part->parent->_erase(part->parent, instr); -@@ -213,6 +262,24 @@ static int part_erase(struct mtd_info *m + if (instr->fail_addr != MTD_FAIL_ADDR_UNKNOWN) instr->fail_addr -= part->offset; - instr->addr -= part->offset; - ++ + if (mtd->flags & MTD_ERASE_PARTIAL) { + if (partial_start) { + part->parent->_write(part->parent, @@ -95,10 +94,10 @@ Signed-off-by: Felix Fietkau + kfree(erase_buf); + } + - return ret; - } + instr->addr -= part->offset; -@@ -525,19 +592,22 @@ static struct mtd_part *allocate_partiti + return ret; +@@ -525,19 +593,22 @@ static struct mtd_part *allocate_partiti remainder = do_div(tmp, wr_alignment); if ((slave->mtd.flags & MTD_WRITEABLE) && remainder) { /* Doesn't start on a boundary of major erase size */ diff --git a/target/linux/generic/pending-5.4/412-mtd-partial_eraseblock_unlock.patch b/target/linux/generic/pending-5.4/412-mtd-partial_eraseblock_unlock.patch index 348fb9a842..b23bc1b201 100644 --- a/target/linux/generic/pending-5.4/412-mtd-partial_eraseblock_unlock.patch +++ b/target/linux/generic/pending-5.4/412-mtd-partial_eraseblock_unlock.patch @@ -20,7 +20,7 @@ Signed-off-by: Tim Harvey --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c -@@ -292,7 +292,16 @@ static int part_lock(struct mtd_info *mt +@@ -293,7 +293,16 @@ static int part_lock(struct mtd_info *mt static int part_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) { struct mtd_part *part = mtd_to_part(mtd); From 770a9c678756462ab0d94656f1fcc30624a31bd0 Mon Sep 17 00:00:00 2001 From: John Audia Date: Thu, 17 Sep 2020 09:51:25 -0400 Subject: [PATCH 17/17] kernel: bump 5.4 to 5.4.66 All modifications made by update_kernel.sh/no manual intervention needed Run-tested: ipq806x (R7800), ath79 (Archer C7v5), x86/64 No dmesg regressions, everything appears functional Signed-off-by: John Audia [add run test from PR] Signed-off-by: Adrian Schmutzler --- include/kernel-version.mk | 4 ++-- .../950-0037-Add-dwc_otg-driver.patch | 2 +- ...ice-quirks-for-Freeway-Airmouse-T3-an.patch | 4 ++-- .../100-GPIO-add-named-gpio-exports.patch | 18 +++++++++--------- ...-msm-use-sdhci_set_clock-instead-of-s.patch | 2 +- .../901-arm-boot-add-dts-files.patch | 6 ++---- .../patches-5.4/851-add-gsbi1-dts.patch | 6 ++---- .../patches-5.4/997-device_tree_cmdline.patch | 6 ++---- ...llow-specifying-s2-prot-bits-when-map.patch | 2 +- ...drop-qman-mmio-cacheable-mapping-hack.patch | 4 ++-- ...dhc-poll-ESDHC_FLUSH_ASYNC_FIFO-bit-u.patch | 6 +++--- ...i-of-esdhc-convert-to-use-esdhc_tunin.patch | 6 +++--- ...i-of-esdhc-update-tuning-erratum-A-00.patch | 6 +++--- ...pagate-resolved-link-config-via-mac_l.patch | 2 +- ...-ethernet-mediatek-support-net-labels.patch | 4 ++-- .../300-mips-add-rtl838x-platform.patch | 2 +- .../301-gpio-add-rtl838x-driver.patch | 4 ++-- ...et-dsa-add-support-for-rtl838x-switch.patch | 2 +- ...sa-increase-dsa-max-ports-for-rtl838x.patch | 6 ++---- ...include-linux-add-phy-ops-for-rtl838x.patch | 2 +- ...ivers-net-phy-eee-support-for-rtl838x.patch | 6 +++--- 21 files changed, 46 insertions(+), 54 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 716e09f8c1..5b9a6ad6d8 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -7,10 +7,10 @@ ifdef CONFIG_TESTING_KERNEL endif LINUX_VERSION-4.19 = .138 -LINUX_VERSION-5.4 = .65 +LINUX_VERSION-5.4 = .66 LINUX_KERNEL_HASH-4.19.138 = d15c27d05f6c527269b75b30cc72972748e55720e7e00ad8abbaa4fe3b1d5e02 -LINUX_KERNEL_HASH-5.4.65 = f514834417d09de1667836e443e085bf37952603f23572b69ef0fcfda16cac69 +LINUX_KERNEL_HASH-5.4.66 = ff1930376774f4c1fc884d82184b5ebea6628f0a37ed9be781c0b119c4cfdab2 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch b/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch index fe4d1d9a00..5b7f773b0b 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch @@ -1051,7 +1051,7 @@ Signed-off-by: Jonathan Bell USB_PORT_FEAT_C_OVER_CURRENT); --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c -@@ -2000,6 +2000,85 @@ free_interfaces: +@@ -1993,6 +1993,85 @@ free_interfaces: if (cp->string == NULL && !(dev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS)) cp->string = usb_cache_string(dev, cp->desc.iConfiguration); diff --git a/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index 799666ec9a..d2e7c9944f 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1241,6 +1244,9 @@ +@@ -1244,6 +1247,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 @@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL }, -@@ -182,6 +183,7 @@ static const struct hid_device_id hid_qu +@@ -184,6 +185,7 @@ static const struct hid_device_id hid_qu { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD2, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT }, diff --git a/target/linux/ipq40xx/patches-5.4/100-GPIO-add-named-gpio-exports.patch b/target/linux/ipq40xx/patches-5.4/100-GPIO-add-named-gpio-exports.patch index 61ed9ea784..d4ea379159 100644 --- a/target/linux/ipq40xx/patches-5.4/100-GPIO-add-named-gpio-exports.patch +++ b/target/linux/ipq40xx/patches-5.4/100-GPIO-add-named-gpio-exports.patch @@ -13,7 +13,7 @@ Signed-off-by: John Crispin --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c -@@ -23,6 +23,8 @@ +@@ -19,6 +19,8 @@ #include #include #include @@ -21,9 +21,9 @@ Signed-off-by: John Crispin +#include #include "gpiolib.h" - -@@ -513,3 +515,68 @@ void of_gpiochip_remove(struct gpio_chip - gpiochip_remove_pin_ranges(chip); + #include "gpiolib-of.h" +@@ -915,3 +917,68 @@ void of_gpiochip_remove(struct gpio_chip + { of_node_put(chip->of_node); } + @@ -93,7 +93,7 @@ Signed-off-by: John Crispin +module_platform_driver(gpio_export_driver); --- a/drivers/gpio/gpiolib-sysfs.c +++ b/drivers/gpio/gpiolib-sysfs.c -@@ -553,7 +553,7 @@ static struct class gpio_class = { +@@ -563,7 +563,7 @@ static struct class gpio_class = { * * Returns zero on success, else an error. */ @@ -102,7 +102,7 @@ Signed-off-by: John Crispin { struct gpio_chip *chip; struct gpio_device *gdev; -@@ -615,6 +615,8 @@ int gpiod_export(struct gpio_desc *desc, +@@ -625,6 +625,8 @@ int gpiod_export(struct gpio_desc *desc, offset = gpio_chip_hwgpio(desc); if (chip->names && chip->names[offset]) ioname = chip->names[offset]; @@ -111,7 +111,7 @@ Signed-off-by: John Crispin dev = device_create_with_groups(&gpio_class, &gdev->dev, MKDEV(0, 0), data, gpio_groups, -@@ -636,6 +638,12 @@ err_unlock: +@@ -646,6 +648,12 @@ err_unlock: gpiod_dbg(desc, "%s: status %d\n", __func__, status); return status; } @@ -141,7 +141,7 @@ Signed-off-by: John Crispin { --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h -@@ -451,6 +451,7 @@ struct gpio_desc *devm_fwnode_get_gpiod_ +@@ -668,6 +668,7 @@ static inline void devm_acpi_dev_remove_ #if IS_ENABLED(CONFIG_GPIOLIB) && IS_ENABLED(CONFIG_GPIO_SYSFS) @@ -149,7 +149,7 @@ Signed-off-by: John Crispin int gpiod_export(struct gpio_desc *desc, bool direction_may_change); int gpiod_export_link(struct device *dev, const char *name, struct gpio_desc *desc); -@@ -458,6 +459,13 @@ void gpiod_unexport(struct gpio_desc *de +@@ -675,6 +676,13 @@ void gpiod_unexport(struct gpio_desc *de #else /* CONFIG_GPIOLIB && CONFIG_GPIO_SYSFS */ diff --git a/target/linux/ipq40xx/patches-5.4/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch b/target/linux/ipq40xx/patches-5.4/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch index cf5c44e687..e56ab6d0f1 100644 --- a/target/linux/ipq40xx/patches-5.4/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch +++ b/target/linux/ipq40xx/patches-5.4/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch @@ -14,7 +14,7 @@ Signed-off-by: Robert Marko --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c -@@ -1730,7 +1730,7 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_mat +@@ -1746,7 +1746,7 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_mat static const struct sdhci_ops sdhci_msm_ops = { .reset = sdhci_reset, diff --git a/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch b/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch index e2dc45a39f..2b5220d3ed 100644 --- a/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch +++ b/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch @@ -8,10 +8,8 @@ Signed-off-by: John Crispin arch/arm/boot/dts/Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) -Index: linux-5.4.63/arch/arm/boot/dts/Makefile -=================================================================== ---- linux-5.4.63.orig/arch/arm/boot/dts/Makefile -+++ linux-5.4.63/arch/arm/boot/dts/Makefile +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile @@ -837,11 +837,52 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-apq8074-dragonboard.dtb \ qcom-apq8084-ifc6540.dtb \ diff --git a/target/linux/ipq806x/patches-5.4/851-add-gsbi1-dts.patch b/target/linux/ipq806x/patches-5.4/851-add-gsbi1-dts.patch index 2e1cb70e11..f75f994904 100644 --- a/target/linux/ipq806x/patches-5.4/851-add-gsbi1-dts.patch +++ b/target/linux/ipq806x/patches-5.4/851-add-gsbi1-dts.patch @@ -1,7 +1,5 @@ -Index: linux-5.4.65/arch/arm/boot/dts/qcom-ipq8064.dtsi -=================================================================== ---- linux-5.4.65.orig/arch/arm/boot/dts/qcom-ipq8064.dtsi -+++ linux-5.4.65/arch/arm/boot/dts/qcom-ipq8064.dtsi +--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi ++++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi @@ -865,6 +865,41 @@ reg = <0x12100000 0x10000>; }; diff --git a/target/linux/ipq806x/patches-5.4/997-device_tree_cmdline.patch b/target/linux/ipq806x/patches-5.4/997-device_tree_cmdline.patch index 92f82b3788..3cc032fdd2 100644 --- a/target/linux/ipq806x/patches-5.4/997-device_tree_cmdline.patch +++ b/target/linux/ipq806x/patches-5.4/997-device_tree_cmdline.patch @@ -1,7 +1,5 @@ -Index: linux-5.4.65/drivers/of/fdt.c -=================================================================== ---- linux-5.4.65.orig/drivers/of/fdt.c -+++ linux-5.4.65/drivers/of/fdt.c +--- a/drivers/of/fdt.c ++++ b/drivers/of/fdt.c @@ -1059,6 +1059,9 @@ int __init early_init_dt_scan_chosen(uns p = of_get_flat_dt_prop(node, "bootargs", &l); if (p != NULL && l > 0) diff --git a/target/linux/layerscape/patches-5.4/811-kvm-0002-arm-arm64-KVM-allow-specifying-s2-prot-bits-when-map.patch b/target/linux/layerscape/patches-5.4/811-kvm-0002-arm-arm64-KVM-allow-specifying-s2-prot-bits-when-map.patch index 309782b460..bdc8725399 100644 --- a/target/linux/layerscape/patches-5.4/811-kvm-0002-arm-arm64-KVM-allow-specifying-s2-prot-bits-when-map.patch +++ b/target/linux/layerscape/patches-5.4/811-kvm-0002-arm-arm64-KVM-allow-specifying-s2-prot-bits-when-map.patch @@ -64,7 +64,7 @@ Signed-off-by: Laurentiu Tudor if (writable) pte = kvm_s2pte_mkwrite(pte); -@@ -2356,7 +2358,7 @@ int kvm_arch_prepare_memory_region(struc +@@ -2361,7 +2363,7 @@ int kvm_arch_prepare_memory_region(struc ret = kvm_phys_addr_ioremap(kvm, gpa, pa, vm_end - vm_start, diff --git a/target/linux/layerscape/patches-5.4/811-kvm-0003-arm-arm64-KVM-drop-qman-mmio-cacheable-mapping-hack.patch b/target/linux/layerscape/patches-5.4/811-kvm-0003-arm-arm64-KVM-drop-qman-mmio-cacheable-mapping-hack.patch index 47ec98ec24..1b36b61e62 100644 --- a/target/linux/layerscape/patches-5.4/811-kvm-0003-arm-arm64-KVM-drop-qman-mmio-cacheable-mapping-hack.patch +++ b/target/linux/layerscape/patches-5.4/811-kvm-0003-arm-arm64-KVM-drop-qman-mmio-cacheable-mapping-hack.patch @@ -105,7 +105,7 @@ Signed-off-by: Diana Craciun if (kvm_is_device_pfn(pfn)) { mem_type = PAGE_S2_DEVICE; flags |= KVM_S2PTE_FLAG_IS_IOMAP; -@@ -2346,6 +2390,9 @@ int kvm_arch_prepare_memory_region(struc +@@ -2351,6 +2395,9 @@ int kvm_arch_prepare_memory_region(struc gpa_t gpa = mem->guest_phys_addr + (vm_start - mem->userspace_addr); phys_addr_t pa; @@ -115,7 +115,7 @@ Signed-off-by: Diana Craciun pa = (phys_addr_t)vma->vm_pgoff << PAGE_SHIFT; pa += vm_start - vma->vm_start; -@@ -2356,9 +2403,13 @@ int kvm_arch_prepare_memory_region(struc +@@ -2361,9 +2408,13 @@ int kvm_arch_prepare_memory_region(struc goto out; } diff --git a/target/linux/layerscape/patches-5.4/816-sdhc-0001-mmc-sdhci-of-esdhc-poll-ESDHC_FLUSH_ASYNC_FIFO-bit-u.patch b/target/linux/layerscape/patches-5.4/816-sdhc-0001-mmc-sdhci-of-esdhc-poll-ESDHC_FLUSH_ASYNC_FIFO-bit-u.patch index 492ae99d02..085de51c14 100644 --- a/target/linux/layerscape/patches-5.4/816-sdhc-0001-mmc-sdhci-of-esdhc-poll-ESDHC_FLUSH_ASYNC_FIFO-bit-u.patch +++ b/target/linux/layerscape/patches-5.4/816-sdhc-0001-mmc-sdhci-of-esdhc-poll-ESDHC_FLUSH_ASYNC_FIFO-bit-u.patch @@ -14,7 +14,7 @@ Signed-off-by: Yangbo Lu --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c -@@ -591,6 +591,32 @@ static void esdhc_clock_enable(struct sd +@@ -592,6 +592,32 @@ static void esdhc_clock_enable(struct sd } } @@ -47,7 +47,7 @@ Signed-off-by: Yangbo Lu static void esdhc_of_set_clock(struct sdhci_host *host, unsigned int clock) { struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); -@@ -683,9 +709,7 @@ static void esdhc_of_set_clock(struct sd +@@ -684,9 +710,7 @@ static void esdhc_of_set_clock(struct sd sdhci_writel(host, temp | ESDHC_HS400_WNDW_ADJUST, ESDHC_TBCTL); esdhc_clock_enable(host, false); @@ -58,7 +58,7 @@ Signed-off-by: Yangbo Lu } /* Wait max 20 ms */ -@@ -887,10 +911,7 @@ static void esdhc_tuning_block_enable(st +@@ -888,10 +912,7 @@ static void esdhc_tuning_block_enable(st u32 val; esdhc_clock_enable(host, false); diff --git a/target/linux/layerscape/patches-5.4/816-sdhc-0002-LF-605-mmc-sdhci-of-esdhc-convert-to-use-esdhc_tunin.patch b/target/linux/layerscape/patches-5.4/816-sdhc-0002-LF-605-mmc-sdhci-of-esdhc-convert-to-use-esdhc_tunin.patch index a80d5c91a4..df19568863 100644 --- a/target/linux/layerscape/patches-5.4/816-sdhc-0002-LF-605-mmc-sdhci-of-esdhc-convert-to-use-esdhc_tunin.patch +++ b/target/linux/layerscape/patches-5.4/816-sdhc-0002-LF-605-mmc-sdhci-of-esdhc-convert-to-use-esdhc_tunin.patch @@ -15,7 +15,7 @@ Acked-by: Adrian Hunter --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c -@@ -923,20 +923,11 @@ static void esdhc_tuning_block_enable(st +@@ -924,20 +924,11 @@ static void esdhc_tuning_block_enable(st esdhc_clock_enable(host, true); } @@ -37,7 +37,7 @@ Acked-by: Adrian Hunter /* Write TBCTL[11:8]=4'h8 */ val = sdhci_readl(host, ESDHC_TBCTL); val &= ~(0xf << 8); -@@ -955,6 +946,25 @@ static void esdhc_prepare_sw_tuning(stru +@@ -956,6 +947,25 @@ static void esdhc_prepare_sw_tuning(stru val = sdhci_readl(host, ESDHC_TBSTAT); val = sdhci_readl(host, ESDHC_TBSTAT); @@ -63,7 +63,7 @@ Acked-by: Adrian Hunter /* Reset data lines by setting ESDHCCTL[RSTD] */ sdhci_reset(host, SDHCI_RESET_DATA); /* Write 32'hFFFF_FFFF to IRQSTAT register */ -@@ -965,10 +975,8 @@ static void esdhc_prepare_sw_tuning(stru +@@ -966,10 +976,8 @@ static void esdhc_prepare_sw_tuning(stru * then program TBPTR[TB_WNDW_END_PTR] = 4 * div_ratio * and program TBPTR[TB_WNDW_START_PTR] = 8 * div_ratio. */ diff --git a/target/linux/layerscape/patches-5.4/816-sdhc-0003-LF-605-mmc-sdhci-of-esdhc-update-tuning-erratum-A-00.patch b/target/linux/layerscape/patches-5.4/816-sdhc-0003-LF-605-mmc-sdhci-of-esdhc-update-tuning-erratum-A-00.patch index fcdeb15d8f..1d2e9386c9 100644 --- a/target/linux/layerscape/patches-5.4/816-sdhc-0003-LF-605-mmc-sdhci-of-esdhc-update-tuning-erratum-A-00.patch +++ b/target/linux/layerscape/patches-5.4/816-sdhc-0003-LF-605-mmc-sdhci-of-esdhc-update-tuning-erratum-A-00.patch @@ -20,7 +20,7 @@ Acked-by: Adrian Hunter --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c -@@ -889,20 +889,20 @@ static int esdhc_signal_voltage_switch(s +@@ -890,20 +890,20 @@ static int esdhc_signal_voltage_switch(s } static struct soc_device_attribute soc_tuning_erratum_type1[] = { @@ -51,7 +51,7 @@ Acked-by: Adrian Hunter { }, }; -@@ -970,13 +970,13 @@ static void esdhc_prepare_sw_tuning(stru +@@ -971,13 +971,13 @@ static void esdhc_prepare_sw_tuning(stru /* Write 32'hFFFF_FFFF to IRQSTAT register */ sdhci_writel(host, 0xFFFFFFFF, SDHCI_INT_STATUS); @@ -68,7 +68,7 @@ Acked-by: Adrian Hunter *window_start = 8 * esdhc->div_ratio; *window_end = 4 * esdhc->div_ratio; } else { -@@ -1049,6 +1049,19 @@ static int esdhc_execute_tuning(struct m +@@ -1050,6 +1050,19 @@ static int esdhc_execute_tuning(struct m if (ret) break; diff --git a/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch b/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch index a9b2b603bb..0eac2ed66e 100644 --- a/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch +++ b/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch @@ -111,7 +111,7 @@ Signed-off-by: David S. Miller struct mvpp2_port *port = netdev_priv(dev); --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -445,9 +445,10 @@ static void mtk_mac_link_down(struct phy +@@ -446,9 +446,10 @@ static void mtk_mac_link_down(struct phy mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id)); } diff --git a/target/linux/ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch b/target/linux/ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch index 00e48fe662..39989ecca1 100644 --- a/target/linux/ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch +++ b/target/linux/ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch @@ -14,7 +14,7 @@ Signed-off-by: RenĂ© van Dorst --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -2863,6 +2863,7 @@ static const struct net_device_ops mtk_n +@@ -2887,6 +2887,7 @@ static const struct net_device_ops mtk_n static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) { @@ -22,7 +22,7 @@ Signed-off-by: RenĂ© van Dorst const __be32 *_id = of_get_property(np, "reg", NULL); struct phylink *phylink; int phy_mode, id, err; -@@ -2955,6 +2956,9 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -2979,6 +2980,9 @@ static int mtk_add_mac(struct mtk_eth *e eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH - MTK_RX_ETH_HLEN; diff --git a/target/linux/rtl838x/patches-5.4/300-mips-add-rtl838x-platform.patch b/target/linux/rtl838x/patches-5.4/300-mips-add-rtl838x-platform.patch index 34fb959a50..ec114a04c9 100644 --- a/target/linux/rtl838x/patches-5.4/300-mips-add-rtl838x-platform.patch +++ b/target/linux/rtl838x/patches-5.4/300-mips-add-rtl838x-platform.patch @@ -10,7 +10,7 @@ platforms += sgi-ip27 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -629,6 +629,29 @@ config RALINK +@@ -630,6 +630,29 @@ config RALINK select ARCH_HAS_RESET_CONTROLLER select RESET_CONTROLLER diff --git a/target/linux/rtl838x/patches-5.4/301-gpio-add-rtl838x-driver.patch b/target/linux/rtl838x/patches-5.4/301-gpio-add-rtl838x-driver.patch index 5eb8521ccb..f911e5158b 100644 --- a/target/linux/rtl838x/patches-5.4/301-gpio-add-rtl838x-driver.patch +++ b/target/linux/rtl838x/patches-5.4/301-gpio-add-rtl838x-driver.patch @@ -1,6 +1,6 @@ --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig -@@ -441,6 +441,12 @@ +@@ -441,6 +441,12 @@ config GPIO_REG A 32-bit single register GPIO fixed in/out implementation. This can be used to represent any register as a set of GPIO signals. @@ -15,7 +15,7 @@ depends on MFD_SYSCON --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile -@@ -117,6 +117,7 @@ +@@ -117,6 +117,7 @@ obj-$(CONFIG_GPIO_RC5T583) += gpio-rc5t obj-$(CONFIG_GPIO_RCAR) += gpio-rcar.o obj-$(CONFIG_GPIO_RDC321X) += gpio-rdc321x.o obj-$(CONFIG_GPIO_REG) += gpio-reg.o diff --git a/target/linux/rtl838x/patches-5.4/700-net-dsa-add-support-for-rtl838x-switch.patch b/target/linux/rtl838x/patches-5.4/700-net-dsa-add-support-for-rtl838x-switch.patch index 0082176d83..7dd12b7917 100644 --- a/target/linux/rtl838x/patches-5.4/700-net-dsa-add-support-for-rtl838x-switch.patch +++ b/target/linux/rtl838x/patches-5.4/700-net-dsa-add-support-for-rtl838x-switch.patch @@ -1,6 +1,6 @@ --- a/drivers/net/dsa/Kconfig +++ b/drivers/net/dsa/Kconfig -@@ -74,6 +74,13 @@ config NET_DSA_REALTEK_SMI +@@ -75,6 +75,13 @@ config NET_DSA_REALTEK_SMI This enables support for the Realtek SMI-based switch chips, currently only RTL8366RB. diff --git a/target/linux/rtl838x/patches-5.4/702-net-dsa-increase-dsa-max-ports-for-rtl838x.patch b/target/linux/rtl838x/patches-5.4/702-net-dsa-increase-dsa-max-ports-for-rtl838x.patch index 5329dcad59..929f2b9444 100644 --- a/target/linux/rtl838x/patches-5.4/702-net-dsa-increase-dsa-max-ports-for-rtl838x.patch +++ b/target/linux/rtl838x/patches-5.4/702-net-dsa-increase-dsa-max-ports-for-rtl838x.patch @@ -1,7 +1,5 @@ -Index: linux-5.4.24/include/linux/platform_data/dsa.h -=================================================================== ---- linux-5.4.24.orig/include/linux/platform_data/dsa.h -+++ linux-5.4.24/include/linux/platform_data/dsa.h +--- a/include/linux/platform_data/dsa.h ++++ b/include/linux/platform_data/dsa.h @@ -6,7 +6,7 @@ struct device; struct net_device; diff --git a/target/linux/rtl838x/patches-5.4/703-include-linux-add-phy-ops-for-rtl838x.patch b/target/linux/rtl838x/patches-5.4/703-include-linux-add-phy-ops-for-rtl838x.patch index db8b0403f7..c61b5f6fff 100644 --- a/target/linux/rtl838x/patches-5.4/703-include-linux-add-phy-ops-for-rtl838x.patch +++ b/target/linux/rtl838x/patches-5.4/703-include-linux-add-phy-ops-for-rtl838x.patch @@ -1,6 +1,6 @@ --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -628,6 +628,10 @@ +@@ -650,6 +650,10 @@ struct phy_driver { struct ethtool_tunable *tuna, const void *data); int (*set_loopback)(struct phy_device *dev, bool enable); diff --git a/target/linux/rtl838x/patches-5.4/704-drivers-net-phy-eee-support-for-rtl838x.patch b/target/linux/rtl838x/patches-5.4/704-drivers-net-phy-eee-support-for-rtl838x.patch index 5262be53c6..7743147ea3 100644 --- a/target/linux/rtl838x/patches-5.4/704-drivers-net-phy-eee-support-for-rtl838x.patch +++ b/target/linux/rtl838x/patches-5.4/704-drivers-net-phy-eee-support-for-rtl838x.patch @@ -1,6 +1,6 @@ --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c -@@ -1244,6 +1244,11 @@ +@@ -1242,6 +1242,11 @@ int phylink_ethtool_ksettings_set(struct /* If we have a PHY, configure the phy */ if (pl->phydev) { @@ -12,7 +12,7 @@ ret = phy_ethtool_ksettings_set(pl->phydev, &our_kset); if (ret) return ret; -@@ -1422,8 +1427,11 @@ +@@ -1420,8 +1425,11 @@ int phylink_ethtool_get_eee(struct phyli ASSERT_RTNL(); @@ -25,7 +25,7 @@ return ret; } -@@ -1440,9 +1448,11 @@ +@@ -1438,9 +1446,11 @@ int phylink_ethtool_set_eee(struct phyli ASSERT_RTNL();