|
小弟前几日拿到一个华美MPR-P1,拆开一看是RT5350F的U,决定自己编一个openwrt固件
使用最新版的openwrt,trunk,网上查了一些资料,MPR-A1,MPR-A2都是用RT5350F,正好op支持
于是硬改16Mflash,32M内存,使用op的MPR-A2配置编译
U-boot是官方的版本,我自己增加了16M flash支持
这个板子只有一个网口,编译固件只用openwrt-ramips-rt305x-mpr-a2-squashfs-sysupgrade.bin
rt305x和rt5350配置是同一条选项。
MPR-A2配置是8M+32M,网上有拆机图片
操作:一颗全新flash,先用编程器刷入u-boot,启动后刷入固件openwrt-ramips-rt305x-mpr-a2-squashfs-sysupgrade.bin
问题:刷入启动TTL有打印,可以进入Openwrt,进入后开启wifi重启,无论如何也没有看到wifi信号,网口也连接不上
进不了设置页面,只有TTL能正常操作。RT5350如何开启wifi?
分析:根据TTL打印
这一段
[ 0.520000] 0x000000000000-0x000000030000 : "u-boot"
[ 0.530000] 0x000000030000-0x000000040000 : "u-boot-env"
[ 0.550000] 0x000000040000-0x000000050000 : "factory"
[ 0.560000] 0x000000050000-0x000000800000 : "firmware"
[ 0.580000] 0x000000146297-0x000000800000 : "rootfs"
提到factory这个段,我认为我缺少这个段的数据导致wifi不能启动,如何获得或制作?
以下打印:
[ 20.350000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 20.370000] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 20.390000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[ 20.400000] cfg80211: (5170000 KHz - 5250000 KHz @ 160000 KHz), (N/A, 2000 mBm), (N/A)
[ 20.420000] cfg80211: (5250000 KHz - 5330000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 20.430000] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 20.450000] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 20.470000] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
信息(N/A, 2000 mBm), (N/A)说明wifi配置数据不正常,我认为可能是0xFFFF,就是没有数据,flash默认的FFFF。
正常的升级是不是:
1、原厂固件升级至openwrt-ramips-rt305x-mpr-a2-squashfs-factory.bin,这时保留factory段
2、openwrt-ramips-rt305x-mpr-a2-squashfs-factory.bin 升级至openwrt-ramips-rt305x-mpr-a2-squashfs-sysupgrade.bin,factory段没有失去。
于是再问,假设我的推理正确,factory段的数据如何从原厂固件读出?或者说如何分辨编程器读出原厂固件的那一段是wifi配置数据?那个固件是ralink官方编译的,厂家修改了界面,没有明确的TTL打印。如果可以确定,我可以使用dd命令将其读出并写入新的固件里面去。
这个问题让我困惑了1周了,上次AR9331也是这样,后来明白了需要一个art文件,自己读出再刷入ART后正常
我就联想RT系列是不是也有一个类似art的文件?
附TTL打印信息:
U-Boot 1.1.3 (Aug 15 2014 - 00:32:37)
Board: Ralink APSoC DRAM: 32 MB
relocate_code Pointer at: 81fb4000
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 42
spi device id: ef 40 18 0 0 (40180000)
find flash: W25Q128BV
raspi_read: from:30000 len:1000
.*** Warning - bad CRC, using default environment
============================================
Ralink UBoot Version: 3.6.0.0
--------------------------------------------
ASIC 5350_MP (Port5<->None)
DRAM_CONF_FROM: Boot-Strapping
DRAM_TYPE: SDRAM
DRAM_SIZE: 256 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 32 MBytes
Flash component: SPI Flash
Date:Aug 15 2014 Time:00:32:37
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384
##### The CPU freq = 360 MHZ ####
estimate memory size =32 Mbytes
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.
3
You choosed 3
0
3: System Boot system code via Flash.
## Booting image at bc050000 ...
raspi_read: from:50000 len:40
. Image Name: Linux Kernel Image
Created: 2014-08-24 15:07:43 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1008215 Bytes = 984.6 kB
Load Address: 80000000
Entry Point: 80000000
raspi_read: from:50040 len:f6257
................ Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 32
Starting kernel ...
[ 0.000000] Linux version 3.10.49 (andy@andy-Vostro-1200) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r42261) ) #6 Sun Aug 24 23:07:21 CST 2014
[ 0.000000] SoC Type: Ralink RT5350 id:1 rev:3
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[ 0.000000] MIPS: machine is HAME MPR-A2
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 02000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x00000000-0x01ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x00000000-0x01ffffff]
[ 0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
[ 0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[ 0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] Memory: 29352k/32768k available (2168k kernel code, 3416k reserved, 551k data, 160k init, 0k highmem)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:256
[ 0.000000] CPU Clock: 360MHz
[ 0.000000] Calibrating delay loop... 239.61 BogoMIPS (lpj=1198080)
[ 0.070000] pid_max: default: 32768 minimum: 301
[ 0.070000] Mount-cache hash table entries: 512
[ 0.080000] pinctrl core: initialized pinctrl subsystem
[ 0.090000] NET: Registered protocol family 16
[ 0.110000] rt2880-pinmux pinctrl.1: invalid group "rgmii" for function "gpio"
[ 0.120000] rt2880-pinmux pinctrl.1: invalid group "mdio" for function "gpio"
[ 0.150000] bio: create slab <bio-0> at 0
[ 0.160000] rt2880_gpio 10000600.gpio: registering 22 gpios
[ 0.170000] rt2880_gpio 10000600.gpio: registering 22 irq handlers
[ 0.180000] Switching to clocksource MIPS
[ 0.190000] NET: Registered protocol family 2
[ 0.200000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[ 0.220000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[ 0.230000] TCP: Hash tables configured (established 512 bind 512)
[ 0.240000] TCP: reno registered
[ 0.250000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.260000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.270000] NET: Registered protocol family 1
[ 0.280000] rt-timer 10000100.timer: maximum frequncy is 7324Hz
[ 0.340000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.350000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.370000] msgmni has been set to 57
[ 0.380000] io scheduler noop registered
[ 0.390000] io scheduler deadline registered (default)
[ 0.400000] gpio-export gpio_export.6: 2 gpio(s) exported
[ 0.410000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.430000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20) is a 16550A
[ 0.440000] console [ttyS0] enabled, bootconsole disabled
[ 0.440000] console [ttyS0] enabled, bootconsole disabled
[ 0.470000] m25p80 spi32766.0: found w25q128, expected s25fl064k
[ 0.490000] m25p80 spi32766.0: w25q128 (16384 Kbytes)
[ 0.500000] 4 ofpart partitions found on MTD device spi32766.0
[ 0.510000] Creating 4 MTD partitions on "spi32766.0":
[ 0.520000] 0x000000000000-0x000000030000 : "u-boot"
[ 0.530000] 0x000000030000-0x000000040000 : "u-boot-env"
[ 0.550000] 0x000000040000-0x000000050000 : "factory"
[ 0.560000] 0x000000050000-0x000000800000 : "firmware"
[ 0.580000] 0x000000146297-0x000000800000 : "rootfs"
[ 0.590000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[ 0.620000] mtd: device 4 (rootfs) set to be root filesystem
[ 0.630000] mtd: partition "rootfs_data" created automatically, ofs=0x570000, len=0x290000
[ 0.640000] 0x000000570000-0x000000800000 : "rootfs_data"
[ 0.670000] eth0: done loading
[ 0.680000] rt3xxx-usbphy usbphy.3: loaded
[ 0.690000] rt2880_wdt 10000120.watchdog: Initialized
[ 0.700000] TCP: cubic registered
[ 0.700000] NET: Registered protocol family 17
[ 0.710000] 8021q: 802.1Q VLAN Support v1.8
[ 0.750000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[ 0.760000] Freeing unused kernel memory: 160K (802a8000 - 802d0000)
procd: Console is alive
procd: - watchdog -
[ 8.390000] usbcore: registered new interface driver usbfs
[ 8.410000] usbcore: registered new interface driver hub
[ 8.420000] usbcore: registered new device driver usb
[ 8.500000] SCSI subsystem initialized
[ 8.520000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 8.530000] ehci-platform: EHCI generic platform driver
[ 8.740000] rt3xxx-usbphy usbphy.3: remote usb device wakeup disabled
[ 8.760000] rt3xxx-usbphy usbphy.3: UTMI 16bit 30MHz
[ 8.770000] ehci-platform 101c0000.ehci: EHCI Host Controller
[ 8.780000] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[ 8.790000] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[ 8.830000] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[ 8.840000] hub 1-0:1.0: USB hub found
[ 8.850000] hub 1-0:1.0: 1 port detected
[ 8.860000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 8.870000] ohci-platform 101c1000.ohci: Generic Platform OHCI Controller
[ 8.890000] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
[ 8.900000] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
[ 8.980000] hub 2-0:1.0: USB hub found
[ 8.990000] hub 2-0:1.0: 1 port detected
[ 9.000000] leds-gpio gpio-leds.4: pins are not configured from the driver
[ 9.030000] usbcore: registered new interface driver usb-storage
procd: - preinit -
[ 10.360000] rt305x-esw 10110000.esw: link changed 0x00
ifconfig: SIOCSIFFLAGS: Cannot assign requested address
ifconfig: SIOCSIFFLAGS: Cannot assign requested address
sendto(): Network is unreachable
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[ 11.980000] rt305x-esw 10110000.esw: link changed 0x01
kmod: ran 1 iterations
[ 15.150000] jffs2: notice: (312) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 18 of xref (0 dead, 2 orphan) found.
block: extroot: no root or overlay mount defined
jffs2 is ready
jffs2 is ready
[ 15.420000] jffs2: notice: (309) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 18 of xref (0 dead, 2 orphan) found.
switching to overlay
ifconfig: SIOCSIFFLAGS: Cannot assign requested address
procd: - early -
procd: - watchdog -
procd: - ubus -
procd: - init -
Please press Enter to activate this console.
[ 19.500000] NET: Registered protocol family 10
[ 19.540000] nf_conntrack version 0.5.0 (461 buckets, 1844 max)
[ 19.580000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 19.650000] u32 classifier
[ 19.650000] input device check on
[ 19.660000] Actions configured
[ 19.690000] Mirror/redirect action on
[ 19.710000] Failed to load ipt action
[ 19.780000] Loading modules backported from Linux version master-2014-05-22-0-gf2032ea
[ 19.790000] Backport generated by backports.git backports-20140320-37-g5c33da0
[ 19.810000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 19.880000] lib80211: common routines for IEEE802.11 drivers
[ 19.950000] usbcore: registered new interface driver ums-alauda
[ 19.970000] usbcore: registered new interface driver ums-cypress
[ 19.980000] usbcore: registered new interface driver ums-datafab
[ 20.000000] usbcore: registered new interface driver ums-freecom
[ 20.020000] usbcore: registered new interface driver ums-isd200
[ 20.030000] usbcore: registered new interface driver ums-jumpshot
[ 20.050000] usbcore: registered new interface driver ums-karma
[ 20.070000] usbcore: registered new interface driver ums-sddr09
[ 20.080000] usbcore: registered new interface driver ums-sddr55
[ 20.100000] usbcore: registered new interface driver ums-usbat
[ 20.170000] xt_time: kernel timezone is -0000
[ 20.300000] cfg80211: Calling CRDA to update world regulatory domain
[ 20.320000] cfg80211: World regulatory domain updated:
[ 20.330000] cfg80211: DFS Master region: unset
[ 20.330000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 20.350000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 20.370000] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 20.390000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[ 20.400000] cfg80211: (5170000 KHz - 5250000 KHz @ 160000 KHz), (N/A, 2000 mBm), (N/A)
[ 20.420000] cfg80211: (5250000 KHz - 5330000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 20.430000] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 20.450000] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 20.470000] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[ 20.520000] PPP generic driver version 2.4.2
[ 20.530000] NET: Registered protocol family 24
[ 20.610000] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5350, rev 0500 detected
[ 20.630000] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5350 detected
[ 20.670000] usbcore: registered new interface driver rt2800usb
[ 24.970000] rt305x-esw 10110000.esw: link changed 0x00
[ 26.580000] rt305x-esw 10110000.esw: link changed 0x01
[ 32.670000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
procd: - init complete -
[ 37.150000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 37.170000] device wlan0 entered promiscuous mode
[ 37.180000] br-lan: port 1(wlan0) entered forwarding state
[ 37.190000] br-lan: port 1(wlan0) entered forwarding state
[ 37.410000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 37.420000] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[ 39.190000] br-lan: port 1(wlan0) entered forwarding state
BusyBox v1.22.1 (2014-08-23 21:46:20 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
CHAOS CALMER (Bleeding Edge, r42261)
-----------------------------------------------------
* 1 1/2 oz Gin Shake with a glassful
* 1/4 oz Triple Sec of broken ice and pour
* 3/4 oz Lime Juice unstrained into a goblet.
* 1 1/2 oz Orange Juice
* 1 tsp. Grenadine Syrup
-----------------------------------------------------
root@OpenWrt:/# ifconfig
br-lan Link encap:Ethernet HWaddr 8E:94:8E:C9:48:C7
inet addr:192.168.8.1 Bcast:192.168.8.255 Mask:255.255.255.0
inet6 addr: fe80::8c94:8eff:fec9:48c7/64 Scopeink
inet6 addr: fd91:2a39:aa5a::1/60 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:1630 (1.5 KiB)
lo Link encapocal 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:1106 errors:0 dropped:0 overruns:0 frame:0
TX packets:1106 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:75840 (74.0 KiB) TX bytes:75840 (74.0 KiB)
wlan0 Link encap:Ethernet HWaddr 8E:94:8E:C9:48:C7
inet6 addr: fe80::8c94:8eff:fec9:48c7/64 Scopeink
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:1888 (1.8 KiB)
root@OpenWrt:/#
|
|