common: mk-image: mkfs with the specified the filesystem type

The if the '-t <fs_type>' is not specified, the default fs is ext2. It's
important if somebody wanna to use the real ext4.

Change-Id: I6ecb8e321595755c7441a0d59b6aba2bfee8e696
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
This commit is contained in:
Ziyuan Xu
2019-09-16 10:19:34 +00:00
parent 731e255fb3
commit 74a4b38e2a

View File

@ -1,5 +1,5 @@
#!/bin/bash
set -x
if [ ! -d "$TARGET_OUTPUT_DIR" ]; then
echo "Source buildroot/build/envsetup.sh firstly!!!"
exit 1
@ -76,9 +76,9 @@ mkimage()
case $FS_TYPE in
ext[234])
if check_host_tool mke2fs; then
mke2fs $TARGET -d $SRC_DIR || return -1
mke2fs -t $FS_TYPE $TARGET -d $SRC_DIR || return -1
else
mke2fs $TARGET || return -1
mke2fs -t $FS_TYPE $TARGET || return -1
copy_to_image || return -1
fi
# Set max-mount-counts to 0, and disable the time-dependent checking.