- 論壇徽章:
- 0
|
新路由2 是由 京東發(fā)布的一款新產(chǎn)品。型號(hào)為NEWIFI D1。
配置有MT7621A處理器,雙核四線程。DDR3 256MB大容量?jī)?nèi)存。32MB閃存。2.4G+5G的無線解決方案。還有USB3.0接口。配置很高,很適合愛好者來HACK
但是因?yàn)樾缕泛芏噘Y料沒發(fā)布。
我朋友自己嘗試了一下最新版的OPENWRT 15.05是可以支持的。還存在兩個(gè)主要BUG:
1、啟動(dòng)系統(tǒng)的時(shí)候如果網(wǎng)線是插著的狀態(tài)網(wǎng)口會(huì)死掉。無法工作。必須啟動(dòng)機(jī)器不插網(wǎng)線,有時(shí)候偶爾開一段時(shí)間還恢復(fù)正常。
2、官方1505目前不支持他的2.4G無線網(wǎng)卡,所以系統(tǒng)只有5G無線網(wǎng)絡(luò)。
反正我們是搞不定了。看看誰能搞定吧。
編譯方法:
使用官方openwrt1505版。然后在target/linux/ramips/dts/下生成NEWIFID1.dts文件,內(nèi)容如下:- /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";
- };
- };
- };
- };
復(fù)制代碼 然后編輯target/linux/ramips/image/Makefile
在ifeq ($(SUBTARGET),mt7621) 下面的TARGET_DEVICES值中增加d1
然后,再下面找個(gè)地方寫一個(gè)參數(shù)- define Device/d1
- DTS := D1
- IMAGE_SIZE := $(ralink_default_fw_size_32M)
- endef
復(fù)制代碼 編輯target/linux/ramips/base-files/etc/board.d/02_network
在firewrt | \下面增加d1 | \
有以上的基本就夠了。然后就正常編譯OPENWRT的流程了?梢詼y(cè)試看看了!!
附圖有真相- [ 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 [early0] 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 [mem 0x00000000-0x0fffffff]
- [ 0.000000] HighMem empty
- [ 0.000000] Movable zone start for each node
- [ 0.000000] Early memory node ranges
- [ 0.000000] node 0: [mem 0x00000000-0x0fffffff]
- [ 0.000000] Initmem setup node 0 [mem 0x00000000-0x0fffffff]
- [ 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] 0 [0] 1 [0] 2 [0] 3
復(fù)制代碼 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: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
- 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: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
- 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: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
- 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: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
- 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
復(fù)制代碼 內(nèi)存- root@localhost:/tmp# free
- total used free shared buffers
- Mem: 256036 124412 131624 212 3604
- -/+ buffers: 120808 135228
- Swap: 0 0 0
復(fù)制代碼 |
|