From 3469334bd924f2092b3c14f17ac112fc673f896d Mon Sep 17 00:00:00 2001 From: nivalxer Date: Mon, 16 Sep 2019 17:19:22 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E6=AD=A3v2ray=E8=AE=A2=E9=98=85?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ${uci_set}type为服务器节点类型,固定为v2ray,不应该取ssr_security字段。 --- .../luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.sh b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.sh index b652eac046..fab868b693 100755 --- a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.sh +++ b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.sh @@ -41,7 +41,6 @@ Server_Update() { #v2ray ${uci_set}alter_id="$ssr_alter_id" ${uci_set}vmess_id="$ssr_vmess_id" - ${uci_set}type="$ssr_security" ${uci_set}transport="$ssr_transport" ${uci_set}tcp_guise="$ssr_tcp_guise" ${uci_set}ws_host="$ssr_ws_host" @@ -223,4 +222,4 @@ else logger -st $log_name[$$] -p3 "${subscribe_url[$o]} 订阅数据获取失败 错误代码: $curl_code" fi done -/etc/init.d/$name restart >/dev/null 2>&1 \ No newline at end of file +/etc/init.d/$name restart >/dev/null 2>&1 From 734df71303969e171fd12a2efa2779f29c82b3cf Mon Sep 17 00:00:00 2001 From: wybb Date: Mon, 16 Sep 2019 17:20:14 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BC=98=E5=8C=96ssr-switch=E5=8D=95?= =?UTF-8?q?=E4=B8=80=E8=8A=82=E7=82=B9=E4=B8=8B=E7=9A=84ss=E9=87=8D?= =?UTF-8?q?=E5=90=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 针对如下场景进行优化 1、ssr-plus仅仅设置了一个服务器节点 2、该节点使用域名地址 3、域名对应的DNS解析ip修改了 问题原因: 在存在多节点情况下,select_proxy会挑选下一个节点重启ssr服务,但是在单一节点下由于不符合if [ "$ENABLE_SERVER" != nil ] 条件,导致并不调用switch_proxy来重启服务。但是域名对应的ip已经修改了,ssr服务本身是依赖ip参数启动的,ssr服务在重启依然停留在老的ip上。 调整方式: 这个修改调整为在每次检测网络失败的情况下,就算只有一个节点,也重启ssr服务,保证ssr服务有机会切换到域名新的ip地址。 此外假如因为ssr服务本身存在一些小概率bug,也可以通过重启ssr解决。 这种情况在付费的ssr服务中很常见,因为服务商往往只提供一个域名,假如因为服务器调整(比如某个服务器ip被和谐了),服务提供商都会重新给域名绑定新的服务器(或新IP) --- .../luci-app-ssr-plus/root/usr/bin/ssr-switch | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-switch b/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-switch index e46de0a2ac..281d0f851e 100755 --- a/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-switch +++ b/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-switch @@ -33,7 +33,7 @@ uci_get_by_type() { DEFAULT_SERVER=$(uci_get_by_type global global_server) CURRENT_SERVER=$DEFAULT_SERVER -#жϴǷ +#判断代理是否正常 check_proxy() { /usr/bin/ssr-check www.google.com 80 $switch_time 1 if [ "$?" == "0" ]; then @@ -41,7 +41,7 @@ if [ "$?" == "0" ]; then else /usr/bin/ssr-check www.baidu.com 80 $switch_time 1 if [ "$?" == "0" ]; then - #gooleͨbaiduͨ + #goole不通baidu通则不正常 return 1 else return 2 @@ -95,7 +95,7 @@ return 1 fi } -#ѡõĴ +#选择可用的代理 select_proxy() { config_load $NAME @@ -106,33 +106,33 @@ config_foreach search_proxy servers } -#л +#切换代理 switch_proxy() { /etc/init.d/shadowsocksr restart $1 return 0 } start() { -#֧kcptunʱл +#不支持kcptun启用时的切换 [ $(uci_get_by_name $DEFAULT_SERVER kcp_enable) = "1" ] && return 1 -while [ "1" = "1" ] #ѭ +while [ "1" = "1" ] #死循环 do sleep $cycle_time LOGTIME=$(date "+%Y-%m-%d %H:%M:%S") - #жϵǰǷΪȱʡ + #判断当前代理是否为缺省服务器 if [ "$CURRENT_SERVER" != "$DEFAULT_SERVER" ] ;then #echo "not default proxy" echo "$(date "+%Y-%m-%d %H:%M:%S") Current server is not default Main server, try to switch back." >> /tmp/ssrplus.log - #ȱʡǷ + #检查缺省服务器是否正常 if test_proxy $DEFAULT_SERVER ;then #echo "switch to default proxy" echo "$(date "+%Y-%m-%d %H:%M:%S") Main server is avilable." >> /tmp/ssrplus.log - #ȱʡл + #缺省服务器正常,切换回来 CURRENT_SERVER=$DEFAULT_SERVER switch_proxy $CURRENT_SERVER echo "switch to default ["$(uci_get_by_name $CURRENT_SERVER server)"] proxy!" >> /tmp/ssrplus.log @@ -142,18 +142,18 @@ do fi fi - #жϵǰǷ + #判断当前代理是否正常 check_proxy current_ret=$? if [ "$current_ret" = "1" ] ;then - #ǰж޿õķ + #当前代理错误,判断有无可用的服务器 #echo "current error" echo "$(date "+%Y-%m-%d %H:%M:%S") Current server error, try to switch another server." >> /tmp/ssrplus.log select_proxy if [ "$ENABLE_SERVER" != nil ] ;then - #ãл + #有其他服务器可用,进行切换 #echo $(uci_get_by_name $new_proxy server) echo "$(date "+%Y-%m-%d %H:%M:%S") Another server is avilable, now switching server." >> /tmp/ssrplus.log CURRENT_SERVER=$ENABLE_SERVER @@ -161,7 +161,9 @@ do normal_flag=1 echo "$(date "+%Y-%m-%d %H:%M:%S") ShadowsocksR server switch OK" >> /tmp/ssrplus.log else - normal_flag=0 + switch_proxy $CURRENT_SERVER + normal_flag=1 + echo "$(date "+%Y-%m-%d %H:%M:%S") Try restart current server." >> /tmp/ssrplus.log fi else normal_flag=0 @@ -170,4 +172,4 @@ do done -} \ No newline at end of file +} From 0024eea3678360529263042386b32f6229596e2e Mon Sep 17 00:00:00 2001 From: Hugo Yuan <429632952@163.com> Date: Tue, 17 Sep 2019 14:45:36 +0800 Subject: [PATCH 3/5] ipq40xx: add Hugo AC1200 support --- .../ipq40xx/base-files/etc/board.d/02_network | 4 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 2 + .../arm/boot/dts/qcom-ipq4019-hugo-ac1200.dts | 78 ++++++ .../boot/dts/qcom-ipq4019-hugo-ac1200.dtsi | 244 ++++++++++++++++++ target/linux/ipq40xx/image/Makefile | 12 + .../901-arm-boot-add-dts-files.patch | 3 +- .../patches-4.14/999-fix-m25p-shutdown.patch | 34 +++ 7 files changed, 376 insertions(+), 1 deletion(-) create mode 100644 target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-hugo-ac1200.dts create mode 100644 target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-hugo-ac1200.dtsi create mode 100644 target/linux/ipq40xx/patches-4.14/999-fix-m25p-shutdown.patch diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index 959374cf91..7f59cefb69 100755 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -26,6 +26,10 @@ ipq40xx_setup_interfaces() ucidef_add_switch "switch0" \ "0t@eth0" "5:lan" "4:wan" ;; + hugo,ac1200) + ucidef_add_switch "switch0" \ + "0t@eth0" "5:wan" "3:lan" + ;; asus,rt-acrh17|\ asus,rt-ac58u|\ avm,fritzbox-4040|\ diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 1062500f7b..b06926b0b2 100644 --- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -151,6 +151,7 @@ case "$FIRMWARE" in ;; compex,wpj428 |\ engenius,eap1300 |\ + hugo,ac1200 |\ openmesh,a42 |\ openmesh,a62) ath10kcal_extract "0:ART" 4096 12064 @@ -192,6 +193,7 @@ case "$FIRMWARE" in ;; compex,wpj428 |\ engenius,eap1300 |\ + hugo,ac1200 |\ openmesh,a42 |\ openmesh,a62) ath10kcal_extract "0:ART" 20480 12064 diff --git a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-hugo-ac1200.dts b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-hugo-ac1200.dts new file mode 100644 index 0000000000..f129d6b1d0 --- /dev/null +++ b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-hugo-ac1200.dts @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2019 Hugo Yuan + */ + +#include "qcom-ipq4019-hugo-ac1200.dtsi" +#include +#include + +/ { + model = "Hugo AC1200"; + compatible = "hugo,ac1200", "qcom,ipq4019"; +}; + +&blsp1_spi1 { + pinctrl-0 = <&spi_0_pins>; + pinctrl-names = "default"; + status = "okay"; + cs-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>; + + flash@0 { + reg = <0>; + compatible = "jedec,spi-nor"; + spi-max-frequency = <24000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "0:SBL1"; + reg = <0x0 0x40000>; + read-only; + }; + partition@40000 { + label = "0:MIBIB"; + reg = <0x40000 0x20000>; + read-only; + }; + partition@60000 { + label = "0:QSEE"; + reg = <0x60000 0x60000>; + read-only; + }; + partition@c0000 { + label = "0:CDT"; + reg = <0xc0000 0x10000>; + read-only; + }; + partition@d0000 { + label = "0:DDRPARAMS"; + reg = <0xd0000 0x10000>; + read-only; + }; + partition@e0000 { + label = "0:APPSBLENV"; + reg = <0xe0000 0x10000>; + read-only; + }; + partition@f0000 { + label = "0:APPSBL"; + reg = <0xf0000 0x80000>; + read-only; + }; + partition@170000 { + label = "0:ART"; + reg = <0x170000 0x10000>; + read-only; + }; + partition@180000 { + compatible = "denx,fit"; + label = "firmware"; + reg = <0x180000 0x1e80000>; + }; + }; + }; +}; + diff --git a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-hugo-ac1200.dtsi b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-hugo-ac1200.dtsi new file mode 100644 index 0000000000..99ff2cc352 --- /dev/null +++ b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-hugo-ac1200.dtsi @@ -0,0 +1,244 @@ +/* + * Copyright (c) 2019 Hugo Yuan + */ + +#include "qcom-ipq4019.dtsi" +#include +#include +#include + +/ { + + model = "Hugo AC1200"; + compatible = "qcom,ipq4019"; + + memory { + device_type = "memory"; + reg = <0x80000000 0x10000000>; /* 256MB */ + }; + + soc { + mdio@90000 { + status = "okay"; + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + }; + + ess-psgmii@98000 { + status = "okay"; + }; + + tcsr@1949000 { + compatible = "qcom,tcsr"; + reg = <0x1949000 0x100>; + qcom,wifi_glb_cfg = ; + }; + + tcsr@194b000 { + /* select hostmode */ + compatible = "qcom,tcsr"; + reg = <0x194b000 0x100>; + qcom,usb-hsphy-mode-select = ; + status = "okay"; + }; + + ess_tcsr@1953000 { + compatible = "qcom,tcsr"; + reg = <0x1953000 0x1000>; + qcom,ess-interface-select = ; + }; + + tcsr@1957000 { + compatible = "qcom,tcsr"; + reg = <0x1957000 0x100>; + qcom,wifi_noc_memtype_m0_m2 = ; + }; + + usb2: usb2@60f8800 { + status = "okay"; + + dwc3@6000000 { + #address-cells = <1>; + #size-cells = <0>; + + usb2_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; + }; + }; + + serial@78af000 { + pinctrl-0 = <&serial_0_pins>; + pinctrl-names = "default"; + status = "okay"; + }; + + serial@78b0000 { + pinctrl-0 = <&serial_1_pins>; + pinctrl-names = "default"; + status = "okay"; + }; + + i2c@78b7000 { /* BLSP1 QUP2 */ + pinctrl-0 = <&i2c_0_pins>; + pinctrl-names = "default"; + + status = "okay"; + }; + + usb3: usb3@8af8800 { + status = "okay"; + + dwc3@8a00000 { + #address-cells = <1>; + #size-cells = <0>; + + usb3_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; + + usb3_port2: port@2 { + reg = <2>; + #trigger-source-cells = <0>; + }; + }; + }; + + crypto@8e3a000 { + status = "okay"; + }; + + watchdog@b017000 { + status = "okay"; + }; + + ess-switch@c000000 { + status = "okay"; + }; + + edma@c080000 { + status = "okay"; + }; + + leds { + compatible = "gpio-leds"; + + led1 { + label = "ac1200:green:ctrl1"; + gpios = <&tlmm 44 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + led2 { + label = "ac1200:red:ctrl2"; + gpios = <&tlmm 45 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + led3 { + label = "ac1200:blue:ctrl3"; + gpios = <&tlmm 46 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&tlmm 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + }; +}; + +&blsp_dma { + status = "okay"; +}; + +&cryptobam { + status = "okay"; +}; + +&qpic_bam { + status = "okay"; +}; + +&tlmm { + i2c_0_pins: i2c-0-pinmux { + mux { + pins = "gpio20", "gpio21"; + function = "blsp_i2c0"; + bias-disable; + }; + }; + + mdio_pins: mdio_pinmux { + mux_1 { + pins = "gpio6"; + function = "mdio"; + bias-pull-up; + }; + mux_2 { + pins = "gpio7"; + function = "mdc"; + bias-pull-up; + }; + }; + + serial_0_pins: serial0-pinmux { + mux { + pins = "gpio16", "gpio17"; + function = "blsp_uart0"; + bias-disable; + }; + }; + + serial_1_pins: serial1_pinmux { + mux { + pins = "gpio8", "gpio9"; + function = "blsp_uart1"; + bias-disable; + }; + }; + + spi_0_pins: spi_0_pinmux { + pinmux { + function = "blsp_spi0"; + pins = "gpio13", "gpio14", "gpio15"; + drive-strength = <12>; + bias-disable; + }; + pinmux_cs { + function = "gpio"; + pins = "gpio12"; + drive-strength = <2>; + bias-disable; + output-high; + }; + }; +}; + +&usb3_ss_phy { + status = "okay"; +}; + +&usb3_hs_phy { + status = "okay"; +}; + +&usb2_hs_phy { + status = "okay"; +}; + +&wifi0 { + status = "okay"; +}; + +&wifi1 { + status = "okay"; +}; diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index 2121a6416f..ebb4a7952b 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -289,6 +289,18 @@ define Device/qcom_ap-dk04.1-c1 endef TARGET_DEVICES += qcom_ap-dk04.1-c1 +define Device/hugo_ac1200 + $(call Device/FitImage) + DEVICE_TITLE := Hugo AC1200 + BOARD_NAME := hugo_ac1200 + DEVICE_DTS := qcom-ipq4019-hugo-ac1200 + KERNEL_SIZE := 4096k + IMAGE_SIZE := 31232k + IMAGES := sysupgrade.bin + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata +endef +TARGET_DEVICES += hugo_ac1200 + define Device/zyxel_nbg6617 $(call Device/FitImageLzma) DEVICE_DTS := qcom-ipq4018-nbg6617 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 0eff38a333..f8378190b9 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,24 @@ dtb-$(CONFIG_ARCH_QCOM) += \ +@@ -697,7 +697,25 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-apq8074-dragonboard.dtb \ qcom-apq8084-ifc6540.dtb \ qcom-apq8084-mtp.dtb \ @@ -28,6 +28,7 @@ Signed-off-by: John Crispin + qcom-ipq4019-a62.dtb \ + qcom-ipq4019-ap.dk04.1-c1.dtb \ + qcom-ipq4019-map-ac2200.dtb \ ++ qcom-ipq4019-hugo-ac1200.dtb \ + qcom-ipq4019-rt-acrh17.dtb \ + qcom-ipq4028-wpj428.dtb \ + qcom-ipq4029-gl-b1300.dtb \ diff --git a/target/linux/ipq40xx/patches-4.14/999-fix-m25p-shutdown.patch b/target/linux/ipq40xx/patches-4.14/999-fix-m25p-shutdown.patch new file mode 100644 index 0000000000..0b825d61e0 --- /dev/null +++ b/target/linux/ipq40xx/patches-4.14/999-fix-m25p-shutdown.patch @@ -0,0 +1,34 @@ +diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c +index 24e1ea3..b1ff69a 100644 +--- a/drivers/mtd/devices/m25p80.c ++++ b/drivers/mtd/devices/m25p80.c +@@ -313,6 +313,21 @@ static int m25p_remove(struct spi_device *spi) + return mtd_device_unregister(&flash->spi_nor.mtd); + } + ++static void m25p_shutdown(struct spi_device *spi) ++{ ++ struct m25p *flash = spi_get_drvdata(spi); ++ ++ if ((&flash->spi_nor)->addr_width > 3) { ++ printk(KERN_INFO "m25p80: exit 4-byte address mode\n"); ++ flash->command[0] = SPINOR_OP_EX4B; // exit 4-byte address mode: 0xe9 ++ spi_write(flash->spi, flash->command, 1); ++ flash->command[0] = 0x66; // enable reset ++ spi_write(flash->spi, flash->command, 1); ++ flash->command[0] = 0x99; // reset ++ spi_write(flash->spi, flash->command, 1); ++ } ++} ++ + /* + * Do NOT add to this array without reading the following: + * +@@ -387,6 +402,7 @@ static struct spi_driver m25p80_driver = { + .id_table = m25p_ids, + .probe = m25p_probe, + .remove = m25p_remove, ++ .shutdown = m25p_shutdown, + + /* REVISIT: many of these chips have deep power-down modes, which + * should clearly be entered on suspend() to minimize power use. From 0373823f017916f2fab02ee4c501798bc4caa19a Mon Sep 17 00:00:00 2001 From: Hugo Yuan <429632952@163.com> Date: Tue, 17 Sep 2019 22:51:14 +0800 Subject: [PATCH 4/5] ipq40xx: Add Hugo AC1200 led aliases (#1635) --- target/linux/ipq40xx/base-files/etc/board.d/01_leds | 5 +++++ .../arch/arm/boot/dts/qcom-ipq4019-hugo-ac1200.dtsi | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/target/linux/ipq40xx/base-files/etc/board.d/01_leds b/target/linux/ipq40xx/base-files/etc/board.d/01_leds index 85b1316300..e63dcf263f 100755 --- a/target/linux/ipq40xx/base-files/etc/board.d/01_leds +++ b/target/linux/ipq40xx/base-files/etc/board.d/01_leds @@ -46,6 +46,11 @@ netgear,ex6150v2) ucidef_set_led_wlan "wlan2g" "WLAN2G" "ex61x0v2:green:router" "phy0tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "ex61x0v2:green:client" "phy1tpt" ;; +hugo,ac1200) + ucidef_set_led_default "green" "GREEN" "${boardname}:green:ctrl1" "1" + ucidef_set_led_default "red" "RED" "${boardname}:red:ctrl2" "1" + ucidef_set_led_default "blue" "BLUE" "${boardname}:blue:ctrl3" "1" + ;; zyxel,nbg6617) ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2G" "phy0tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5G" "phy1tpt" diff --git a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-hugo-ac1200.dtsi b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-hugo-ac1200.dtsi index 99ff2cc352..ff5b333f9b 100644 --- a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-hugo-ac1200.dtsi +++ b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-hugo-ac1200.dtsi @@ -17,6 +17,13 @@ reg = <0x80000000 0x10000000>; /* 256MB */ }; + aliases { + led-boot = &power; + led-failsafe = &power; + led-running = &power; + led-upgrade = &power; + }; + soc { mdio@90000 { status = "okay"; @@ -128,19 +135,16 @@ led1 { label = "ac1200:green:ctrl1"; gpios = <&tlmm 44 GPIO_ACTIVE_LOW>; - default-state = "on"; }; led2 { label = "ac1200:red:ctrl2"; gpios = <&tlmm 45 GPIO_ACTIVE_LOW>; - default-state = "on"; }; - led3 { + power: led3 { label = "ac1200:blue:ctrl3"; gpios = <&tlmm 46 GPIO_ACTIVE_LOW>; - default-state = "on"; }; }; From ed120b49ce0e88475b81dc06708309a01dacbf5e Mon Sep 17 00:00:00 2001 From: Eason Date: Tue, 17 Sep 2019 22:51:53 +0800 Subject: [PATCH 5/5] luci-app-autoreboot: fix sunday schedule reboot datetype (#1634) --- .../lean/luci-app-autoreboot/luasrc/model/cbi/autoreboot.lua | 4 ++-- package/lean/luci-app-autoreboot/root/etc/init.d/autoreboot | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/lean/luci-app-autoreboot/luasrc/model/cbi/autoreboot.lua b/package/lean/luci-app-autoreboot/luasrc/model/cbi/autoreboot.lua index 8a008d7fa1..d66b773ad6 100644 --- a/package/lean/luci-app-autoreboot/luasrc/model/cbi/autoreboot.lua +++ b/package/lean/luci-app-autoreboot/luasrc/model/cbi/autoreboot.lua @@ -11,14 +11,14 @@ enable.rmempty = false enable.default=0 week=s:option(ListValue,"week",translate("Week Day")) -week:value(0,translate("Everyday")) +week:value(7,translate("Everyday")) week:value(1,translate("Monday")) week:value(2,translate("Tuesday")) week:value(3,translate("Wednesday")) week:value(4,translate("Thursday")) week:value(5,translate("Friday")) week:value(6,translate("Saturday")) -week:value(7,translate("Sunday")) +week:value(0,translate("Sunday")) week.default=0 hour=s:option(Value,"hour",translate("Hour")) diff --git a/package/lean/luci-app-autoreboot/root/etc/init.d/autoreboot b/package/lean/luci-app-autoreboot/root/etc/init.d/autoreboot index 7973d6c3f4..934477d415 100755 --- a/package/lean/luci-app-autoreboot/root/etc/init.d/autoreboot +++ b/package/lean/luci-app-autoreboot/root/etc/init.d/autoreboot @@ -15,7 +15,7 @@ run_reboot() if [ $minute = 0 ] ; then minute="00" fi - if [ $week = 0 ] ; then + if [ $week = 7 ] ; then week="*" fi sed -i '/reboot/d' /etc/crontabs/root >/dev/null 2>&1