扫一扫,手机浏览English  wiki  真伪

微博微信020-38373101

开发板资讯

CONTACT US

联系方式

020-38373101

地址:广州市番禺区大石街道石北工业路728号8栋3楼301

sales@embedsky.net

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

TQIMX6UL在Linux平台下制作SD启动卡
日期:2017-11-01

启动卡可以在linux 平台制作也可以在window 平台制作。linux 平台制作的tf除了烧写还可以用作内核挂载文件系统的介质(内核挂载tf 卡里的ext4 文件系统)。

不是所有的烧写都要做sd 启动卡,在以下情况下任一种情况都不需要制作SD 启动卡:

1、系统拔码打到nand 启动时,可以正常启动并进入uboot 菜单。

2、使用usb 烧写。

当使用SD 卡或者tftp 烧写且无法从nand 启动时需要做sd 启动卡帮助重新烧写系统。

以下是详细的制作步骤:

1. 打开disks 软件(如果ubuntu 是中文的是“磁盘实用工具”)

disks 软件 “磁盘实用工具”


2. 插入读卡器,在disks 工具中查看sd 卡的设备名


在disks 工具中查看sd 卡的设备名

可以看到红色标出处就是TF 卡的设备名(/dev/sdc)。设备名会根据当前系统块设备个数不同而不同,按实际情况而定,笔者电脑为/dev/sdc

接着制作启动卡:

1. 解压启动卡制作工具:

$tar jxvf tqimx6ul-tools.tar.bz2

tqimx6ul-tools

注:tqimx6ul-tools.tar.bz2 在不同版本中内容可能会有不同。图片仅供参考。

2. 执行制卡脚本

执行命令,此命令会格式化tf 卡,请做好备份。

$ sudo ./create_sdcard.sh -a/dev/sd[a-z] 

使用上命令制作完成后tf 卡会被分成2 个区,第一个是vfat 格式,第二个分区是ext4 格式,

两个分区里面都没有内容。由于要重新分区与格式化,花费时间与卡大小有关。

[9:44:13]..X6UL/TQ_COREB/tqimx6ul-tools> sudo ./create_sdcard.sh -a /dev/sdc
total :           7452MB
kernle_rom_sizeb: 512MB
rootfs_rom_sizeb: 6940MB

umount: /dev/sdc2: not mounted
umount: /dev/sdc1: not mounted
1+0 records in
1+0 records out
1024 bytes (1.0 kB, 1.0 KiB) copied,0.00286325 s, 358 kB/s

Welcome to fdisk (util-linux2.27.1).
Changes will remain in memory only,until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x924c6329.

Command (m for help): Partition type 
 p primary (0 primary, 0 extended, 4free)
 e extended (container for logical partitions)

Select (default p): Partition number(1-4, default 1): First sector (2048-15261695,default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-15261695, default 15261695):
Created a new partition 1 of type'Linux' and of size 512 MiB.

Command (m for help): Partition type 
 p primary (1 primary, 0 extended, 3 free)
 e extended (container for logical partitions)
Select (default p): Partition number(2-4, default 2): First sector (1050624-15261695, default 1050624):Last sector, +sectors or +size{K,M,G,T,P} (1050624-15261695, default15261695): 
Created a new partition 2 of type'Linux' and of size 6.8 GiB.

Command (m for help): The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

formating android images
mkfs.fat 3.0.28 (2015-05-16)
mke2fs 1.42.13 (17-May-2015)
/dev/sdc2 contains a ext4 file system
 last mounted on Fri Feb 24 09:44:43 2017
Proceed anyway? (y,n) y
Creating filesystem with 1776384 4k blocks and 444400 inodes
Filesystem UUID:6dbed6ef-1446-467e-9177-b88771df8ca8
Superblock backups stored on blocks:
 32768, 98304, 163840, 229376,294912, 819200, 884736, 1605632
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks):done
Writing superblocks and filesystem accounting information: done
flashing images...
16+0 records in
16+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied,0.0451527 s, 181 kB/s
1198+0 records in
1198+0 records out
613376 bytes (613 kB, 599 KiB)copied, 0.783226 s, 783 kB/s


注:

1. 在不同版本,不同的卡,不同的操作系统中显示内容可能会有不同。上述打印仅供参考。

2. 如果是之前有做过的启动卡再次制作,会有提示已经是是否要重新格式化,y 即可.


技术支持 天嵌科技