mkfirmware.sh: Avoid touching extra partitions without source dir

Tested with:
export RK_EXTRA_PARTITIONS="/dev/sda1:/mnt/usb_storage:vfat:defaults::"

Check:
1/ no errors in mkfirmware.sh
2/ etc/fstab got:
/dev/sda1       /mnt/usb_storage        vfat    defaults        0 2

Change-Id: I2f567a9084b14a951d243276c742b0a1667576e9
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This commit is contained in:
Jeffy Chen
2022-05-06 18:36:47 +08:00
parent ccf337ceb3
commit 0ff8660dc2

View File

@ -202,7 +202,22 @@ pack_extra_partitions() {
MOUNT="$(partition_arg "$part" 2 "/$PART_NAME")"
FS_TYPE="$(partition_arg "$part" 3)"
SRC="$DEV_DIR/$PART_NAME/$(partition_arg "$part" 5 "$PART_NAME")"
SRC="$(partition_arg "$part" 5)"
# Src is either none or relative path to device/rockchip/<name>/
# or absolute path
case "$SRC" in
"")
continue
;;
/*)
;;
*)
SRC="$DEV_DIR/$PART_NAME/$SRC"
;;
esac
SIZE="$(partition_arg "$part" 6 auto)"
OPTS="$(partition_arg "$part" 7)"
LABEL=