diff --git a/.github/ISSUE_TEMPLATE/issue.md b/.github/ISSUE_TEMPLATE/issue.md index 2716ec67..c59b9c05 100755 --- a/.github/ISSUE_TEMPLATE/issue.md +++ b/.github/ISSUE_TEMPLATE/issue.md @@ -37,5 +37,6 @@ labels: bug - OpenMPTCProuter VPS version: - OpenMPTCProuter VPS provider: - OpenMPTCProuter platform: + - Country: diff --git a/build.sh b/build.sh index 2ea724e5..a6b5d99f 100755 --- a/build.sh +++ b/build.sh @@ -36,7 +36,12 @@ OMR_PACKAGES=${OMR_PACKAGES:-full} OMR_ALL_PACKAGES=${OMR_ALL_PACKAGES:-no} OMR_TARGET=${OMR_TARGET:-x86_64} OMR_TARGET_CONFIG="config-$OMR_TARGET" -OMR_KERNEL=${OMR_KERNEL:-5.4} +UPSTREAM=${UPSTREAM:-no} +if [ "$UPSTREAM" = "no" ]; then + OMR_KERNEL=${OMR_KERNEL:-5.4} +else + OMR_KERNEL=${OMR_KERNEL:-5.14} +fi SHORTCUT_FE=${SHORTCUT_FE:-no} #OMR_RELEASE=${OMR_RELEASE:-$(git describe --tags `git rev-list --tags --max-count=1` | sed 's/^\([0-9.]*\).*/\1/')} #OMR_RELEASE=${OMR_RELEASE:-$(git tag --sort=committerdate | tail -1)} @@ -196,6 +201,10 @@ else CONFIG_VERSION_NUMBER="$(git -C "$OMR_FEED" tag --sort=committerdate | tail -1)-$(git -C "$OMR_FEED" rev-parse --short HEAD)" EOF fi +if [ "$OMR_KERNEL" = "5.14" ]; then + echo 'CONFIG_KERNEL_GIT_CLONE_URI="https://github.com/multipath-tcp/mptcp_net-next.git"' >> "$OMR_TARGET/source/.config" + echo 'CONFIG_KERNEL_GIT_REF="f733ba14728e8e7856721ca821ea62ba6c72a948"' >> "$OMR_TARGET/source/.config" +fi if [ "$OMR_ALL_PACKAGES" = "yes" ]; then echo 'CONFIG_ALL=y' >> "$OMR_TARGET/source/.config" echo 'CONFIG_ALL_NONSHARED=y' >> "$OMR_TARGET/source/.config" @@ -361,7 +370,7 @@ echo "Done" #echo "Done" # Add BBR2 patch, only working on 64bits images for now -if [ "$OMR_TARGET" = "x86_64" ] || [ "$OMR_TARGET" = "bpi-r64" ] || [ "$OMR_TARGET" = "rpi4" ] || [ "$OMR_TARGET" = "espressobin" ] || [ "$OMR_TARGET" = "r2s" ] || [ "$OMR_TARGET" = "r4s" ] || [ "$OMR_TARGET" = "rpi3" ]; then +if [ "$UPSTREAM" = "no" ] && ([ "$OMR_TARGET" = "x86_64" ] || [ "$OMR_TARGET" = "bpi-r64" ] || [ "$OMR_TARGET" = "rpi4" ] || [ "$OMR_TARGET" = "espressobin" ] || [ "$OMR_TARGET" = "r2s" ] || [ "$OMR_TARGET" = "r4s" ] || [ "$OMR_TARGET" = "rpi3" ]); then echo "Checking if BBRv2 patch is set or not" if ! patch -Rf -N -p1 -s --dry-run < ../../patches/bbr2.patch; then echo "apply..." @@ -446,6 +455,20 @@ if [ "$OMR_KERNEL" = "5.4" ]; then find target/linux/mediatek -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=4.19%KERNEL_PATCHVER:=5.4%g' {} \; echo "Done" fi +if [ "$OMR_KERNEL" = "5.14" ]; then + echo "Set to kernel 5.14 for rpi arch" + find target/linux/bcm27xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.4%KERNEL_PATCHVER:=5.14%g' {} \; + echo "Done" + echo "Set to kernel 5.14 for x86 arch" + find target/linux/x86 -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.4%KERNEL_PATCHVER:=5.14%g' {} \; + echo "Done" + echo "Set to kernel 5.14 for mvebu arch (WRT)" + find target/linux/mvebu -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.4%KERNEL_PATCHVER:=5.14%g' {} \; + echo "Done" + echo "Set to kernel 5.14 for mediatek arch (BPI-R2)" + find target/linux/mediatek -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.4%KERNEL_PATCHVER:=5.14%g' {} \; + echo "Done" +fi #rm -rf feeds/packages/libs/libwebp cd "../.." diff --git a/root/target/linux/generic/hack-5.4/780-net-ipheth-fix-RX-EOVERFLOW.patch b/root/target/linux/generic/hack-5.4/780-net-ipheth-fix-RX-EOVERFLOW.patch new file mode 100644 index 00000000..7d7c5aa4 --- /dev/null +++ b/root/target/linux/generic/hack-5.4/780-net-ipheth-fix-RX-EOVERFLOW.patch @@ -0,0 +1,52 @@ +From dd109ded2b526636fff438d33433ab64ffd21583 Mon Sep 17 00:00:00 2001 +From: Georgi Valkov +Date: Fri, 16 Apr 2021 20:44:36 +0300 +Subject: [PATCH] ipheth: fix EOVERFLOW in ipheth_rcvbulk_callback + +When rx_buf is allocated we need to account for IPHETH_IP_ALIGN, +which reduces the usable size by 2 bytes. Otherwise we have 1512 +bytes usable instead of 1514, and if we receive more than 1512 +bytes, ipheth_rcvbulk_callback is called with status -EOVERFLOW, +after which the driver malfunctiones and all communication stops. + +Fixes: ipheth 2-1:4.2: ipheth_rcvbulk_callback: urb status: -75 + +Signed-off-by: Georgi Valkov +--- + drivers/net/usb/ipheth.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c +index 207e59e74935..06d9f19ca142 100644 +--- a/drivers/net/usb/ipheth.c ++++ b/drivers/net/usb/ipheth.c +@@ -121,7 +121,7 @@ static int ipheth_alloc_urbs(struct ipheth_device *iphone) + if (tx_buf == NULL) + goto free_rx_urb; + +- rx_buf = usb_alloc_coherent(iphone->udev, IPHETH_BUF_SIZE, ++ rx_buf = usb_alloc_coherent(iphone->udev, IPHETH_BUF_SIZE + IPHETH_IP_ALIGN, + GFP_KERNEL, &rx_urb->transfer_dma); + if (rx_buf == NULL) + goto free_tx_buf; +@@ -146,7 +146,7 @@ static int ipheth_alloc_urbs(struct ipheth_device *iphone) + + static void ipheth_free_urbs(struct ipheth_device *iphone) + { +- usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, iphone->rx_buf, ++ usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE + IPHETH_IP_ALIGN, iphone->rx_buf, + iphone->rx_urb->transfer_dma); + usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, iphone->tx_buf, + iphone->tx_urb->transfer_dma); +@@ -317,7 +317,7 @@ static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags) + + usb_fill_bulk_urb(dev->rx_urb, udev, + usb_rcvbulkpipe(udev, dev->bulk_in), +- dev->rx_buf, IPHETH_BUF_SIZE, ++ dev->rx_buf, IPHETH_BUF_SIZE + IPHETH_IP_ALIGN, + ipheth_rcvbulk_callback, + dev); + dev->rx_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; +-- +2.31.1 +