diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile index 1c6b78971..b032e07c3 100644 --- a/package/boot/uboot-envtools/Makefile +++ b/package/boot/uboot-envtools/Makefile @@ -9,16 +9,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uboot-envtools PKG_DISTNAME:=u-boot -PKG_VERSION:=2019.07 -PKG_RELEASE:=2 +PKG_VERSION:=2020.04 +PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:= \ + https://ftp.denx.de/pub/u-boot \ + https://mirror.cyberbits.eu/u-boot \ + ftp://ftp.denx.de/pub/u-boot +PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372 PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://git.denx.de/u-boot.git -PKG_SOURCE_VERSION:=e5aee22e4be75e75a854ab64503fc80598bc2004 -PKG_MIRROR_HASH:=58c1ecaf901b6bf65c5e872b5449b642694ae5acebf61f91f0d4bc20b4c654b7 PKG_BUILD_DEPENDS:=fstools diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 index 15bd9ffb6..aebfeca85 100644 --- a/package/boot/uboot-envtools/files/ath79 +++ b/package/boot/uboot-envtools/files/ath79 @@ -15,6 +15,7 @@ board=$(board_name) case "$board" in alfa-network,ap121f|\ buffalo,bhr-4grv2|\ +devolo,magic-2-wifi|\ engenius,ecb1750|\ etactica,eg200|\ glinet,gl-ar300m-lite|\ @@ -44,6 +45,9 @@ yuncore,xd4200) buffalo,wzr-hp-ag300h) ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000" ;; +domywifi,dw33d) + ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x10000" "0x10000" + ;; glinet,gl-ar150) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000" ;; diff --git a/package/boot/uboot-envtools/files/mvebu b/package/boot/uboot-envtools/files/mvebu index 7902384a3..10f31b05a 100644 --- a/package/boot/uboot-envtools/files/mvebu +++ b/package/boot/uboot-envtools/files/mvebu @@ -17,6 +17,9 @@ case "$board" in cznic,turris-omnia) ubootenv_add_uci_config "/dev/mtd0" "0xC0000" "0x10000" "0x40000" ;; +glinet,gl-mv1000) + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x8000" "1" + ;; globalscale,espressobin|\ globalscale,espressobin-emmc|\ globalscale,espressobin-v7|\ diff --git a/package/boot/uboot-envtools/files/mxs b/package/boot/uboot-envtools/files/mxs index ecfb5de16..e087d6078 100644 --- a/package/boot/uboot-envtools/files/mxs +++ b/package/boot/uboot-envtools/files/mxs @@ -17,6 +17,9 @@ i2se,duckbill) ubootenv_add_uci_config "/dev/mmcblk0" "0x20000" "0x20000" ubootenv_add_uci_config "/dev/mmcblk0" "0x40000" "0x20000" ;; +olimex,imx23-olinuxino) + ubootenv_add_uci_config "/dev/mmcblk0" "0x40000" "0x4000" + ;; esac config_load ubootenv diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index 2078aff0b..5c4730670 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -35,7 +35,7 @@ zbtlink,zbt-wg2626) ;; xiaomi,mir3p|\ xiaomi,mir3g|\ -xiaomi,miwifi-r3) +xiaomi,redmi-router-ac2100) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" ;; esac diff --git a/target/linux/ramips/dts/mt7621_xiaomi_redmi-router-ac2100.dts b/target/linux/ramips/dts/mt7621_xiaomi_redmi-router-ac2100.dts new file mode 100644 index 000000000..d5669b584 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_xiaomi_redmi-router-ac2100.dts @@ -0,0 +1,158 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "xiaomi,redmi-router-ac2100", "mediatek,mt7621-soc"; + model = "Xiaomi Redmi Router AC2100"; + + aliases { + led-boot = &led_status_amber; + led-failsafe = &led_status_amber; + led-running = &led_status_white; + led-upgrade = &led_status_white; + label-mac-device = &gmac0; + }; + + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + leds { + compatible = "gpio-leds"; + + led_status_amber: status_amber { + label = "rm2100:amber:status"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + }; + + led_status_white: status_white { + label = "rm2100:white:status"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + }; + + wan_amber { + label = "rm2100:amber:wan"; + gpios = <&gpio 10 GPIO_ACTIVE_LOW>; + }; + + wan_white { + label = "rm2100:white:wan"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + +}; + + +&nand { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "Bootloader"; + reg = <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label = "Config"; + reg = <0x80000 0x40000>; + }; + + partition@c0000 { + label = "Bdata"; + reg = <0xc0000 0x40000>; + read-only; + }; + + factory: partition@100000 { + label = "factory"; + reg = <0x100000 0x40000>; + read-only; + }; + + partition@140000 { + label = "crash"; + reg = <0x140000 0x40000>; + }; + + partition@180000 { + label = "crash_syslog"; + reg = <0x180000 0x40000>; + }; + + partition@1c0000 { + label = "reserved0"; + reg = <0x1c0000 0x40000>; + read-only; + }; + + /* We keep stock xiaomi firmware (kernel0) here */ + partition@200000 { + label = "kernel_stock"; + reg = <0x200000 0x400000>; + }; + + partition@600000 { + label = "kernel"; + reg = <0x600000 0x400000>; + }; + + partition@a00000 { + label = "ubi"; + reg = <0xa00000 0x7580000>; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0000>; + ieee80211-freq-limit = <2400000 2500000>; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0xe000>; +}; + +&state_default { + gpio { + groups = "uart2", "uart3", "wdt"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 47945bd07..72e0c5898 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -892,6 +892,23 @@ define Device/xiaomi_mir3p endef TARGET_DEVICES += xiaomi_mir3p +define Device/xiaomi_redmi-router-ac2100 + $(Device/uimage-lzma-loader) + BLOCKSIZE := 128k + PAGESIZE := 2048 + KERNEL_SIZE := 4096k + IMAGE_SIZE := 124416k + 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 + DEVICE_VENDOR := Xiaomi + DEVICE_MODEL := Redmi Router AC2100 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e wpad-basic uboot-envtools +endef +TARGET_DEVICES += xiaomi_redmi-router-ac2100 + define Device/xiaoyu_xy-c5 IMAGE_SIZE := 32448k DEVICE_VENDOR := XiaoYu diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index 7695cb991..b67dfb078 100755 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -81,6 +81,9 @@ xiaomi,mir3p) xzwifi,creativebox-v1) ucidef_set_led_switch "internet" "internet" "$boardname:blue:internet" "switch0" "0x10" ;; +xiaomi,redmi-router-ac2100) + ucidef_set_led_netdev "wan" "wan" "$boardname:white:wan" "wan" + ;; youhua,wr1200js) ucidef_set_led_switch "internet" "INTERNET" "$boardname:green:wan" "switch0" "0x01" ;; diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index d4d662a96..c49969846 100755 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -109,6 +109,8 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan" "4:lan" "6@eth0" ;; + xiaomi,mir3p|\ + xiaomi,redmi-router-ac2100|\ hiwifi,hc5962) ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh index ad10dcbda..facc89bee 100755 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -53,7 +53,8 @@ platform_do_upgrade() { netgear,r6850|\ netis,wf2881|\ xiaomi,mir3g|\ - xiaomi,mir3p) + xiaomi,mir3p|\ + xiaomi,redmi-router-ac2100) nand_do_upgrade "$1" ;; iodata,wn-ax1167gr2|\