51

Odp: Screenshot ffmpeg

To co napisałem w poście 44 - włączone są wszystkie usb. Więc teraz albo zrób sobie poprawnie łatkę i skompiluj system albo używaj tego - to 22.04-rc4, z openwrt bez żadnych moim zmian poza tym dtsem. Możesz tam normalnie zainstalować pakiety z repo.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

52

Odp: Screenshot ffmpeg

Na razie próbuje ogarnąć tą łatkę:
./target/linux/sunxi/patches-5.4/001-sunxi-h3-nanopi-neo-enable-usb-goldpin.patch

--- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
@@ -73,0 +73,23 @@
+&ohci1 {
+    status = "okay";
+};
+
+&ohci2 {
+    status = "okay";
+};
+
+&ohci3 {
+    status = "okay";
+};
+
+&ehci1 {
+    status = "okay";
+};
+
+&ehci2 {
+    status = "okay";
+};
+
+&ehci3 {
+    status = "okay";
+};

Gdzie jeszcze popełniam błąd?

53

Odp: Screenshot ffmpeg

Jeżeli modyfikujesz istniejący plik to przed i po zmianach są jeszcze trzy linie oryginalnej zawartości. Zrób sobie tego diffa będziesz miał poprawną łatkę, nie lep tego ręcznie jak robisz teraz.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

54

Odp: Screenshot ffmpeg

Zrobiłem diffa, dalej jest źle:

diff -u ./build_dir/host/u-boot-2021.01/arch/arm/dts/sun8i-h3-nanopi-neo.dts ./sun8i-h3-nanopi-neo.dts > ./target/linux/sunxi/patches-5.4/001-sunxi-h3-nanopi-neo-enable-usb-goldpin.patch

--- ./build_dir/host/u-boot-2021.01/arch/arm/dts/sun8i-h3-nanopi-neo.dts    2022-06-19 20:53:01.899071623 +0200
+++ ./sun8i-h3-nanopi-neo.dts    2022-06-19 20:52:01.425772754 +0200
@@ -71,3 +71,26 @@
     usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
 };
 
+&ehci1 {
+        status = "okay";
+};
+
+&ehci2 {
+        status = "okay";
+};
+
+&ehci3 {
+        status = "okay";
+};
+
+&ohci1 {
+        status = "okay";
+};
+
+&ohci2 {
+        status = "okay";
+};
+
+&ohci3 {
+        status = "okay";
+};

Wynik kompilacji:

Applying /root/OpenWRT/openwrt/target/linux/sunxi/patches-5.4/001-sunxi-h3-nanopi-neo-enable-usb-goldpin.patch using plaintext:
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- ./build_dir/host/u-boot-2021.01/arch/arm/dts/sun8i-h3-nanopi-neo.dts       2022-06-19 20:53:01.899071623 +0200
|+++ ./sun8i-h3-nanopi-neo.dts  2022-06-19 20:52:01.425772754 +0200
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
Patch failed!  Please fix /root/OpenWRT/openwrt/target/linux/sunxi/patches-5.4/001-sunxi-h3-nanopi-neo-enable-usb-goldpin.patch!
make[4]: *** [Makefile:40: /root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-sunxi_cortexa7/linux-5.4.188/.prepared_6ca7f032a9ae7f44a5e614ac30177b86] Error 1
make[4]: Leaving directory '/root/OpenWRT/openwrt/target/linux/sunxi'
make[3]: *** [Makefile:11: compile] Error 2
make[3]: Leaving directory '/root/OpenWRT/openwrt/target/linux'
time: target/linux/compile#43.51#45.03#61.82
    ERROR: target/linux failed to build.
make[2]: *** [target/Makefile:25: target/linux/compile] Error 1
make[2]: Leaving directory '/root/OpenWRT/openwrt'
make[1]: *** [target/Makefile:18: /root/OpenWRT/openwrt/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.target_compile] Error 2
make[1]: Leaving directory '/root/OpenWRT/openwrt'
make: *** [/root/OpenWRT/openwrt/include/toplevel.mk:230: world] Błąd 2

55

Odp: Screenshot ffmpeg

złe pliki.

Nie
--- ./build_dir/host/u-boot-2021.01/arch/arm/dts/sun8i-h3-nanopi-neo.dts    2022-06-19 20:53:01.899071623 +0200
+++ ./sun8i-h3-nanopi-neo.dts    2022-06-19 20:52:01.425772754 +0200

tylko

--- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts

Te linie określają które pliki będą łatane.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

56

Odp: Screenshot ffmpeg

Skopiowałem tego dtsa:
cp ./build_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-8.4.0_musl_eabi/linux-5.4.188/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts ./sun8i-h3-nanopi-neo.dts

Zrobiłem zmiany, difa i to mój patch:

--- a/arch/arm/dts/sun8i-h3-nanopi-neo.dts
+++ b/arch/arm/dts/sun8i-h3-nanopi-neo.dts
@@ -51,6 +51,18 @@
     status = "okay";
 };
 
+&ehci1 {
+    status = "okay";
+};
+
+&ehci2 {
+    status = "okay";
+};
+
+&ehci3 {
+    status = "okay";
+};
+
 &emac {
     phy-handle = <&int_mii_phy>;
     phy-mode = "mii";
@@ -62,6 +74,18 @@
     status = "okay";
 };
 
+&ohci1 {
+        status = "okay";
+};
+
+&ohci2 {
+        status = "okay";
+};
+
+&ohci3 {
+        status = "okay";
+};
+
 &usb_otg {
     status = "okay";
     dr_mode = "peripheral";

Dalej wyrzuca błąd:

Applying /root/OpenWRT/openwrt/target/linux/sunxi/patches-5.4/001-sunxi-h3-nanopi-neo-enable-usb-goldpin.patch using plaintext:
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/arch/arm/dts/sun8i-h3-nanopi-neo.dts
|+++ b/arch/arm/dts/sun8i-h3-nanopi-neo.dts
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
Patch failed!  Please fix /root/OpenWRT/openwrt/target/linux/sunxi/patches-5.4/001-sunxi-h3-nanopi-neo-enable-usb-goldpin.patch!
make[4]: *** [Makefile:40: /root/OpenWRT/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-sunxi_cortexa7/linux-5.4.188/.prepared_21e3fd19a9affaddb317f9a9518c4c71] Error 1
make[4]: Leaving directory '/root/OpenWRT/openwrt/target/linux/sunxi'
make[3]: *** [Makefile:11: compile] Error 2
make[3]: Leaving directory '/root/OpenWRT/openwrt/target/linux'
time: target/linux/compile#42.98#42.96#59.30
    ERROR: target/linux failed to build.
make[2]: *** [target/Makefile:25: target/linux/compile] Error 1
make[2]: Leaving directory '/root/OpenWRT/openwrt'
make[1]: *** [target/Makefile:18: /root/OpenWRT/openwrt/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.target_compile] Error 2
make[1]: Leaving directory '/root/OpenWRT/openwrt'
make: *** [/root/OpenWRT/openwrt/include/toplevel.mk:230: world] Błąd 2

57

Odp: Screenshot ffmpeg

Mała poprawka:

--- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts

a nie a/arch/arm/dts/sun8i-h3-nanopi-neo.dts/ b/arch/arm/dts/sun8i-h3-nanopi-neo.dts

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

58 (edytowany przez tinware 2022-06-20 01:06:38)

Odp: Screenshot ffmpeg

Działa wyśmienicie, ekstra! ;-)

Zastanawia mnie ten wpis z dtsa, co on oznacza?

&usbphy {
        usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
};

Sprawdziłem jeszcze kwestię GPIO, poniżej moje notatki.

https://images89.fotosik.pl/600/2f0c460b631b6737.jpg

Chciałbym uruchomić GPIO na PG11 oraz UART1 czyli PG6, PG7, PG8 i PG9.
Co muszę jeszcze dopisać do tego dtsa?

59

Odp: Screenshot ffmpeg

gpio od wykrycia podłączenia kabla microusb. Detekcja pinu.

gpio tak po prostu musisz sobie wyeksportować o ile nie jest używane. Serial - jeżeli jest definiowany w dtsie to tak samo musisz włączyć (okey dla odpowiedniej nazwy).

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.