hoowa 发表于 2015-11-10 16:11

OpenWrt玩家新玩具:京东新路由2已被破

新路由2 是由 京东发布的一款新产品。型号为NEWIFI D1。

配置有MT7621A处理器,双核四线程。DDR3 256MB大容量内存。32MB闪存。2.4G+5G的无线解决方案。还有USB3.0接口。配置很高,很适合爱好者来HACK

但是因为新品很多资料没发布。

我朋友自己尝试了一下最新版的OPENWRT 15.05是可以支持的。还存在两个主要BUG:
1、启动系统的时候如果网线是插着的状态网口会死掉。无法工作。必须启动机器不插网线,有时候偶尔开一段时间还恢复正常。
2、官方1505目前不支持他的2.4G无线网卡,所以系统只有5G无线网络。

反正我们是搞不定了。看看谁能搞定吧。


编译方法:
使用官方openwrt1505版。然后在target/linux/ramips/dts/下生成NEWIFID1.dts文件,内容如下:/dts-v1/;

/include/ "mt7621.dtsi"

/ {
        compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
        model = "D1";

        memory@0 {
                device_type = "memory";
                reg = <0x0 0x10000000>;
        };

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

        palmbus@1E000000 {

                gpio@600 {
                        gpio0: bank@0 {
                                status = "okay";
                        };
                        gpio1: bank@1 {
                                status = "okay";
                        };
                };

                spi@b00 {
                        status = "okay";

                        m25p80@0 {
                                #address-cells = <1>;
                                #size-cells = <1>;
                                compatible = "mx25l25635e";
                                reg = <0 0>;
                                linux,modalias = "m25p80";
                                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>;
                                };

                                partition@50000 {
                                        label = "firmware";
                                        reg = <0x50000 0xfb0000>;
                                };

                        };
                };

        };

        pcie@1e140000 {
                status = "okay";

                pcie0 {
                        mt76@0,0 {
                                reg = <0x0000 0 0 0 0>;
                                device_type = "pci";
                                mediatek,mtd-eeprom = <&factory 0x8000>;
                                mediatek,2ghz = <0>;
                        };
                };

                pcie1 {
                        mt76@1,0 {
                                reg = <0x0000 0 0 0 0>;
                                device_type = "pci";
                                mediatek,mtd-eeprom = <&factory 0x0000>;
                                mediatek,5ghz = <0>;
                        };
                };
        };

        ethernet@1e100000 {
                mtd-mac-address = <&factory 0xe000>;
        };

      gpio_export {
                compatible = "gpio-export";
                #size-cells = <0>;
                usb20-power {
                        gpio-export,name = "usb20-power";
                        gpio-export,output = <1>;
                        gpios = <&gpio0 9 1>;
                };
                usb30-power {
                        gpio-export,name = "usb30-power";
                        gpio-export,output = <1>;
                        gpios = <&gpio0 11 1>;
                };
      };

        gpio-leds {
                compatible = "gpio-leds";

                power {
                        label = "d1:green:power";
                        gpios = <&gpio0 14 0>;
                };

                sys1 {
                        label = "d1:green:sys1";
                        gpios = <&gpio0 16 1>;
                };

                sys2 {
                        label = "d1:green:sys2";
                        gpios = <&gpio0 13 1>;
                };

        };

        gpio-keys-polled {
                compatible = "gpio-keys-polled";
                #address-cells = <1>;
                #size-cells = <0>;
                poll-interval = <20>;
                reset {
                        label = "reset";
                        gpios = <&gpio0 15 1>;
                        linux,code = <0x198>;
                };
        };

        pinctrl {
                state_default: pinctrl0 {
                gpio {
                                ralink,group = "rgmii2", "jtag", "wdt rst", "mdio", "sdhci", "uart2", "uart3";
                                ralink,function = "gpio";
                        };
                };
        };

};
然后编辑target/linux/ramips/image/Makefile
在ifeq ($(SUBTARGET),mt7621) 下面的TARGET_DEVICES值中增加d1
然后,再下面找个地方写一个参数define Device/d1
DTS := D1
IMAGE_SIZE := $(ralink_default_fw_size_32M)
endef编辑target/linux/ramips/base-files/etc/board.d/02_network
在firewrt | \下面增加d1 | \


有以上的基本就够了。然后就正常编译OPENWRT的流程了。可以测试看看了!!


附图有真相[    0.000000] Linux version 3.18.21 (xxx) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r65) ) #1 SMP Tue Nov 10 15:39:52 CST 2015
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] bootconsole enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is xxx
[    0.000000] Determined physical RAM map:
[    0.000000]memory: 10000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   
[    0.000000]   HighMemempty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0:
[    0.000000] Initmem setup node 0
[    0.000000] On node 0 totalpages: 65536
[    0.000000] free_area_init_node: node 0, pgdat 8033db80, node_mem_map 81000000
[    0.000000]   Normal zone: 512 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65536 pages, LIFO batch:15
[    0.000000] Detected 3 available secondary CPU(s)
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.000000] PERCPU: Embedded 9 pages/cpu @8120b000 s5696 r8192 d22976 u36864
[    0.000000] pcpu-alloc: s5696 r8192 d22976 u36864 alloc=9*4096
[    0.000000] pcpu-alloc: 0 1 2 3
CPU情况root@localhost:/tmp# cat /proc/cpuinfo
system type             : MediaTek MT7621 ver:1 eco:3
processor               : 0
cpu model               : MIPS 1004Kc V2.15
BogoMIPS                : 580.40
wait instruction      : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector: yes
hardware watchpoint   : yes, count: 4, address/irw mask:
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented      : mips16 dsp mt
shadow register sets    : 1
kscratch registers      : 0
package               : 0
core                  : 0
VCED exceptions         : not available
VCEI exceptions         : not available
VPE                     : 0

processor               : 1
cpu model               : MIPS 1004Kc V2.15
BogoMIPS                : 439.91
wait instruction      : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector: yes
hardware watchpoint   : yes, count: 4, address/irw mask:
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented      : mips16 dsp mt
shadow register sets    : 1
kscratch registers      : 0
package               : 0
core                  : 0
VCED exceptions         : not available
VCEI exceptions         : not available
VPE                     : 1

processor               : 2
cpu model               : MIPS 1004Kc V2.15
BogoMIPS                : 580.40
wait instruction      : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector: yes
hardware watchpoint   : yes, count: 4, address/irw mask:
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented      : mips16 dsp mt
shadow register sets    : 1
kscratch registers      : 0
package               : 0
core                  : 1
VCED exceptions         : not available
VCEI exceptions         : not available
VPE                     : 0

processor               : 3
cpu model               : MIPS 1004Kc V2.15
BogoMIPS                : 586.13
wait instruction      : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector: yes
hardware watchpoint   : yes, count: 4, address/irw mask:
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented      : mips16 dsp mt
shadow register sets    : 1
kscratch registers      : 0
package               : 0
core                  : 1
VCED exceptions         : not available
VCEI exceptions         : not available
VPE                     : 1
内存root@localhost:/tmp# free
             total         used         free       shared      buffers
Mem:      256036       124412       131624          212         3604
-/+ buffers:             120808       135228
Swap:            0            0            0
页: [1]
查看完整版本: OpenWrt玩家新玩具:京东新路由2已被破