linux+sd制作升级卡,TQIMX6UL在Linux平台下制作SD启动卡

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

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

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

2、使用usb烧写。

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

以下是详细的制作步骤:

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

a4c26d1e5885305701be709a3d33442f.png

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

a4c26d1e5885305701be709a3d33442f.png

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

接着制作启动卡:

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

$tar jxvf tqimx6ul-tools.tar.bz2

a4c26d1e5885305701be709a3d33442f.png

注: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即可.

阅读更多:http://www.embedsky.com/index.php?g=home&m=news&a=show&id=67

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值