From 7a06c25c47b7f99281ae6110c0dd475f26003f30 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Tue, 3 Feb 2026 19:13:12 +0700 Subject: [PATCH] updated support for orangepi_zero_2w --- .../etc/finit.d/available/getty.conf | 7 -- .../etc/finit.d/available/getty@.conf | 2 + .../etc/finit.d/available/udhcpc@.conf | 2 + .../etc/finit.d/available/udhcpc@wlan0.conf | 2 - .../{wifi@wlan0.conf => wpa_supplicant@.conf} | 2 +- .../etc/finit.d/enabled/getty.conf | 1 - .../etc/finit.d/enabled/getty@tty1.conf | 1 + .../etc/finit.d/enabled/getty@ttyS0.conf | 1 + .../etc/finit.d/enabled/udhcpc@wlan0.conf | 1 + .../finit.d/enabled/wpa_supplicant@wlan0.conf | 1 + .../sun50i-h618-orangepi-zero2w.dts | 91 +++++++------------ 11 files changed, 42 insertions(+), 69 deletions(-) delete mode 100644 board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/getty.conf create mode 100644 board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/getty@.conf create mode 100644 board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/udhcpc@.conf delete mode 100644 board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/udhcpc@wlan0.conf rename board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/{wifi@wlan0.conf => wpa_supplicant@.conf} (50%) delete mode 120000 board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/getty.conf create mode 120000 board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/getty@tty1.conf create mode 120000 board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/getty@ttyS0.conf create mode 120000 board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/udhcpc@wlan0.conf create mode 120000 board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/wpa_supplicant@wlan0.conf diff --git a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/getty.conf b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/getty.conf deleted file mode 100644 index 03a06f1..0000000 --- a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/getty.conf +++ /dev/null @@ -1,7 +0,0 @@ -# Consoles to start getty on when system is up -tty [12345] /dev/ttyS0 noclear nowait -tty [12345] /dev/tty1 noclear nowait -tty [12345] /dev/tty2 noclear nowait -tty [12345] /dev/tty3 noclear nowait -tty [12345] /dev/tty4 noclear nowait -tty [12345] /dev/ttyGS0 noclear nowait diff --git a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/getty@.conf b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/getty@.conf new file mode 100644 index 0000000..fe3d906 --- /dev/null +++ b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/getty@.conf @@ -0,0 +1,2 @@ +# Consoles to start getty on when system is up +tty :%i [12345] /dev/%i noclear nowait diff --git a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/udhcpc@.conf b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/udhcpc@.conf new file mode 100644 index 0000000..2141bb8 --- /dev/null +++ b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/udhcpc@.conf @@ -0,0 +1,2 @@ +# Запуск DHCP-клиента после поднятия интерфейса wlan0 +service :%i /usr/bin/udhcpc -R -n -f -p /var/run/udhcpc.%i.pid -i %i -- DHCP Client diff --git a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/udhcpc@wlan0.conf b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/udhcpc@wlan0.conf deleted file mode 100644 index 7c5c5c5..0000000 --- a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/udhcpc@wlan0.conf +++ /dev/null @@ -1,2 +0,0 @@ -# Запуск DHCP-клиента после поднятия интерфейса wlan0 -service [2345] /usr/bin/udhcpc -R -n -p /var/run/udhcpc.wlan0.pid -i wlan0 -- DHCP Client diff --git a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/wifi@wlan0.conf b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/wpa_supplicant@.conf similarity index 50% rename from board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/wifi@wlan0.conf rename to board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/wpa_supplicant@.conf index 3e43a8a..d7bde50 100644 --- a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/wifi@wlan0.conf +++ b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/wpa_supplicant@.conf @@ -1,2 +1,2 @@ # Запуск wpa_supplicant для интерфейса wlan0 при загрузке системы -service [S12345] /usr/bin/wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf -- WPA Supplicant +service :%i /usr/bin/wpa_supplicant -Dnl80211 -i %i -c /etc/wpa_supplicant.conf -- WPA Supplicant diff --git a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/getty.conf b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/getty.conf deleted file mode 120000 index 24b41ba..0000000 --- a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/getty.conf +++ /dev/null @@ -1 +0,0 @@ -../available/getty.conf \ No newline at end of file diff --git a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/getty@tty1.conf b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/getty@tty1.conf new file mode 120000 index 0000000..8c585fd --- /dev/null +++ b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/getty@tty1.conf @@ -0,0 +1 @@ +../available/getty@.conf \ No newline at end of file diff --git a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/getty@ttyS0.conf b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/getty@ttyS0.conf new file mode 120000 index 0000000..8c585fd --- /dev/null +++ b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/getty@ttyS0.conf @@ -0,0 +1 @@ +../available/getty@.conf \ No newline at end of file diff --git a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/udhcpc@wlan0.conf b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/udhcpc@wlan0.conf new file mode 120000 index 0000000..bebe3d0 --- /dev/null +++ b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/udhcpc@wlan0.conf @@ -0,0 +1 @@ +../available/udhcpc@.conf \ No newline at end of file diff --git a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/wpa_supplicant@wlan0.conf b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/wpa_supplicant@wlan0.conf new file mode 120000 index 0000000..fddaa0f --- /dev/null +++ b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/wpa_supplicant@wlan0.conf @@ -0,0 +1 @@ +../available/wpa_supplicant@.conf \ No newline at end of file diff --git a/board/orangepi_zero_2w/sun50i-h618-orangepi-zero2w.dts b/board/orangepi_zero_2w/sun50i-h618-orangepi-zero2w.dts index 5795139..f5e1be2 100755 --- a/board/orangepi_zero_2w/sun50i-h618-orangepi-zero2w.dts +++ b/board/orangepi_zero_2w/sun50i-h618-orangepi-zero2w.dts @@ -141,8 +141,9 @@ }; &gpu { + status = "okay"; + #cooling-cells = <2>; mali-supply = <®_dcdc1>; - status = "disabled"; }; &mmc0 { @@ -491,64 +492,38 @@ }; }; -&ths { - status = "disabled"; +&{/thermal-zones/gpu-thermal} { + trips { + /delete-node/ gpu_alert; + /delete-node/ gpu-crit; + + gpu_alert: gpu-alert { + temperature = <95000>; // подняли с 85000 + hysteresis = <2000>; + type = "passive"; + }; + }; + + // Отключаем cooling-maps чтобы избежать warning + cooling-maps { + /delete-node/ map0; + }; }; -// &ths { -// compatible = "allwinner,sun50i-h616-ths"; -// reg = <0x05070400 0x400>; -// interrupts = ; -// clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>; -// clock-names = "bus", "mod"; -// resets = <&ccu RST_BUS_THS>; -// nvmem-cells = <&ths_calibration>; -// nvmem-cell-names = "calibration"; -// #thermal-sensor-cells = <1>; -// status = "okay"; -// }; +&{/thermal-zones/cpu-thermal} { + trips { + /delete-node/ cpu_alert; + /delete-node/ cpu-crit; -// &cpu_thermal { -// polling-delay-passive = <0>; -// polling-delay = <0>; -// thermal-sensors = <&ths 0>; -// trips { -// cpu_crit: cpu_crit { -// temperature = <100000>; -// hysteresis = <0>; -// type = "critical"; -// }; -// }; -// cooling-maps { -// }; -// }; + cpu_alert: cpu-alert { + temperature = <95000>; // подняли с 85000 + hysteresis = <2000>; + type = "passive"; + }; + }; -// &gpu_thermal { -// polling-delay-passive = <0>; -// polling-delay = <0>; -// thermal-sensors = <&ths 1>; -// trips { -// gpu_crit: gpu_crit { -// temperature = <100000>; -// hysteresis = <0>; -// type = "critical"; -// }; -// }; -// cooling-maps { -// }; -// }; - -// &ddr_thermal { -// polling-delay-passive = <0>; -// polling-delay = <0>; -// thermal-sensors = <&ths 2>; -// trips { -// ddr_crit: ddr_crit { -// temperature = <100000>; -// hysteresis = <0>; -// type = "critical"; -// }; -// }; -// cooling-maps { -// }; -// }; + // Отключаем cooling-maps чтобы избежать warning + cooling-maps { + /delete-node/ map0; + }; +};