123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393 |
- From 593d238ebf777c36c9ee819a1e20f59da5adc361 Mon Sep 17 00:00:00 2001
- From: kiddin9 <[email protected]>
- Date: Tue, 5 Jul 2022 17:54:53 +0800
- Subject: [PATCH] Update mt7621.mk
- Signed-off-by: kiddin9 <[email protected]>
- ---
- target/linux/ramips/image/mt7621.mk | 46 +++++++++--------------------
- 1 file changed, 14 insertions(+), 32 deletions(-)
- diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
- index bdaeac2cb16e..72fbd3930a80 100644
- --- a/target/linux/ramips/image/mt7621.mk
- +++ b/target/linux/ramips/image/mt7621.mk
- @@ -223,7 +223,7 @@ define Device/asus_rt-n56u-b1
- DEVICE_VARIANT := B1
- IMAGE_SIZE := 16064k
- DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
- - kmod-usb-ledtrig-usbport
- + kmod-usb-ledtrig-usbport wpad-mini -wpad-basic-wolfssl -coremark -htop -bash -openssh-sftp-server
- endef
- TARGET_DEVICES += asus_rt-n56u-b1
-
- @@ -984,7 +984,7 @@ define Device/jcg_y2
- JCG_MAXSIZE := 16064k
- DEVICE_VENDOR := JCG
- DEVICE_MODEL := Y2
- - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3
- + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 wpad-mini -wpad-basic-wolfssl -coremark -htop -bash -openssh-sftp-server
- endef
- TARGET_DEVICES += jcg_y2
-
- @@ -1000,6 +1000,16 @@ define Device/lenovo_newifi-d1
- endef
- TARGET_DEVICES += lenovo_newifi-d1
-
- +define Device/jdcloud_re-sp-01b
- + $(Device/dsa-migration)
- + $(Device/uimage-lzma-loader)
- + IMAGE_SIZE := 32448k
- + DEVICE_VENDOR := JDCloud
- + DEVICE_MODEL := RE-SP-01B
- + DEVICE_PACKAGES := kmod-fs-ext4 kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware kmod-sdhci-mt7620 kmod-usb3
- + endef
- + TARGET_DEVICES += jdcloud_re-sp-01b
- +
- define Device/linksys_e5600
- $(Device/dsa-migration)
- $(Device/uimage-lzma-loader)
- @@ -1369,7 +1379,7 @@ define Device/netgear_wndr3700-v5
- SERCOMM_SWVER := 0x1054
- SERCOMM_PAD := 320k
- DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
- - kmod-usb-ledtrig-usbport
- + kmod-usb-ledtrig-usbport wpad-mini -wpad-basic-wolfssl -coremark -htop -bash -openssh-sftp-server
- SUPPORTED_DEVICES += wndr3700v5
- endef
- TARGET_DEVICES += netgear_wndr3700-v5
- @@ -1400,7 +1410,7 @@ define Device/oraybox_x3a
- IMAGE_SIZE := 15360k
- DEVICE_VENDOR := OrayBox
- DEVICE_MODEL := X3A
- - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
- + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-mini -wpad-basic-wolfssl -coremark -htop -bash -openssh-sftp-server
- endef
- TARGET_DEVICES += oraybox_x3a
-
- @@ -1412,7 +1422,7 @@ define Device/phicomm_k2p
- DEVICE_ALT0_VENDOR := Phicomm
- DEVICE_ALT0_MODEL := KE 2P
- SUPPORTED_DEVICES += k2p
- - DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
- + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-mini -wpad-basic-wolfssl -coremark -htop -bash -openssh-sftp-server
- endef
- TARGET_DEVICES += phicomm_k2p
-
- @@ -1533,7 +1543,7 @@ define Device/thunder_timecloud
- IMAGE_SIZE := 16064k
- DEVICE_VENDOR := Thunder
- DEVICE_MODEL := Timecloud
- - DEVICE_PACKAGES := kmod-usb3 -wpad-basic-wolfssl
- + DEVICE_PACKAGES := kmod-usb3 -wpad-basic-wolfssl -bash -openssh-sftp-server -coremark -htop
- SUPPORTED_DEVICES += timecloud
- endef
- TARGET_DEVICES += thunder_timecloud
- @@ -1843,7 +1853,6 @@ define Device/xiaomi_nand_separate
- PAGESIZE := 2048
- KERNEL_SIZE := 4096k
- UBINIZE_OPTS := -E 5
- - IMAGES += kernel1.bin rootfs0.bin
- IMAGE/kernel1.bin := append-kernel
- IMAGE/rootfs0.bin := append-ubi | check-size
- IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
- @@ -1866,7 +1875,7 @@ define Device/xiaomi_mi-router-3g-v2
- DEVICE_VENDOR := Xiaomi
- DEVICE_MODEL := Mi Router 3G
- DEVICE_VARIANT := v2
- - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2
- + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-mini -wpad-basic-wolfssl -coremark -htop -bash -openssh-sftp-server
- SUPPORTED_DEVICES += xiaomi,mir3g-v2
- endef
- TARGET_DEVICES += xiaomi_mi-router-3g-v2
- @@ -1881,7 +1890,6 @@ define Device/xiaomi_mi-router-3-pro
- IMAGE_SIZE := 255488k
- DEVICE_VENDOR := Xiaomi
- DEVICE_MODEL := Mi Router 3 Pro
- - IMAGES += factory.bin
- IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
- IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
- check-size
- @@ -1927,30 +1935,14 @@ define Device/xiaomi_mi-router-cr660x
- KERNEL_SIZE := 4096k
- UBINIZE_OPTS := -E 5
- IMAGE_SIZE := 128512k
- - IMAGES += firmware.bin
- + IMAGES += factory.bin
- IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
- - IMAGE/firmware.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
- + IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
- check-size
- DEVICE_PACKAGES += kmod-mt7915e uboot-envtools
- + DEVICE_MODEL := Mi Router CR660X / TR60X
- endef
- -
- -define Device/xiaomi_mi-router-cr6606
- - $(Device/xiaomi_mi-router-cr660x)
- - DEVICE_MODEL := Mi Router CR6606
- -endef
- -TARGET_DEVICES += xiaomi_mi-router-cr6606
- -
- -define Device/xiaomi_mi-router-cr6608
- - $(Device/xiaomi_mi-router-cr660x)
- - DEVICE_MODEL := Mi Router CR6608
- -endef
- -TARGET_DEVICES += xiaomi_mi-router-cr6608
- -
- -define Device/xiaomi_mi-router-cr6609
- - $(Device/xiaomi_mi-router-cr660x)
- - DEVICE_MODEL := Mi Router CR6609
- -endef
- -TARGET_DEVICES += xiaomi_mi-router-cr6609
- +TARGET_DEVICES += xiaomi_mi-router-cr660x
-
- define Device/xiaomi_redmi-router-ac2100
- $(Device/xiaomi_nand_separate)
- @@ -1985,7 +1977,7 @@ define Device/youhua_wr1200js
- DEVICE_VENDOR := YouHua
- DEVICE_MODEL := WR1200JS
- DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
- - kmod-usb-ledtrig-usbport
- + kmod-usb-ledtrig-usbport wpad-mini -wpad-basic-wolfssl -coremark -htop -bash -openssh-sftp-server
- endef
- TARGET_DEVICES += youhua_wr1200js
-
- @@ -1995,7 +1987,7 @@ define Device/youku_yk-l2
- DEVICE_VENDOR := Youku
- DEVICE_MODEL := YK-L2
- DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
- - kmod-usb-ledtrig-usbport
- + kmod-usb-ledtrig-usbport wpad-mini -wpad-basic-wolfssl -coremark -htop -bash -openssh-sftp-server
- UIMAGE_MAGIC := 0x12291000
- UIMAGE_NAME := 400000000000000000003000
-
- --- /dev/null
- +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dts
- @@ -0,0 +1,8 @@
- +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
- +
- +#include "mt7621_xiaomi_mi-router-cr660x.dtsi"
- +
- +/ {
- + compatible = "xiaomi,mi-router-cr660x", "mediatek,mt7621-soc";
- + model = "Xiaomi Mi Router CR6606 / CR6608 / CR6609";
- +};
- --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
- +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
- @@ -131,9 +131,7 @@ tplink,tl-wpa8631p-v3)
- xiaomi,mi-router-ac2100)
- ucidef_set_led_netdev "wan-blue" "WAN (blue)" "blue:wan" "wan"
- ;;
- -xiaomi,mi-router-cr6606|\
- -xiaomi,mi-router-cr6608|\
- -xiaomi,mi-router-cr6609)
- +xiaomi,mi-router-cr660x)
- ucidef_set_led_netdev "internet" "Internet" "blue:net" "wan"
- ;;
- xiaomi,redmi-router-ac2100)
- --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
- +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
- @@ -28,9 +28,7 @@ ramips_setup_interfaces()
- hiwifi,hc5962|\
- xiaomi,mi-router-3-pro|\
- xiaomi,mi-router-ac2100|\
- - xiaomi,mi-router-cr6606|\
- - xiaomi,mi-router-cr6608|\
- - xiaomi,mi-router-cr6609|\
- + xiaomi,mi-router-cr660x|\
- xiaomi,redmi-router-ac2100)
- ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
- ;;
- @@ -45,6 +43,7 @@ ramips_setup_interfaces()
- iptime,a3002mesh|\
- jcg,q20|\
- lenovo,newifi-d1|\
- + jdcloud,re-sp-01b|\
- mikrotik,routerboard-m33g|\
- oraybox,x3a|\
- renkforce,ws-wn530hp3-a|\
- --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
- +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
- @@ -92,9 +92,7 @@ platform_do_upgrade() {
- xiaomi,mi-router-3-pro|\
- xiaomi,mi-router-4|\
- xiaomi,mi-router-ac2100|\
- - xiaomi,mi-router-cr6606|\
- - xiaomi,mi-router-cr6608|\
- - xiaomi,mi-router-cr6609|\
- + xiaomi,mi-router-cr660x|\
- xiaomi,redmi-router-ac2100|\
- zyxel,nwa50ax|\
- zyxel,nwa55axe)
- --- a/package/boot/uboot-envtools/files/ramips
- +++ b/package/boot/uboot-envtools/files/ramips
- @@ -73,9 +73,7 @@ zyxel,nr7101)
- ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x80000"
- ;;
- bolt,arion|\
- -xiaomi,mi-router-cr6606|\
- -xiaomi,mi-router-cr6608|\
- -xiaomi,mi-router-cr6609)
- +xiaomi,mi-router-cr660x)
- ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
- ;;
- esac
- --- /dev/null
- +++ b/target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts
- @@ -0,0 +1,150 @@
- +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
- +
- +#include "mt7621.dtsi"
- +
- +#include <dt-bindings/gpio/gpio.h>
- +#include <dt-bindings/input/input.h>
- +
- +/ {
- + compatible = "jdcloud,re-sp-01b", "mediatek,mt7621-soc";
- + model = "JDCloud RE-SP-01B";
- +
- + aliases {
- + led-boot = &led_red;
- + led-failsafe = &led_red;
- + led-running = &led_green;
- + led-upgrade = &led_blue;
- + label-mac-device = &gmac0;
- + };
- +
- + chosen {
- + bootargs = "console=ttyS0,115200";
- + };
- +
- + keys {
- + compatible = "gpio-keys";
- +
- + reset {
- + label = "reset";
- + gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
- + linux,code = <KEY_RESTART>;
- + };
- + };
- +
- + leds {
- + compatible = "gpio-leds";
- +
- + led_red: red {
- + label = "red:sys";
- + gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
- + panic-indicator;
- + };
- +
- + led_green: green {
- + label = "green:sys";
- + gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
- + };
- +
- + led_blue: blue {
- + label = "blue:sys";
- + gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
- + };
- + };
- +};
- +
- +&sdhci {
- + status = "okay";
- +};
- +
- +&spi0 {
- + status = "okay";
- +
- + flash@0 {
- + compatible = "jedec,spi-nor";
- + reg = <0>;
- + spi-max-frequency = <50000000>;
- +
- + partitions {
- + compatible = "fixed-partitions";
- + #address-cells = <1>;
- + #size-cells = <1>;
- +
- + partition@0 {
- + label = "u-boot";
- + reg = <0x0 0x30000>;
- + read-only;
- + };
- +
- + config: partition@30000 {
- + label = "config";
- + reg = <0x30000 0x10000>;
- + read-only;
- + };
- +
- + factory: partition@40000 {
- + label = "factory";
- + reg = <0x40000 0x10000>;
- + read-only;
- + };
- +
- + partition@50000 {
- + compatible = "denx,uimage";
- + label = "firmware";
- + reg = <0x50000 0x1fb0000>;
- + };
- + };
- + };
- +};
- +
- +&gmac0 {
- + mtd-mac-address-ascii = <&config 0x4429>;
- +};
- +
- +&switch0 {
- + ports {
- + port@0 {
- + status = "okay";
- + label = "wan";
- + };
- +
- + port@1 {
- + status = "okay";
- + label = "lan1";
- + };
- +
- + port@2 {
- + status = "okay";
- + label = "lan2";
- + };
- + };
- +};
- +
- +&pcie {
- + status = "okay";
- +};
- +
- +&pcie0 {
- + wifi@0,0 {
- + reg = <0x0000 0 0 0 0>;
- + mtd-mac-address-ascii = <&config 0x4429>;
- + mediatek,mtd-eeprom = <&factory 0x0>;
- + };
- +};
- +
- +&pcie1 {
- + wifi@0,0 {
- + reg = <0x0000 0 0 0 0>;
- + mtd-mac-address-ascii = <&config 0x4429>;
- + mtd-mac-address-increment = <0x80>;
- + mtd-mac-address-increment-byte = <3>;
- + mediatek,mtd-eeprom = <&factory 0x8000>;
- + ieee80211-freq-limit = <5000000 6000000>;
- + };
- +};
- +
- +&state_default {
- + gpio {
- + groups = "uart2", "uart3", "wdt";
- + function = "gpio";
- + };
- +};
|