Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions base_image_assembling/assemble_base_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ COPY_MODE="singlecopy"
STORAGE_EMMC_FLAG=false
STORAGE_DEVICE="sd"
PT_SIZE=''
GENERATE_MBR_ONLY_FLAG=false
GENERATE_PT_TBL_ONLY_FLAG=false

while getopts "o:deb:mh" arg; do
case $arg in
Expand All @@ -45,7 +45,7 @@ while getopts "o:deb:mh" arg; do
SOC=$OPTARG
;;
m)
GENERATE_MBR_ONLY_FLAG=true
GENERATE_PT_TBL_ONLY_FLAG=true
;;
h)
print_help
Expand Down Expand Up @@ -89,7 +89,7 @@ if [ x$GENERATE_PT_TBL_ONLY_FLAG == xtrue ]; then
fi
echo "Generating ${IMAGE_PT_TBL_PATH}"
cd $PT_FILEDIR
generate_pt_tbl_dualslot $PT_FILENAME $IMAGE_PT_SIZE $IMAGE_PT_TBL_FMT
generate_pt_tbl_dualslot $PT_FILENAME $IMAGE_PT_TBL_SIZE $IMAGE_PT_TBL_FMT
cd -
echo "DONE"
exit 0
Expand Down
2 changes: 1 addition & 1 deletion boards/cfg_imx6ull_base.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ IMAGE_PT_TBL_LENGTH=512
# Format: [PARTITION_NAME:<OFFSET_START>:<OFFSET_END>:<Filesystem Type>]
# Numbers and fs type in this struct will be passed to command directly.
# sudo parted <PARTITION_NAME> unit MiB mkpart primary <Filesystem Type> <OFFSET_START> <OFFSET_END>
IMAGE_PT_TABLE_STRUCT="
IMAGE_PT_TBL_STRUCT="
1:SLOTA_BOOT_PT:100:220:fat32
2:SLOTA_ROOTFS:220:3220:ext4
3:SLOTB_BOOT_PT:3220:3340:fat32
Expand Down
2 changes: 1 addition & 1 deletion boards/cfg_imx8mm_base.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ IMAGE_PT_TBL_LENGTH=512
# Format: [PARTITION_NAME:<OFFSET_START>:<OFFSET_END>:<Filesystem Type>]
# Numbers and fs type in this struct will be passed to command directly.
# sudo parted <PARTITION_NAME> unit MiB mkpart primary <Filesystem Type> <OFFSET_START> <OFFSET_END>
IMAGE_PT_TABLE_STRUCT="
IMAGE_PT_TBL_STRUCT="
1:SLOTA_BOOT_PT:100:220:fat32
2:SLOTA_ROOTFS:220:3220:ext4
3:SLOTB_BOOT_PT:3220:3340:fat32
Expand Down
2 changes: 1 addition & 1 deletion boards/cfg_imx93_base.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ IMAGE_PT_TBL_LENGTH=512
# Format: [PARTITION_NAME:<OFFSET_START>:<OFFSET_END>:<Filesystem Type>]
# Numbers and fs type in this struct will be passed to command directly.
# sudo parted <PARTITION_NAME> unit MiB mkpart primary <Filesystem Type> <OFFSET_START> <OFFSET_END>
IMAGE_PT_TABLE_STRUCT="
IMAGE_PT_TBL_STRUCT="
1:SLOTA_BOOT_PT:100:220:fat32
2:SLOTA_ROOTFS:220:3220:ext4
3:SLOTB_BOOT_PT:3220:3340:fat32
Expand Down
13 changes: 13 additions & 0 deletions utils/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,19 @@ function generate_pt_tbl_dualslot()
exit -1
fi

case $PT_FMT in
MBR)
sudo parted ${PT_DISKLABEL} mklabel msdos
;;
GPT)
sudo parted ${PT_DISKLABEL} mklabel gpt
;;
?)
echo "Invalid partition type!"
exit -1
;;
esac

for each_item in $IMAGE_PT_TBL_STRUCT; do
local pt_index=$(echo $each_item | cut -d: -f1)
local pt_name=$(echo $each_item | cut -d: -f2)
Expand Down