From a66353a01576c5146ae0d72ee1f8b24ba33cb88e Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Wed, 23 Sep 2020 16:04:43 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8DCM520=E5=9C=A8OPBOOT?= =?UTF-8?q?=E7=9A=84=E5=90=AF=E5=8A=A8=E5=88=86=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../arm/boot/dts/qcom-ipq4019-cm520-79f.dts | 300 ++++++++++++++++++ 1 file changed, 300 insertions(+) create mode 100644 root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts new file mode 100644 index 00000000..019a8a19 --- /dev/null +++ b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts @@ -0,0 +1,300 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qcom-ipq4019.dtsi" +#include +#include +#include + +/ { + model = "MobiPromo CM520-79F"; + compatible = "mobipromo,cm520-79f"; + + aliases { + led-boot = &led_sys; + led-failsafe = &led_sys; + led-running = &led_sys; + led-upgrade = &led_sys; + }; + + chosen { + bootargs-append = " ubi.block=0,1 root=/dev/ubiblock0_1"; + }; + + soc { + rng@22000 { + status = "okay"; + }; + + mdio@90000 { + status = "okay"; + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>; + reset-delay-us = <1000>; + }; + + ess-psgmii@98000 { + status = "okay"; + }; + + tcsr@1949000 { + compatible = "qcom,tcsr"; + reg = <0x1949000 0x100>; + qcom,wifi_glb_cfg = ; + }; + + tcsr@194b000 { + compatible = "qcom,tcsr"; + reg = <0x194b000 0x100>; + qcom,usb-hsphy-mode-select = ; + }; + + 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@60f8800 { + status = "okay"; + + dwc3@6000000 { + #address-cells = <1>; + #size-cells = <0>; + + usb2_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; + }; + }; + + 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"; + }; + }; + + led_spi { + compatible = "spi-gpio"; + #address-cells = <1>; + #size-cells = <0>; + + sck-gpios = <&tlmm 40 GPIO_ACTIVE_HIGH>; + mosi-gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>; + num-chipselects = <0>; + + led_gpio: led_gpio@0 { + compatible = "fairchild,74hc595"; + reg = <0>; + gpio-controller; + #gpio-cells = <2>; + registers-number = <1>; + spi-max-frequency = <1000000>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_usb: usb { + label = "cm520-79f:blue:usb"; + gpios = <&tlmm 10 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "usbport"; + trigger-sources = <&usb3_port1>, <&usb3_port2>, <&usb2_port1>; + }; + + led_sys: can { + label = "cm520-79f:blue:can"; + gpios = <&tlmm 11 GPIO_ACTIVE_HIGH>; + }; + + wan { + label = "cm520-79f:blue:wan"; + gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>; + }; + + lan1 { + label = "cm520-79f:blue:lan1"; + gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>; + }; + + lan2 { + label = "cm520-79f:blue:lan2"; + gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>; + }; + + wlan2g { + label = "cm520-79f:blue:wlan2g"; + gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + wlan5g { + label = "cm520-79f:blue:wlan5g"; + gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&tlmm 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&blsp_dma { + status = "okay"; +}; + +&blsp1_uart1 { + status = "okay"; +}; + +&blsp1_uart2 { + status = "okay"; +}; + +&cryptobam { + status = "okay"; +}; + +&gmac0 { + mtd-mac-address = <&art 0x1006>; +}; + +&gmac1 { + mtd-mac-address = <&art 0x5006>; +}; + +&nand { + pinctrl-0 = <&nand_pins>; + pinctrl-names = "default"; + status = "okay"; + + nand@0 { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "Bootloader"; + reg = <0x0 0xb00000>; + }; + + art: partition@b00000 { + label = "ART"; + reg = <0xb00000 0x80000>; + read-only; + }; + + partition@b80000 { + label = "rootfs"; + reg = <0xb80000 0x7480000>; + }; + }; + }; +}; + +&qpic_bam { + status = "okay"; +}; + +&tlmm { + mdio_pins: mdio_pinmux { + mux_1 { + pins = "gpio6"; + function = "mdio"; + bias-pull-up; + }; + + mux_2 { + pins = "gpio7"; + function = "mdc"; + bias-pull-up; + }; + }; + + nand_pins: nand_pins { + pullups { + pins = "gpio52", "gpio53", "gpio58", + "gpio59"; + function = "qpic"; + bias-pull-up; + }; + + pulldowns { + pins = "gpio54", "gpio55", "gpio56", + "gpio57", "gpio60", "gpio61", + "gpio62", "gpio63", "gpio64", + "gpio65", "gpio66", "gpio67", + "gpio68", "gpio69"; + function = "qpic"; + bias-pull-down; + }; + }; +}; + +&usb3_ss_phy { + status = "okay"; +}; + +&usb3_hs_phy { + status = "okay"; +}; + +&usb2_hs_phy { + status = "okay"; +}; + +&wifi0 { + status = "okay"; + qcom,ath10k-calibration-variant = "CM520-79F"; +}; + +&wifi1 { + status = "okay"; + qcom,ath10k-calibration-variant = "CM520-79F"; +}; From 9386655b0212e02f34cfbb44030986ba162fb027 Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Wed, 23 Sep 2020 16:07:58 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=96=B0=E5=A2=9Ecm520-79f=20=E6=98=9F?= =?UTF-8?q?=E9=99=85=E5=AE=9D=E7=9B=92=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config-cm520-79f | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 config-cm520-79f diff --git a/config-cm520-79f b/config-cm520-79f new file mode 100644 index 00000000..d37328a9 --- /dev/null +++ b/config-cm520-79f @@ -0,0 +1,6 @@ +CONFIG_TARGET_ipq40xx=y +CONFIG_TARGET_ipq40xx_generic=y +CONFIG_TARGET_ipq40xx_generic_DEVICE_mobipromo_cm520-79f=y +CONFIG_PACKAGE_kmod-6lowpan=y +# CONFIG_KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE is not set +CONFIG_KERNEL_CC_OPTIMIZE_FOR_SIZE=y From d168087bb9d8c7690d6317d058069da2f661c108 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 23 Sep 2020 16:56:40 +0200 Subject: [PATCH 3/6] Remove upstreamed patch --- .../0104-dts-add-pause-to-port6.patch | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100644 root/target/linux/mediatek/patches-5.4/0104-dts-add-pause-to-port6.patch diff --git a/root/target/linux/mediatek/patches-5.4/0104-dts-add-pause-to-port6.patch b/root/target/linux/mediatek/patches-5.4/0104-dts-add-pause-to-port6.patch deleted file mode 100644 index a8bc7979..00000000 --- a/root/target/linux/mediatek/patches-5.4/0104-dts-add-pause-to-port6.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 3a466fd3d5b921c085fd3c863cab3f1afdb90c9c Mon Sep 17 00:00:00 2001 -From: Frank Wunderlich -Date: Sun, 12 Jan 2020 16:46:33 +0100 -Subject: [PATCH] arm: dts: add pause to port6 of switch - -to be same as gmac0 ---- - arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts -index 52343bd76fe5..7b8383af87e0 100644 ---- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts -+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts -@@ -253,6 +253,7 @@ - fixed-link { - speed = <1000>; - full-duplex; -+ pause; - }; - }; - }; From 21e83ca6fc7ba88df572fed67ea151fffd944915 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 23 Sep 2020 16:57:15 +0200 Subject: [PATCH 4/6] Optimize for size on wrt3200acm --- config-wrt3200acm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config-wrt3200acm b/config-wrt3200acm index 79bae0ff..1c560ff5 100644 --- a/config-wrt3200acm +++ b/config-wrt3200acm @@ -3,3 +3,5 @@ CONFIG_TARGET_mvebu_cortexa9=y CONFIG_TARGET_mvebu_cortexa9_DEVICE_linksys_wrt3200acm=y CONFIG_PACKAGE_kmod-6lowpan=y CONFIG_PACKAGE_luci-app-advanced-reboot=y +# CONFIG_KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE is not set +CONFIG_KERNEL_CC_OPTIMIZE_FOR_SIZE=y From 6c6434a34b60df16513733ee6f8f5fab702e3bc3 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 23 Sep 2020 16:57:41 +0200 Subject: [PATCH 5/6] Update OpenWrt --- build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 12ee8334..af188018 100755 --- a/build.sh +++ b/build.sh @@ -71,9 +71,9 @@ fi #_get_repo source https://github.com/ysurac/openmptcprouter-source "master" if [ "$OMR_OPENWRT" = "default" ]; then - _get_repo "$OMR_TARGET/source" https://github.com/openwrt/openwrt "d643b10a76965a94684012d2ddf36e2bcc146274" - _get_repo feeds/packages https://github.com/openwrt/packages "0daa9fb1dd48ee63024a5fc24dd3c85e112f7ed6" - _get_repo feeds/luci https://github.com/openwrt/luci "4f6c054d7a468b980538461ede1da40789af4d46" + _get_repo "$OMR_TARGET/source" https://github.com/openwrt/openwrt "620f9c773413a0deaeda2bdc22d5e9cb89b9317f" + _get_repo feeds/packages https://github.com/openwrt/packages "ed39c2f02e1f05c40161986c6d0581f7eba58bea" + _get_repo feeds/luci https://github.com/openwrt/luci "6044084a61cdd95e390002cc6a908b33185d457d" elif [ "$OMR_OPENWRT" = "master" ]; then _get_repo "$OMR_TARGET/source" https://github.com/openwrt/openwrt "master" _get_repo feeds/packages https://github.com/openwrt/packages "master" @@ -293,6 +293,7 @@ fi echo "Update feeds index" rm -rf feeds/luci/modules/luci-mod-network [ -d feeds/${OMR_DIST}/luci-mod-status ] && rm -rf feeds/luci/modules/luci-mod-status +[ -d feeds/${OMR_DIST}/luci-app-statistics ] && rm -rf feeds/luci/applications/luci-app-statistics cp .config .config.keep scripts/feeds clean From 6bead962271be669f7abd23ace1027afd4f975a7 Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Thu, 24 Sep 2020 00:08:26 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E4=B8=BA=E5=AE=98=E7=BD=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 32 +++++++++++++++++++++--- root/package/base-files/files/etc/shadow | 5 ++++ 2 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 root/package/base-files/files/etc/shadow diff --git a/.gitignore b/.gitignore index 4bd7ccf9..2d93d211 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,29 @@ -sdk -source -feeds +*.o +.DS_Store +.*.swp +/env +/dl +/.config +/.config.old +/bin +/build_dir +/staging_dir +/tmp +/logs +/feeds +/feeds.conf +/files +/overlay +/package/feeds +/package/openwrt-packages +key-build* +*.orig +*.rej +*~ +.#* +*# +.emacs.desktop* +TAGS*~ +git-src +.git-credentials +/*.log diff --git a/root/package/base-files/files/etc/shadow b/root/package/base-files/files/etc/shadow new file mode 100644 index 00000000..40218708 --- /dev/null +++ b/root/package/base-files/files/etc/shadow @@ -0,0 +1,5 @@ +root:$1$ie.8vTnt$7EzhI1ZYiwp8hSAC4eSId0:18473:0:99999:7::: +daemon:*:0:0:99999:7::: +ftp:*:0:0:99999:7::: +network:*:0:0:99999:7::: +nobody:*:0:0:99999:7:::