Chinaunix首页 | 论坛 | 博客
  • 博客访问: 209581
  • 博文数量: 93
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 978
  • 用 户 组: 普通用户
  • 注册时间: 2014-11-10 15:46
个人简介

青春无悔

文章分类

全部博文(93)

文章存档

2015年(16)

2014年(77)

我的朋友

分类: LINUX

2014-11-10 17:17:18

ROM的扫描顺序为:UART3-->SD card-->Nand Flash
在UART3时,可以使用Transfer --> XMODEM --> Send (1K mode)
分别传MLO.Byteswap和u-boot.img即可以在RAM运行
运行u-boot成功后,就要重新烧写MLO.Byteswap和u-boot.img两个文件到flash了。

1.SPI Flash大小
2M Bytes(0x00 000 ~ 0x1F FFFF)

[    1.386505] 0x000000000000-0x000000020000 : "SPL"
[    1.392761] 0x000000020000-0x00000007f000 : "U-Boot"
[    1.406433] 0x00000007f000-0x000000080000 : "U-Boot Env"

2.u-boot对SPI的操作有
sf - SPI flash sub-system

Usage:
sf probe [[bus:]cs] [hz] [mode] - init flash device on given SPI bus
                                  and chip select
sf read addr offset len         - read `len' bytes starting at
                                  `offset' to memory at `addr'
sf write addr offset len        - write `len' bytes from memory
                                  at `addr' to flash at `offset'
sf erase offset [+]len          - erase `len' bytes from `offset'
                                  `+len' round up `len' to block size
sf update addr offset len       - erase and write `len' bytes from memory
                                  at `addr' to flash at `offset'

3.通过SD卡启动,进入U-boot
U-Boot# sf probe 0
SF: Detected GD25Q16 with page size 4 KiB, total 2 MiB

U-Boot# sf erase 0 +200000

//sdcard=======================
U-Boot# mmc rescan

U-Boot# fatload mmc 0 ${loadaddr} MLO.byteswap
reading MLO.byteswap
101117 bytes read in 18 ms (5.4 MiB/s)

U-Boot# sf write ${loadaddr} 0 0x20000

U-Boot# fatload mmc 0 ${loadaddr} u-boot.img
reading u-boot.img
364768 bytes read in 45 ms (7.7 MiB/s)

U-Boot# sf write ${loadaddr} 0x20000 0x60000


* 0x00000 - 0x20000  : First copy of SPL
* 0x20000 - 0xE0000  : U-Boot
* 0xE0000 - 0x100000 : U-Boot Environment
* 0x100000 - 0x200000: Reserved
U-Boot# sf probe 0
SF: Detected GD25Q16 with page size 4 KiB, total 2 MiB
U-Boot# loady
## Ready for binary (ymodem) download to 0x80200000 at 115200 bps...
CCCCCCC
开始 ymodem 传输。  按 Ctrl+C 取消。
  100%      98 KB    5 KB/s 00:00:18       0 Errors

xyzModem - CRC mode, 792(SOH)/0(STX)/0(CAN) packets, 9 retries
## Total Size      = 0x00018afd = 101117 Bytes
U-Boot# sf erase 0 +200000
U-Boot# sf write 0x80200000 0 0x20000
U-Boot# loady
## Ready for binary (ymodem) download to 0x80200000 at 115200 bps...
CCCC
开始 ymodem 传输。  按 Ctrl+C 取消。
  100%     355 KB    6 KB/s 00:00:54       0 Errors

xyzModem - CRC mode, 2849(SOH)/0(STX)/0(CAN) packets, 6 retries
## Total Size      = 0x00058f40 = 364352 Bytes
U-Boot# sf erase 0x20000 0xc0000
U-Boot# sf write 0x80200000 0x20000 0xc0000




阅读(1113) | 评论(0) | 转发(0) |
0

上一篇:触摸屏stlib-master移植

下一篇:qt4.8.3移植

给主人留下些什么吧!~~