天嵌科技 ARM开发社区

 找回密码
 注册
查看: 3949|回复: 1

TQi.MX6UL开发平台:sd卡自动烧写

[复制链接]
freewing 发表于 2021-8-20 09:44:06 | 显示全部楼层 |阅读模式
sd卡烧写分为自动烧写与手动烧写:

自动烧写
在做好的启动卡内复制相关镜像后,接到板子上,系统会根据镜像自动更新nand里的镜像。烧写过程无须人工干预,适合量产时使用。

手动烧写
在sd卡复制镜像后,启动板子。进入菜单选择要更新的镜像。自定义程度较自动烧写高。

tf卡脱机自动烧写
自动烧写要先制作tf启动卡,具体方法可以参考《制作sd启动卡》章节。

准备镜像
光盘的烧写镜像在:TQIMX6UL_COREB_CD/出厂烧录镜像合集/Linux镜像/
使用sd卡脱机烧写时,拷贝到tf卡中的镜像需要修改为默认名称,以下是使用的默认名称。

1.将做好的tf卡(启动卡)插到电脑上。
2.将要烧写的镜像复制tf卡里的第一个分区(vfat格式)里的根目录下。
注:tq-imx6ul_net0_uart.dtb和tq-imx6ul_net0_net1.dtb根据实际要求二选一。
tq-imx6ul_net0_uart.dtb为双网卡+6串口的配置,tq-imx6ul_net0_uart.dtb为单网卡+8串口的配置。
  1. $ ls /media/qingleqq/DF15-3F7C/

  2. $ cp u-boot_tqimx6ul_v1.0.imx zImage_tqimx6ul_v1.0 tq-imx6ul_net0_uart.dtb rootfs_tqimx6ul.ubifs

  3. /media/qingleqq/DF15-3F7C/.
复制代码
将镜像名修改为默认名称
  1. $ ls /media/qingleqq/DF15-3F7C/*
  2. tq-imx6ul.dtb rootfs.ubifs u-boot.imx zImage
复制代码
/media/qingleqq/DF15-3F7C/为笔者sd卡挂载目录,只作参考,以实际为准。
如果有不想更新的镜像,可以不复制。如:只想更新内核,则可只复制内核镜像。

烧写

将tf卡插到板子上,上电,系统会自动烧写。烧写完成后系统会自动启动。
将第一个分区默认成fat模式,并分别查找u-boot.imx、tq-imx6ul.dtb、zImage、rootfs.ubifs。
找到文件就读取并烧写,如果文件不存在就略过。
以下是自动烧写全镜像的打印。
  1. U-Boot 2016.03-gd294d2c-dirty (Feb 24 2017 - 09:08:25 +0800)
  2. CPU: Freescale i.MX6UL rev1.1 528 MHz (running at 396 MHz)
  3. CPU: Industrial temperature grade (-40C to 105C) at 38C
  4. Reset cause: POR
  5. Board: MX6UL 14x14 EVK
  6. I2C: ready
  7. DRAM: 512 MiB
  8. NAND: 1024 MiB
  9. MMC: FSL_SDHC: 0, FSL_SDHC: 1
  10. *** Warning - bad CRC, using default environment
  11. Display: TN92 (800x480)
  12. Video: 800x480x24
  13. Error: no valid bmp image at 85800000
  14. In: serial
  15. Out: serial
  16. Err: serial
  17. Net: FEC0
  18. Normal Boot
  19. Hit any key to stop autoboot: 0
  20. reading u-boot.imx
  21. 613376 bytes read in 67 ms (8.7 MiB/s)
  22. nand erase.part u-boot;
  23. NAND erase.part: device 0 offset 0x0, size 0x400000
  24. Erasing at 0x3e0000 -- 100% complete.
  25. OK
  26. filesize = 95c00
  27. nand write.e 807ffc00 0x100000 96000
  28. NAND write: device 0 offset 0x100000, size 0x96000
  29. 614400 bytes written: OK
  30. reading logo.bmp
  31. 131638 bytes read in 28 ms (4.5 MiB/s)
  32. NAND erase.part: device 0 offset 0x600000, size 0x400000
  33. Erasing at 0x9e0000 -- 100% complete.
  34. OK
  35. NAND write: device 0 offset 0x600000, size 0x20236
  36. 131638 bytes written: OK
  37. reading zImage
  38. 5994032 bytes read in 522 ms (11 MiB/s)
  39. NAND erase.part: device 0 offset 0xa00000, size 0xa00000
  40. Erasing at 0x13e0000 -- 100% complete.
  41. OK
  42. NAND write: device 0 offset 0xa00000, size 0x5b7630
  43. 5994032 bytes written: OK
  44. NAND erase.part: device 0 offset 0x1400000, size 0x200000
  45. Erasing at 0x15e0000 -- 100% complete.
  46. OK
  47. reading tq-imx6ul.dtb
  48. 35384 bytes read in 20 ms (1.7 MiB/s)
  49. NAND write: device 0 offset 0x1400000, size 0x8a38
  50. 35384 bytes written: OK
  51. reading rootfs.ubifs
  52. 86851584 bytes read in 7372 ms (11.2 MiB/s)
  53. NAND erase.part: device 0 offset 0x1600000, size 0xea00000
  54. Skipping bad block at 0x06c40000
  55. Skipping bad block at 0x06c80000
  56. Erasing at 0xffe0000 -- 100% complete.
  57. OK
  58. ubi0: attaching mtd1
  59. ubi0: scanning is finished
  60. ubi0: empty MTD device detected
  61. ubi0: attached mtd1 (name "mtd=5", size 234 MiB)
  62. ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
  63. ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
  64. ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
  65. ubi0: good PEBs: 1870, bad PEBs: 2, corrupted PEBs: 0
  66. ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128
  67. ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number:
  68. 0
  69. ubi0: available PEBs: 1828, total reserved PEBs: 42, PEBs reserved for bad PEB
  70. handling: 38
  71. No size specified -> Using max size (232112128)
  72. Creating dynamic volume rootfs of size 232112128
  73. 86851584 bytes written to volume rootfs
  74. use nandboot
  75. NAND read: device 0 offset 0xa00000, size 0xa00000
  76. 10485760 bytes read: OK
  77. NAND read: device 0 offset 0x1400000, size 0x200000
  78. 2097152 bytes read: OK
  79. Kernel image @ 0x80800000 [ 0x000000 - 0x5b7630 ]
  80. ## Flattened Device Tree blob at 83000000
  81. Booting using the fdt blob at 0x83000000
  82. Using Device Tree in place at 83000000, end 8300ba37
  83. Modify /soc/aips-bus@02000000/bee@02044000:status disabled
  84. ft_system_setup for mx6
  85. Starting kernel ...
  86. Booting Linux on physical CPU 0x0
  87. Linux version 4.1.15-ga2a1e0e-dirty (qingleqq@z-work) (gcc version 5.3.1
  88. 20160412 (Linaro GCC 5.3-2016.05) ) #24 SMP PREEMPT Thu Feb 23 11:09:49 CST 2017
  89. CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
  90. CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
  91. Machine model: Freescale i.MX6 UltraLite 14x14 EVK Board
  92. Reserved memory: created CMA memory pool at 0x8c000000, size 320 MiB
  93. Reserved memory: initialized node linux,cma, compatible id shared-dma-pool
  94. Memory policy: Data cache writealloc
  95. PERCPU: Embedded 12 pages/cpu @8bb32000 s16960 r8192 d24000 u49152
  96. Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
  97. Kernel command line: console=ttySAC0,115200 panel=TN92 root=ubi0:rootfs
  98. rootfstype=ubifs ubi.mtd=5
  99. mtdparts=gpmi-nand:4m(u-boot),2m(u-boot-env),4m(logo),10m(kernel),2m(dtb),-(
  100. rootfs) rootwait rw
  101. PID hash table entries: 2048 (order: 1, 8192 bytes)
  102. Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
  103. Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
  104. Memory: 178956K/524288K available (8350K kernel code, 387K rwdata, 2780K rodata,
  105. 324K init, 442K bss, 17652K reserved, 327680K cma-reserved, 0K highmem)
  106. Virtual kernel memory layout:
复制代码




qingtianxiayi 发表于 2021-10-12 12:14:42 | 显示全部楼层
SD卡烧写 优秀good
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌科技 嵌入式开发社区 ( 粤ICP备11094220号 )

GMT+8, 2023-2-5 16:39 , Processed in 1.031256 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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