From ff27ffd1658cc233e67c2facc4343f3f448b51d5 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 22 May 2024 17:42:43 +0200 Subject: [PATCH 1/6] odroidc2: fix reboot All credits go to @gitmeister: https://github.com/MichaIng/DietPi/issues/5414#issuecomment-1462629461 Signed-off-by: MichaIng --- .../meson64-6.10/board-odroidc2-fix-reboot.patch | 13 +++++++++++++ .../meson64-6.6/board-odroidc2-fix-reboot.patch | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 patch/kernel/archive/meson64-6.10/board-odroidc2-fix-reboot.patch create mode 100644 patch/kernel/archive/meson64-6.6/board-odroidc2-fix-reboot.patch diff --git a/patch/kernel/archive/meson64-6.10/board-odroidc2-fix-reboot.patch b/patch/kernel/archive/meson64-6.10/board-odroidc2-fix-reboot.patch new file mode 100644 index 000000000000..ac6cf9f26d4b --- /dev/null +++ b/patch/kernel/archive/meson64-6.10/board-odroidc2-fix-reboot.patch @@ -0,0 +1,13 @@ +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +index e6d2de7..662b4be 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +@@ -102,7 +102,7 @@ + /* + * signal name from schematics: TF_3V3N_1V8_EN + */ +- gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; ++ gpios = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>; + gpios-states = <0>; + + states = <3300000 0>, diff --git a/patch/kernel/archive/meson64-6.6/board-odroidc2-fix-reboot.patch b/patch/kernel/archive/meson64-6.6/board-odroidc2-fix-reboot.patch new file mode 100644 index 000000000000..ac6cf9f26d4b --- /dev/null +++ b/patch/kernel/archive/meson64-6.6/board-odroidc2-fix-reboot.patch @@ -0,0 +1,13 @@ +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +index e6d2de7..662b4be 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +@@ -102,7 +102,7 @@ + /* + * signal name from schematics: TF_3V3N_1V8_EN + */ +- gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; ++ gpios = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>; + gpios-states = <0>; + + states = <3300000 0>, From 8994dd3b89bf5348cf816f76ee60215f7ed5ef89 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 13 May 2024 18:01:27 +0200 Subject: [PATCH 2/6] radxa-zero3: fix U-Boot dtb choice for Armbian kernel builds Signed-off-by: MichaIng --- .../board_radxa-zero3-fix-dtb-choice.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 patch/u-boot/u-boot-radxa-latest/board_radxa-zero3-fix-dtb-choice.patch diff --git a/patch/u-boot/u-boot-radxa-latest/board_radxa-zero3-fix-dtb-choice.patch b/patch/u-boot/u-boot-radxa-latest/board_radxa-zero3-fix-dtb-choice.patch new file mode 100644 index 000000000000..fc4f198820f8 --- /dev/null +++ b/patch/u-boot/u-boot-radxa-latest/board_radxa-zero3-fix-dtb-choice.patch @@ -0,0 +1,19 @@ +diff --git a/board/rockchip/evb_rk3568/evb_rk3568.c b/board/rockchip/evb_rk3568/evb_rk3568.c +index 43b8de4..72a419b 100644 +--- a/board/rockchip/evb_rk3568/evb_rk3568.c ++++ b/board/rockchip/evb_rk3568/evb_rk3568.c +@@ -24,10 +24,10 @@ struct variant_def { + + #ifdef CONFIG_ID_EEPROM + static struct variant_def variants[] = { +- {"radxa,zero3", 230, 270, 0, -1, "rockchip/rk3566-radxa-zero-3w-aic8800ds2.dtb"}, +- {"radxa,zero3", 400, 450, 0, -1, "rockchip/rk3566-radxa-zero-3e.dtb"}, +- {"radxa,zero3", 451, 510, 0, -1, "rockchip/rk3566-radxa-zero-3w-ap6212.dtb"}, +- {"radxa,rock-3c", 300, 360, 0, -1, "rockchip/rk3566-rock-3c-aic8800ds2.dtb"}, ++ {"radxa,zero3", 230, 270, 0, -1, "rockchip/rk3566-radxa-zero3.dtb"}, ++ {"radxa,zero3", 400, 450, 0, -1, "rockchip/rk3566-radxa-zero3.dtb"}, ++ {"radxa,zero3", 451, 510, 0, -1, "rockchip/rk3566-radxa-zero3-ap6212.dtb"}, ++ {"radxa,rock-3c", 300, 360, 0, -1, "rockchip/rk3566-rock-3c.dtb"}, + }; + + static void set_fdtfile(void) From 2e1871e404838885e2212b05ef142a7398d11292 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 13 May 2024 22:38:36 +0200 Subject: [PATCH 3/6] nanopineo: remove LED patch conflicting with upstream Upstream kernel defines the exact same LEDs already. having both defined leads to unusable LED sysfs nodes: https://github.com/MichaIng/DietPi/issues/5401 Signed-off-by: MichaIng --- ...3-nanopi-neo-Add-regulator-leds-mmc2.patch | 22 +------------------ ...3-nanopi-neo-Add-regulator-leds-mmc2.patch | 22 +------------------ ...3-nanopi-neo-Add-regulator-leds-mmc2.patch | 22 +------------------ 3 files changed, 3 insertions(+), 63 deletions(-) diff --git a/patch/kernel/archive/sunxi-6.1/patches.armbian/arm-dts-h3-nanopi-neo-Add-regulator-leds-mmc2.patch b/patch/kernel/archive/sunxi-6.1/patches.armbian/arm-dts-h3-nanopi-neo-Add-regulator-leds-mmc2.patch index b9e2773a674a..76506b3b5323 100644 --- a/patch/kernel/archive/sunxi-6.1/patches.armbian/arm-dts-h3-nanopi-neo-Add-regulator-leds-mmc2.patch +++ b/patch/kernel/archive/sunxi-6.1/patches.armbian/arm-dts-h3-nanopi-neo-Add-regulator-leds-mmc2.patch @@ -11,31 +11,11 @@ diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts b/arch/arm/boot/dts/sun8i index df71fab3c..032849663 100644 --- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts +++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts -@@ -49,6 +49,63 @@ / { +@@ -49,6 +49,43 @@ / { aliases { ethernet0 = &emac; }; + -+ /* Warning: sunxi-5.18: -+ * The leds node is present in the sun8i-h3-nanopi.dtsi file -+ * You will have to fix this situation yourself -+ */ -+ leds { -+ compatible = "gpio-leds"; -+ -+ pwr { -+ label = "nanopi:red:pwr"; -+ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ -+ linux,default-trigger = "default-on"; -+ }; -+ -+ status { -+ label = "nanopi:green:status"; -+ gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */ -+ linux,default-trigger = "heartbeat"; -+ }; -+ }; -+ + vdd_cpux: gpio-regulator { + compatible = "regulator-gpio"; + pinctrl-names = "default"; diff --git a/patch/kernel/archive/sunxi-6.6/patches.armbian/arm-dts-h3-nanopi-neo-Add-regulator-leds-mmc2.patch b/patch/kernel/archive/sunxi-6.6/patches.armbian/arm-dts-h3-nanopi-neo-Add-regulator-leds-mmc2.patch index ad81ccf01ee7..37fd4c9fcfce 100644 --- a/patch/kernel/archive/sunxi-6.6/patches.armbian/arm-dts-h3-nanopi-neo-Add-regulator-leds-mmc2.patch +++ b/patch/kernel/archive/sunxi-6.6/patches.armbian/arm-dts-h3-nanopi-neo-Add-regulator-leds-mmc2.patch @@ -11,31 +11,11 @@ diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo.dts b/arch/arm/boot index df71fab3cf4e..032849663443 100644 --- a/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo.dts +++ b/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo.dts -@@ -49,6 +49,63 @@ / { +@@ -49,6 +49,43 @@ / { aliases { ethernet0 = &emac; }; + -+ /* Warning: sunxi-5.18: -+ * The leds node is present in the sun8i-h3-nanopi.dtsi file -+ * You will have to fix this situation yourself -+ */ -+ leds { -+ compatible = "gpio-leds"; -+ -+ pwr { -+ label = "nanopi:red:pwr"; -+ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ -+ linux,default-trigger = "default-on"; -+ }; -+ -+ status { -+ label = "nanopi:green:status"; -+ gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */ -+ linux,default-trigger = "heartbeat"; -+ }; -+ }; -+ + vdd_cpux: gpio-regulator { + compatible = "regulator-gpio"; + pinctrl-names = "default"; diff --git a/patch/kernel/archive/sunxi-6.7/patches.armbian/arm-dts-h3-nanopi-neo-Add-regulator-leds-mmc2.patch b/patch/kernel/archive/sunxi-6.7/patches.armbian/arm-dts-h3-nanopi-neo-Add-regulator-leds-mmc2.patch index ad81ccf01ee7..37fd4c9fcfce 100644 --- a/patch/kernel/archive/sunxi-6.7/patches.armbian/arm-dts-h3-nanopi-neo-Add-regulator-leds-mmc2.patch +++ b/patch/kernel/archive/sunxi-6.7/patches.armbian/arm-dts-h3-nanopi-neo-Add-regulator-leds-mmc2.patch @@ -11,31 +11,11 @@ diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo.dts b/arch/arm/boot index df71fab3cf4e..032849663443 100644 --- a/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo.dts +++ b/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo.dts -@@ -49,6 +49,63 @@ / { +@@ -49,6 +49,43 @@ / { aliases { ethernet0 = &emac; }; + -+ /* Warning: sunxi-5.18: -+ * The leds node is present in the sun8i-h3-nanopi.dtsi file -+ * You will have to fix this situation yourself -+ */ -+ leds { -+ compatible = "gpio-leds"; -+ -+ pwr { -+ label = "nanopi:red:pwr"; -+ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ -+ linux,default-trigger = "default-on"; -+ }; -+ -+ status { -+ label = "nanopi:green:status"; -+ gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */ -+ linux,default-trigger = "heartbeat"; -+ }; -+ }; -+ + vdd_cpux: gpio-regulator { + compatible = "regulator-gpio"; + pinctrl-names = "default"; From 7793f6dd8173b6e6e975bee6d85ecd83318c17a4 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 2 Jun 2024 15:41:46 +0200 Subject: [PATCH 4/6] configs: enable mt7921u USB WiFi drivers for all boards In case of rk35xx-vendor, the mt7921e PCIe WiFi drivers were enabled already, but the one for USB was missing. It was enabled for most other boards already, hence this commit is an alignment. Signed-off-by: MichaIng --- config/kernel/linux-arm64-wdk2023.config | 2 +- config/kernel/linux-bcm2711-legacy.config | 2 +- config/kernel/linux-k3-current.config | 2 +- config/kernel/linux-odroidxu4-current.config | 2 +- config/kernel/linux-phytium-embedded-current.config | 2 +- config/kernel/linux-rk35xx-vendor.config | 2 +- config/kernel/linux-tqma-current.config | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/kernel/linux-arm64-wdk2023.config b/config/kernel/linux-arm64-wdk2023.config index a0f55a7455b1..1e01b94b392b 100644 --- a/config/kernel/linux-arm64-wdk2023.config +++ b/config/kernel/linux-arm64-wdk2023.config @@ -3708,7 +3708,7 @@ CONFIG_MT76x2U=m # CONFIG_MT7915E is not set # CONFIG_MT7921E is not set # CONFIG_MT7921S is not set -# CONFIG_MT7921U is not set +CONFIG_MT7921U=m # CONFIG_MT7996E is not set # CONFIG_MT7925E is not set # CONFIG_MT7925U is not set diff --git a/config/kernel/linux-bcm2711-legacy.config b/config/kernel/linux-bcm2711-legacy.config index 32c5a2e59e86..45a23224db6d 100644 --- a/config/kernel/linux-bcm2711-legacy.config +++ b/config/kernel/linux-bcm2711-legacy.config @@ -3005,7 +3005,7 @@ CONFIG_MT7915E=m CONFIG_MT7921_COMMON=m CONFIG_MT7921E=m # CONFIG_MT7921S is not set -# CONFIG_MT7921U is not set +CONFIG_MT7921U=m CONFIG_WLAN_VENDOR_MICROCHIP=y # CONFIG_WILC1000_SDIO is not set # CONFIG_WILC1000_SPI is not set diff --git a/config/kernel/linux-k3-current.config b/config/kernel/linux-k3-current.config index e6ff80936d03..de33caaae5c7 100644 --- a/config/kernel/linux-k3-current.config +++ b/config/kernel/linux-k3-current.config @@ -2838,7 +2838,7 @@ CONFIG_WLAN_VENDOR_MEDIATEK=y # CONFIG_MT7915E is not set # CONFIG_MT7921E is not set # CONFIG_MT7921S is not set -# CONFIG_MT7921U is not set +CONFIG_MT7921U=m CONFIG_WLAN_VENDOR_MICROCHIP=y # CONFIG_WILC1000_SDIO is not set # CONFIG_WILC1000_SPI is not set diff --git a/config/kernel/linux-odroidxu4-current.config b/config/kernel/linux-odroidxu4-current.config index b14015aef0ac..d817e516bd38 100644 --- a/config/kernel/linux-odroidxu4-current.config +++ b/config/kernel/linux-odroidxu4-current.config @@ -2443,7 +2443,7 @@ CONFIG_MT76x2U=m # CONFIG_MT7663U is not set # CONFIG_MT7663S is not set # CONFIG_MT7921S is not set -# CONFIG_MT7921U is not set +CONFIG_MT7921U=m CONFIG_WLAN_VENDOR_MICROCHIP=y # CONFIG_WILC1000_SDIO is not set # CONFIG_WILC1000_SPI is not set diff --git a/config/kernel/linux-phytium-embedded-current.config b/config/kernel/linux-phytium-embedded-current.config index a40bdf188a72..226b17fffce7 100644 --- a/config/kernel/linux-phytium-embedded-current.config +++ b/config/kernel/linux-phytium-embedded-current.config @@ -3036,7 +3036,7 @@ CONFIG_MT792x_LIB=m CONFIG_MT7921_COMMON=m CONFIG_MT7921E=m # CONFIG_MT7921S is not set -# CONFIG_MT7921U is not set +CONFIG_MT7921U=m # CONFIG_MT7996E is not set CONFIG_WLAN_VENDOR_MICROCHIP=y # CONFIG_WILC1000_SDIO is not set diff --git a/config/kernel/linux-rk35xx-vendor.config b/config/kernel/linux-rk35xx-vendor.config index 45e75b4f5d66..4e199c793e2e 100644 --- a/config/kernel/linux-rk35xx-vendor.config +++ b/config/kernel/linux-rk35xx-vendor.config @@ -3031,7 +3031,7 @@ CONFIG_MT7915E=m CONFIG_MT7921_COMMON=m CONFIG_MT7921E=m # CONFIG_MT7921S is not set -# CONFIG_MT7921U is not set +CONFIG_MT7921U=m CONFIG_WLAN_VENDOR_MICROCHIP=y CONFIG_WILC1000=m CONFIG_WILC1000_SDIO=m diff --git a/config/kernel/linux-tqma-current.config b/config/kernel/linux-tqma-current.config index f640470c9d1b..47f2c076d5c1 100644 --- a/config/kernel/linux-tqma-current.config +++ b/config/kernel/linux-tqma-current.config @@ -3008,7 +3008,7 @@ CONFIG_WLAN_VENDOR_MEDIATEK=y # CONFIG_MT7915E is not set # CONFIG_MT7921E is not set # CONFIG_MT7921S is not set -# CONFIG_MT7921U is not set +CONFIG_MT7921U=m # CONFIG_MT7996E is not set CONFIG_WLAN_VENDOR_MICROCHIP=y # CONFIG_WILC1000_SDIO is not set From 4110286f4e7b154004832b84a973c0a5188e3868 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Mon, 22 Jul 2024 22:41:12 +0200 Subject: [PATCH 5/6] meson64: remove U-Boot boot order patch since it sometimes results in a boot loop, when aiming to boot from eMMC or SD card: https://github.com/MichaIng/DietPi/issues/7168, https://forum.armbian.com/topic/36141-usb-errors/ The attempt to boot from USB might be too fast, when trying it first, where some USB drives are not ready yet, resulting in an error. Signed-off-by: MichaIng --- .../meson64-boot-usb-nvme-scsi-first.patch | 33 ------------------- 1 file changed, 33 deletions(-) delete mode 100644 patch/u-boot/v2022.10/meson64-boot-usb-nvme-scsi-first.patch diff --git a/patch/u-boot/v2022.10/meson64-boot-usb-nvme-scsi-first.patch b/patch/u-boot/v2022.10/meson64-boot-usb-nvme-scsi-first.patch deleted file mode 100644 index d7f8141477ff..000000000000 --- a/patch/u-boot/v2022.10/meson64-boot-usb-nvme-scsi-first.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ricardo Pardini -Date: Mon, 14 Nov 2022 14:59:45 +0100 -Subject: meson64 u-boot v2022.10: change `BOOT_TARGET_DEVICES to try to boot - USB, NVME and SCSI before SD, MMC, PXE, DHCP - ---- - include/configs/meson64.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/include/configs/meson64.h b/include/configs/meson64.h -index 40803ee9da1..af7b764da6a 100644 ---- a/include/configs/meson64.h -+++ b/include/configs/meson64.h -@@ -64,12 +64,12 @@ - #ifndef BOOT_TARGET_DEVICES - #define BOOT_TARGET_DEVICES(func) \ - func(ROMUSB, romusb, na) \ -- func(MMC, mmc, 0) \ -- func(MMC, mmc, 1) \ -- func(MMC, mmc, 2) \ - BOOT_TARGET_DEVICES_USB(func) \ - BOOT_TARGET_NVME(func) \ - BOOT_TARGET_SCSI(func) \ -+ func(MMC, mmc, 0) \ -+ func(MMC, mmc, 1) \ -+ func(MMC, mmc, 2) \ - func(PXE, pxe, na) \ - func(DHCP, dhcp, na) - #endif --- -Armbian - From 5a6b849279ab23e42028c383ade29673d0b30b31 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Mon, 16 Sep 2024 03:50:48 +0000 Subject: [PATCH 6/6] tools: Bump `SHELLFMT_VERSION` from 3.8.0 to 3.9.0 --- lib/tools/shellfmt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tools/shellfmt.sh b/lib/tools/shellfmt.sh index 04678ec16f67..e772560fefc9 100755 --- a/lib/tools/shellfmt.sh +++ b/lib/tools/shellfmt.sh @@ -7,7 +7,7 @@ # This file is a part of the Armbian Build Framework # https://github.com/armbian/build/ -SHELLFMT_VERSION=${SHELLFMT_VERSION:-3.8.0} # https://github.com/mvdan/sh/releases/ +SHELLFMT_VERSION=${SHELLFMT_VERSION:-3.9.0} # https://github.com/mvdan/sh/releases/ SRC="$( cd "$(dirname "$0")/../.."