相关的文档:

在windows PC中制作

首先用

http://ftp.phytec.cn/tools/SD_CardFormatter0500SetupEN.exe

将sd卡格式化。

然后用

http://ftp.phytec.cn/tools/win32diskimager-1.0.0-install.exe

来将 .sdcard 文件写入sd卡,此时取消挂载,这张sd卡就可以用来做启动盘。
.sdcard文件从ftp.phytec.cn下载

在linux PC中制作

你可以采用.sdcard 这个image文件,也可以自己分区制作,请参考对应核心板的BSP manual,如 phyCORE-i.MX6 的 l-814e-3-imx6-bsp-manual #Using_four_individual_Images

以下方法为使用.sdcard文件来制作的流程:

1  取消挂载sdcard设备, 点击文件夹中sdcard设备的取消挂载按钮

2  查找sdcard设备

sudo fdisk -l
Disk /dev/sdb: 3.7 GiB, 3904897024 bytes, 7626752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf0755ca1

Device     Boot  Start     End Sectors   Size Id Type
/dev/sdb1  *      8192  382453  374262 182.8M  c W95 FAT32 (LBA)
/dev/sdb2       382976 1165271  782296   382M 83 Linux

3  将SD卡镜像文件烧进SD卡里面,SD卡镜像是.sdcard文件。在SD卡镜像的目录下进行这个操作。

sudo dd if=[sdcard] of=/dev/sdb bs=1M conv=fsync

[sdcard]要改成相应的.sdcard文件名,/dev/sdb改成相应的SD卡设备

烧录好了之后会出现相应的信息

sudo dd if=phytec-qt5demo-image-phyboard-mira-imx6-3.sdcard of=/dev/sdb bs=1M conv=fsync
368+0 records in
368+0 records out
385875968 bytes (386 MB, 368 MiB) copied, 68.8075 s, 5.6 MB/s

4  将SD卡插进开发板,设置开发板从SD卡启动。

为SD卡启动盘增加分区

已经烧好镜像的SD卡在linux中可查到有两个分区

nicola@ubuntu:~$ sudo fdisk -l /dev/sdb
Disk /dev/sdb: 3.7 GiB, 3904897024 bytes, 7626752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3556b3e8

Device     Boot Start    End Sectors  Size Id Type
/dev/sdb1        8192  24575   16384    8M  c W95 FAT32 (LBA)
/dev/sdb2       24576 286719  262144  128M 83 Linux

/dev/sdb1 是kernel 和 oftree 的分区, /dev/sdb2 是 linux 文件系统分区,文件分区是跟sdcard镜像大小一样大,如果需要复制大文件到SD卡linux系统上,需要增加一个分区,可以使用Linux下fdisk工具新增分区。

nicola@ubuntu:~$ sudo fdisk /dev/sdb

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


Command (m for help): n
Partition type
   p   primary (2 primary, 0 extended, 2 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (3,4, default 3): 3
First sector (2048-7626751, default 2048): 286720
Last sector, +sectors or +size{K,M,G,T,P} (286720-7626751, default 7626751): 

Created a new partition 3 of type 'Linux' and of size 3.5 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

新增分区后,需要重新插拔SD卡,然后先格式化/dev/sdb3分区,再挂载sdb3分区

nicola@ubuntu:~$ sudo mkfs.ext4 -L "sd" /dev/sdb3
mke2fs 1.42.13 (17-May-2015)
Creating filesystem with 917504 4k blocks and 229376 inodes
Filesystem UUID: 2d49bc42-1bf5-4882-b4a6-c916387c20d0
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 

nicola@ubuntu:~$ mkdir ~/sd
nicola@ubuntu:~$ sudo mount /dev/sdb3 ~/sd

操作分区sdb3完成后,需要取消挂载

nicola@ubuntu:~$ sudo umount /dev/sdb3

开发板挂载sd卡新增的分区

root@phyboard-mira-imx6-5:~# mkdir sd
root@phyboard-mira-imx6-5:~# mount /dev/mmcblk0p3 ~/sd



  • No labels