QNX EMMC 分区

                                                QNX---EMMC 分区 

      QNX EMMC 分区是通过fdisk实现的,其分区命令使用帮助信息如下:

fdisk - create QNX disk partition (QNX)

fdisk  [-zf] [-B loader] drive [cmd [args]]
Options:
 -z        Zero the partition table (interactive mode only)
 -B loader Use filename 'loader' as the primary loader for the device.
 -f        Force boot loader to be written on demand, even if it is
           impossible to save the old loader which had been on the disk.
           In non-interactive mode force "add" command to be actioned, even
           if this would involve over-writing an existing partition slot.

Where:
 drive     is the name of the disk (e.g. /dev/fd1, /dev/hd0)
 cmd       is a mandatory command.  Recognised commands are:
              add    [args]             Create a partition.
              delete [args]             Delete partition(s).
              boot   [args]             Make partition bootable.
              query  [args]             Size in cylinders.
              loader                    Copy boot loader to disk.
              show                      Display partition table.
              info                      Show mount info for raw drive.

Command Arguments:
add [-s slot] [-e index] [-t type] [-b] [-c start,end] [-p percentage] [-l]
    Note that extended partition indices may change due to additions.
 Options:
      -s slot           Slot in partition table to use (1..4, default is last free)
      -e index          Index into the extended partition. (1..N)
      -t type           Type of partition to be added (1 - 255, default is 77).
      -b                Make added partition boot capable.
      -c start,end      Pass the start and end cylinder for the partition to use.
      -n count          Number of cylinders to allocate (extended partitions only)
      -p percent        Percentage of the largest contiguous space the added
                        partition should use, this option is ignored if the -c
                        option is used (default is 100%)
delete [-s slot] [-e index] [-t type] [-a]
    Note that extended partition indices may change due to deletions.
 Options:
      -s slot           Delete partition in selected slot.
      -e index          Index into the extended partition. (1..N)
      -t type           Delete partition of selected type.
      -a                Delete all partitions.
boot [-s slot] [-e index] [-t type]
 Options:
      -s slot           Boot partition in selected slot.
      -e index          Index into the extended partition. (1..N)
      -t type           Boot partition of selected type.
type [-s slot] [-t type[,type2]]
 Options:
      -s slot           Change type in selected slot.
      -t type[,type2]   If slot is specified, only type is valid as the new type.
                        If slot is not specified, both type and type2 are required,
                        and change the selected type to type2.
query [-s slot] [-e index] [-t type] [-f] [-T] [-l]
 Options:
      -s slot           Query partition in selected slot.
      -e index          Index into the extended partition. (1..N)
      -t type           Query partition of selected type.
      -f                Query total number of free cylinders.
      -T                Query total number of cylinders.
      -l                Change units from cylinders to blocks.

根据上述帮助信息,进行分区。

    首先查看设备/dev下是否挂在了EMMC设备,设备号为hd0,从上面我可以看到 已经分了四个区,分别是hd0t12,hd0t12.1,hd0t12.2,hd0t12.3;其中hd0t12 中的t12为文件系统类型,这里使用的是FAT32 。

QNX EMMC 分区_第1张图片

    通过fdisk 查看我当前的分区,分类四个区,每一个区可以根据自己的需要设置不同的大小和文件类型,本分区的文件类型是t12 也就是当前的hd0t12。

QNX EMMC 分区_第2张图片

下面我重新分区,先要删除所有分区,使用fdisk /dev/hd0 -a 命令删除,这时在查看分区删除后的状态为:

QNX EMMC 分区_第3张图片

配置分区可以通过两种方式,一种直接输入fdisk /dev/hd0 ,类似于menuconfig,根据提示直接填入参数

QNX EMMC 分区_第4张图片

    还有一种就是通过shell命令配置,QNX启动的时候根据你配置的命令顺序执行就行了,分完区后,通过mkdosfs 格式化后,mount挂在相应的分区就行了。

QNX EMMC 分区_第5张图片

QNX EMMC 分区_第6张图片

 

 

 

 

 

 

你可能感兴趣的:(QNX系统与驱动)