diff --git a/.github/workflows/testpr.yml b/.github/workflows/testpr.yml index f4ba3461ef..b023291899 100644 --- a/.github/workflows/testpr.yml +++ b/.github/workflows/testpr.yml @@ -12,9 +12,13 @@ jobs: - name: Environment variables run: sudo -E bash -c set - name: Install required packages - run: sudo apt-get install shellcheck - - name: "lint libraries via shellcheck" - run: shellcheck --color -x -s bash -S warning -e SC2034,SC1090,SC2154,SC2153 lib/*.sh && echo "shellcheck lib/*.sh - OK"; + run: sudo apt-get install shellcheck jq + - name: "shellcheck lint error report json format" + shell: bash {0} + run: | + shellcheck -f json -x -s bash -S warning -e SC2034,SC1090,SC2154,SC2153 lib/*.sh > report.json + cat report.json |jq -C 'group_by(.file)|.[] | {file: [(limit(1;.[].file)), {shellcheck_codes: [{code: (group_by(.code)|.[] | limit(1;.[].code)), count: length}]}], file_error_count: length}' + #shellcheck --color -x -s bash -S warning -e SC2034,SC1090,SC2154,SC2153 lib/*.sh && echo "shellcheck lib/*.sh - OK"; build_sbc_kernel: name: Compile changed kernel # This job runs on self hosted Linux machine, with public label diff --git a/config/kernel/linux-odroidxu4-current.config b/config/kernel/linux-odroidxu4-current.config index 4c5f6d3a6b..e2163e4cc8 100644 --- a/config/kernel/linux-odroidxu4-current.config +++ b/config/kernel/linux-odroidxu4-current.config @@ -5475,7 +5475,7 @@ CONFIG_DDR=y # CONFIG_ARM_PL172_MPMC is not set CONFIG_PL353_SMC=y CONFIG_SAMSUNG_MC=y -CONFIG_EXYNOS5422_DMC=y +CONFIG_EXYNOS5422_DMC=n CONFIG_EXYNOS_SROM=y CONFIG_IIO=y CONFIG_IIO_BUFFER=y diff --git a/config/kernel/linux-odroidxu4-dev.config b/config/kernel/linux-odroidxu4-dev.config index 7caffc7143..f48178bba2 100644 --- a/config/kernel/linux-odroidxu4-dev.config +++ b/config/kernel/linux-odroidxu4-dev.config @@ -5417,7 +5417,7 @@ CONFIG_DDR=y # CONFIG_ARM_PL172_MPMC is not set CONFIG_PL353_SMC=y CONFIG_SAMSUNG_MC=y -CONFIG_EXYNOS5422_DMC=y +CONFIG_EXYNOS5422_DMC=n CONFIG_EXYNOS_SROM=y CONFIG_IIO=y CONFIG_IIO_BUFFER=y diff --git a/lib/compilation-prepare.sh b/lib/compilation-prepare.sh index c5e4b66afd..421c4b986c 100644 --- a/lib/compilation-prepare.sh +++ b/lib/compilation-prepare.sh @@ -176,7 +176,19 @@ compilation_prepare() fi + # Updated USB network drivers for RTL8152/RTL8153 based dongles that also support 2.5Gbs variants + if linux-version compare "${version}" ge 5.4; then + + # attach to specifics tag or branch + local rtl8152ver="branch:master" + + display_alert "Adding" "Drivers for 2.5Gb RTL8152/RTL8153 USB dongles ${rtl8152ver}" "info" + fetch_from_repo "https://github.com/igorpecovnik/realtek-r8152-linux" "rtl8152" "${rtl8152ver}" "yes" + cp -R "${SRC}/cache/sources/rtl8152/${rtl8152ver#*:}"/{r8152.c,compatibility.h} \ + "${SRC}/cache/sources/${LINUXSOURCEDIR}/drivers/net/usb/" + + fi # Wireless drivers for Realtek 8189ES chipsets diff --git a/packages/bsp/common/etc/udev/rules.d/50-usb-realtek-net.rules b/packages/bsp/common/etc/udev/rules.d/50-usb-realtek-net.rules new file mode 100644 index 0000000000..5c8840e513 --- /dev/null +++ b/packages/bsp/common/etc/udev/rules.d/50-usb-realtek-net.rules @@ -0,0 +1,42 @@ +# This is used to change the default configuration of Realtek USB ethernet adapters + +ACTION!="add", GOTO="usb_realtek_net_end" +SUBSYSTEM!="usb", GOTO="usb_realtek_net_end" +ENV{DEVTYPE}!="usb_device", GOTO="usb_realtek_net_end" + +# Modify this to change the default value +ENV{REALTEK_NIC_MODE}="1" + +# Realtek +ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" +ATTR{idVendor}=="0bda", ATTR{idProduct}=="8155", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" +ATTR{idVendor}=="0bda", ATTR{idProduct}=="8153", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" +ATTR{idVendor}=="0bda", ATTR{idProduct}=="8152", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" + +# Samsung +ATTR{idVendor}=="04e8", ATTR{idProduct}=="a101", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" + +# Lenovo +ATTR{idVendor}=="17ef", ATTR{idProduct}=="304f", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" +ATTR{idVendor}=="17ef", ATTR{idProduct}=="3052", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" +ATTR{idVendor}=="17ef", ATTR{idProduct}=="3054", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" +ATTR{idVendor}=="17ef", ATTR{idProduct}=="3057", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" +ATTR{idVendor}=="17ef", ATTR{idProduct}=="3082", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" +ATTR{idVendor}=="17ef", ATTR{idProduct}=="7205", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" +ATTR{idVendor}=="17ef", ATTR{idProduct}=="720a", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" +ATTR{idVendor}=="17ef", ATTR{idProduct}=="720b", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" +ATTR{idVendor}=="17ef", ATTR{idProduct}=="720c", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" +ATTR{idVendor}=="17ef", ATTR{idProduct}=="721e", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" +ATTR{idVendor}=="17ef", ATTR{idProduct}=="a359", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" +ATTR{idVendor}=="17ef", ATTR{idProduct}=="a387", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" + +# TP-LINK +ATTR{idVendor}=="2357", ATTR{idProduct}=="0601", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" + +# Nvidia +ATTR{idVendor}=="0955", ATTR{idProduct}=="09ff", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" + +# LINKSYS +ATTR{idVendor}=="13b1", ATTR{idProduct}=="0041", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" + +LABEL="usb_realtek_net_end" diff --git a/packages/bsp/common/usr/lib/armbian/armbian-hardware-optimization b/packages/bsp/common/usr/lib/armbian/armbian-hardware-optimization index ddf512436b..d7d5841f2f 100755 --- a/packages/bsp/common/usr/lib/armbian/armbian-hardware-optimization +++ b/packages/bsp/common/usr/lib/armbian/armbian-hardware-optimization @@ -98,6 +98,16 @@ prepare_board() { echo 8 >/proc/irq/$(awk -F":" "/ethernet/ {print \$1}" /dev/null echo 7 >/sys/class/net/eth0/queues/rx-0/rps_cpus ;; + meson-g12b) # S922X/A311D: ODROID N2, possibly VIM3, cpu0/cpu1 are the little ones + # MMC on cpu1, USB3 on cpu2, Ethernet on cpu3, rdma on cpu4, vsync on cpu5 + for i in $(awk -F':' '/mmc/{print $1}' /proc/irq/$i/smp_affinity_list + done + echo 2 >/proc/irq/$(awk -F":" "/xhci-hcd/ {print \$1}" /proc/irq/$(awk -F":" "/eth0/ {print \$1}" /proc/irq/$(awk -F":" "/rdma/ {print \$1}" /proc/irq/$(awk -F":" "/ osd-vsync/ {print \$1}" /proc/irq/$i/smp_affinity diff --git a/patch/kernel/odroidxu4-current/patch-5.4.43-44.patch b/patch/kernel/odroidxu4-current/patch-5.4.43-44.patch index 48842cdd2f..9517acb275 100644 --- a/patch/kernel/odroidxu4-current/patch-5.4.43-44.patch +++ b/patch/kernel/odroidxu4-current/patch-5.4.43-44.patch @@ -2348,18 +2348,6 @@ index fe630438f67b..9bb37ac99a10 100644 { USB_DEVICE_AND_INTERFACE_INFO(TPLINK_VENDOR_ID, 0x0601, USB_CLASS_COMM, USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), -diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c -index 44ea5dcc43fd..cd1a07175e11 100644 ---- a/drivers/net/usb/r8152.c -+++ b/drivers/net/usb/r8152.c -@@ -5837,6 +5837,7 @@ static const struct usb_device_id rtl8152_table[] = { - {REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8153)}, - {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07ab)}, - {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07c6)}, -+ {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x0927)}, - {REALTEK_USB_DEVICE(VENDOR_ID_SAMSUNG, 0xa101)}, - {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x304f)}, - {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3062)}, diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c index 73a852b2f417..34eec26b0c1f 100644 --- a/drivers/soc/mediatek/mtk-cmdq-helper.c diff --git a/patch/kernel/sunxi-current/patch-5.4.43-44.patch b/patch/kernel/sunxi-current/patch-5.4.43-44.patch index 48842cdd2f..9517acb275 100644 --- a/patch/kernel/sunxi-current/patch-5.4.43-44.patch +++ b/patch/kernel/sunxi-current/patch-5.4.43-44.patch @@ -2348,18 +2348,6 @@ index fe630438f67b..9bb37ac99a10 100644 { USB_DEVICE_AND_INTERFACE_INFO(TPLINK_VENDOR_ID, 0x0601, USB_CLASS_COMM, USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), -diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c -index 44ea5dcc43fd..cd1a07175e11 100644 ---- a/drivers/net/usb/r8152.c -+++ b/drivers/net/usb/r8152.c -@@ -5837,6 +5837,7 @@ static const struct usb_device_id rtl8152_table[] = { - {REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8153)}, - {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07ab)}, - {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07c6)}, -+ {REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x0927)}, - {REALTEK_USB_DEVICE(VENDOR_ID_SAMSUNG, 0xa101)}, - {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x304f)}, - {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3062)}, diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c index 73a852b2f417..34eec26b0c1f 100644 --- a/drivers/soc/mediatek/mtk-cmdq-helper.c