找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
楼主: zyguowei

[PRO(R3P)] 小米路由器R3P拆机_NAND改SPI(内含高清图慎入)

  [复制链接]
发表于 2019-7-2 23:56 | 显示全部楼层
fyi2000 发表于 2019-7-2 11:19
能不能最后帮我一个忙?我只想验证在线切换能不能免halt/reset处理器,在内存执行另一个适配NAND的Bootlo ...

我明白你的意思,是SPI启动PBBOOT,然后TFTP载入NAND专用的pbboot,执行相关命令,操作nand。
我目前已经过了这一步了,不是载入的ram,是直接刷入了NAND,并切换到了NAND启动,NAND上的pbboot启动是没有问题的,并且能成功刷入initramfs,并成功启动了pandorabox。到这里可以使用upgrade命令,可以用mtd命令,可以刷入官方的kernel(目的是支持U盘恢复官方系统),但都报CRC错误,无法完成固件刷写。

感觉pbboot对坏块的处理比较成功,pandorabox反而不行。

点评

你完全不明白我的用意,我希望你退回上一步,因为我在意的是 "bootm 0x90000000" 那一步,这一步可以帮助你我更了解R3P,我同意潘多拉处理坏块的能力比较强,但是对你来说已经走不通,何不试试我的方法?对你有何损  详情 回复 发表于 2019-7-3 09:47
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-3 09:47 | 显示全部楼层
本帖最后由 fyi2000 于 2019-7-3 09:51 编辑
laomao9000 发表于 2019-7-2 23:56
我明白你的意思,是SPI启动PBBOOT,然后TFTP载入NAND专用的pbboot,执行相关命令,操作nand。
我目前已 ...

你完全不明白我的用意,我希望你退回上一步,因为我在意的是 "bootm 0x90000000" 那一步,这一步可以帮助你我更了解R3P,我同意潘多拉处理坏块的能力比较强,但是暂时没有更新的固件可以选择,何不试试我的方法?对你有何损失?

话说回来,你是不是觉得在线切换对你来说很困难?还是你担心弄坏路由器?若是如此,那麽我就不强人所难了

我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-3 10:02 | 显示全部楼层
本帖最后由 fyi2000 于 2019-7-3 16:24 编辑
laomao9000 发表于 2019-7-2 23:38
问题是MTD写入报错,CRC错误,过不去。然后PBBOOT拒绝加载内核。
所以initramfs下的upgrade无法成功。唯 ...

不要一直在这里打转,我的方法循序渐进,完全没要求你刷机,中间没有刷机命令,就只是试一试R3P的反应,了解u-boot的功能,等看了TTL串口输出,我才会决定是否进行下一步,而且现在还缺适配Micron NAND的最新官方u-boot备份

补充:
绕了一大圈才发现lintel大神早就有最新官方编程器固件完整备份,大神就是大神,早就想到我等的需要,最新U-Boot 1.1.3 (Sep 25 2018 - 12:04:25)支持Micron MT29F2G08ABAEA,u-boot实际长度0x21d70,Bootlog

Index of /刷机说明/小米路由器Pro/xiaomi-pro/

所以命令改为
  1. tftp 0x90000000 miwifi_r3p_uboot.bin
  2. ##不必切换至NAND##
  3. bootm 0x90000000
复制代码
附件miwifi_r3p_uboot.bin已修改uart_en & boot_wait

本帖子中包含更多资源

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

×
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-3 15:43 | 显示全部楼层
本帖最后由 laomao9000 于 2019-7-3 15:50 编辑
fyi2000 发表于 2019-7-3 10:02
不要一直在这里打转,我的方法循序渐进,完全没要求你刷机,中间没有刷机命令,就只是试一试R3P的反应, ...

刷官方UBOOT?这个前几天已经测试过了。启动后出现下面这个菜单。选1:启动官方kernel——我的nand已经没有了其他rootfs分区,所以,kernel会重新启动。如果是有rootfs的情况,应该可以正常恢复系统。
选2:将kernel刷入,可以恢复kernel分区。这一步也试过,过不去,CRC错误!如果这一步过了,可以使用U盘恢复官方系统。
3、正常启动
4、进入命令行
9、恢复UBOOT


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.

You choosed 4

我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-3 17:42 | 显示全部楼层
本帖最后由 fyi2000 于 2019-7-3 17:47 编辑
laomao9000 发表于 2019-7-3 15:43
刷官方UBOOT?这个前几天已经测试过了。启动后出现下面这个菜单。选1:启动官方kernel——我的nand已经没 ...

谢谢,你有进展,我也一直未放弃,而且我原先一直纠结于 "在线切换SPI/NAND",但现在慢慢有了顿悟,因为我可能误解了TXD1/GPIO0的作用,这两个只是告诉处理器启动哪个闪存,但两个闪存一直都并存着,关键在於调用不同的程序,就能决定以哪个闪存为主,只有不能并存的闪存,才存在需要 "在线切换CE-/CS-" 的问题,此外u-boot的功能我也还有不明之处,可惜我没有R3P,所以才必须由你来证明这个想法

请准备一个FAT32单分区U盘
下载小米路由器PRO(R3P) 内测版固件2.17.123 (或最新2.16.19稳定版) 至U盘根目录,重新命名为 miwifi.bin
下载 kernel0.bin

接下来有两个想法,第一还是要证明 "不需要在线切换至NAND",程序决定一切
  1. 从SPI闪存启动
  2. 按4进入命令模式
  3. tftp 0x90000000 miwifi_r3p_uboot.bin (一定要载入这个官方u-boot,不要pb-boot)
  4. bootm 0x90000000 (按回车以後就立即按住4不放)
  5. 按4进入命令模式
  6. nand read 0 40
复制代码
如果bootm出现错误而中止,那就代表 "在线切换至NAND" 还是有必要,请重试一次,在bootm之前加入 "在线切换至NAND"

不关机接着进行第二步,如果上一步错过命令模式则必须重来
  1. 插上U盘
  2. tftp 0x90000000 kernel0.bin
  3. 按住Reset不放
  4. bootm 0x90000000
  5. 直到橙灯闪烁才松手
复制代码
应该不用等很久,接着等几分钟直到蓝灯恒亮,注意看TTL串口输出,能走到这一步就算成功了,虽然我也只有五成把握,因为就怕无法处理坏块,以上并未更新NAND上面的pb-boot,而pb-boot只会执行kernel0,不会执行kernel1,如果无法顺利执行,那就重复第一步,再执行
  1. bootm 0xbc600000
复制代码
再不成功,那就比较复杂,因为官方固件会读取u-boot环境变量才决定哪个rootfs,那就只好换掉pb-boot,然後重置环境变量,刷回官方u-boot以後,直接从NAND闪存启动即可

以上请上传完整TTL串口输出以供判读

其实我还有更大胆的想法,但是还得看以上结果再修正

谢谢你的帮忙
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-3 20:25 | 显示全部楼层
本帖最后由 laomao9000 于 2019-7-3 22:06 编辑
fyi2000 发表于 2019-7-3 17:42
谢谢,你有进展,我也一直未放弃,而且我原先一直纠结于 "在线切换SPI/NAND",但现在慢慢有了顿悟,因为 ...

我这个NAND有问题,这些操作不具代表性啊,关键都走不下去,只要写nand,就报CRC错误。我的r3p已经装机,等我拆开TTL下。
+++++++++++++++++++++++++++++
1、SPI pbboot RAM加载nand uboot,加载后死机
PB-Boot # tftp 0x90000000 miwifi_r3p_uboot.bin

NetLoop,call eth_halt !

NetLoop,call eth_init !
Ralink GMAC initializing
TFTP from server 192.168.1.100; our IP address is 192.168.1.1
Filename 'miwifi_r3p_uboot.bin'.

TIMEOUT_COUNT=10,Load address: 0x90000000
Loading: Got ARP REQUEST, return our IP
Got ARP REPLY, set server/gtwy eth addr (00:d8:61:4e:49:10)
Got it
T
         ############################
done
Bytes transferred = 138608 (21d70 hex)
LoadAddr=90000000 NetBootFileXferSize=00021d70

PB-Boot # bootm 0x90000000
Booting image from 90000000 ...
   Image Name:   NAND Flash I
   Image Type:   MIPS Linux Standalone Program (uncompressed)
   Data Size:    138544 Bytes = 135.3 kB
   Load Address: a0200000
   Entry Point:  a0200000
   Verifying Checksum ... OK
OK
   Flushing cache from 0xa0200000 size 138544 ... OK
到这里就不动了,死机!看来pbboot再启动uboot不可行。
2、spi pbboot启动官版内核,U盘刷机
PandoraBox-Boot Version 2.1
Build:Feb 19 2019-07:42:15
SoC:MT7621AT
Memory-Testing...524288K OK
DRAM HighMem Reserved
MT7621:CPU clock set to 880Mhz
PCIe:reset controller
Software System Reset
PB-Boot running at 0x9BF94000!
PandoraBox MT7621/28 SPI Flash driver
SPI_CLK:31MHz  SPI_Mode:3Byte
Flash:W25Q128FV Size:16MB
Using internal default config
Board:MiWiFi3 Pro
PandoraBox GPIO subsystem init
PandoraBox MT762x GPIO driver initialized.
GPIO_Mode_REG: 0x0004D02C
PandoraBox LED subsystem init
LED [Power] registered
PandoraBox Button subsystem init
Button [Reset] registered
Enable USB#1 Power
MT7530 GSW initialized
MT7530 set LAN/WAN WLLLL                                                      0


PandoraBox-Boot Version 2.1
PB-Boot # tftp 0x90000000 kernel0.bin

NetLoop,call eth_halt !

NetLoop,call eth_init !
Ralink GMAC initializing
TFTP from server 192.168.1.100; our IP address is 192.168.1.1
Filename 'kernel0.bin'.

TIMEOUT_COUNT=10,Load address: 0x90000000
Loading: checksum bad
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REPLY, set server/gtwy eth addr (00:d8:61:4e:49:10)
Got it
T
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ########################################
done
Bytes transferred = 4194304 (400000 hex)
LoadAddr=90000000 NetBootFileXferSize=00400000
PB-Boot # bootm 0x90000000
Booting image from 90000000 ...
   Image Name:   MIPS OpenWrt Linux-3.10.14
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    3472911 Bytes =  3.3 MB
   Load Address: 82001000
   Entry Point:  82468670
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
   Flushing cache from 0x82001000 size 7502592 ... OK

LINUX started...

THIS IS ASIC

SDK 5.0.S.0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.10.14 (jenkins@a5fa907b31b0) (gcc version 4.8.5 (crosstool-NG crosstool-ng-1.22.0) ) #1 MiWiFi-R3P-2.16.15 SMP Mon Dec 17 02:48:24 UTC 2018
[    0.000000]
[    0.000000]  The CPU feqenuce set to 880 MHz
[    0.000000] GCMP present
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] Software DMA cache coherency
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 1c000000 @ 00000000 (usable)
[    0.000000]  memory: 04000000 @ 20000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x00000000-0x01ffffff]
[    0.000000]   Normal   [mem 0x02000000-0x1fffffff]
[    0.000000]   HighMem  [mem 0x20000000-0x23ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x1bffffff]
[    0.000000]   node   0: [mem 0x20000000-0x23ffffff]
[    0.000000] Detected 3 available secondary CPU(s)
[    0.000000] Primary instruction cache 32kB, 4-way, VIPT, 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 7 pages/cpu @82c1c000 s6912 r8192 d13568 u32768
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS1,115200n8 root=/dev/mtdblock5 console=ttyS0,115200 bootloader=pb-boot uart_en=1 telnet_en=1 factory_mode=0 usb_u3=1
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Writing ErrCtl register=00038000
[    0.000000] Readback ErrCtl register=00038000
[    0.000000] allocated 1179648 bytes of page_cgroup
[    0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[    0.000000] Memory: 510208k/458752k available (4559k kernel code, 14080k reserved, 1188k data, 1604k init, 65536k highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:128
[    0.000000] console [ttyS1] enabled
[    0.150000] Calibrating delay loop... 580.40 BogoMIPS (lpj=2902016)
[    0.210000] pid_max: default: 32768 minimum: 301
[    0.210000] Mount-cache hash table entries: 512
[    0.220000] Initializing cgroup subsys memory
[    0.220000] Initializing cgroup subsys net_cls
[    0.230000] launch: starting cpu1
[    0.230000] launch: cpu1 gone!
[    0.230000] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.230000] Primary instruction cache 32kB, 4-way, VIPT, linesize 32 bytes.
[    0.230000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.230000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.290000] Synchronize counters for CPU 1: done.
[    0.300000] launch: starting cpu2
[    0.300000] launch: cpu2 gone!
[    0.300000] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.300000] Primary instruction cache 32kB, 4-way, VIPT, linesize 32 bytes.
[    0.300000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.300000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.360000] Synchronize counters for CPU 2: done.
[    0.370000] launch: starting cpu3
[    0.370000] launch: cpu3 gone!
[    0.370000] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.370000] Primary instruction cache 32kB, 4-way, VIPT, linesize 32 bytes.
[    0.370000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.370000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.430000] Synchronize counters for CPU 3: done.
[    0.440000] Brought up 4 CPUs
[    0.440000] devtmpfs: initialized
[    0.450000] NET: Registered protocol family 16
[    0.750000] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.750000] PCIE PHY initialize
[    0.760000] ***** Xtal 40MHz *****
[    0.760000] start MT7621 PCIe register access
[    1.360000] RALINK_RSTCTRL = 7000000
[    1.360000] RALINK_CLKCFG1 = 77ffeff8
[    1.360000]
[    1.360000] *************** MT7621 PCIe RC mode *************
[    1.860000] PCIE2 no card, disable it(RST&CLK)
[    1.860000] pcie_link status = 0x3
[    1.870000] RALINK_RSTCTRL= 3000000
[    1.870000] *** Configure Device number setting of Virtual PCI-PCI bridge ***
[    1.880000] RALINK_PCI_PCICFG_ADDR = 21007f2 -> 21007f2
[    1.880000] PCIE0 enabled
[    1.880000] PCIE1 enabled
[    1.890000] interrupt enable status: 300000
[    1.890000] Port 1 N_FTS = 1b105000
[    1.890000] Port 0 N_FTS = 1b105000
[    1.900000] config reg done
[    1.900000] init_rt2880pci done
[    1.930000] bio: create slab <bio-0> at 0
[    1.940000] SCSI subsystem initialized
[    1.940000] usbcore: registered new interface driver usbfs
[    1.950000] usbcore: registered new interface driver hub
[    1.950000] usbcore: registered new device driver usb
[    1.960000] PCI host bridge to bus 0000:00
[    1.960000] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    1.970000] pci_bus 0000:00: root bus resource [io  0x1e160000-0x1e16ffff]
[    1.970000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.980000] pci 0000:00:00.0: BAR 0: can't assign mem (size 0x80000000)
[    1.980000] pci 0000:00:01.0: BAR 0: can't assign mem (size 0x80000000)
[    1.990000] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    1.990000] pci 0000:00:01.0: BAR 8: assigned [mem 0x60100000-0x601fffff]
[    2.000000] pci 0000:00:00.0: BAR 1: assigned [mem 0x60200000-0x6020ffff]
[    2.000000] pci 0000:00:01.0: BAR 1: assigned [mem 0x60210000-0x6021ffff]
[    2.010000] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    2.010000] pci 0000:00:00.0: PCI bridge to [bus 01]
[    2.020000] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    2.020000] pci 0000:02:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff 64bit]
[    2.030000] pci 0000:00:01.0: PCI bridge to [bus 02]
[    2.030000] pci 0000:00:01.0:   bridge window [mem 0x60100000-0x601fffff]
[    2.040000] BAR0 at slot 0 = 0
[    2.040000] bus=0x0, slot = 0x0
[    2.040000] res[0]->start = 0
[    2.040000] res[0]->end = 0
[    2.050000] res[1]->start = 60200000
[    2.050000] res[1]->end = 6020ffff
[    2.050000] res[2]->start = 0
[    2.050000] res[2]->end = 0
[    2.060000] res[3]->start = 0
[    2.060000] res[3]->end = 0
[    2.060000] res[4]->start = 0
[    2.060000] res[4]->end = 0
[    2.070000] res[5]->start = 0
[    2.070000] res[5]->end = 0
[    2.070000] BAR0 at slot 1 = 0
[    2.070000] bus=0x0, slot = 0x1
[    2.080000] res[0]->start = 0
[    2.080000] res[0]->end = 0
[    2.080000] res[1]->start = 60210000
[    2.080000] res[1]->end = 6021ffff
[    2.090000] res[2]->start = 0
[    2.090000] res[2]->end = 0
[    2.090000] res[3]->start = 0
[    2.090000] res[3]->end = 0
[    2.100000] res[4]->start = 0
[    2.100000] res[4]->end = 0
[    2.100000] res[5]->start = 0
[    2.100000] res[5]->end = 0
[    2.110000] bus=0x1, slot = 0x0, irq=0x4
[    2.110000] res[0]->start = 60000000
[    2.110000] res[0]->end = 600fffff
[    2.120000] res[1]->start = 0
[    2.120000] res[1]->end = 0
[    2.120000] res[2]->start = 0
[    2.120000] res[2]->end = 0
[    2.130000] res[3]->start = 0
[    2.130000] res[3]->end = 0
[    2.130000] res[4]->start = 0
[    2.130000] res[4]->end = 0
[    2.140000] res[5]->start = 0
[    2.140000] res[5]->end = 0
[    2.140000] bus=0x2, slot = 0x1, irq=0x18
[    2.140000] res[0]->start = 60100000
[    2.150000] res[0]->end = 601fffff
[    2.150000] res[1]->start = 0
[    2.150000] res[1]->end = 0
[    2.150000] res[2]->start = 0
[    2.160000] res[2]->end = 0
[    2.160000] res[3]->start = 0
[    2.160000] res[3]->end = 0
[    2.160000] res[4]->start = 0
[    2.170000] res[4]->end = 0
[    2.170000] res[5]->start = 0
[    2.170000] res[5]->end = 0
[    2.180000] cfg80211: Calling CRDA to update world regulatory domain
[    2.180000] Switching to clocksource MIPS
[    2.190000] NET: Registered protocol family 2
[    2.190000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    2.200000] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    2.210000] TCP: Hash tables configured (established 4096 bind 4096)
[    2.210000] TCP: reno registered
[    2.220000] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    2.220000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    2.230000] NET: Registered protocol family 1
[    3.310000] 4 CPUs re-calibrate udelay(lpj = 2924544)
[    3.320000] bounce pool size: 64 pages
[    3.340000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    3.350000] msgmni has been set to 868
[    3.350000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    3.360000] io scheduler noop registered (default)
[    3.370000] MIWIFI panic notifier registeredreg_int_mask=0, INT_MASK= 0
[    3.370000] HSDMA_init
[    3.380000]
[    3.380000]  hsdma_phy_tx_ring0 = 0x01c00000, hsdma_tx_ring0 = 0xa1c00000
[    3.390000]
[    3.390000]  hsdma_phy_rx_ring0 = 0x01c04000, hsdma_rx_ring0 = 0xa1c04000
[    3.390000] TX_CTX_IDX0 = 0
[    3.400000] TX_DTX_IDX0 = 0
[    3.400000] RX_CRX_IDX0 = 3ff
[    3.400000] RX_DRX_IDX0 = 0
[    3.410000] set_fe_HSDMA_glo_cfg
[    3.410000] HSDMA_GLO_CFG = 465
[    3.410000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    3.420000] serial8250: ttyS0 at MMIO 0x1e000d00 (irq = 27) is a 16550A
[    3.430000] serial8250: ttyS1 at MMIO 0x1e000c00 (irq = 26) is a 16550A
[    3.430000] led=10, on=4000, off=1, blinks,=1, reset=1, time=4000
[    3.440000] Ralink gpio driver initialized
[    3.440000] brd: module loaded
[    3.450000] flash manufacture id: ef, device id 40 18
[    3.450000] W25Q128BV(ef 40180000) (16384 Kbytes)
[    3.460000] mtd .name = raspi, .size = 0x01000000 (16M) .erasesize = 0x00010000 (64K) .numeraseregions = 0
[    3.470000] Creating 5 MTD partitions on "raspi":
[    3.470000] 0x000000000000-0x000001000000 : "ALL"
[    3.480000] 0x000000000000-0x000000030000 : "Bootloader"
[    3.490000] 0x000000030000-0x000000040000 : "Config"
[    3.490000] 0x000000040000-0x000000050000 : "Factory"
[    3.500000] 0x000000050000-0x000001000000 : "firmware"
[    3.510000] PPP generic driver version 2.4.2
[    3.510000] PPP BSD Compression module registered
[    3.520000] PPP Deflate Compression module registered
[    3.520000] PPP MPPE Compression module registered
[    3.530000] NET: Registered protocol family 24
[    3.530000] p p t p driver version 0.8.5
[    3.540000] ps: can't get major 253
[    3.540000] GMAC1_MAC_ADRH -- : 0x00007811
[    3.540000] GMAC1_MAC_ADRL -- : 0xdc05c24c
[    3.550000] Ralink APSoC Ethernet Driver Initilization. v3.1  1024 rx/tx descriptors allocated, mtu = 1500!
[    3.560000] GMAC1_MAC_ADRH -- : 0x00007811
[    3.560000] GMAC1_MAC_ADRL -- : 0xdc05c24c
[    3.570000] PROC INIT OK!
[    3.570000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.580000] ehci-pci: EHCI PCI platform driver
[    3.580000] ehci-platform: EHCI generic platform driver
[    3.590000] *****run project phy.
[    3.620000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.650000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.680000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.710000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.740000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.770000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.800000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.830000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.860000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.890000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.980000] FM_OUT value: u4FmOut = 0(0x00000000)
[    4.010000] FM_OUT value: u4FmOut = 0(0x00000000)
[    4.040000] FM_OUT value: u4FmOut = 0(0x00000000)
[    4.070000] FM_OUT value: u4FmOut = 0(0x00000000)
[    4.100000] FM_OUT value: u4FmOut = 0(0x00000000)
[    4.130000] FM_OUT value: u4FmOut = 0(0x00000000)
[    4.160000] FM_OUT value: u4FmOut = 0(0x00000000)
[    4.190000] FM_OUT value: u4FmOut = 0(0x00000000)
[    4.220000] FM_OUT value: u4FmOut = 0(0x00000000)
[    4.250000] FM_OUT value: u4FmOut = 0(0x00000000)
[    4.430000] xhci-hcd xhci-hcd: xHCI Host Controller
[    4.430000] xhci-hcd xhci-hcd: new USB bus registered, assigned bus number 1
[    4.440000] xhci-hcd xhci-hcd: irq 22, io mem 0x1e1c0000
[    4.450000] hub 1-0:1.0: USB hub found
[    4.450000] hub 1-0:1.0: 2 ports detected
[    4.450000] xhci-hcd xhci-hcd: xHCI Host Controller
[    4.460000] xhci-hcd xhci-hcd: new USB bus registered, assigned bus number 2
[    4.470000] hub 2-0:1.0: USB hub found
[    4.470000] hub 2-0:1.0: 1 port detected
[    4.480000] usbcore: registered new interface driver usb-storage
[    4.480000] softdog: Software Watchdog Timer: 0.08 initialized. soft_noboot=0 soft_margin=60 sec soft_panic=0 (nowayout=0)
[    4.490000] Netfilter messages via NETLINK v0.30.
[    4.500000] nfnl_acct: registering with nfnetlink.
[    4.500000] nf_conntrack version 0.5.0 (7972 buckets, 31888 max)
[    4.510000] ipip: IPv4 over IPv4 tunneling driver
[    4.520000] gre: GRE over IPv4 demultiplexor driver
[    4.520000] ip_tables: (C) 2000-2006 Netfilter Core Team
[    4.530000] Type=Restricted Cone
[    4.530000] TCP: cubic registered
[    4.530000] NET: Registered protocol family 10
[    4.540000] NET: Registered protocol family 17
[    4.550000] l2tp_core: L2TP core driver, V2.0
[    4.550000] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[    4.550000] l2tp_netlink: L2TP netlink interface
[    4.560000] 8021q: 802.1Q VLAN Support v1.8
[    4.570000] Could not find crash partition
[    4.570000] FLASH ID: [00 00 00 00 00]
[    4.570000] Unknown flash : [00 00 00 00 00]
[    4.580000] miqef:  usr otp read not available
[    4.580000] miqef: mtd otp probe fail
[    4.600000] Freeing unused kernel memory: 1604K (8259f000 - 82730000)
[    4.600000] csd: CSD deadlock debugging initiated!
[    4.650000] Loading essential drivers...
[    4.660000] Press Ctrl+C to enter RAMFS...
[    4.900000] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    4.920000] add_ep parameters, dev_speed 3, is_in 0, isTT 0, ep_type 2, maxp 512, interval 1, burst 0, mult 0, ep 0x9bf87580, ep_ctx 0xa1c0d060, sch_ep 0x9bf87c80
[    4.930000] add_ep parameters, dev_speed 3, is_in 1, isTT 0, ep_type 2, maxp 512, interval 1, burst 0, mult 0, ep 0x9bf875ac, ep_ctx 0xa1c0d080, sch_ep 0x9bf87f00
[    4.950000] usb-storage 1-1:1.0: USB Mass Storage device detected
[    4.950000] scsi0 : usb-storage 1-1:1.0
[    5.680000] Check for USB recovery...
[    5.690000] arch/mips/ralink/nvram.c 446: ERROR! Bad CRC 0, ignore values in flash.
[    5.700000] Found usb storage, wait for ready
[    5.960000] scsi 0:0:0:0: Direct-Access     General  UDisk            5.00 PQ: 0 ANSI: 2
[    5.970000] sd 0:0:0:0: [sda] 15728640 512-byte logical blocks: (8.05 GB/7.50 GiB)
[    5.970000] sd 0:0:0:0: [sda] Write Protect is off
[    5.980000] sd 0:0:0:0: [sda] No Caching mode page found
[    5.980000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    5.990000] sd 0:0:0:0: [sda] No Caching mode page found
[    6.000000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    6.000000]  sda:
[    6.010000] sd 0:0:0:0: [sda] No Caching mode page found
[    6.010000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    6.020000] sd 0:0:0:0: [sda] Attached SCSI removable disk
starting pid 369, tty '': '/etc/rcS'
[    6.760000] led=8, on=1, off=4000, blinks,=1, reset=1, time=1
[    6.770000] led=10, on=10, off=10, blinks,=1, reset=1, time=4000
[    6.780000] led=6, on=1, off=4000, blinks,=1, reset=1, time=1
[   16.820000] FAT-fs (sda): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
System recovery [   19.720000] Burning uImage.bin to kernel0 ...is in progress...
Could not open mtd device: kernel0
Can't open device for writin[   19.730000] led=8, on=1, off=4000, blinks,=1, reset=1, time=1
g!
[   19.740000] led=10, on=1, off=4000, blinks,=1, reset=1, time=1
[   19.750000] led=6, on=4000, off=1, blinks,=1, reset=1, time=1

到这里亮红灯,也死机了。这一步能启动官方内核,能进入,能找到U盘,并进入恢复,但提示无法写入,看日志是没有识别初NAND!难道nand只能在PBBOOT下识别?L大的绝技啊!

看来最好的方法还是在pbboot下面操作了:

我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-3 22:08 | 显示全部楼层
本帖最后由 laomao9000 于 2019-7-3 22:13 编辑

目前来看,是L大的PBBOOT能支持SPI启动,同时访问NAND。所以,简单的恢复方法因该是在pbboot下面操作了:

1/焊接好镁光nand和spi flash(提前刷入spi版pbboot),短接JP10,JP11,
2/接好TTL,网线,PC准备tftpd,准备好原厂固件备份,然后通电,从SPI启动
3/按4进入命令模式,进入恢复阶段。

提供有关pbboot下的有关恢复命令:
恢复nand整体备份
tftp 0x80200000 fullflash.bin;nand erase_write 0x80300000 0x100000 0xe000000
恢复uboot           
tftp 0x80200000 bootloader.bin ; nand erase_write 0x80200000 0x0 0x40000
恢复Factory,这里有出厂MAC地址,WIFI信号调教,关键!
tftp 0x80200000 Factory.bin; nand erase 0xc0000 0x040000;nand write 0x80200000 0xc0000 0x040000
恢复kernel0
tftp 0x80200000 kernel0.bin; nand erase 0x200000 0x0400000;nand write 0x80200000 0x200000 0x0400000
恢复kernel1
tftp 0x80200000 kernel1.bin; nand erase 0x600000 0x0400000;nand write 0x80200000 0x600000 0x0400000
恢复rootfs0
tftp 0x80200000 rootfs0.bin;nand erase 0xa00000 0x2800000;nand write 0x80200000 0xa00000 0x2800000
恢复rootfs1
tftp 0x80200000 rootfs1.bin;nand erase 0x3200000 0x2800000;nand write 0x80200000 0x3200000 0x2800000


其他分区地址
[    3.840000] Creating 13 MTDpartitions on "MT7621-NAND":
[    3.850000]0x000000000000-0x00000ff80000 : "ALL"
[    3.850000]0x000000000000-0x000000040000 : "Bootloader"
[    3.860000]0x000000040000-0x000000080000 : "Config"
[    3.870000] 0x000000080000-0x0000000c0000: "Bdata"
[    3.870000]0x0000000c0000-0x000000100000 : "Factory"
[    3.880000]0x000000100000-0x000000140000 : "crash"
[    3.890000]0x000000140000-0x0000001c0000 : "crash_syslog"
[    3.890000]0x0000001c0000-0x000000200000 : "reserved0"
[    3.900000]0x000000200000-0x000000600000 : "kernel0"
[    3.910000]0x000000600000-0x000000a00000 : "kernel1"
[    3.910000]0x000000a00000-0x000003200000 : "rootfs0"
[    3.920000]0x000003200000-0x000005a00000 : "rootfs1"
[    3.920000]0x000005a00000-0x00000ff80000 : "overlay


我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-4 10:04 | 显示全部楼层
laomao9000 发表于 2019-7-3 20:25
我这个NAND有问题,这些操作不具代表性啊,关键都走不下去,只要写nand,就报CRC错误。我的r3p已经装机, ...
  1. [    3.450000] flash manufacture id: ef, device id 40 18
  2. [    3.450000] W25Q128BV(ef 40180000) (16384 Kbytes)
  3. [    3.460000] mtd .name = raspi, .size = 0x01000000 (16M) .erasesize = 0x00010000 (64K) .numeraseregions = 0
复制代码
这个结果确实有问题,但是在此之前少了两个操作,第一并未切换JP10/JP11,第二无法顺利执行官方u-boot,这个结果我也知道可能会发生,所以才会提醒你如果官方u-boot启动不成,那麽在执行官方uboot之前得断开JP10/JP11,请问这一步很困难吗?你有加装开关吗?能否请你再试一次?如果第一关都过不了,那麽接下来的实验也就没有意义,如果证明在线切换都无法让官方u-boot顺利执行,那麽我才会真正放弃

谢谢
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-5 08:35 | 显示全部楼层
fyi2000 发表于 2019-7-4 10:04
这个结果确实有问题,但是在此之前少了两个操作,第一并未切换JP10/JP11,第二无法顺利执行官方u-boot, ...

短接JP10,JP11,影响的是CPU初始化时的逻辑,不是启动后的,更不是kernel状态的。实测也证明了这点,刚才在spi pbboot加载uboot后,开放JP10,JP11,并不能让uboot运行起来,TTL输出和短接时完全一样的。
所以,要恢复NAND,只有两个途径:
1、pbboot下恢复,可以是SPI启动,也可以是NAND启动。
2、uboot下恢复,只能是NAND启动。

我们需要了解PBBOOT能同时访问NAND和spi的机制,了解了这个,上面这些测试就不必要了。
手头没有MTK的开发手册,无法做进一步探索。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-5 08:50 | 显示全部楼层
fyi2000 发表于 2019-7-4 10:04
这个结果确实有问题,但是在此之前少了两个操作,第一并未切换JP10/JP11,第二无法顺利执行官方u-boot, ...

补充一句,就像你前面说的,在不断开CS信号的情况下,不存在“在线切换”,这个两个芯片始终在线。

JP10接的是TXD0(就是TTL接口),JP11接的是GPIO0,不能影响两个芯片的选择。

只是PBBoot知晓如何访问两个芯片,而又不造成干扰的方法。

我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-7-8 17:55 | 显示全部楼层
zyguowei 发表于 2018-12-4 11:33
链接:https://pan.baidu.com/s/1vfM89IsHQ8kNNkoyXNkpOQ
提取码刮刮卡:6x6x

挂掉了,可以再更新下吗
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-7-8 20:22 | 显示全部楼层
dbwing520 发表于 2019-7-8 17:55
挂掉了,可以再更新下吗

   
去5楼 看..
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-8-2 08:33 | 显示全部楼层
都是高手,厉害厉害!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-8-6 16:11 | 显示全部楼层
zyguowei 发表于 2018-12-5 02:28
原汁原味的原机编程器固件....

请问,原汁原味的编程器固件  怎么备份来的
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-8-20 14:42 | 显示全部楼层
laomao9000 发表于 2019-7-1 21:50
某宝淘来的,不好说啊。坏块太讨厌,无法进行了。尝试了刷入官方kernel,以便U盘恢复,不成功,刷入kerne ...

我也碰到和你同样的问题,我的解决方法是换一片全新的闪存,没上过机也没上过编程器的哪种。
你输入nand init的时候会出现以下提示。多了个 write factory BBT * 4,这个BBT意思是bad block table
PB-Boot # nand init
NAND: S34ML01G100TF 128MiB
write factory BBT * 4

我也不知道是什么原因,我的闪存都是新的,只要用过的闪存就不行,哪怕就上一次编程器都不行。
估计是ECC的问题。
产生的坏块在编程器上可以擦除掉,我不停的擦除、焊接、重刷。搞了好几次都不行。
最后直接焊个全新的搞定。
目前我的R3G已经成功更换了S34ML01G200TF100的闪存!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-3-29 19:32

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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

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