找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 597|回复: 1

自适配小米路由3硬改版报错求解答!

[复制链接]
反馈bug/问题模板,提建议请删除

## 1.关于你要提交的问题

Q:是否搜索了issue (使用 "x" 选择)
* [x ] 没有类似的issue

## 2. 详细叙述
由于小米路由3在刷机时输入了错误的指令导致成砖,在硬改spi sop8 flash后由于想要开放的生态选择编译openwrt,由于小米mini和硬改版的小米3配置完全一致,只有网口位置不同,故拷贝一份小米mini.dts然后修改关于mini的信息为r3mi后开始编译
### (1) 具体问题

A:报错详情:
`ERROR: Input tree has errors, aborting (use -f to force output)
Makefile:201: recipe for target '/home/oprenwrt/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/image-mt7620a_xiaomi_miwifi-r3mi.dtb' failed
make[5]: *** [/home/oprenwrt/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/image-mt7620a_xiaomi_miwifi-r3mi.dtb] Error 2
make[5]: Leaving directory '/home/oprenwrt/lede/target/linux/ramips/image'
Makefile:25: recipe for target 'install' failed
make[4]: *** [install] Error 2
make[4]: Leaving directory '/home/oprenwrt/lede/target/linux/ramips'
Makefile:13: recipe for target 'install' failed
make[3]: *** [install] Error 2
make[3]: Leaving directory '/home/oprenwrt/lede/target/linux'
time: target/linux/install#592.85#94.10#667.34
target/Makefile:23: recipe for target 'target/linux/install' failed
make[2]: *** [target/linux/install] Error 2
make[2]: Leaving directory '/home/oprenwrt/lede'
target/Makefile:19: recipe for target '/home/oprenwrt/lede/staging_dir/target-mipsel_24kc_musl/stamp/.target_install' failed
make[1]: *** [/home/oprenwrt/lede/staging_dir/target-mipsel_24kc_musl/stamp/.target_install] Error 2
make[1]: Leaving directory '/home/oprenwrt/lede'
/home/oprenwrt/lede/include/toplevel.mk:222: recipe for target 'world' failed
make: *** [world] Error 2
`


### (2) 路由器型号和固件版本

A:小米路由3
openwrt 5.14

### (3) 详细日志
[](url)


###(4)自我诊断
#### 我在"mt7620.mk"中规定代码片段如下:
define Device/xiaomi_miwifi-r3mi
  SOC := mt7620a
  IMAGE_SIZE := 15872k
  DEVICE_VENDOR := Xiaomi
  DEVICE_MODEL := Mi Router R3Mi
  DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci
  SUPPORTED_DEVICES += miwifi-r3mi
endef
TARGET_DEVICES += xiaomi_miwifi-r3mi

#### 02_network
                xiaomi,miwifi-r3mi)
                ucidef_add_switch "switch0" \
                        "1:lan" "4:lan" "0:wan" "6@eth0"
                ;;

        xiaomi,miwifi-r3mi)
                wan_mac=$(mtd_get_mac_binary factory 0x28)
                lan_mac=$(macaddr_setbit_la "$wan_mac")
                ;;
####mt7620a_xiaomi_miwifi-r3mi.dts

/dts-v1/;

#include "mt7620a.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

/ {
        compatible = "xiaomi,miwifi-r3mi", "ralink,mt7620a-soc";
        model = "Xiaomi Mi Router R3Mi";

        aliases {
                led-boot = &led_blue;
                led-failsafe = &led_blue;
                led-running = &led_blue;
                led-upgrade = &led_blue;
                label-mac-device = eernet;
        };

        chosen {
                bootargs = "console=ttyS0,115200";
        };

        leds {
                compatible = "gpio-leds";

                led_blue: blue {
                        label = "miwifi-mini:blue:status";
                        gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
                        default-state = "on";
                };

                yellow {
                        label = "miwifi-mini:yellow:status";
                        gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
                };

                red {
                        label = "miwifi-mini:red:status";
                        gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
                };
        };

        keys {
                compatible = "gpio-keys";

                reset {
                        label = "reset";
                        gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
                        linux,code = <KEY_RESTART>;
                };
        };
};

&gpio0 {
        status = "okay";
};

&gpio1 {
        status = "okay";
};

&gpio2 {
        status = "okay";
};

&spi0 {
        status = "okay";

        flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <10000000>;

                partitions {
                        compatible = "fixed-partitions";
                        #address-cells = <1>;
                        #size-cells = <1>;

                        partition@0 {
                                label = "u-boot";
                                reg = <0x0 0x30000>;
                        };

                        partition@30000 {
                                label = "u-boot-env";
                                reg = <0x30000 0x10000>;
                                read-only;
                        };

                        factory: partition@40000 {
                                label = "factory";
                                reg = <0x40000 0x10000>;
                                read-only;
                        };

                        partition@50000 {
                                compatible = "denx,uimage";
                                label = "firmware";
                                reg = <0x50000 0xf80000>;
                        };

                        partition@fd0000 {
                                label = "crash";
                                reg = <0xfd0000 0x10000>;
                        };

                        partition@fe0000 {
                                label = "reserved";
                                reg = <0xfe0000 0x10000>;
                                read-only;
                        };

                        partition@ff0000 {
                                label = "Bdata";
                                reg = <0xff0000 0x10000>;
                        };
                };
        };
};

&ehci {
        status = "okay";
};

&ohci {
        status = "okay";
};

eernet {
        pinctrl-names = "default";
        pinctrl-0 = <&ephy_pins>;

        mtd-mac-address = <&factory 0x28>;

        mediatek,portmap = "llllw";
};

&wmac {
        ralink,mtd-eeprom = <&factory 0x0>;
        pinctrl-names = "default";
        pinctrl-0 = <&pa_pins>;
};

&pcie {
        status = "okay";
};

&pcie0 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
                mediatek,mtd-eeprom = <&factory 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
};

&state_default {
        gpio {
                groups = "i2c", "rgmii1";
                function = "gpio";
        };
};


#### 相关文件打包

[http://pan.alibada.ml:9983/#/s/EVHa](url)

#### 说在后面,我发现只要我不规定网口,就能正常编译,但是编译的固件启动很慢,5G信号也不稳定,网口无法使用,但是一但
                xiaomi,miwifi-r3mi)
                ucidef_add_switch "switch0" \
                        "1:lan" "4:lan" "0:wan" "6@eth0"
                ;;

就会报错如题,请各位大佬帮忙看下

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
 楼主| | 显示全部楼层
问题已解决
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

欢迎大家光临恩山无线论坛上一条 /1 下一条

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-29 02:07

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表