扫一扫,手机浏览Englishwiki

微博微信020-38373101

开发板资讯

CONTACT US

联系方式

020-38373101

地址:广州市番禺区大石街南大公路鸿图工业园厂房A1402(地铁站点:广州地铁3号线大石地铁A/B出口)

sales@embedsky.net

产品新闻您的位置:首页 >开发板资讯>产品新闻

TQIMX6UL开发板手动烧写
日期:2017-12-21

      如果无法从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 #####
[SDCARD MODE]
###################################
[1] Download u-boot.bin to Nand Flash
[2] Download Logo image(logo.bin) to Nand Flash
[3] Download Linux Kernel (zImage.bin) to Nand Flash
[4] Download Device tree blob(*.dtb)
[5] Download UBIFS image (root.ubifs) to Nand Flash
[6] Download YAFFS image (root.yaffs2) to Nand Flash
[7] Download Program to SDRAM and Run it
[8] Boot the system
[9] Format the Nand Flash
[0] Set the boot parameters
[n] Enter TFTP download mode menu
[r] Restart u-boot
[t] Test kernel Image (zImage)
[q] Return console
[x] read uboot to sdcard
Please press a key to continue :

接下来是烧写对应的镜像。镜像的烧写顺序可随意,要烧写什么镜像也可以安实际需要来决定。 


(2)u-boot烧写

按1烧写uboot 镜像:

[q] Return console
[x] 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 #####
[SDCARD MODE]
###################################


(3)Logo烧写

按2烧写logo文件,注意logo为8位色深的bmp图片,分辨率与屏分辨率一样。
##### TQ-IMX6UL U-boot MENU #####
[SDCARD MODE]
###################################
[1] Download u-boot.bin to Nand Flash
[2] Download Logo image(logo.bin) to Nand Flash
[3] Download Linux Kernel (zImage.bin) to Nand Flash
[4] Download Device tree blob(*.dtb)
....
[q] Return console
[x] 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 #####
[SDCARD MODE]
###################################
[1] Download u-boot.bin to Nand Flash


(4)内核烧写

按3烧写内核

##### TQ-IMX6UL U-boot MENU #####
[SDCARD MODE]
###################################
[1] Download u-boot.bin to Nand Flash
[2] Download Logo image(logo.bin) to Nand Flash
[3] Download Linux Kernel (zImage.bin) to Nand Flash
[4] Download Device tree blob(*.dtb)
......
[x] 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 #####
[SDCARD MODE]
###################################


(5) dtb 烧写

按4烧写dtb文件

##### TQ-IMX6UL U-boot MENU #####
[SDCARD MODE]
###################################
[1] Download u-boot.bin to Nand Flash
[2] Download Logo image(logo.bin) to Nand Flash
[3] Download Linux Kernel (zImage.bin) to Nand Flash
[4] Download Device tree blob(*.dtb)
......
[x] 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 #####
[SDCARD MODE]
###################################


(6)文件系统烧写

按5烧写ubi文件系统,当前只支持ubi文件系统。

[t] Test kernel Image (zImage)
[q] Return console
[x] 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 #####
[SDCARD MODE]
###################################

到此各部分的烧写已经完成。


(7) 启动测试

按8启动系统,测试是否烧写成功:

[7] Download Program to SDRAM and Run it
[8] Boot the system
[9] Format the Nand Flash
[0] Set the boot parameters
[n] Enter TFTP download mode menu
[r] Restart u-boot
[t] Test kernel Image (zImage)
[q] Return console
[x] 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 [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: failed to allocate memory for node 'linux,cma'
Memory policy: Data cache writealloc
.....
技术支持 天嵌科技