diff --git a/build.sh b/build.sh index a16940f..aebed31 100755 --- a/build.sh +++ b/build.sh @@ -54,7 +54,7 @@ apply_patches() { cd "$OPENWRT_DIR" - for file in $(find $PATCH_DIR -type f -name '*.patch'); do + for file in $(ls -1 $PATCH_DIR/*.patch); do echo "Applying patch: $file" if patch -p1 -f --dry-run < $file; then patch -p1 -f < $file || return 1 diff --git a/onion/patches/003-enable-pwm.patch b/onion/patches/003-enable-pwm.patch new file mode 100644 index 0000000..8677df8 --- /dev/null +++ b/onion/patches/003-enable-pwm.patch @@ -0,0 +1,22 @@ +--- a/target/linux/ramips/dts/mt7628an.dtsi ++++ b/target/linux/ramips/dts/mt7628an.dtsi +@@ -221,9 +221,6 @@ + resets = <&rstctrl 31>; + reset-names = "pwm"; + +- pinctrl-names = "default"; +- pinctrl-0 = <&pwm0_pins>, <&pwm1_pins>; +- + status = "disabled"; + }; + +--- a/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi ++++ b/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi +@@ -176,3 +176,7 @@ + reg = <0x28 0x6>; + }; + }; ++ ++&pwm { ++ status = "okay"; ++};