天嵌i.MX6UL开发平台sd卡自动烧写方法

[复制链接]
 楼主| Margaple 发表于 2018-8-7 17:28 | 显示全部楼层 |阅读模式
本帖最后由 Margaple 于 2018-8-7 17:33 编辑

  sd卡烧写分为自动烧写与手动烧写:
  自动烧写
  在做好的启动卡内复制相关镜像后,接到板子上,系统会根据镜像自动更新nand里的镜像。烧写过程无须人工干预,适合量产时使用。
  手动烧写
  在sd卡复制镜像后,启动板子,进入菜单选择要更新的镜像,自定义程度较自动烧写高。
  tf卡脱机自动烧写
  自动烧写要先制作tf启动卡,具体方法可以参考《制作sd启动卡》章节。
  准备镜像
  光盘的烧写镜像在:TQIMX6UL_COREB_CD/出厂烧录镜像合集/Linux 镜像/,使用sd卡脱机烧写时,拷贝到tf卡中的镜像需要修改为默认名称,以下是使用的默认名称。

镜像内容
默认镜像名称
Bootloader镜像
u-boot.imx
内核镜像
zImage
Dtb镜像
tq-imx6ul.dtb
文件系镜像
rootfs.ubifs

  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串口的配置。
  $ ls /media/qingleqq/DF15-3F7C/
  $ cp u-boot_tqimx6ul_v1.0.imx zImage_tqimx6ul_v1.0 tq-imx6ul_net0_uart.dtb rootfs_tqimx6ul.ubifs
  /media/qingleqq/DF15-3F7C/.
  将镜像名修改为默认名称,步骤略。
  $ ls /media/qingleqq/DF15-3F7C/*
  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 **.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.embedsky
  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.embedsky.com
  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.       embedsky.com
  48.   reading tq-imx6ul.dtb
  49.   35384 bytes read in 20 ms (1.7 MiB/s)
  50.   NAND write: device 0 offset 0x1400000, size 0x8a38
  51.   35384 bytes written: OK
  52.   reading rootfs.ubifs
  53.   86851584 bytes read in 7372 ms (11.2 MiB/s)
  54.   NAND erase.part: device 0 offset 0x1600000, size 0xea00000
  55.   Skipping bad block at 0x06c40000
  56.   Skipping bad block at 0x06c80000
  57.   Erasing at 0xffe0000 -- 100% complete.
  58.   OK
  59.   ubi0: attaching mtd1
  60.   ubi0: scanning is finished
  61.   ubi0: empty MTD device detected
  62.   ubi0: attached mtd1 (name "mtd=5", size 234 MiB)
  63.   ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
  64.   ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
  65.   ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
  66.   ubi0: good PEBs: 1870, bad PEBs: 2, corrupted PEBs: 0
  67.   ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128
  68.   ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number:
  69.   0
  70.   ubi0: available PEBs: 1828, total reserved PEBs: 42, PEBs reserved for bad PEB
  71.   handling: 38
  72.   No size specified -> Using max size (232112128)
  73.   Creating dynamic volume rootfs of size 232112128
  74.   86851584 bytes written to volume rootfs
  75.   use nandboot
  76.   NAND read: device 0 offset 0xa00000, size 0xa00000
  77.   10485760 bytes read: OK
  78.   NAND read: device 0 offset 0x1400000, size 0x200000
  79.   2097152 bytes read: OK
  80.   Kernel image [url=home.php?mod=space&uid=72445]@[/url] 0x80800000 [ 0x000000 - 0x5b7630 ]
  81.   ## Flattened Device Tree blob at 83000000
  82.   Booting using the fdt blob at 0x83000000
  83.   Using Device Tree in place at 83000000, end 8300ba37
  84.   Modify /soc/aips-bus@02000000/bee@02044000:status disabled
  85.   ft_system_setup for mx6
  86.   Starting kernel ...
  87.   Booting Linux on physical CPU 0x0
  88.   Linux version 4.1.15-ga2a1e0e-dirty (qingleqq@z-work) (gcc version 5.3.1
  89.   20160412 (Linaro GCC 5.3-2016.05) ) #24 SMP PREEMPT Thu Feb 23 11:09:49 CST 2017
  90.   CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
  91.   CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
  92.   Machine model: Freescale i.MX6 UltraLite 14x14 EVK Board
  93.   Reserved memory: created CMA memory pool at 0x8c000000, size 320 MiB
  94.   Reserved memory: initialized node linux,cma, compatible id shared-dma-pool
  95.   Memory policy: Data cache writealloc
  96.   PERCPU: Embedded 12 pages/cpu @8bb32000 s16960 r8192 d24000 u49152
  97.   Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
  98.   Kernel command line: console=ttySAC0,115200 panel=TN92 root=ubi0:rootfs
  99.   rootfstype=ubifs ubi.mtd=5
  100.   mtdparts=gpmi-nand:4m(u-boot),2m(u-boot-env),4m(**),10m(kernel),2m(dtb),-(
  101.   rootfs) rootwait rw
  102.   PID hash table entries: 2048 (order: 1, 8192 bytes)
  103.   Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
  104.   Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
  105.   Memory: 178956K/524288K available (8350K kernel code, 387K rwdata, 2780K rodata,
  106.   324K init, 442K bss, 17652K reserved, 327680K cma-reserved, 0K highmem)
  107.   Virtual kernel memory layout:

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

本版积分规则

99

主题

105

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部

99

主题

105

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部