From 92785f7c669fabfc23bc3fbc8b51ba7c7fcf43b8 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Mon, 25 Nov 2019 00:24:23 -0800 Subject: [PATCH 1/4] luci-app-unblockmusic: change default http port 5200 --- package/lean/luci-app-unblockmusic/Makefile | 2 +- .../root/etc/init.d/unblockmusic | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package/lean/luci-app-unblockmusic/Makefile b/package/lean/luci-app-unblockmusic/Makefile index a50de73a3b..edc8e0255b 100644 --- a/package/lean/luci-app-unblockmusic/Makefile +++ b/package/lean/luci-app-unblockmusic/Makefile @@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-unblockmusic PKG_VERSION:=2.2.0 -PKG_RELEASE:=9 +PKG_RELEASE:=10 PKG_LICENSE:=Apache-2.0 diff --git a/package/lean/luci-app-unblockmusic/root/etc/init.d/unblockmusic b/package/lean/luci-app-unblockmusic/root/etc/init.d/unblockmusic index 5be5239562..9ff4963a2f 100755 --- a/package/lean/luci-app-unblockmusic/root/etc/init.d/unblockmusic +++ b/package/lean/luci-app-unblockmusic/root/etc/init.d/unblockmusic @@ -25,7 +25,7 @@ add_rule() $ipt_n -A cloud_music -d 192.168.0.0/16 -j RETURN $ipt_n -A cloud_music -d 224.0.0.0/4 -j RETURN $ipt_n -A cloud_music -d 240.0.0.0/4 -j RETURN - $ipt_n -A cloud_music -p tcp -j REDIRECT --to-ports 5202 + $ipt_n -A cloud_music -p tcp -j REDIRECT --to-ports 5200 $ipt_n -I PREROUTING -p tcp --dport 80 -m set --match-set music dst -j cloud_music } @@ -41,7 +41,7 @@ del_rule(){ set_firewall(){ rm -f /tmp/dnsmasq.d/dnsmasq-163.conf mkdir -p /tmp/dnsmasq.d - echo "dhcp-option=252,http://$ROUTE_IP:5200/proxy.pac" > /tmp/dnsmasq.d/dnsmasq-163.conf + echo "dhcp-option=252,http://$ROUTE_IP:5201/proxy.pac" > /tmp/dnsmasq.d/dnsmasq-163.conf echo "ipset=/music.163.com/music" >> /tmp/dnsmasq.d/dnsmasq-163.conf echo "ipset=/interface.music.163.com/music" >> /tmp/dnsmasq.d/dnsmasq-163.conf /etc/init.d/dnsmasq restart >/dev/null 2>&1 @@ -82,11 +82,11 @@ start() fi if [ $TYPE = "default" ]; then - node /usr/share/UnblockNeteaseMusic/app.js $endponintset -p 5200:5201 >/tmp/unblockmusic.log 2>&1 & - node /usr/share/UnblockNeteaseMusic/app.js -p 5202 >>/tmp/unblockmusic.log 2>&1 & + node /usr/share/UnblockNeteaseMusic/app.js $endponintset -p 5201:5202 >/tmp/unblockmusic.log 2>&1 & + node /usr/share/UnblockNeteaseMusic/app.js -p 5200 >>/tmp/unblockmusic.log 2>&1 & else - node /usr/share/UnblockNeteaseMusic/app.js $endponintset -p 5200:5201 -o $TYPE >/tmp/unblockmusic.log 2>&1 & - node /usr/share/UnblockNeteaseMusic/app.js -p 5202 -o $TYPE >>/tmp/unblockmusic.log 2>&1 & + node /usr/share/UnblockNeteaseMusic/app.js $endponintset -p 5201:5202 -o $TYPE >/tmp/unblockmusic.log 2>&1 & + node /usr/share/UnblockNeteaseMusic/app.js -p 5200 -o $TYPE >>/tmp/unblockmusic.log 2>&1 & fi set_firewall From baa682be14054581e185e60a5a380d35796c7419 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Mon, 25 Nov 2019 00:31:18 -0800 Subject: [PATCH 2/4] ipq40xx: switch to ath10k-ct --- target/linux/ipq40xx/Makefile | 4 ++-- target/linux/ipq40xx/image/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target/linux/ipq40xx/Makefile b/target/linux/ipq40xx/Makefile index e8f078bee8..8c918ff1c9 100644 --- a/target/linux/ipq40xx/Makefile +++ b/target/linux/ipq40xx/Makefile @@ -17,8 +17,8 @@ include $(INCLUDE_DIR)/target.mk DEFAULT_PACKAGES += \ kmod-usb-dwc3-of-simple \ kmod-leds-gpio kmod-gpio-button-hotplug swconfig \ - kmod-ath10k wpad-openssl \ - kmod-usb3 kmod-usb-dwc3 ath10k-firmware-qca4019 \ + kmod-ath10k-ct wpad-openssl \ + kmod-usb3 kmod-usb-dwc3 ath10k-firmware-qca4019-ct \ automount autosamba luci-app-ipsec-vpnd v2ray shadowsocks-libev-ss-redir shadowsocksr-libev-server \ luci-app-unblockmusic luci-app-transmission htop diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index d2abc9a4c5..19cf854b5e 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -106,7 +106,7 @@ define Device/asus_rt-acrh17 KERNEL_INITRAMFS := $$(KERNEL) | uImage none KERNEL_INITRAMFS_SUFFIX := -factory.trx IMAGES := sysupgrade.bin - DEVICE_PACKAGES := ipq-wifi-rt-acrh17 ath10k-firmware-qca9984 + DEVICE_PACKAGES := ipq-wifi-rt-acrh17 ath10k-firmware-qca9984-ct endef TARGET_DEVICES += asus_rt-acrh17 From 176f1241396881888591ff8f211ffbd67c9de481 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Mon, 25 Nov 2019 01:02:52 -0800 Subject: [PATCH 3/4] ipq40xx: add p2w-r619ac 128M NAND support ( Needs Opboot 1.0.9 128M ver ) --- .../boot/dts/qcom-ipq4019-p2w-r619ac-128m.dts | 18 +++ .../arm/boot/dts/qcom-ipq4019-p2w-r619ac.dts | 12 ++ ...19-r619ac.dts => qcom-ipq4019-r619ac.dtsi} | 103 ++++++++++++------ target/linux/ipq40xx/image/Makefile | 16 ++- 4 files changed, 116 insertions(+), 33 deletions(-) create mode 100644 target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-p2w-r619ac-128m.dts create mode 100644 target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-p2w-r619ac.dts rename target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/{qcom-ipq4019-r619ac.dts => qcom-ipq4019-r619ac.dtsi} (78%) diff --git a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-p2w-r619ac-128m.dts b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-p2w-r619ac-128m.dts new file mode 100644 index 0000000000..b51378a7ed --- /dev/null +++ b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-p2w-r619ac-128m.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qcom-ipq4019-r619ac.dtsi" + +/ { + model = "P&W R619AC 128M"; + compatible = "p2w,r619ac-128m"; + + chosen { + bootargs-append = " root=/dev/ubiblock0_1 rootfstype=squashfs"; + }; +}; + +&rootfs_part1 { + reg = <0x0 0x8000000>; +}; + +/delete-node/ &rootfs_part2; diff --git a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-p2w-r619ac.dts b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-p2w-r619ac.dts new file mode 100644 index 0000000000..31010dd179 --- /dev/null +++ b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-p2w-r619ac.dts @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qcom-ipq4019-r619ac.dtsi" + +/ { + model = "P&W R619AC"; + compatible = "p2w,r619ac"; + + chosen { + bootargs-append = " root=/dev/ubiblock0_1 rootfstype=squashfs"; + }; +}; diff --git a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-r619ac.dts b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi similarity index 78% rename from target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-r619ac.dts rename to target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi index 51b0e05ed1..99993852a8 100644 --- a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-r619ac.dts +++ b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi @@ -6,9 +6,6 @@ #include / { - model = "P&W R619AC"; - compatible = "p2w,r619ac"; - aliases { led-boot = &led_sys; led-failsafe = &led_sys; @@ -17,10 +14,6 @@ label-mac-device = &gmac0; }; - chosen { - bootargs-append = " root=/dev/ubiblock0_1 rootfstype=squashfs"; - }; - soc { rng@22000 { status = "okay"; @@ -87,6 +80,8 @@ leds { compatible = "gpio-leds"; + pinctrl-0 = <&led_pins>; + pinctrl-names = "default"; led_sys: sys { label = "r619ac:blue:sys"; @@ -135,8 +130,50 @@ #size-cells = <1>; partition@0 { + label = "SBL1"; + reg = <0x0 0x40000>; + read-only; + }; + + partition@40000 { + label = "MIBIB"; + reg = <0x40000 0x20000>; + read-only; + }; + + partition@60000 { + label = "QSEE"; + reg = <0x60000 0x60000>; + read-only; + }; + + partition@c0000 { + label = "CDT"; + reg = <0xc0000 0x10000>; + read-only; + }; + + partition@d0000 { + label = "DDRPARAMS"; + reg = <0xd0000 0x10000>; + read-only; + }; + + partition@e0000 { + label = "APPSBLENV"; + reg = <0xe0000 0x10000>; + read-only; + }; + + partition@f0000 { + label = "APPSBL"; + reg = <0xf0000 0x80000>; + read-only; + }; + + partition@1 { label = "Bootloader"; - reg = <0 0x170000>; + reg = <0x0 0x170000>; }; partition@170000 { @@ -171,12 +208,12 @@ #address-cells = <1>; #size-cells = <1>; - partition@0 { + rootfs_part1: partition@0 { label = "rootfs"; reg = <0x0 0x4000000>; }; - partition@4000000 { + rootfs_part2: partition@4000000 { label = "unused1"; reg = <0x4000000 0x4000000>; }; @@ -184,20 +221,6 @@ }; }; -&pcie0 { - status = "okay"; - perst-gpio = <&tlmm 4 GPIO_ACTIVE_LOW>; - wake-gpio = <&tlmm 40 GPIO_ACTIVE_HIGH>; - - /* Free slot for use */ - bridge@0,0 { - reg = <0x00000000 0 0 0 0>; - #address-cells = <3>; - #size-cells = <2>; - ranges; - }; -}; - &qpic_bam { status = "okay"; }; @@ -205,7 +228,6 @@ &sdhci { pinctrl-0 = <&sd_0_pins>; pinctrl-names = "default"; - cd-gpios = <&tlmm 22 GPIO_ACTIVE_LOW>; vqmmc-supply = <&vqmmc>; status = "okay"; }; @@ -237,12 +259,6 @@ function = "sdio"; drive-strength = <16>; }; - - mux_3 { - pins = "gpio32"; - function = "gpio"; - output-low; - }; }; serial_0_pins: serial0-pinmux { @@ -252,6 +268,29 @@ bias-disable; }; }; + + led_pins: led_pinmux { + mux { + pins = "gpio32", "gpio39", "gpio50"; + function = "gpio"; + bias-pull-up; + output-low; + }; + + mux_1 { + pins = "gpio52"; + function = "gpio"; + bias-pull-up; + output-high; + }; + + mux_2 { + pins = "gpio61"; + function = "gpio"; + bias-pull-down; + output-high; + }; + }; }; &usb3_ss_phy { @@ -278,4 +317,4 @@ &wifi1 { status = "okay"; qcom,ath10k-calibration-variant = "R619AC"; -}; \ No newline at end of file +}; diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index 19cf854b5e..f80c4b15da 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -89,7 +89,7 @@ define Device/asus_rt-ac58u KERNEL_INITRAMFS := $$(KERNEL) | uImage none KERNEL_INITRAMFS_SUFFIX := -factory.trx IMAGES := sysupgrade.bin - DEVICE_PACKAGES := kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-usb-ledtrig-usbport -kmod-ath10k-ct -ath10k-firmware-qca4019-ct kmod-ath10k ath10k-firmware-qca4019 endef TARGET_DEVICES += asus_rt-ac58u @@ -291,6 +291,20 @@ define Device/p2w_r619ac endef TARGET_DEVICES += p2w_r619ac +define Device/p2w_r619ac-128m + $(call Device/FitzImage) + $(call Device/UbiFit) + DEVICE_VENDOR := P&W + DEVICE_MODEL := R619AC + DEVICE_VARIANT := 128M + DEVICE_DTS := qcom-ipq4019-p2w-r619ac-128m + DEVICE_DTS_CONFIG := config@10 + BLOCKSIZE := 128k + PAGESIZE := 2048 + DEVICE_PACKAGES := ipq-wifi-p2w_r619ac +endef +TARGET_DEVICES += p2w_r619ac-128m + define Device/qcom_ap-dk04.1-c1 $(call Device/FitImage) $(call Device/UbiFit) From ab7187358534b19367c356db236bd9efe8e4c106 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Mon, 25 Nov 2019 01:21:58 -0800 Subject: [PATCH 4/4] ipq40xx: fix dts makefile --- target/linux/ipq40xx/image/Makefile | 2 +- .../ipq40xx/patches-4.14/901-arm-boot-add-dts-files.patch | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index f80c4b15da..706d34e18c 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -281,7 +281,7 @@ define Device/p2w_r619ac $(call Device/UbiFit) DEVICE_VENDOR := P&W DEVICE_MODEL := R619AC - DEVICE_DTS := qcom-ipq4019-r619ac + DEVICE_DTS := qcom-ipq4019-p2w-r619ac DEVICE_DTS_CONFIG := config@10 BLOCKSIZE := 128k PAGESIZE := 2048 diff --git a/target/linux/ipq40xx/patches-4.14/901-arm-boot-add-dts-files.patch b/target/linux/ipq40xx/patches-4.14/901-arm-boot-add-dts-files.patch index b3862874eb..6e30c1e7d4 100644 --- a/target/linux/ipq40xx/patches-4.14/901-arm-boot-add-dts-files.patch +++ b/target/linux/ipq40xx/patches-4.14/901-arm-boot-add-dts-files.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -697,7 +697,26 @@ dtb-$(CONFIG_ARCH_QCOM) += \ +@@ -697,7 +697,27 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-apq8074-dragonboard.dtb \ qcom-apq8084-ifc6540.dtb \ qcom-apq8084-mtp.dtb \ @@ -28,7 +28,8 @@ Signed-off-by: John Crispin + qcom-ipq4019-a62.dtb \ + qcom-ipq4019-ap.dk04.1-c1.dtb \ + qcom-ipq4019-map-ac2200.dtb \ -+ qcom-ipq4019-r619ac.dtb \ ++ qcom-ipq4019-p2w-r619ac.dtb \ ++ qcom-ipq4019-p2w-r619ac-128m.dtb \ + qcom-ipq4019-hugo-ac1200.dtb \ + qcom-ipq4019-rt-acrh17.dtb \ + qcom-ipq4028-wpj428.dtb \