Skip to content

Commit

Permalink
Adjust the partition unit to MiB
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Apr 16, 2022
1 parent 40c7e24 commit 131cf8d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build-armbian/common-files/rootfs/usr/sbin/armbian-install
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ fi
# Format emmc disk
echo "Start create MBR and partittion"
parted -s "${DEV_EMMC}" mklabel msdos 2>/dev/null
parted -s "${DEV_EMMC}" mkpart primary fat32 $((BLANK1))M $((BLANK1 + BOOT - 1))M 2>/dev/null
parted -s "${DEV_EMMC}" mkpart primary ${file_system_type} $((BLANK1 + BOOT + BLANK2))M 100% 2>/dev/null
parted -s "${DEV_EMMC}" mkpart primary fat32 $((BLANK1))MiB $((BLANK1 + BOOT - 1))MiB 2>/dev/null
parted -s "${DEV_EMMC}" mkpart primary ${file_system_type} $((BLANK1 + BOOT + BLANK2))MiB 100% 2>/dev/null
sync

# Write the uboot
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 5.4.187 Kernel Configuration
# Linux/arm64 5.4.189 Kernel Configuration
#

#
Expand Down
4 changes: 2 additions & 2 deletions rebuild
Original file line number Diff line number Diff line change
Expand Up @@ -608,8 +608,8 @@ make_image() {
sync

parted -s ${build_image_file} mklabel msdos 2>/dev/null
parted -s ${build_image_file} mkpart primary fat32 $((SKIP_MB))M $((SKIP_MB + BOOT_MB - 1))M 2>/dev/null
parted -s ${build_image_file} mkpart primary ${ROOTFS_TYPE} $((SKIP_MB + BOOT_MB))M 100% 2>/dev/null
parted -s ${build_image_file} mkpart primary fat32 $((SKIP_MB))MiB $((SKIP_MB + BOOT_MB - 1))MiB 2>/dev/null
parted -s ${build_image_file} mkpart primary ${ROOTFS_TYPE} $((SKIP_MB + BOOT_MB))MiB 100% 2>/dev/null
sync

loop_new=$(losetup -P -f --show "${build_image_file}")
Expand Down

0 comments on commit 131cf8d

Please sign in to comment.