diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index 70d70dfed0..6c649bfacc 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -32,7 +32,8 @@ ampedwireless,ally-r1900k) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" "4" ;; beeline,smartbox-giga|\ -beeline,smartbox-turbo) +beeline,smartbox-turbo|\ +rostelecom,rt-sf-1) ubootenv_add_uci_config "/dev/mtd0" "0x80000" "0x1000" "0x20000" ;; buffalo,wsr-1166dhp|\ diff --git a/target/linux/ramips/dts/mt7621_rostelecom_rt-sf-1.dts b/target/linux/ramips/dts/mt7621_rostelecom_rt-sf-1.dts new file mode 100644 index 0000000000..c476cf9495 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_rostelecom_rt-sf-1.dts @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621_sercomm_dxx_nand_256m.dtsi" + +/ { + compatible = "rostelecom,rt-sf-1", "mediatek,mt7621-soc"; + model = "Rostelecom RT-SF-1"; +}; + +&pcie0 { + wifi@0,0 { + nvmem-cells = <&macaddr_factory_21000>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(3)>; + }; +}; + +&pcie1 { + wifi@0,0 { + nvmem-cells = <&macaddr_factory_21000>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(2)>; + }; +}; + +&gmac1 { + nvmem-cells = <&macaddr_factory_21000>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(11)>; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index de10da7cb6..e7b38aaacf 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -1740,6 +1740,19 @@ define Device/renkforce_ws-wn530hp3-a endef TARGET_DEVICES += renkforce_ws-wn530hp3-a +define Device/rostelecom_rt-sf-1 + $(Device/sercomm_dxx) + IMAGE_SIZE := 32768k + SERCOMM_HWID := DKG + SERCOMM_HWVER := 10110 + SERCOMM_SWVER := 1026 + DEVICE_VENDOR := Rostelecom + DEVICE_MODEL := RT-SF-1 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware \ + kmod-usb3 uboot-envtools +endef +TARGET_DEVICES += rostelecom_rt-sf-1 + define Device/samknows_whitebox-v8 $(Device/dsa-migration) $(Device/uimage-lzma-loader) 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 a3c233a20f..98db9fb9fc 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -25,7 +25,8 @@ asus,rt-n56u-b1) ;; beeline,smartbox-flash|\ beeline,smartbox-giga|\ -beeline,smartbox-turbo) +beeline,smartbox-turbo|\ +rostelecom,rt-sf-1) ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan" ;; belkin,rt1800) diff --git a/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount b/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount index 99b318a922..597c2da60f 100755 --- a/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount +++ b/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount @@ -8,7 +8,8 @@ boot() { [ -n "$(fw_printenv bootcount bootchanged 2>/dev/null)" ] &&\ echo -e "bootcount\nbootchanged\n" | /usr/sbin/fw_setenv -s - ;; - beeline,smartbox-turbo) + beeline,smartbox-turbo|\ + rostelecom,rt-sf-1) [[ $(hexdump -n 1 -e '/1 "%1d"' -s $((0x20001)) /dev/mtd3) == \ $((0xff)) ]] || printf '\xff' | dd of=/dev/mtdblock3 \ count=1 bs=1 seek=$((0x20001)) 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 d380ea66f7..95bba16194 100755 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -95,6 +95,7 @@ platform_do_upgrade() { netgear,wax202|\ netis,wf2881|\ raisecom,msg1500-x-00|\ + rostelecom,rt-sf-1|\ sercomm,na502|\ sercomm,na502s|\ sim,simax1800t|\