embedsky 发表于 2018-3-13 11:19:50

TQIMX6UL开发板手动烧写

本帖最后由 embedsky 于 2018-3-13 11:25 编辑

      如果无法从nand启动,在sd卡烧写前要先制作sd启动卡,具体方法可以参考在Linux平台下和Windows平台下制作SD启动卡,如果nand可以启动可以直接从nand启动。      光盘的烧写镜像在:TQIMX6UL_COREB_CD/出厂烧录镜像合集/Linux 镜像/tqimx6ul_v1.0;烧写镜像的名称可以在uboot 中设置的。如未设置将使用以下默认名称。
镜像内容默认镜像名称
Bootloader镜像u-boot.imx
内核镜像zImage
Dtb镜像tq-imx6ul.dtb
文件系镜像rootfs.ubifs
1. 准备一张tf卡,将第一个分区格式化成fat格式。2. 将烧写的镜像复制tf卡里的第一个分区里(vfat格式)。$ ls /media/qingleqq/DF15-3F7C/
$ cp u-boot.imx zImage tq-imx6ul.dtb rootfs.ubifs /media/qingleqq/DF15-3F7C/.
$ ls /media/qingleqq/DF15-3F7C/
$ ls /media/qingleqq/DF15-3F7C/*
tq-imx6ul.dtb rootfs.ubifs u-boot.imx zImage/media/qingleqq/DF15-3F7C/为笔者sd卡挂载目录,只作参考,以实际为准。
烧写(1) 进入下载菜单1. 如不能从nand 启动,将拔码打到sd 卡启动。插上已经做好的tf 启动卡。否则拔码打到 nand 启动。2. 接上串口,上电;在以下倒数完成之前按任意键。......
Normal Boot
Hit any key to stop autoboot: 1 #这里是1 秒
......按任意键中断自动启动,进入命令行菜单Out: serial
Err: serial
Net: FEC0
Normal Boot
Hit any key to stop autoboot: 0
##### TQ-IMX6UL U-boot MENU #####

###################################
Download u-boot.bin to Nand Flash
Download Logo image(logo.bin) to Nand Flash
Download Linux Kernel (zImage.bin) to Nand Flash
Download Device tree blob(*.dtb)
Download UBIFS image (root.ubifs) to Nand Flash
Download YAFFS image (root.yaffs2) to Nand Flash
Download Program to SDRAM and Run it
Boot the system
Format the Nand Flash
Set the boot parameters
Enter TFTP download mode menu
Restart u-boot
Test kernel Image (zImage)
Return console
read uboot to sdcard
Please press a key to continue :接下来是烧写对应的镜像。镜像的烧写顺序可随意,要烧写什么镜像也可以安实际需要来决定。
(2)u-boot烧写按1烧写uboot 镜像:
Return console
read uboot to sdcard
Please press a key to continue :1
reading u-boot.imx
613376 bytes read in 66 ms (8.9 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
##### TQ-IMX6UL U-boot MENU #####

###################################
(3)Logo烧写##### TQ-IMX6UL U-boot MENU #####

###################################
Download u-boot.bin to Nand Flash
Download Logo image(logo.bin) to Nand Flash
Download Linux Kernel (zImage.bin) to Nand Flash
Download Device tree blob(*.dtb)
....
Return console
read uboot to sdcard
Please press a key to continue :2
reading logo.bmp
385076 bytes read in 49 ms (7.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 0x5e034
385076 bytes written: OK
##### TQ-IMX6UL U-boot MENU #####

###################################
Download u-boot.bin to Nand Flash
(4)内核烧写按3烧写内核##### TQ-IMX6UL U-boot MENU #####

###################################
Download u-boot.bin to Nand Flash
Download Logo image(logo.bin) to Nand Flash
Download Linux Kernel (zImage.bin) to Nand Flash
Download Device tree blob(*.dtb)
......
read uboot to sdcard
Please press a key to continue :3
reading zImage
6049496 bytes read in 310 ms (18.6 MiB/s)
NAND erase.part: device 0 offset 0xa00000, size 0xa00000
Erasing at 0x13e0000 -- 100% complete.
OK
NAND write: device 0 offset 0xa00000, size 0x5c4ed8
6049496 bytes written: OK
##### TQ-IMX6UL U-boot MENU #####

###################################
(5) dtb 烧写按4烧写dtb文件##### TQ-IMX6UL U-boot MENU #####

###################################
Download u-boot.bin to Nand Flash
Download Logo image(logo.bin) to Nand Flash
Download Linux Kernel (zImage.bin) to Nand Flash
Download Device tree blob(*.dtb)
......
read uboot to sdcard
Please press a key to continue :4
NAND erase.part: device 0 offset 0x1400000, size 0x200000
Erasing at 0x15e0000 -- 100% complete.
OK
reading tq-imx6ul.dtb
36834 bytes read in 20 ms (1.8 MiB/s)
NAND write: device 0 offset 0x1400000, size 0x8fe2
36834 bytes written: OK
##### TQ-IMX6UL U-boot MENU #####

###################################
(6)文件系统烧写按5烧写ubi文件系统,当前只支持ubi文件系统。 Test kernel Image (zImage)
Return console
read uboot to sdcard
Please press a key to continue :5
reading rootfs.ubifs
35680256 bytes read in 1747 ms (19.5 MiB/s)
NAND erase.part: device 0 offset 0x1600000, size 0xea00000
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: 1872, bad PEBs: 0, 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: 44, PEBs reserved for bad PEB
handling: 40
No size specified -> Using max size (232112128)
Creating dynamic volume rootfs of size 232112128
35680256 bytes written to volume rootfs
##### TQ-IMX6UL U-boot MENU #####

###################################
到此各部分的烧写已经完成。
(7) 启动测试按8启动系统,测试是否烧写成功: Download Program to SDRAM and Run it
Boot the system
Format the Nand Flash
Set the boot parameters
Enter TFTP download mode menu
Restart u-boot
Test kernel Image (zImage)
Return console
read uboot to sdcard
Please press a key to continue :8
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 - 0x5c4ed8 ]
## Flattened Device Tree blob at 83000000
Booting using the fdt blob at 0x83000000
Using Device Tree in place at 83000000, end 8300bfe1
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-gcb8ab66-dirty (qingleqq@z-work) (gcc version 5.2.0 (GCC) )
#262 SMP PREEMPT Fri Jan 6 13:33:47 CST 2017
CPU: ARMv7 Processor 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: failed to allocate memory for node 'linux,cma'
Memory policy: Data cache writealloc
.....http://www.embedsky.com/index.php?g=home&m=news&a=show&id=86
页: [1]
查看完整版本: TQIMX6UL开发板手动烧写