|
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串口的配置。
- $ 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。
找到文件就读取并烧写,如果文件不存在就略过。
以下是自动烧写全镜像的打印。
- U-Boot 2016.03-gd294d2c-dirty (Feb 24 2017 - 09:08:25 +0800)
- CPU: Freescale i.MX6UL rev1.1 528 MHz (running at 396 MHz)
- CPU: Industrial temperature grade (-40C to 105C) at 38C
- Reset cause: POR
- Board: MX6UL 14x14 EVK
- I2C: ready
- DRAM: 512 MiB
- NAND: 1024 MiB
- MMC: FSL_SDHC: 0, FSL_SDHC: 1
- *** Warning - bad CRC, using default environment
- Display: TN92 (800x480)
- Video: 800x480x24
- Error: no valid bmp image at 85800000
- In: serial
- Out: serial
- Err: serial
- Net: FEC0
- Normal Boot
- Hit any key to stop autoboot: 0
- reading u-boot.imx
- 613376 bytes read in 67 ms (8.7 MiB/s)
- nand erase.part u-boot;
- NAND erase.part: device 0 offset 0x0, size 0x400000
- Erasing at 0x3e0000 -- 100% complete.
- OK
- filesize = 95c00
- nand write.e 807ffc00 0x100000 96000
- NAND write: device 0 offset 0x100000, size 0x96000
- 614400 bytes written: OK
- reading logo.bmp
- 131638 bytes read in 28 ms (4.5 MiB/s)
- NAND erase.part: device 0 offset 0x600000, size 0x400000
- Erasing at 0x9e0000 -- 100% complete.
- OK
- NAND write: device 0 offset 0x600000, size 0x20236
- 131638 bytes written: OK
- reading zImage
- 5994032 bytes read in 522 ms (11 MiB/s)
- NAND erase.part: device 0 offset 0xa00000, size 0xa00000
- Erasing at 0x13e0000 -- 100% complete.
- OK
- NAND write: device 0 offset 0xa00000, size 0x5b7630
- 5994032 bytes written: OK
- NAND erase.part: device 0 offset 0x1400000, size 0x200000
- Erasing at 0x15e0000 -- 100% complete.
- OK
- reading tq-imx6ul.dtb
- 35384 bytes read in 20 ms (1.7 MiB/s)
- NAND write: device 0 offset 0x1400000, size 0x8a38
- 35384 bytes written: OK
- reading rootfs.ubifs
- 86851584 bytes read in 7372 ms (11.2 MiB/s)
- NAND erase.part: device 0 offset 0x1600000, size 0xea00000
- Skipping bad block at 0x06c40000
- Skipping bad block at 0x06c80000
- Erasing at 0xffe0000 -- 100% complete.
- OK
- ubi0: attaching mtd1
- ubi0: scanning is finished
- ubi0: empty MTD device detected
- ubi0: attached mtd1 (name "mtd=5", size 234 MiB)
- ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
- ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
- ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
- ubi0: good PEBs: 1870, bad PEBs: 2, corrupted PEBs: 0
- ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128
- ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number:
- 0
- ubi0: available PEBs: 1828, total reserved PEBs: 42, PEBs reserved for bad PEB
- handling: 38
- No size specified -> Using max size (232112128)
- Creating dynamic volume rootfs of size 232112128
- 86851584 bytes written to volume rootfs
- use nandboot
- NAND read: device 0 offset 0xa00000, size 0xa00000
- 10485760 bytes read: OK
- NAND read: device 0 offset 0x1400000, size 0x200000
- 2097152 bytes read: OK
- Kernel image @ 0x80800000 [ 0x000000 - 0x5b7630 ]
- ## Flattened Device Tree blob at 83000000
- Booting using the fdt blob at 0x83000000
- Using Device Tree in place at 83000000, end 8300ba37
- Modify /soc/aips-bus@02000000/bee@02044000:status disabled
- ft_system_setup for mx6
- Starting kernel ...
- Booting Linux on physical CPU 0x0
- Linux version 4.1.15-ga2a1e0e-dirty (qingleqq@z-work) (gcc version 5.3.1
- 20160412 (Linaro GCC 5.3-2016.05) ) #24 SMP PREEMPT Thu Feb 23 11:09:49 CST 2017
- CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
- CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
- Machine model: Freescale i.MX6 UltraLite 14x14 EVK Board
- Reserved memory: created CMA memory pool at 0x8c000000, size 320 MiB
- Reserved memory: initialized node linux,cma, compatible id shared-dma-pool
- Memory policy: Data cache writealloc
- PERCPU: Embedded 12 pages/cpu @8bb32000 s16960 r8192 d24000 u49152
- Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
- Kernel command line: console=ttySAC0,115200 panel=TN92 root=ubi0:rootfs
- rootfstype=ubifs ubi.mtd=5
- mtdparts=gpmi-nand:4m(u-boot),2m(u-boot-env),4m(logo),10m(kernel),2m(dtb),-(
- rootfs) rootwait rw
- PID hash table entries: 2048 (order: 1, 8192 bytes)
- Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
- Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
- Memory: 178956K/524288K available (8350K kernel code, 387K rwdata, 2780K rodata,
- 324K init, 442K bss, 17652K reserved, 327680K cma-reserved, 0K highmem)
- Virtual kernel memory layout:
复制代码
|
|