拿到一个不知道的开发板,配置如下:
CPU:MT7628AN 5G WiFi:MT7612EN DDR:Winbond W9751G6K8-251 (64MB) SNOR:25Q64FVSIG (8MB)
里面的固件可以开机,串口打印信息如下:
Restarting system. [04030C0D][04030C0E] DDR Calibration DQS reg = 00008888
U-Boot 1.1.3 (Oct 16 2016 – 19:48:39)
Board: Ralink APSoC DRAM: 64 MB relocate_code Pointer at: 83fb4000
Software System Reset Occurred
flash manufacture id: c8, device id 40 17 find flash: GD25Q64B *** Warning – bad CRC, using default environment
============================================ Ralink UBoot Version: 5.0.0.0
ASIC 7628_MP (Port5<->None) DRAM component: 512 Mbits DDR, width 16 DRAM bus: 16 bit Total memory: 64 MBytes Flash component: SPI Flash Date:Oct 16 2016 Time:19:48:39 ============================================ icache: sets:512, ways:4, linesz:32 ,total:65536 dcache: sets:256, ways:4, linesz:32 ,total:32768
The CPU freq = 580 MHZ ####
estimate memory size =64 Mbytes RESET MT7628 PHY!!!!!! Please choose the operation: 1: Load system code to SDRAM via TFTP. 2: Load system code then write to Flash via TFTP. 3: Boot system code via Flash (default). 4: Entr boot command line interface. 9: Load Boot Loader code then write to Flash via TFTP. default: 3 0
3: System Boot system code via Flash.
Booting image at bc050000 …
Image Name: Linux Kernel Image Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 3783625 Bytes = 3.6 MB Load Address: 80000000 Entry Point: 8000c150 Verifying Checksum … OK Uncompressing Kernel Image … OK No initrd
Transferring control to Linux (at address 8000c150) …
Giving linux memsize in MB, 64
Starting kernel …
LINUX started…
THIS IS ASIC Linux version 2.6.36 (ziqiang@ziqiang) (gcc version 4.6.3 (Buildroot 2012.11.1) ) #21 Wed Jun 13 22:27:45 CST 2018
The CPU feqenuce set to 575 MHz
MIPS CPU sleep mode enabled. CPU revision is: 00019655 (MIPS 24Kc) Software DMA cache coherency Determined physical RAM map: memory: 04000000 @ 00000000 (usable) Initrd not found or empty – disabling initrd Zone PFN ranges: Normal 0x00000000 -> 0x00004000 Movable zone start PFN for each node early_node_map[1] active PFN ranges 0: 0x00000000 -> 0x00004000 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256 Kernel command line: console=ttyS1,57600n8 root=/dev/ram0 console= PID hash table entries: 256 (order: -2, 1024 bytes) Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) Primary instruction cache 64kB, VIPT, , 4-waylinesize 32 bytes. Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes Writing ErrCtl register=0003dd70 Readback ErrCtl register=0003dd70 Memory: 58172k/65536k available (3253k kernel code, 7308k reserved, 778k data, 2480k init, 0k highmem) NR_IRQS:128 console [ttyS1] enabled Calibrating delay loop… 386.04 BogoMIPS (lpj=772096) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 512 NET: Registered protocol family 16 RALINK_GPIOMODE = 54050404 RALINK_GPIOMODE = 54040404 Xtal 40MHz start PCIe register access RALINK_RSTCTRL = 2400000 RALINK_CLKCFG1 = fdbfffc0
** MT7628 PCIe RC mode
PCIE0 enabled
Port 0 N_FTS = 1b105000
init_rt2880pci done
bio: create slab
=== pAd = c014d000, size = 1404512 ===
<-- RTMPAllocTxRxRingMemory, Status=0, ErrorValue=0x
<-- RTMPAllocAdapterBlock, Status=0
RtmpChipOpsHook(492): Not support for HIF_MT yet!
mt7628_init()-->
mt7628_init(FW(8a00), HW(8a01), CHIPID(7628))
e2.bin mt7628_init(1135)::(2), pChipCap->fw_len(63888)
mt_bcn_buf_init(218): Not support for HIF_MT yet!
<--mt7628_init()
nf_conntrack version 0.5.0 (908 buckets, 3632 max)
matchsize=264
IPVS: Registered protocols ()
IPVS: Connection hash table configured (size=4096, memory=32Kbytes)
IPVS: ipvs loaded.
GRE over IPv4 demultiplexor driver
gre: can't add protocol
ip_tables: (C) 2000-2006 Netfilter Core Team, Type=Restricted Cone
TCP cubic registered
NET: Registered protocol family 10
NET: Registered protocol family 17
Bridge firewalling registered
Ebtables v2.0 registered
Lan Domain: myrepeater.net
Lan Domain: www.mywifi.net
Lan Domain: www.myrepeater.net
Lan Domain: mywifi.net
Lan Domain: myrepeater.net
L2TP core driver, V2.0
PPPoL2TP kernel driver, V2.0
802.1Q VLAN Support v1.8 Ben Greear
,–. <)
`- |__7
|. |\ .--|. \ |.\--. / j \
.7j\ \
| o | (o)____O) |
\ / J \ /
---'
—‘
init: can’t log to /dev/tty5 starting pid 111, tty ‘/dev/ttyS1’: ‘/bin/sh’
BusyBox v1.12.1 (2018-06-13 22:24:34 CST) built-in shell (ash) Enter ‘help’ for a list of built-in commands.
Raeth v3.1 (Tasklet,SkbRecycle)
phy_tx_ring = 0x02d37000, tx_ring = 0xa2d37000
phy_rx_ring0 = 0x02d38000, rx_ring0 = 0xa2d38000 GMAC1_MAC_ADRH — : 0x000000e0 GMAC1_MAC_ADRL — : 0x2051bd6b RT305x_ESW: Link Status Changed device eth2 entered promiscuous mode device eth2.1 entered promiscuous mode TX_BCN DESC a33a6000 size = 320 RX[0] DESC a33a9000 size = 1024 RX[1] DESC a33aa000 size = 1024 E2pAccessMode=2 cfg_mode=9 cfg_mode=9 wmode_band_equal(): Band Equal! AndesSendCmdMsg: Could not send in band command due to diable fRTMP_ADAPTER_MCU_SEND_IN_BAND_CMD APSDCapable[0]=0 APSDCapable[1]=0 APSDCapable[2]=0 APSDCapable[3]=0 APSDCapable[4]=0 APSDCapable[5]=0 APSDCapable[6]=0 APSDCapable[7]=0 APSDCapable[8]=0 APSDCapable[9]=0 APSDCapable[10]=0 APSDCapable[11]=0 APSDCapable[12]=0 APSDCapable[13]=0 APSDCapable[14]=0 APSDCapable[15]=0 default ApCliAPSDCapable[0]=0 Key1Str is Invalid key length(0) or Type(0) Key2Str is Invalid key length(0) or Type(0) Key3Str is Invalid key length(0) or Type(0) Key4Str is Invalid key length(0) or Type(0) RTMPSetDefaultChannel() : default channel to 1 load fw image from fw_header_image AndesMTLoadFwMethod1(2182)::pChipCap->fw_len(63888) FW Version:20151201 FW Build Date:20151201183641 CmdAddressLenReq:(ret = 0) CmdFwStartReq: override = 1, address = 1048576 CmdStartDLRsp: WiFI FW Download Success MtAsicDMASchedulerInit(): DMA Scheduler Mode=0(LMAC) efuse_probe: efuse = 10000002 RtmpChipOpsEepromHook::e2p_type=2, inf_Type=4 RtmpEepromGetDefault::e2p_dafault=2 RtmpChipOpsEepromHook: E2P type(2), E2pAccessMode = 2, E2P default = 2 NVM is FLASH mode
- Phy Mode = 14 Country Region from e2p = ffff tssi_1_target_pwr_g_band = 30
- Phy Mode = 14
- Phy Mode = 14 NICInitPwrPinCfg(11): Not support for HIF_MT yet! NICInitializeAsic(651): Not support rtmp_mac_sys_reset () for HIF_MT yet! mt_mac_init()–> MtAsicInitMac()–> mt7628_init_mac_cr()–> MtAsicSetMacMaxLen(1276): Set the Max RxPktLen=1024! <--mt_mac_init() WTBL Segment 1 info: MemBaseAddr/FID:0x28000/0 EntrySize/Cnt:32/128 WTBL Segment 2 info: MemBaseAddr/FID:0x40000/0 EntrySize/Cnt:64/128 WTBL Segment 3 info: MemBaseAddr/FID:0x42000/64 EntrySize/Cnt:64/128 WTBL Segment 4 info: MemBaseAddr/FID:0x44000/128 EntrySize/Cnt:32/128 AntCfgInit(2946): Not support for HIF_MT yet! MCS Set = ff ff 00 00 01 MtAsicSetChBusyStat(861): Not support for HIF_MT yet! CmdSlotTimeSet:(ret = 0) [PMF]ap_pmf_init:: apidx=0, MFPC=0, MFPR=0, SHA256=0 MtAsicSetRalinkBurstMode(3051): Not support for HIF_MT yet! MtAsicSetPiggyBack(796): Not support for HIF_MT yet! MtAsicSetTxPreamble(3030): Not support for HIF_MT yet! The 2-BSSID mode is enabled, the BSSID byte5 MUST be the multiple of 2 MtAsicSetPreTbtt(): bss_idx=0, PreTBTT timeout = 0xf0 Main bssid = 00:e0:20:51:bd:6d <==== rt28xx_init, Status=0 @@@ ed_monitor_exit : ===> @@@ ed_monitor_exit : <=== mt7628_set_ed_cca: TURN OFF EDCCA mac 0x10618 = 0xd7083f0f, EDCCA_Status=0 WiFi Startup Cost (ra0): 3.764s device ra0 entered promiscuous mode register rt2860
=== pAd = c0782000, size = 2162080 ===
<-- RTMPAllocTxRxRingMemory, Status=0 <-- RTMPAllocAdapterBlock, Status=0 pAd->CSRBaseAddress =0xc0680000, csr_addr=0xc0680000! device_id =0x7662 ==>rlt_wlan_chip_onoff(): OnOff:1, Reset= 1, pAd->WlanFunCtrl:0x0, Reg-WlanFunCtrl=0x20a ====> mt76x2_ePA_per_rate_compensate_init: 5868 is_ePA: 1 E2pAccessMode=2 cfg_mode=14 cfg_mode=14 wmode_band_equal(): Band Not Equal! APSDCapable[0]=0 APSDCapable[1]=0 APSDCapable[2]=0 APSDCapable[3]=0 APSDCapable[4]=0 APSDCapable[5]=0 APSDCapable[6]=0 APSDCapable[7]=0 APSDCapable[8]=0 APSDCapable[9]=0 APSDCapable[10]=0 APSDCapable[11]=0 APSDCapable[12]=0 APSDCapable[13]=0 APSDCapable[14]=0 APSDCapable[15]=0 default ApCliAPSDCapable[0]=0 Key1Str is Invalid key length(0) or Type(0) Key2Str is Invalid key length(0) or Type(0) Key3Str is Invalid key length(0) or Type(0) Key4Str is Invalid key length(0) or Type(0) WiFi Mcast disabled=0 RtmpChipOpsEepromHook::e2p_type=2, inf_Type=5 NVM is FLASH mode (pAd->flash_offset = 0x48000) get_dev_name_prefix(): dev_idx = 1, dev_name_prefix=rai build time = 20141115060606a rom patch for E3 IC
platform = ALPS hw/sw version = ?? patch version =
FW Version:0.0.00 Build:1 Build Time:201507311614____ fw for E3 IC RX[0] DESC a2f9f000 size = 4096 RX[1] DESC a2fc8000 size = 4096 E2pAccessMode=2 cfg_mode=14 cfg_mode=14 wmode_band_equal(): Band Not Equal! APSDCapable[0]=0 APSDCapable[1]=0 APSDCapable[2]=0 APSDCapable[3]=0 APSDCapable[4]=0 APSDCapable[5]=0 APSDCapable[6]=0 APSDCapable[7]=0 APSDCapable[8]=0 APSDCapable[9]=0 APSDCapable[10]=0 APSDCapable[11]=0 APSDCapable[12]=0 APSDCapable[13]=0 APSDCapable[14]=0 APSDCapable[15]=0 default ApCliAPSDCapable[0]=0 Key1Str is Invalid key length(0) or Type(0) Key2Str is Invalid key length(0) or Type(0) Key3Str is Invalid key length(0) or Type(0) Key4Str is Invalid key length(0) or Type(0) WiFi Mcast disabled=0
- Phy Mode = 49 get_chl_grp:illegal channel (167) get_chl_grp:illegal channel (167) get_chl_grp:illegal channel (169) get_chl_grp:illegal channel (169) get_chl_grp:illegal channel (171) get_chl_grp:illegal channel (171) drivers/net/wireless/rlt_wifi_ap/../rlt_wifi/chips/mt76x2.c:3028 assert (ad->TxPower[choffset].Channel == 42)failed Country Region from e2p = ffff mt76x2_read_temp_info_from_eeprom:: is_temp_tx_alc=0, temp_tx_alc_enable=0 mt76x2_read_tx_alc_info_from_eeprom:: is_ePA_mode=0, ePA_type=3 mt76x2_read_tx_alc_info_from_eeprom:: [5G band] high_temp_slope=0, low_temp_slope=0 mt76x2_read_tx_alc_info_from_eeprom:: [2G band] high_temp_slope=0, low_temp_slope=0 mt76x2_read_tx_alc_info_from_eeprom:: [5G band] tc_lower_bound=0, tc_upper_bound=0 mt76x2_read_tx_alc_info_from_eeprom:: [2G band] tc_lower_bound=0, tc_upper_bound=0 mt76x2_get_external_lna_gain::LNA type=0x11, BLNAGain=0x0, ALNAGain0=0x0, ALNAGain1=0x0, ALNAGain2=0x0
- Phy Mode = 49
- Phy Mode = 49 andes_pci_fw_init 0x1300 = 00073200 AntCfgInit: primary/secondary ant 0/1 andes_load_cr:cr_type(2) ChipStructAssign(): MT76x2 hook ! MCS Set = ff ff 00 00 01 mt76x2_bbp_adjust():rf_bw=2, ext_ch=1, PrimCh=149, HT-CentCh=151, VHT-CentCh=155 TX0 power compensation = 0x38 TX1 power compensation = 0x38 APStartUp(): AP Set CentralFreq at 155(Prim=149, HT-CentCh=151, VHT-CentCh=155, BBP_BW=2) mt76x2_calibration(channel = 155) Main bssid = 00:e0:20:51:bd:6e mt76x2_reinit_agc_gain:original agc_vga0 = 0x5c, agc_vga1 = 0x5c mt76x2_reinit_agc_gain:updated agc_vga0 = 0x5c, agc_vga1 = 0x5c mt76x2_reinit_hi_lna_gain:original hi_lna0 = 0x27, hi_lna1 = 0x27 mt76x2_reinit_hi_lna_gain:updated hi_lna0 = 0x27, hi_lna1 = 0x27 original vga value(chain0) = 5c original vga value(chain1) = 5c <==== rt28xx_init, Status=0 get_dev_name_prefix(): dev_idx = 1, dev_name_prefix=apclii RTMPDrvOpen(1):Check if PDMA is idle! RTMPDrvOpen(2):Check if PDMA is idle! device rai0 entered promiscuous mode br0: port 3(rai0) entering learning state br0: port 3(rai0) entering learning state br0: port 2(ra0) entering learning state br0: port 2(ra0) entering learning state br0: port 1(eth2.1) entering learning state br0: port 1(eth2.1) entering learning state br0: port 3(rai0) entering forwarding state br0: port 2(ra0) entering forwarding state br0: port 1(eth2.1) entering forwarding state led=13, on=1, off=4000, blinks,=1, reset=1, time=4000
准备开干了,先烧写不死的UBOOT-Breed。 我准备用UBUNTU对这块板子刷机,先在UBUNTU上安装tftp:
1.安装tftp sudo apt-get install tftp-hpa tftpd-hpa xinetd
-
建立目录 $ sudo mkdir /tftpboot # 这是建立tftp传输目录。 $ sudo chmod 777 /tftpboot $ sudo touch test.txt # test.txt文件最好输入内容以便区分
-
配置
sudo gedit /etc/default/tftpd-hpa
TFTP_USERNAME=”tftp” TFTP_DIRECTORY=”/tftpboot” # 这里是你的tftpd-hpa的服务目录,这个想建立在哪里都行 TFTP_ADDRESS=”0.0.0.0:69″ TFTP_OPTIONS=”-l -c -s” # 这里是选项,-c是可以上传文件的参数,-s是指定tftpd-hpa服务目录,上面已经指定
-
重启服务 $ sudo service tftpd-hpa restart # 启动服务,这里要注意,采用的独立服务形式。
-
测试
cd /home/myfolder
tftp localhost #localhost 表示本机
tftp>get test.txt //test.txt 是之前在 /tftpboot 目录下新建的文件 tftp>q
#退出后,在目录下会有一个test.txt文件,表示tftp服务器安装成功!
目前我有一台windows电脑,安装了串口工具SecureCRT,通过串口接到路由器PCB上查看串口信息,以及下串口命令。
另外一台UBUNTU电脑,用上面的方法安装了TFTP服务,同时用一根网线把UBUNTU和路由器PCB板子连接起来。
这时UBUNTU电脑获得IP是192.168.1.100,路由器PCB板子IP是:192.168.1.253(通过串口执行命令ifconfig,如下),
我看到斐讯k1的配置和我的这块PCB配置差不多,于是从网上找个斐讯k1的Breed刷入。
ifconfig
br0 Link encap:Ethernet HWaddr 00:E0:20:51:BD:6B
inet addr:192.168.1.253 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:20ff:fe51:bd6b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:99 errors:0 dropped:0 overruns:0 frame:0
TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9726 (9.4 KiB) TX bytes:3874 (3.7 KiB)
eth2 Link encap:Ethernet HWaddr 00:E0:20:51:BD:6B
inet6 addr: fe80::2e0:20ff:fe51:bd6b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:101 errors:0 dropped:0 overruns:0 frame:0
TX packets:446 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12212 (11.9 KiB) TX bytes:243336 (237.6 KiB)
Interrupt:3
eth2.1 Link encap:Ethernet HWaddr 00:E0:20:51:BD:6B
inet6 addr: fe80::2e0:20ff:fe51:bd6b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:101 errors:0 dropped:0 overruns:0 frame:0
TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:10798 (10.5 KiB) TX bytes:4232 (4.1 KiB)
eth2.2 Link encap:Ethernet HWaddr 00:E0:20:51:BD:6C
inet6 addr: fe80::2e0:20ff:fe51:bd6c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:407 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:238686 (233.0 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
ra0 Link encap:Ethernet HWaddr 00:E0:20:51:BD:6D
inet6 addr: fe80::2e0:20ff:fe51:bd6d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:4
rai0 Link encap:Ethernet HWaddr 00:E0:20:51:BD:6E
inet6 addr: fe80::2e0:20ff:fe51:bd6e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:2
#在ubuntu上打开命令提示符,输入telnet 192.168.2.253,用户名和密码均是admin
#然后输入 cd /tmp tftp -g -l /tmp/uboot.bin -r uboot.bin 192.168.2.100 mtd_write write uboot.bin Bootloader
#等待一两秒,刷入Breed。
这次我找到的是这个bootloader试试运气:
烧录器烧完,焊回,接上串口线,波特率设置成115200,上电开机,有正常的信息打印出:
[04020C0D][04020C0D] DDR Calibration DQS reg = 00008787
U-Boot 1.1.3 (May 18 2015 – 14:37:16)
SoC:MediaTek MT7628 DRAM: Found DDR2 Memory. TEST-0 256M: CFG0:0x249CE2E5 CFG1:0x223A2323 CFG2:0x68000C43 CFG3:0x00000452 CFG4:0x0000000A TEST-1 128M: CFG0:0x249B42E5 CFG1:0x22362323 CFG2:0x68000C43 CFG3:0x00000452 CFG4:0x0000000A TEST-2 64M: CFG0:0x249AA2E5 CFG1:0x22322323 CFG2:0x68000C43 CFG3:0x00000452 CFG4:0x0000000A Done,DDR2 is 64 MB relocate_code Pointer at: 83fa8000 flash manufacture id: c8, device id 40 17 Flash:GD25Q64B Size:8MB *** Warning – bad CRC, using default environment
_ __ | _ \ __ | _ | _ ) ____ __ | ) / ` | ‘ \ / ` | / _ \ | ‘_/ ` | \ / \ \/ / | _/ ( | (_ | (_) | (_ | _) | (_) > < | _ | _, | _ | _ | _, | ___/ | _ | _, | _/ \//\\ | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PandoraBox Ralink/MTK Platform | |||||||||||||||||||||||||||||||||||||||||||
The best solution for you | |||||||||||||||||||||||||||||||||||||||||||
Copyright 2015 D-Team Technology Co.,Ltd. SZ | |||||||||||||||||||||||||||||||||||||||||||
Board:Ralink RT305x | |||||||||||||||||||||||||||||||||||||||||||
lintel |
|||||||||||||||||||||||||||||||||||||||||||
__ |
===============Board Info================== CPU Frequency:575MHz Detected Memory:64MiB Bootloader Version:4.3.1.0 icache: sets:512, ways:4, linesz:32 ,total:64KiB dcache: sets:256, ways:4, linesz:32 ,total:32KiB ============================================ RESET MT7628 PHY!!!!!! GSW VLAN:LLLW GPIO_MODE init: I2C:GPIO REFCLK0:GPIO NAND/SD:GPIO WDT_RST:GPIO GPIO_MODE_REGs: 0x571544d5 READY_LED_BIT:37. Please choose the operation: 1: Load system code to SDRAM via TFTP. 2: Load system code then write to Flash via TFTP. 3: Boot system code via Flash (default). 4: Entr boot command line interface. 7: Load Boot Loader code then write to Flash via Serial. 9: Load Boot Loader code then write to Flash via TFTP. 0
3: System Boot system code via Flash.
Press Reset button enter upgrade mode!
Booting image at bc050000 …
Bad Magic Number,FFFFFFFF
Starting httpd to update firmware…
Recovery Module v2.0 | ||
---|---|---|
Note:Please Use Web Browser Upgrade the Firmware ! | ||
Copyright 2014 D-Team Technology Co.,Ltd. SZ | ||
lintel |
||
____ |
[Kernel]uOS Version: v1.2 [TCP/IP]ETH0 MAC:FF:FF:FF:FF:FF:FF [TCP/IP]IP:192.168.1.1 [TCP/IP]Netmask:255.255.255.0 [TCP/IP]Default Router:0.0.0.0 [DHCPD]Server IP:192.168.1.1
NetTxPacket = 0x83FE1380. Trying Eth0 (10/100-M)
Waitting for RX_DMA_BUSY status Start… done
ETH_STATE_ACTIVE!! [Kernel]Enter Network Loop! [LED]Thread started!!
把UBUNTU电脑和路由器通过有线相连,UBUNTU会提示有网络连接成功,输入IP192.168.1.1可打开bootloader刷固件的网页(看网上说要先按住reset键再上电,如果只存在uboot的固件不需要按键,如果里面有烧写系统固件,下次想进uboot烧其他固件,才需要按住reset key)。
#在openwrt官方网站上,我看到下面的产品(Archer C50 v3)和我的硬件配置一样。 https://openwrt.org/toh/tp-link/archer-c50
#但是我下载下来后,无法烧录,提示校验失败 http://downloads.openwrt.org/releases/18.06.1/targets/ramips/mt76x8/openwrt-18.06.1-ramips-mt76x8-tplink_c50-v3-squashfs-tftp-recovery.bin
#Table of Hardware:This is the main Table of Hardware, listing all devices that are supported by OpenWrt. https://openwrt.org/toh/start #Table of Hardware: Full details。This table shows full hardware details for all devices listed in the Table of Hardware. https://openwrt.org/toh/views/toh_extended_all
#这个比较好用,按照各种关键字搜索: https://openwrt.org/toh/views/dataclouds
#下面的boot和固件拯救了我的板子,uboot和固件都验证可用 http://downloads.openwrt.org.cn/PandoraBox/MT7628AN_EVB/
#下面这个固件烧进去后,最后会死机 http://downloads.openwrt.org.cn/PandoraBox/MT7628AN_EVB/PandoraBox-ralink-mt7628-mt7628an-evb-squashfs-sysupgrade-r865-20150519.bin
#下面这个这个固件,至少能跑起来 http://downloads.openwrt.org.cn/PandoraBox/MT7628AN_EVB/PandoraBox-ralink-mt7628-mt7628an-evb-squashfs-sysupgrade-r858-20150518.bin
用串口登录,或者用192.168.1.1登录网页时,用户名root,初始密码admin
#pandorabox的SDK与IPK应用程序在这里下载: https://downloads.pangubox.com/pandorabox/18.10/targets/ralink/mt7628/
#编译pandorabox https://blog.csdn.net/lvshaorong/article/details/62215033
开机成功,打印信息如下:
…………………………………………………………………….. …………………………………………………………………….. . . Done!
[kernel]Firmware upgrade done! [httpd]Reboot!!! [kernel]Signal pending 0. [Kernel]Signal ACK and clean. [Kernel]reboot Signal detect!! [04020C0D][04020C0D] DDR Calibration DQS reg = 00008787
U-Boot 1.1.3 (May 18 2015 – 14:37:16)
SoC:MediaTek MT7628 DRAM: Found DDR2 Memory. TEST-0 256M: CFG0:0x249CE2E5 CFG1:0x223A2323 CFG2:0x68000C43 CFG3:0x00000452 CFG4:0x0000000A TEST-1 128M: CFG0:0x249B42E5 CFG1:0x22362323 CFG2:0x68000C43 CFG3:0x00000452 CFG4:0x0000000A TEST-2 64M: CFG0:0x249AA2E5 CFG1:0x22322323 CFG2:0x68000C43 CFG3:0x00000452 CFG4:0x0000000A Done,DDR2 is 64 MB relocate_code Pointer at: 83fa8000
Software System Reset Occurred
flash manufacture id: c8, device id 40 17 Flash:GD25Q64B Size:8MB *** Warning – bad CRC, using default environment
_ __ | _ \ __ | _ | _ ) ____ __ | ) / ` | ‘ \ / ` | / _ \ | ‘_/ ` | \ / \ \/ / | _/ ( | (_ | (_) | (_ | _) | (_) > < | _ | _, | _ | _ | _, | ___/ | _ | _, | _/ \//\\ | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PandoraBox Ralink/MTK Platform | |||||||||||||||||||||||||||||||||||||||||||
The best solution for you | |||||||||||||||||||||||||||||||||||||||||||
Copyright 2015 D-Team Technology Co.,Ltd. SZ | |||||||||||||||||||||||||||||||||||||||||||
Board:Ralink RT305x | |||||||||||||||||||||||||||||||||||||||||||
lintel |
|||||||||||||||||||||||||||||||||||||||||||
__ |
===============Board Info================== CPU Frequency:575MHz Detected Memory:64MiB Bootloader Version:4.3.1.0 icache: sets:512, ways:4, linesz:32 ,total:64KiB dcache: sets:256, ways:4, linesz:32 ,total:32KiB ============================================ RESET MT7628 PHY!!!!!! GSW VLAN:LLLW GPIO_MODE init: I2C:GPIO REFCLK0:GPIO NAND/SD:GPIO WDT_RST:GPIO GPIO_MODE_REGs: 0x55154415 READY_LED_BIT:37. Please choose the operation: 1: Load system code to SDRAM via TFTP. 2: Load system code then write to Flash via TFTP. 3: Boot system code via Flash (default). 4: Entr boot command line interface. 7: Load Boot Loader code then write to Flash via Serial. 9: Load Boot Loader code then write to Flash via TFTP. 0
3: System Boot system code via Flash.
Press Reset button enter upgrade mode!
Booting image at bc050000 …
Image Name: PabdoraBox Linux-3.14.42 Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 1134785 Bytes = 1.1 MB Load Address: 80000000 Entry Point: 80000000 Verifying Checksum … OK Uncompressing Kernel Image … OK No initrd
Transferring control to Linux (at address 80000000) …
Giving linux memsize in MB, 64
Starting kernel …
PandoraBox For Ralink/MTK APSoC. Copyright 2013-2014 D-Team Technology SZ
LINUX started…
THIS IS ASIC
[ 0.000000] Linux version 3.14.42 (lintel@PandoraBox-Server) (gcc version 4.8.3 (PandoraBox/Linaro GCC 4.8-2014.04 r775) ) #32 Mon May 18 19:15:21 CST 2015
[ 0.000000] PandoraBox CPUID Module for Ralink/MTK SoC v1.1.
[ 0.000000] MediaTek MT7628 pkg:BGA rev:1 eco:2 CPU:575MHz, Bus:191MHz Uart:191MHz
[ 0.000000] CPU running in Little Endian
[ 0.000000] Board VLAN:LLLLW
[ 0.000000] Flash:SPI Size: 8MB
[ 0.000000] DRAM: 64MB DDR2 16 bits
[ 0.000000] Kernel Support [PCI] [USB]
[ 0.000000]
[ 0.000000] MIPS CPU sleep mode enabled.
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019655 (MIPS 24KEc)
[ 0.000000] Software DMA cache coherency
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 04000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty – disabling initrd
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x00000000-0x03ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x00000000-0x03ffffff]
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: pause_on_oops=10 noresume board=MT7628A_EVB console=ttyS1,115200 rootfstype=squashfs,jffs2
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Writing ErrCtl register=0003cd70
[ 0.000000] Readback ErrCtl register=0003cd70
[ 0.000000] Memory: 61392K/65536K available (2443K kernel code, 130K rwdata, 504K rodata, 176K init, 253K bss, 4144K reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:256
[ 0.000000] console [ttyS1] enabled
[ 0.000000] console [ttyS1] enabled
[ 0.000000] bootconsole [early0] disabled
[ 0.000000] bootconsole [early0] disabled
[ 0.010000] Calibrating delay loop… 385.84 BogoMIPS (lpj=1929216)
[ 0.070000] pid_max: default: 32768 minimum: 301
[ 0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.080000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.090000] pinctrl core: initialized pinctrl subsystem
[ 0.090000] NET: Registered protocol family 16
[ 0.100000] Ralink/MTK BootROM maped.
[ 0.100000] Generic GPIO Driver for MediaTek MT7628 Board. Copyright lintel 2005-2013
[ 0.110000] MT7628-GPIO0:registering 31 irq handlers
[ 0.110000] MT7628-GPIO1:registering 31 irq handlers
[ 0.120000] MT7628-GPIO3:registering 31 irq handlers
[ 0.120000] MIPS: machine is MediaTek MT7628A Evaluation Board
[ 0.130000] ralink_register_flash:SPI Flash.
[ 0.130000] MT762x:SDHC Interface registered.
[ 0.130000] Ralink/MTK PinCtrl registered.
[ 0.140000] Generic PinCtrl Driver for MediaTek MT7628 Board. Copyright lintel 2005-2015
[ 0.140000] ralink-pinmux ralink-pinmux: invalid group “pwm0” for function “sdhc”
[ 0.150000] ralink-pinmux ralink-pinmux: invalid group “pwm1” for function “sdhc”
[ 0.150000] PINCTRL:add 31 pins for MT7628-PINCTRL0.
[ 0.160000] PINCTRL:add 31 pins for MT7628-PINCTRL1.
[ 0.160000] PINCTRL:add 31 pins for MT7628-PINCTRL2.
[ 0.170000] GPIO_MODE_REG:0x55154415
[ 1.280000] bio: create slab
PandoraBox login: PandoraBox login: PandoraBox login: PandoraBox login: PandoraBox login: PandoraBox login: PandoraBox login: PandoraBox login: PandoraBox login: PandoraBox login: root Password: Login incorrect PandoraBox login: admin Password: Login incorrect PandoraBox login: root Password: Login incorrectPlease press Enter to activate this console.
PandoraBox login: Login timed out Please press Enter to activate this console.
PandoraBox login: root Password:
BusyBox v1.22.1 (2015-05-09 15:44:33 CST) built-in shell (ash) Enter ‘help’ for a list of built-in commands.
_ __ | _ \ __ | _ | _ ) ____ __ | ) / ` | ‘ \ / ` | / _ \ | ‘_/ ` | \ / \ \/ / | _/ ( | (_ | (_) | (_ | _) | (_) > < | _ | _, | _ | _ | _, | ___/ | _ | _, | _/ \//\\ | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PandoraBox SDK Platform | |||||||||||||||||||||||||||||||||||||||||||
The Best solution for you | |||||||||||||||||||||||||||||||||||||||||||
Copyright 2013-2015 D-Team Technology Co.,Ltd.SZ | |||||||||||||||||||||||||||||||||||||||||||
http://www.pandorabox.org.cn | |||||||||||||||||||||||||||||||||||||||||||
__ |
Base on OpenWrt BARRIER BREAKER (14.09, r858)
[root@PandoraBox:/root]#
[root@PandoraBox:/root]#
[root@PandoraBox:/root]#
[root@PandoraBox:/root]#
[root@PandoraBox:/root]#
[root@PandoraBox:/root]#ifconfig
br-lan Link encap:Ethernet HWaddr 00:0C:43:28:80:BC
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:43ff:fe28:80bc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:207 errors:0 dropped:0 overruns:0 frame:0
TX packets:129 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:21152 (20.6 KiB) TX bytes:15173 (14.8 KiB)
eth0 Link encap:Ethernet HWaddr 00:0C:43:28:80:BC
inet6 addr: fe80::20c:43ff:fe28:80bc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:226 errors:0 dropped:0 overruns:0 frame:0
TX packets:286 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:26717 (26.0 KiB) TX bytes:67429 (65.8 KiB)
Interrupt:3
eth0.1 Link encap:Ethernet HWaddr 00:0C:43:28:80:BC
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:226 errors:0 dropped:0 overruns:0 frame:0
TX packets:118 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22649 (22.1 KiB) TX bytes:14027 (13.6 KiB)
eth0.2 Link encap:Ethernet HWaddr 00:0C:43:28:80:BC
inet6 addr: fe80::20c:43ff:fe28:80bc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:161 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:51278 (50.0 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:2556 errors:0 dropped:0 overruns:0 frame:0
TX packets:2556 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:154368 (150.7 KiB) TX bytes:154368 (150.7 KiB)
ra0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:4
[root@PandoraBox:/root]# [root@PandoraBox:/root]# [root@PandoraBox:/root]# [root@PandoraBox:/root]# [root@PandoraBox:/root]#iwconfig ifb0 no wireless extensions.
ra2 MT76X8 APSoC ESSID:”HT_AP2″
Mode:Managed Frequency=2.462 GHz Access Point: 02:00:00:20:00:00
Bit Rate:300 Mb/s Tx-Power=18 dBm
Encryption key:off
Power Management:on
gre0 no wireless extensions.
wds1 MT76X8 APSoC ESSID:”HT_AP1″
Mode:Managed Frequency=2.462 GHz Access Point: 02:00:00:10:00:00
Bit Rate:300 Mb/s Tx-Power=18 dBm
Encryption key:off
Power Management:on
eth0.1 no wireless extensions.
lo no wireless extensions.
ra1 MT76X8 APSoC ESSID:”HT_AP1″
Mode:Managed Frequency=2.462 GHz Access Point: 02:00:00:10:00:00
Bit Rate:300 Mb/s Tx-Power=18 dBm
Encryption key:off
Power Management:on
gretap0 no wireless extensions.
teql0 no wireless extensions.
wds0 MT76X8 APSoC ESSID:”PandoraBox_000000″
Mode:Managed Frequency=2.462 GHz Access Point: Not-Associated
Bit Rate:300 Mb/s Tx-Power=18 dBm
Encryption key:off
Power Management:on
ra0 MT76X8 APSoC ESSID:”PandoraBox_000000″
Mode:Managed Frequency=2.462 GHz Access Point: Not-Associated
Bit Rate:300 Mb/s Tx-Power=18 dBm
Encryption key:off
Power Management:on
Link Quality=10/100 Signal level:0 dBm Noise level:0 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
apcli1 MT76X8 APSoC ESSID:””
Mode:Managed Frequency=2.462 GHz Access Point: Not-Associated
Bit Rate:300 Mb/s Tx-Power=18 dBm
Encryption key:off
Power Management:on
Link Quality=10/100 Signal level:0 dBm Noise level:0 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
eth0 no wireless extensions.
wds3 MT76X8 APSoC ESSID:”HT_AP3″
Mode:Managed Frequency=2.462 GHz Access Point: 02:00:00:30:00:00
Bit Rate:300 Mb/s Tx-Power=18 dBm
Encryption key:off
Power Management:on
ifb1 no wireless extensions.
ra3 MT76X8 APSoC ESSID:”HT_AP3″
Mode:Managed Frequency=2.462 GHz Access Point: 02:00:00:30:00:00
Bit Rate:300 Mb/s Tx-Power=18 dBm
Encryption key:off
Power Management:on
apcli0 MT76X8 APSoC ESSID:””
Mode:Managed Frequency=2.462 GHz Access Point: Not-Associated
Bit Rate:300 Mb/s Tx-Power=18 dBm
Encryption key:off
Power Management:on
Link Quality=10/100 Signal level:0 dBm Noise level:0 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
br-lan no wireless extensions.
wds2 MT76X8 APSoC ESSID:”HT_AP2″
Mode:Managed Frequency=2.462 GHz Access Point: 02:00:00:20:00:00
Bit Rate:300 Mb/s Tx-Power=18 dBm
Encryption key:off
Power Management:on
eth0.2 no wireless extensions.
[root@PandoraBox:/root]#[ 742.600000] RT305x-ESW:Port3 Link Down
[root@PandoraBox:/root]# [root@PandoraBox:/root]# [root@PandoraBox:/root]#
OpenWRT支持7628AN的链接:
https://openwrt.org/toh/views/toh_dev_arch-target-cpu?dataflt%5B0%5D=cpu_%3DMediaTek%20MT7628AN
#MediaTek MT7628AN, MediaTek MT7610EN https://openwrt.org/toh/hwdata/tp-link/tp-link_tl-wr902ac_v3
#MediaTek MT7628AN, MediaTek MT7612EN https://openwrt.org/toh/hwdata/hiwifi_gee/hiwifi_gee_hc5861b
#MediaTek MT7628AN, MediaTek MT7612E https://openwrt.org/toh/hwdata/wavlink/wl-wn575a3
参考资料:
https://blog.csdn.net/gaoyang8320/article/details/51126018 https://bbs.pcauto.com.cn/topic-11780653.html http://www.right.com.cn/forum/thread-154561-1-1.html
http://www.right.com.cn/forum/thread-204532-1-1.html http://www.right.com.cn/forum/thread-204532-1-1.html http://www.right.com.cn/forum/thread-197663-1-1.html
https://openwrt.org/toh/tp-link/tp-link_archer_c20_v4 https://openwrt.org/toh/xiaomi/nano?s[]=mt7628