本文主要适用于
飛淩OKMX6X-
C平台Linux3.0.35作業系統,本文主要講解eMMC增加分區兩種方式,其他
imx6Q平台也可以參考,但是不同廠家
iMX6平台之間會存在差異,需自行修改以适應自己的使用。
增加分區方法一(幫助了解分區)
fdisk -l 檢視系統上的硬碟,找到需要分區的硬碟:/dev/mmcblk0.
進入該裝置:fdisk /dev/ mmcblk0
此時出現:
Command (m for help):
檢視幫助資訊:輸入 m:
看到如下資訊
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition 注:這是删除一個分區的動作;
l list known partition types 注: l 是列出分區類型,以供我們設定相應分區的類型;
m print this menu 注: m 是列出幫助資訊;
n add a new partition 注:添加一個分區;
o create a new empty DOS partition table
p print the partition table 注: p 列出分區表;
q quit without saving changes 注:不儲存退出;
s create a new empty Sun disklabel
t change a partition's system id 注: t 改變分區類型;
u change display/entry units
v verify the partition table
w write table to disk and exit 注:把分區表寫入硬碟并退出;
x extra functionality (experts only) 注:擴充應用,專家功能;
具體每個參數的含義,請仔細閱讀。常用的就是:d l m p q t w
列出目前操作硬碟的分區情況:用 p

添加分區:輸入n
Command (m for help): n
Command action
e extended
p primary partition (1-4)
添加主分區: 輸入p
Partition number (1-4): 2
注:前面已經有一個主分區了,這個也算主分區從2 開始;
First cylinder (1-238592, default 1):直接回車
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1600, default 1600):800(按照需求添加大小)
Command (m for help): p
Disk /dev/mmcblk0: 7818 MB, 7818182656 bytes
4 heads, 16 sectors/track, 238592 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
添加分區:輸入n
Command (m for help): n
Command action
e extended
p primary partition (1-4)
添加主分區: 輸入p
Partition number (1-4): 3
First cylinder (801-238592, default 801): 801
Last cylinder or +size or +sizeM or +sizeK (801-1600, default 1600):回車 Using default value 1600
輸入w 儲存并退出
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table
fdisk -l
即可看到增加的分區
注:儲存以後會出現如下警告,可忽略,不影響結果。
fdisk: WARNING: rereading partition table failed, kernel still uses old table: Device or resource busy
eMMC增加分區方法二(相對容易操作)
修改燒寫工具中的mksdcard.sh,路徑:mfgtools\Profiles\Linux\OS Firmware例如:
修改完成後重新燒寫
在終端輸入 fdisk –l出現如下