找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 8284|回复: 10

dw33d使用nand启动的方法,及一些qca9558(9557)各种(nor、ram、nand)版本的uboot

[复制链接]
发表于 2020-7-11 13:13 | 显示全部楼层 |阅读模式
本帖最后由 jiuweiljp 于 2020-7-14 08:58 编辑



1、spi nor版本u-boot
注:没有基础的朋友,请自行在论坛上查找刷写方法,如果没有特别要求最好不要随意更换自己的Uboot。
自己编译的版本,找了一些资料就是没有找到让这个uboot支持内存256MB,这个版本只支持128MB内存。




2、ram版本u-boot
这个版本大家随意使用没有危险,载入地址0x81000000
(1)在u-boot中使用
        tftp 0x81000000 dw33d_u-boot_ram.bin
        go 0x81000000
(2)在breed中使用
        wget 0x81000000 http://192.168.1.x/dw33d_u-boot_ram.bin    (x为你电脑的ip)
        mem crc32 0x81000000 0x31078  (我也不知道为什么breed中使用ram版的uboot为什么需要校验下,如果不校验有较大概率死机)
        boot raw 0x81000000





3、nand版本的u-boot
可以将dw33d的nor flash的第10脚与第16脚短接后上电,就能进入nand启动模式。

  1. ============启动界面,按esc 可以中断========
  2. __________________sri____________________
  3. 944x BootROM Ver. (asic) 1.0 [Nov  8 2011 13:42:57]
  4. _________________________________________
  5. find_hif: bootstrap = 0x31e58
  6. Nand Flash init
  7. otp_get_nand_table: 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
  8. ONFI: Control Setting = 0xb44
  9. hdr: [0xbd004000 : 0xbd004000 : 0x2000 : 0x39fbdb14]
  10. nand_load_fw: read 4 pages
  11. nand_load_fw: 0x10000 0x800 0xbd0047f0
  12. nand_load_fw: 0x20000 0x800 0xbd004ff0
  13. nand_load_fw: 0x30000 0x800 0xbd0057f0
  14. f/w 0 read complete, jumping to 0xbd004000
  15. initialize PLL & DDR

  16. sri
  17. Scorpion 1.0
  18. ath_ddr_initial_config(322): (32bit) ddr2 init
  19. ... done
  20. *** Warning *** : PCIe WLAN Module not found !!!
  21. *** Warning *** : PCIe WLAN Module not found !!!
  22. ... done
  23. fw1: Nand Init
  24. hdr:[0xbd004000 : 0xbd004000 : 0x2000 : 0x39fbdb14]
  25. nand_boot:skip 4 pages
  26. hdr:[0xa0100000 : 0xa0100000 : 0x81000 : 0x5c7a069a]
  27. nand_boot:read 258 pages
  28. f/w 1 read complete, jumping to 0xa0100000


  29. U-Boot 2016.01-00030-g2fa4604 (Aug 18 2016 - 17:23:32 +0300)

  30. =========================================
  31. Caraboot v3.1 (QCA9557, NAND) U-Boot
  32. http://www.8devices.com/
  33. -----------------------------------------
  34. DRAM:  128 MiB
  35. NAND:  128 MiB
  36. *** Warning - bad CRC, using default environment

  37. Net:   eth0, eth1
  38. Hit <ESC> key to stop autoboot:  0
复制代码

  1. ==============u-boot中的命令比nor中的多了不少====================
  2. ath>help
  3. ?       - alias for 'help'
  4. base    - print or set address offset
  5. bdinfo  - print Board Info structure
  6. boot    - boot default, i.e., run 'bootcmd'
  7. bootd   - boot default, i.e., run 'bootcmd'
  8. bootm   - boot application image from memory
  9. bootp   - boot image via network using BOOTP/TFTP protocol
  10. chpart  - change active partition
  11. cmp     - memory compare
  12. coninfo - print console devices and information
  13. cp      - memory copy
  14. crc32   - checksum calculation
  15. dhcp    - boot image via network using DHCP/TFTP protocol
  16. dumpmii - MII utility commands
  17. echo    - echo args to console
  18. editenv - edit environment variable
  19. env     - environment handling commands
  20. erase   - erase FLASH memory
  21. exit    - exit script
  22. ext4load- load binary file from a Ext4 filesystem
  23. ext4ls  - list files in a directory (default /)
  24. ext4size- determine a file's size
  25. false   - do nothing, unsuccessfully
  26. fatinfo - print information about filesystem
  27. fatload - load binary file from a dos filesystem
  28. fatls   - list files in a directory (default /)
  29. fatsize - determine a file's size
  30. flinfo  - print FLASH memory information
  31. go      - start application at address 'addr'
  32. help    - print command description/usage
  33. iminfo  - print header information for application image
  34. imxtract- extract a part of a multi-image
  35. itest   - return true/false on integer compare
  36. loadb   - load binary file over serial line (kermit mode)
  37. loads   - load S-Record file over serial line
  38. loadx   - load binary file over serial line (xmodem mode)
  39. loady   - load binary file over serial line (ymodem mode)
  40. loop    - infinite loop on address range
  41. md      - memory display
  42. mdio    - MDIO utility commands
  43. mii     - MII utility commands
  44. mm      - memory modify (auto-incrementing address)
  45. mtdparts- define flash/nand partitions
  46. mtest   - simple RAM read/write test
  47. mw      - memory write (fill)
  48. nand    - NAND sub-system
  49. nboot   - boot from NAND device
  50. nfs     - boot image via network using NFS protocol
  51. nm      - memory modify (constant address)
  52. pci     - list and access PCI Configuration Space
  53. ping    - send ICMP ECHO_REQUEST to network host
  54. printenv- print environment variables
  55. protect - enable or disable FLASH write protection
  56. reset   - Perform RESET of the CPU
  57. run     - run commands in an environment variable
  58. saveenv - save environment variables to persistent storage
  59. setenv  - set environment variables
  60. setexpr - set environment variable as the result of eval expression
  61. showvar - print local hushshell variables
  62. sleep   - delay execution for some time
  63. source  - run script from memory
  64. test    - minimal test like /bin/sh
  65. tftpboot- boot image via network using TFTP protocol
  66. tftpput - TFTP put command, for uploading files to a server
  67. true    - do nothing, successfully
  68. ubi     - ubi commands
  69. ubifsload- load file from an UBIFS filesystem
  70. ubifsls - list files in a directory
  71. ubifsmount- mount UBIFS volume
  72. ubifsumount- unmount UBIFS volume
  73. usb     - USB sub-system
  74. usb_boot_file- usb_boot_file - Automatic boot/recovery from file in USB drive

  75. usbboot - boot from USB device
  76. version - print monitor, compiler and linker version
  77. ath>
复制代码
注:竟然还支持USB启动,ubi也在这个版本中支持了


  1. ath> help nand
  2. nand - NAND sub-system

  3. Usage:
  4. nand info - show available NAND devices
  5. nand device [dev] - show or set current device
  6. nand read - addr off|partition size
  7. nand write - addr off|partition size
  8.     read/write 'size' bytes starting at offset 'off'
  9.     to/from memory address 'addr', skipping bad blocks.
  10. nand read.raw - addr off|partition [count]
  11. nand write.raw - addr off|partition [count]
  12.     Use read.raw/write.raw to avoid ECC and access the flash as-is.
  13. nand erase[.spread] [clean] off size - erase 'size' bytes from offset 'off'
  14.     With '.spread', erase enough for given file size, otherwise,
  15.     'size' includes skipped bad blocks.
  16. nand erase.part [clean] partition - erase entire mtd partition'
  17. nand erase.chip [clean] - erase entire chip'
  18. nand bad - show bad blocks
  19. nand dump[.oob] off - dump page
  20. nand scrub [-y] off size | scrub.part partition | scrub.chip
  21.     really clean NAND erasing bad blocks (UNSAFE)
  22. nand markbad off [...] - mark bad block(s) at offset (UNSAFE)
  23. nand biterr off - make a bit error at offset (UNSAFE)
复制代码
对nand的命令也支持多了不少,有兴趣自己研究吧!
  1. ath> help usb
  2. usb - USB sub-system

  3. Usage:
  4. usb start - start (scan) USB controller
  5. usb reset - reset (rescan) USB controller
  6. usb stop [f] - stop USB [f]=force stop
  7. usb tree - show USB device tree
  8. usb info [dev] - show available USB devices
  9. usb test [dev] [port] [mode] - set USB 2.0 test mode
  10.     (specify port 0 to indicate the device's upstream port)
  11.     Available modes: J, K, S[E0_NAK], P[acket], F[orce_Enable]
  12. usb storage - show details of USB storage devices
  13. usb dev [dev] - show or set current USB storage device
  14. usb part [dev] - print partition table of one or all USB storage    devices
  15. usb read addr blk# cnt - read `cnt' blocks starting at block `blk#'
  16.     to memory address `addr'
  17. usb write addr blk# cnt - write `cnt' blocks starting at block `blk#'
  18.     from memory address `addr'

  19. ath> help usbboot
  20. usbboot - boot from USB device

  21. Usage:
  22. usbboot loadAddr dev:part

  23. ath> help usb_boot_file
  24. usb_boot_file - usb_boot_file - Automatic boot/recovery from file in USB drive

  25. Usage:
  26. usb_boot_file  
复制代码



刷写这个nand固件也很简单在openwrt中使用
  1. mtd erase /dev/mtd7
  2. nandwrite -a -m /dev/mtd7 文件名
复制代码








本帖子中包含更多资源

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

×
我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2020-7-11 13:46 | 显示全部楼层
usb 的这个有点意思
  1. ath> usb start
  2. starting USB...
  3. USB0:   USB EHCI 1.00
  4. scanning bus 0 for devices... 2 USB Device(s) found
  5. USB1:   USB EHCI 1.00
  6. scanning bus 1 for devices... 2 USB Device(s) found
  7.        scanning usb for storage devices... 2 Storage Device(s) found

  8. ath> usb tree
  9. USB device tree:
  10.   1  Hub (480 Mb/s, 0mA)
  11.   |  u-boot EHCI Host Controller
  12.   |
  13.   +-2  Mass Storage (480 Mb/s, 500mA)
  14.         USB Storage 000000000903
  15.      
  16.   3  Hub (480 Mb/s, 0mA)
  17.   |  u-boot EHCI Host Controller
  18.   |
  19.   +-4  Mass Storage (480 Mb/s, 300mA)
  20.        SMI Corporation USB DISK AA00000000007254
  21.      
  22. ath> usb storage
  23.   Device 0: Vendor: Generic  Rev: 0903 Prod: STORAGE DEVICE  
  24.             Type: Removable Hard Disk
  25.             Capacity: 15193.5 MB = 14.8 GB (31116288 x 512)
  26.   Device 1: Vendor: SMI      Rev: 1100 Prod: USB DISK        
  27.             Type: Removable Hard Disk
  28.             Capacity: 7728.0 MB = 7.5 GB (15826944 x 512)
复制代码




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

使用道具 举报

发表于 2020-11-11 20:32 | 显示全部楼层
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-4-16 19:09 | 显示全部楼层
研究了好几天,也没能搞懂怎么刷NAND版本的Uboot

不知道是不是我理解有误,我想把NAND版的uboot刷到NAND里面从而启动  即使在不装SPI flash的情况下也能启动,从而可以两个FLASH救砖,楼主可以教教我怎么刷NAND版的uboot到NAND flash启动吗?

点评

我没有试过将nor flash拆下来从nand flash启动,在openwrt 中刷写nand flash时nand flash的0x0地址一般挂在/dev/mtd7 上,注意写之前先清除一遍。  详情 回复 发表于 2021-4-18 20:17
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2021-4-18 20:17 | 显示全部楼层
本帖最后由 jiuweiljp 于 2021-4-18 20:29 编辑
佩戴的剑穗 发表于 2021-4-16 19:09
研究了好几天,也没能搞懂怎么刷NAND版本的Uboot

不知道是不是我理解有误,我想把NAND版的uboot刷到NAND ...

我没有试过将nor flash拆下来从nand flash启动bootload。在用nor flash启动openwrt 后,刷写nand flash时,nand flash的0x0地址一般挂在/dev/mtd7 上(有可能不同你自己注意下),注意写之前先清一遍。刷写完后断电将nor flash的10和16脚短接然后通电就ok了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-8-2 02:02 | 显示全部楼层
MX25L25635FMI-10G
W971GG6SB-25 *2
AR8033-AL1A  
AR8035-A     
QCA9557   
QCA9882
MSC5535  *2
5003L1   *2

请问大神这配置可以搞吗?直接暴力上编程器?本人小白

点评

你这配置很特别, 1、在atheros上使用32MB flash很少见。但至少能驱动16MB 2、8033 8035 我没记错的话,都是千兆的网络芯片,这个能驱动的固件不多,你这个设备应该是AP吧,感觉带POE模块 3、其余的就没有特殊的9  详情 回复 发表于 2021-8-2 08:06
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2021-8-2 08:06 | 显示全部楼层
chenlsln 发表于 2021-8-2 02:02
MX25L25635FMI-10G
W971GG6SB-25 *2
AR8033-AL1A  

你这配置很特别,
1、在atheros上使用32MB flash很少见。但至少能驱动16MB
2、8033 8035 我没记错的话,都是千兆的网络芯片,这个能驱动的固件不多,你这个设备应该是AP吧,感觉带POE模块
3、其余的就没有特殊的9557(mips架构cpu+2.4g),9882 (5g)

另外你可以试试本帖ram版本bootload的,其它别测试(80%会砖)。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2023-11-3 19:49 | 显示全部楼层
感谢大佬的辛苦付出,手里有个ap,方案与大麦dw33d一致,但板子上不带nand,你的uboot编程器刷入后无法启动。所以想学习一下编译适合我的uboot,能否指点一下,谢谢。

点评

breed 也有大麦的uboot,https://breed.hackpascal.net/  详情 回复 发表于 2023-11-4 10:21
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2023-11-4 10:21 | 显示全部楼层
本帖最后由 jiuweiljp 于 2023-11-4 10:34 编辑
xxzzcc 发表于 2023-11-3 19:49
感谢大佬的辛苦付出,手里有个ap,方案与大麦dw33d一致,但板子上不带nand,你的uboot编程器刷入后无法启动 ...

不知道你说的无法启动是指的无法引导固件,还是连bootload都启动不了。

breed 也有大麦的bootload,https://breed.hackpascal.net/    (这个是nor spi flash用的)


如果能连接到板子上的 ttl 接口
   1、看看原始bootload的启动信息是否能正常显示;
   2、刷入 breed 的bootload 看看启动信息是否也是正常的;

另外uboot只是一个引导器,作用有点像计算机的bios,要使用ap还是要找到合适的固件(操作系统)。


点评

感谢你的回复,我描述的不清楚给你添麻烦了。 情况是这样 刷写spi nor版本u-boot启动跑码如图网卡获取不到ip,手动设置IP提示未知网络,且ping不通并无法访问web。 [attachimg]653541[/attachimg] 刷写dw33d_u-bo  详情 回复 发表于 2023-11-4 20:44
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2023-11-4 20:44 | 显示全部楼层
本帖最后由 xxzzcc 于 2023-11-4 20:52 编辑
jiuweiljp 发表于 2023-11-4 10:21
不知道你说的无法启动是指的无法引导固件,还是连bootload都启动不了。

breed 也有大麦的bootload,https ...

感谢你的回复,我描述的不清楚给你添麻烦了。
情况是这样
刷写spi nor版本u-boot启动跑码如图网卡获取不到ip,手动设置IP提示未知网络,且ping不通并无法访问web。


刷写dw33d_u-boot_ram与qca9558_nand_128_u-boot 不跑码网卡不通。
刷写dw33d-breed跑码如图并提示未知网络



硬件是:QCA9557+QCA9882+AR8033+AR8035


本帖子中包含更多资源

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

×

点评

1、第一个图乱码,可能串口的波特率对不对; 2、dw33d_u-boot_ram这个文件不是刷到flash芯片中用的,原贴没有说清楚。 qca9558_nand_128_u-boot这个是刷进nand的flash中用的,nor flash 不能用。 3、你的第二张  详情 回复 发表于 2023-11-6 10:26
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2023-11-6 10:26 | 显示全部楼层
本帖最后由 jiuweiljp 于 2023-11-6 13:43 编辑
xxzzcc 发表于 2023-11-4 20:44
感谢你的回复,我描述的不清楚给你添麻烦了。
情况是这样
刷写spi nor版本u-boot启动跑码如图网卡获取不到 ...

1、第一个图乱码,可能串口的波特率对不对;
2、dw33d_u-boot_ram这个文件不是刷到flash芯片中用的,原贴没有说清楚。
     qca9558_nand_128_u-boot这个是刷进nand的flash中用的,nor flash 不能用。
3、你的第二张图怎么nor flash才2MByte?是识别错误还是其他,另外你的usb网卡好像只支持100/10 MB,你换到主板的网卡(1000MB、100MB、10MB)这3个速率都试一下(见下图),看截图breed已经驱动了你的网卡(好像breed默认ip是192.168.1.1,并且支持DHCP正常情况下电脑网卡可以自动获得ip地址),另外可以换个
路由器网口试试。
  
4、给你一个网站参考
https://www.superwrt.com/tools/





本帖子中包含更多资源

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

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-24 14:42

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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

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