Hello.
I'm trying to assemble my firmware for the device Kimax U-35WF. I assembled this file of differences:
diff --git a/diffconfig b/diffconfig
new file mode 100644
index 0000000..eb11ea1
--- /dev/null
+++ b/diffconfig
@@ -0,0 +1,44 @@
+CONFIG_TARGET_ramips=y
+CONFIG_TARGET_ramips_mt7620=y
+CONFIG_TARGET_ramips_mt7620_DEVICE_u35wf=y
+CONFIG_ALL_NONSHARED=y
+CONFIG_DEVEL=y
+CONFIG_CCACHE=y
+CONFIG_IB=y
+CONFIG_IMAGEOPT=y
+# CONFIG_KERNEL_KALLSYMS is not set
+CONFIG_PACKAGE_libiwinfo-lua=y
+CONFIG_PACKAGE_liblua=y
+CONFIG_PACKAGE_libubus-lua=y
+CONFIG_PACKAGE_libuci-lua=y
+CONFIG_PACKAGE_lua=y
+CONFIG_PACKAGE_luci=y
+CONFIG_PACKAGE_luci-app-firewall=y
+CONFIG_PACKAGE_luci-base=y
+CONFIG_PACKAGE_luci-lib-ip=y
+CONFIG_PACKAGE_luci-lib-jsonc=y
+CONFIG_PACKAGE_luci-lib-nixio=y
+CONFIG_PACKAGE_luci-mod-admin-full=y
+CONFIG_PACKAGE_luci-proto-ipv6=y
+CONFIG_PACKAGE_luci-proto-ppp=y
+CONFIG_PACKAGE_luci-theme-bootstrap=y
+CONFIG_PACKAGE_rpcd=y
+CONFIG_PACKAGE_uhttpd=y
+CONFIG_PACKAGE_uhttpd-mod-ubus=y
+# CONFIG_PER_FEED_REPO_ADD_COMMENTED is not set
+CONFIG_SDK=y
+CONFIG_VERSIONOPT=y
+CONFIG_VERSION_BUG_URL=""
+CONFIG_VERSION_CODE=""
+CONFIG_VERSION_CODE_FILENAMES=y
+CONFIG_VERSION_DIST="LEDE"
+CONFIG_VERSION_FILENAMES=y
+CONFIG_VERSION_HWREV=""
+CONFIG_VERSION_MANUFACTURER=""
+CONFIG_VERSION_MANUFACTURER_URL=""
+CONFIG_VERSION_NICK=""
+CONFIG_VERSION_NUMBER=""
+CONFIG_VERSION_PRODUCT=""
+CONFIG_VERSION_REPO="http://downloads.lede-project.org/releases/17.01.2"
+CONFIG_VERSION_SUPPORT_URL=""
+# CONFIG_IB_STANDALONE is not set
diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index 4e6eeb2..f4dc0f3 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -312,6 +312,10 @@ tiny-ac)
set_wifi_led "$board:orange:wifi"
set_usb_led "$board:green:usb"
;;
+u35wf)
+ set_wifi_led "$board:blue:wifi"
+ ucidef_set_led_netdev "lan" "LAN" "$board:green:ethernet" "eth0.1" "tx rx"
+ ;;
vocore)
ucidef_set_led_netdev "eth" "ETH" "$board:orange:eth" "eth0"
set_wifi_led "$board:green:status"
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 36cdc10..c694b34 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -165,6 +165,7 @@ ramips_setup_interfaces()
nw718|\
psr-680w|\
sl-r7205|\
+ u35wf|\
ur-336un|\
w502u|\
wr6202)
@@ -295,6 +296,7 @@ ramips_setup_macs()
case $board in
a5-v11|\
+ u35wf|\
ht-tm02)
lan_mac=$(cat /sys/class/net/eth0/address)
;;
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 4ed18d7..3934811 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -150,6 +150,7 @@ get_status_led() {
linkits7688d)
[ "$1" = "upgrade" ] && status_led="mediatek:orange:wifi"
;;
+ u35wf|\
m2m)
status_led="$board:blue:wifi"
;;
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index e642d56..a212f1c 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -472,6 +472,9 @@ ramips_board_detect() {
*"UR-336UN")
name="ur-336un"
;;
+ *"U35WF")
+ name="u35wf"
+ ;;
*"V11ST-FE")
name="v11st-fe"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 7f5b1dd..bf3beae 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -133,6 +133,7 @@ platform_check_image() {
timecloud|\
tiny-ac|\
ur-326n4g|\
+ u35wf|\
ur-336un|\
v22rw-2x2|\
vocore|\
diff --git a/target/linux/ramips/dts/U35WF.dts b/target/linux/ramips/dts/U35WF.dts
new file mode 100644
index 0000000..d759fa1
--- /dev/null
+++ b/target/linux/ramips/dts/U35WF.dts
@@ -0,0 +1,111 @@
+/dts-v1/;
+
+#include "mt7620n.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "u35wf", "ralink,mt7620n-soc";
+ model = "Kimax U-35WF (16Mb)";
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ wifi {
+ label = "u35wf:blue:wifi";
+ gpios = <&gpio3 0 1>;
+ };
+
+ ethernet {
+ label = "u35wf:green:ethernet";
+ gpios = <&gpio2 4 1>;
+ };
+ };
+
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio2 3 1>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio0 {
+ status = "okay";
+};
+
+&gpio2 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ m25p80@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+ðernet {
+ mtd-mac-address = <&factory 0x4>;
+ mediatek,portmap = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0>;
+};
+
+&pinctrl {
+ state_default: pinctrl0 {
+ default {
+ ralink,group = "ephy", "wled", "pa", "i2c", "wdt", "uartf";
+ ralink,function = "gpio";
+ };
+ };
+};
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index e27c405..f586f32 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -485,3 +485,20 @@ define Device/d240
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76 kmod-sdhci-mt7620
endef
TARGET_DEVICES += d240
+
+define Device/u35wf
+ DTS := U35WF
+ IMAGE_SIZE := $(ralink_default_fw_size_16M)
+ IMAGES += factory.bin
+ SUPPORTED_DEVICES += u35wf
+ IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE)
+ DEVICE_TITLE := Kimax U35WF (16Mb)
+ DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ohci uboot-envtools \
+ kmod-usb-ledtrig-usbport kmod-ata-core kmod-scsi-core kmod-usb-storage \
+ kmod-usb-storage-extras swap-utils mount-utils kmod-nls-utf8 \
+ kmod-nls-base kmod-fs-ext4 kmod-fs-exfat kmod-fs-msdos \
+ kmod-fs-ntfs kmod-fs-vfat ntfs-3g e2fsprogs \
+ block-mount blkid ntfsprogs_ntfs-3g
+ DEFAULT_PACKAGES += $(DEVICE_PACKAGES)
+endef
+TARGET_DEVICES += u35wf
I used various descriptions of the network interface, in particular:
ucidef_set_interface_lan "eth0.2"
or
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
or
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
or
ucidef_add_switch "switch0" \
"4:lan" "6t@eth0"
The firmware is compiled without errors, but after downloading to the device access to it is neither by telnet nor by ssh.
For download I use breed instead of uboot.
Tell me what I'm doing wrong?