From 6b5c880975e9e1e92d76bab5e281ce2cd76695be Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 8 Mar 2021 14:46:21 +0100 Subject: [PATCH 1/6] Update OpenWRT --- build.sh | 16 ++++++++-------- config | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/build.sh b/build.sh index 8787570d..d6bf0fa8 100755 --- a/build.sh +++ b/build.sh @@ -78,9 +78,9 @@ fi #_get_repo source https://github.com/ysurac/openmptcprouter-source "master" if [ "$OMR_OPENWRT" = "default" ]; then - _get_repo "$OMR_TARGET/source" https://github.com/openwrt/openwrt "482c9ff289c65480c8e7340e1740db24c62f91df" - _get_repo feeds/packages https://github.com/openwrt/packages "82ceca2619b0abf882b684599a2d62f45389a28b" - _get_repo feeds/luci https://github.com/openwrt/luci "cb0979ffb242d91f8a478438d27e2f004fb89e59" + _get_repo "$OMR_TARGET/source" https://github.com/openwrt/openwrt "ffeb37047e85a5efd96890db12710e9d60b4b76a" + _get_repo feeds/packages https://github.com/openwrt/packages "7bc897eb94c09c8fe2472091709fab7446b37976" + _get_repo feeds/luci https://github.com/openwrt/luci "5af5f4a1ee5cbcd4a3099e6e210aca0099973410" elif [ "$OMR_OPENWRT" = "master" ]; then _get_repo "$OMR_TARGET/source" https://github.com/openwrt/openwrt "master" _get_repo feeds/packages https://github.com/openwrt/packages "master" @@ -287,11 +287,11 @@ if ! patch -Rf -N -p1 -s --dry-run < ../../patches/download-ipv4.patch; then fi echo "Done" -echo "Remove check rsync" -if [ "$(grep rsync include/prereq-build.mk)" != "" ]; then - patch -N -p1 -s < ../../patches/check-rsync.patch -fi -echo "Done" +#echo "Remove check rsync" +#if [ "$(grep rsync include/prereq-build.mk)" != "" ]; then +# patch -N -p1 -s < ../../patches/check-rsync.patch +#fi +#echo "Done" if [ -f target/linux/mediatek/patches-5.4/0999-hnat.patch ]; then rm -f target/linux/mediatek/patches-5.4/0999-hnat.patch diff --git a/config b/config index 9f0e4e5a..7b627e04 100644 --- a/config +++ b/config @@ -177,6 +177,7 @@ CONFIG_PACKAGE_kmod-via-rhine=y CONFIG_PACKAGE_kmod-via-velocity=y CONFIG_PACKAGE_kmod-vmxnet3=y CONFIG_PACKAGE_kmod-fs-vfat=y +CONFIG_PACKAGE_kmod-macremapper=m CONFIG_TARGET_IMAGES_PAD=y CONFIG_TARGET_ROOTFS_EXT4=y CONFIG_KERNEL_TCP_CONG_CDG=y From 57abd7f5ae88ce62ea40d2e3b23761ddb64d52e4 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 8 Mar 2021 17:39:41 +0100 Subject: [PATCH 2/6] Remove fstools patch --- .../fstools/patches/100-disable-lazy-init.patch | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 root/package/system/fstools/patches/100-disable-lazy-init.patch diff --git a/root/package/system/fstools/patches/100-disable-lazy-init.patch b/root/package/system/fstools/patches/100-disable-lazy-init.patch deleted file mode 100644 index c3092570..00000000 --- a/root/package/system/fstools/patches/100-disable-lazy-init.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/libfstools/rootdisk.c b/libfstools/rootdisk.c -index dd00c1b..f3b87fc 100644 ---- a/libfstools/rootdisk.c -+++ b/libfstools/rootdisk.c -@@ -270,7 +270,7 @@ static int rootdisk_volume_init(struct volume *v) - if (rootdisk_use_f2fs(p)) - snprintf(str, sizeof(str), "mkfs.f2fs -q -l rootfs_data %s", v->blk); - else -- snprintf(str, sizeof(str), "mkfs.ext4 -q -L rootfs_data %s", v->blk); -+ snprintf(str, sizeof(str), "mkfs.ext4 -q -E lazy_itable_init=0,lazy_journal_init=0 -L rootfs_data %s", v->blk); - ret = system(str); - break; - default: From f5da6ef37de4fd9d3bd1c75e851d85352168bd6f Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 8 Mar 2021 19:37:50 +0100 Subject: [PATCH 3/6] Remove patch not needed anymore --- ...xhci-quirks-add-link-TRB-quirk-VL805.patch | 69 ------------------- 1 file changed, 69 deletions(-) delete mode 100644 root/target/linux/bcm27xx/patches-5.4/990-xhci-quirks-add-link-TRB-quirk-VL805.patch diff --git a/root/target/linux/bcm27xx/patches-5.4/990-xhci-quirks-add-link-TRB-quirk-VL805.patch b/root/target/linux/bcm27xx/patches-5.4/990-xhci-quirks-add-link-TRB-quirk-VL805.patch deleted file mode 100644 index 13a90ba6..00000000 --- a/root/target/linux/bcm27xx/patches-5.4/990-xhci-quirks-add-link-TRB-quirk-VL805.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 5d9d9ba7547ad27d76dd36791f54a57ff555ff8a Mon Sep 17 00:00:00 2001 -From: Jonathan Bell -Date: Mon, 26 Oct 2020 14:03:35 +0000 -Subject: [PATCH] xhci: quirks: add link TRB quirk for VL805 - -The VL805 controller can't cope with the TR Dequeue Pointer for an endpoint -being set to a Link TRB. The hardware-maintained endpoint context ends up -stuck at the address of the Link TRB, leading to erroneous ring expansion -events whenever the enqueue pointer wraps to the dequeue position. - -If the search for the end of the current TD and ring cycle state lands on -a Link TRB, move to the next segment. - -See: https://github.com/raspberrypi/linux/issues/3919 - -Signed-off-by: Jonathan Bell ---- - drivers/usb/host/xhci-pci.c | 1 + - drivers/usb/host/xhci-ring.c | 10 ++++++++++ - drivers/usb/host/xhci.h | 1 + - 3 files changed, 12 insertions(+) - -diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c -index 5238fa29ea978..b975e6803d485 100644 ---- a/drivers/usb/host/xhci-pci.c -+++ b/drivers/usb/host/xhci-pci.c -@@ -251,6 +251,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) - pdev->device == 0x3483) { - xhci->quirks |= XHCI_LPM_SUPPORT; - xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; -+ xhci->quirks |= XHCI_AVOID_DQ_ON_LINK; - } - - if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && -diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c -index d99e636f3844c..8149abff857c2 100644 ---- a/drivers/usb/host/xhci-ring.c -+++ b/drivers/usb/host/xhci-ring.c -@@ -624,6 +624,16 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci, - - } while (!cycle_found || !td_last_trb_found); - -+ /* -+ * Quirk: the xHC does not correctly parse link TRBs if the HW Dequeue -+ * pointer is set to one. Advance to the next TRB (and next segment). -+ */ -+ if (xhci->quirks & XHCI_AVOID_DQ_ON_LINK && trb_is_link(new_deq)) { -+ if (link_trb_toggles_cycle(new_deq)) -+ state->new_cycle_state ^= 0x1; -+ next_trb(xhci, ep_ring, &new_seg, &new_deq); -+ } -+ - state->new_deq_seg = new_seg; - state->new_deq_ptr = new_deq; - -diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h -index 2033bb8683033..90ccc71231c1a 100644 ---- a/drivers/usb/host/xhci.h -+++ b/drivers/usb/host/xhci.h -@@ -1874,8 +1874,9 @@ struct xhci_hcd { - #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) - #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) - #define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(36) - #define XHCI_SKIP_PHY_INIT BIT_ULL(37) - #define XHCI_DISABLE_SPARSE BIT_ULL(38) -+#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(39) - - unsigned int num_active_eps; - unsigned int limit_active_eps; From eb3ecd9249873e104a27f2308960054c45924f1f Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 8 Mar 2021 19:39:21 +0100 Subject: [PATCH 4/6] Remove patch not needed anymore --- .../linux/mediatek/patches-5.4/0230-pthread.patch | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 root/target/linux/mediatek/patches-5.4/0230-pthread.patch diff --git a/root/target/linux/mediatek/patches-5.4/0230-pthread.patch b/root/target/linux/mediatek/patches-5.4/0230-pthread.patch deleted file mode 100644 index ab5523cf..00000000 --- a/root/target/linux/mediatek/patches-5.4/0230-pthread.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/scripts/Makefile 2020-03-21 22:28:13.290800484 +0800 -+++ b/scripts/Makefile 2020-03-21 22:28:26.230870790 +0800 -@@ -23,8 +23,8 @@ hostprogs-$(CONFIG_SYSTEM_EXTRA_CERTIFIC - - HOSTCFLAGS_sortextable.o = -I$(srctree)/tools/include - HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include --HOSTLDLIBS_sign-file = -lcrypto --HOSTLDLIBS_extract-cert = -lcrypto -+HOSTLDLIBS_sign-file = -lcrypto -lpthread -+HOSTLDLIBS_extract-cert = -lcrypto -lpthread - - always := $(hostprogs-y) $(hostprogs-m) - - From c920737d48723f5b911442c01c276663ccf1cce5 Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Tue, 9 Mar 2021 10:35:46 +0800 Subject: [PATCH 5/6] fix --- ...xhci-quirks-add-link-TRB-quirk-VL805.patch | 69 ------------------- .../mediatek/patches-5.4/0230-pthread.patch | 14 ---- 2 files changed, 83 deletions(-) delete mode 100755 root/target/linux/bcm27xx/patches-5.4/990-xhci-quirks-add-link-TRB-quirk-VL805.patch delete mode 100755 root/target/linux/mediatek/patches-5.4/0230-pthread.patch diff --git a/root/target/linux/bcm27xx/patches-5.4/990-xhci-quirks-add-link-TRB-quirk-VL805.patch b/root/target/linux/bcm27xx/patches-5.4/990-xhci-quirks-add-link-TRB-quirk-VL805.patch deleted file mode 100755 index 13a90ba6..00000000 --- a/root/target/linux/bcm27xx/patches-5.4/990-xhci-quirks-add-link-TRB-quirk-VL805.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 5d9d9ba7547ad27d76dd36791f54a57ff555ff8a Mon Sep 17 00:00:00 2001 -From: Jonathan Bell -Date: Mon, 26 Oct 2020 14:03:35 +0000 -Subject: [PATCH] xhci: quirks: add link TRB quirk for VL805 - -The VL805 controller can't cope with the TR Dequeue Pointer for an endpoint -being set to a Link TRB. The hardware-maintained endpoint context ends up -stuck at the address of the Link TRB, leading to erroneous ring expansion -events whenever the enqueue pointer wraps to the dequeue position. - -If the search for the end of the current TD and ring cycle state lands on -a Link TRB, move to the next segment. - -See: https://github.com/raspberrypi/linux/issues/3919 - -Signed-off-by: Jonathan Bell ---- - drivers/usb/host/xhci-pci.c | 1 + - drivers/usb/host/xhci-ring.c | 10 ++++++++++ - drivers/usb/host/xhci.h | 1 + - 3 files changed, 12 insertions(+) - -diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c -index 5238fa29ea978..b975e6803d485 100644 ---- a/drivers/usb/host/xhci-pci.c -+++ b/drivers/usb/host/xhci-pci.c -@@ -251,6 +251,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) - pdev->device == 0x3483) { - xhci->quirks |= XHCI_LPM_SUPPORT; - xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; -+ xhci->quirks |= XHCI_AVOID_DQ_ON_LINK; - } - - if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && -diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c -index d99e636f3844c..8149abff857c2 100644 ---- a/drivers/usb/host/xhci-ring.c -+++ b/drivers/usb/host/xhci-ring.c -@@ -624,6 +624,16 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci, - - } while (!cycle_found || !td_last_trb_found); - -+ /* -+ * Quirk: the xHC does not correctly parse link TRBs if the HW Dequeue -+ * pointer is set to one. Advance to the next TRB (and next segment). -+ */ -+ if (xhci->quirks & XHCI_AVOID_DQ_ON_LINK && trb_is_link(new_deq)) { -+ if (link_trb_toggles_cycle(new_deq)) -+ state->new_cycle_state ^= 0x1; -+ next_trb(xhci, ep_ring, &new_seg, &new_deq); -+ } -+ - state->new_deq_seg = new_seg; - state->new_deq_ptr = new_deq; - -diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h -index 2033bb8683033..90ccc71231c1a 100644 ---- a/drivers/usb/host/xhci.h -+++ b/drivers/usb/host/xhci.h -@@ -1874,8 +1874,9 @@ struct xhci_hcd { - #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) - #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) - #define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(36) - #define XHCI_SKIP_PHY_INIT BIT_ULL(37) - #define XHCI_DISABLE_SPARSE BIT_ULL(38) -+#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(39) - - unsigned int num_active_eps; - unsigned int limit_active_eps; diff --git a/root/target/linux/mediatek/patches-5.4/0230-pthread.patch b/root/target/linux/mediatek/patches-5.4/0230-pthread.patch deleted file mode 100755 index ab5523cf..00000000 --- a/root/target/linux/mediatek/patches-5.4/0230-pthread.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/scripts/Makefile 2020-03-21 22:28:13.290800484 +0800 -+++ b/scripts/Makefile 2020-03-21 22:28:26.230870790 +0800 -@@ -23,8 +23,8 @@ hostprogs-$(CONFIG_SYSTEM_EXTRA_CERTIFIC - - HOSTCFLAGS_sortextable.o = -I$(srctree)/tools/include - HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include --HOSTLDLIBS_sign-file = -lcrypto --HOSTLDLIBS_extract-cert = -lcrypto -+HOSTLDLIBS_sign-file = -lcrypto -lpthread -+HOSTLDLIBS_extract-cert = -lcrypto -lpthread - - always := $(hostprogs-y) $(hostprogs-m) - - From ab10c6f81e7b58c9c5666d0824a613e986f57f95 Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Tue, 9 Mar 2021 10:39:14 +0800 Subject: [PATCH 6/6] Update config --- config | 1 + 1 file changed, 1 insertion(+) diff --git a/config b/config index d0b53c20..e7b9c644 100755 --- a/config +++ b/config @@ -177,6 +177,7 @@ CONFIG_PACKAGE_kmod-via-rhine=y CONFIG_PACKAGE_kmod-via-velocity=y CONFIG_PACKAGE_kmod-vmxnet3=y CONFIG_PACKAGE_kmod-fs-vfat=y +CONFIG_PACKAGE_kmod-macremapper=m CONFIG_TARGET_IMAGES_PAD=y CONFIG_TARGET_ROOTFS_EXT4=y CONFIG_KERNEL_TCP_CONG_CDG=y