谷动谷力

 找回密码
 立即注册
谷动谷力 首页 嵌入式 查看内容

Uboot 命令TFTP下载RT-Smart系统镜像并烧写到emmc

2022-5-6 23:30| 发布者: 鸣涧| 查看: 84| 评论: 4|原作者: 鸣涧

摘要: Uboot 命令TFTP 下载RT-Smart系统镜像并烧写到emmc 上回说到Windows下通过 UbootTFTP 方式下载和启动rt-smart 内核, 其实只是通过TFTP下载rt-smart 内核到内存,启动开发板,并不是下载到emmc(ROM),怎么烧写emm ...
Uboot 命令TFTP 下载RT-Smart系统镜像并烧写到emmc



上回说到Windows下通过 Uboot  TFTP 方式下载和启动rt-smart 内核, 其实只是通过TFTP下载rt-smart 内核到内存,启动开发板,并不是下载到emmc(ROM),怎么烧写emmc呢? 下面讲解


准备

  •     设置TFTP服务
  •     设置开板板IP
  •     设置服务器TFTP

请到上回Windows下通过 Uboot  TFTP 方式下载和启动rt-smart 内核

下载系统镜像
  1. => tftp emmc.img
  2. Using ethernet@02188000 device
  3. TFTP from server 192.168.0.26; our IP address is 192.168.0.100
  4. Filename 'emmc.img'.
  5. Load address: 0x80800000
  6. Loading: #################################################################
  7.          #################################################################
  8.          .......
  9.          ####################
  10.          1.6 MiB/s
  11. done
  12. Bytes transferred = 69207040 (4200400 hex)
复制代码

提示下载启始地址0x80800000,大小69207040Bytes /512Bytes/blk = 135170 转换为16进制 0x21002

写入emmmc

按上面计算写emmc命令为mmc write 0x80800000 0 21002
  1. => mmc write 0x80800000 0 21002

  2. MMC write: dev # 1, block # 0, count 135170 ... 135170 blocks written: OK
复制代码

注:从内存地址0x80800000开始 写到emmc0blk开始写 135170(x21002) blks(块) 

0?wx_fmt=png.jpg


 

设置uboot环境变量并保存:

  1. setenv bootcmd "fatload mmc 1:1 0x80001000 /kernel/rtthread.bin; dcache flush; go 0x80001000"
  2. saveenv
复制代码


RT-Smart系统命令:
  1. boot
复制代码


执行结果:

  1. => setenv bootcmd "fatload mmc 1:1 0x80001000 /kernel/rtthread.bin; dcache flush; go 0x80001000"
  2. => saveenv
  3. Saving Environment to MMC...
  4. Writing to MMC(1)... done
  5. => boot
  6. reading /kernel/rtthread.bin
  7. 1182208 bytes read in 52 ms (21.7 MiB/s)
  8. ## Starting application at 0x80001000 ...

  9. \ | /
  10. - RT -     Thread Smart Operating System
  11. / | \     5.0.0 build Dec 23 2021
  12. 2006 - 2020 Copyright by rt-thread team
  13. lwIP-2.1.2 initialized!
  14. [15] E/drv.enet: emac device init success

  15. [20] I/I2C: I2C bus [i2c3] registered
  16. [24] I/I2C: I2C bus [i2c4] registered
  17. [83] E/drv.enet:
  18. PHY Link down, please check the cable connection and link partner setting.

  19. [117] I/SDIO: emmc card capacity 3817472 KB.
  20. found part[0], begin: 2098176, size: 128.0MB
  21. found part[1], begin: 136315904, size: 128.0MB
  22. [154] I/touch: rt_touch init success
  23. [158] I/gt911: touch device gt911 init success
  24. [163] I/sal.skt: Socket Abstraction Layer initialize success.
  25. emmc file system initialization done!
  26. Dir / sd0 mount failed!
  27. [1634] E/[RW007]: The wifi Stage 1 status 0 0 0 1
  28. [1641] I/WLAN.dev: wlan init success
  29. [1646] I/WLAN.lwip: eth device init ok name:w0
  30. [1646] I/WLAN.dev: wlan init success
  31. [1656] I/WLAN.lwip: eth device init ok name:w1

  32. rw007  sn: [rw00700000000fc584a2c4d43]
  33. rw007 ver: [RW007_2.1.0-a7a0d089-57]

  34. [5232] D/drv.enet: enet1 link up

  35. [5667] W/WLAN.mgnt: F:rt_wlan_connect L:1091 not find ap! ssid:rt-thread
  36. hello rt-smart!
  37. /sd/wifi.sh wi-fi configuration file not exist in sd card!
  38. [5674] I/mcf.link.tcp: TCPServer Waiting for client on port 5555...

  39. [5692] I/mcf.link: MCF link port(3) register successfully.
  40. msh />[5722] I/mcf.trans: MCF(V0.1.0) initialized successfully.
  41. [5722] I/urpc: uRPC(V0.1.0) initialize successfully.
  42. [5722] I/mcf.trans: MCF protocol started successfully.


  43. 内核成功启动,试试命令,
  44. msh />
  45. msh />ls
  46. Directory /:
  47. kernel              <DIR>
  48. root                <DIR>
  49. sd                  <DIR>
  50. msh />
  51. RT-Thread shell commands:
  52. reboot           - reboot system
  53. cpu_usage        - display cpu usage
  54. dbg              - dbg
  55. memcheck         - check memory data
  56. memtrace         - dump memory trace information
  57. gic_dump         - show gic status
  58. list_page        - show page info
  59. list_fd          - list file descriptor
  60. lsof             - list open files
  61. mount            - mount<device><mountpoint><fstype>
  62. unmount          - unmount the mountpoint
  63. hello            - say hello world
  64. clear            - clear the terminal screen
  65. version          - show RT-Thread version information
  66. list_thread      - list thread
  67. list_sem         - list semaphore in system
  68. list_event       - list event in system
  69. list_mutex       - list mutex in system
  70. list_mailbox     - list mail box in system
  71. list_msgqueue    - list message queue in system
  72. list_memheap     - list memory heap in system
  73. list_mempool     - list memory pool in system
  74. list_timer       - list timer in system
  75. list_device      - list device in system
  76. list             - list all symbol in system
  77. help             - RT-Thread shell help.
  78. ps               - List threads in the system.
  79. free             - Show the memory usage in the system.
  80. ls               - List information about the FILEs.
  81. cp               - Copy SOURCE to DEST.
  82. mv               - Rename SOURCE to DEST.
  83. cat              - Concatenate FILE(s)
  84. rm               - Remove(unlink) the FILE(s).
  85. cd               - Change the shell working directory.
  86. pwd              - Print the name of the current working directory.
  87. mkdir            - Create the DIRECTORY.
  88. mkfs             - format disk with file system
  89. df               - disk free
  90. echo             - echo string to file
  91. set              - set or show environment variable
  92. list_channel     - list IPC channel information
  93. list_process     - list process
  94. kill             - send a signal to a process
  95. killall          - kill processes by name
  96. list_shm         - show share memory info
  97. sys_log          - sys_log 1(enable)/0(disable)
  98. ifconfig         - list the information of all network interfaces
  99. ping             - ping network host
  100. dns              - list and set the information of dns
  101. netstat          - list the information of TCP / IP
  102. pwm_enable       - pwm_enable pwm1 1
  103. pwm_disable      - pwm_disable pwm1 1
  104. pwm_set          - pwm_set pwm1 1 100 50
  105. date             - get date and time or set [year month day hour min sec]
  106. wifi             - wifi command.

  107. msh />

复制代码

nice成功了

0?wx_fmt=png.jpg

鲜花

握手

雷人

路过

鸡蛋

相关阅读

发表评论

最新评论

鸣涧 2022-5-10 21:33
设置uboot启动延时
  1. setenv bootdelay 0
复制代码
fannifu 2022-5-12 21:16
本帖最后由 fannifu 于 2022-5-12 23:45 编辑

dhcp 下截 emmc.img 烧录
  1. dhcp 0x80800000 192.168.0.38:emmc.img
复制代码
fannifu 2022-5-12 23:46
烧录
  1. mmc write 0x80800000 0 41AA
复制代码
fannifu 2022-5-12 23:58
烧写uboot
  1. mmc write 0x80800000 1 3fe
复制代码

查看全部评论(4)

最新热点

QQ|Archiver|手机版|深圳市光明谷科技有限公司|光明谷商城|Sunshine Silicon Corpporation ( 粤ICP备14060730号|Sitemap

GMT+8, 2024-9-30 23:14 , Processed in 0.155941 second(s), 37 queries .

Powered by Discuz! X3.2 Licensed

© 2001-2013 Comsenz Inc.

返回顶部