From f472d645c56484eb3a9a9419292f024cd274c767 Mon Sep 17 00:00:00 2001 From: ophub Date: Tue, 6 Dec 2022 03:32:42 +0000 Subject: [PATCH] Adjust firmware image SKIP_MB settings --- rebuild | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rebuild b/rebuild index 05e2b72b81..10b649df39 100755 --- a/rebuild +++ b/rebuild @@ -92,8 +92,7 @@ build_armbian=( "beikeyun" "l1pro" ) -# Set Armbian firmware size (Unit: MiB, SKIP_MB >= 4, BOOT_MB >= 256, ROOT_MB >= 2048) -SKIP_MB="68" +# Set Armbian firmware size (Unit: MiB, BOOT_MB >= 256, ROOT_MB >= 2048) BOOT_MB="256" ROOT_MB="2560" # Set ROOTFS partition file system type, options: [ ext4 / btrfs ] @@ -434,6 +433,9 @@ make_image() { build_image_file="${tmp_outpath}/Armbian_${armbian_rebuild_version}_${PLATFORM}_${board}_${release_codename}_${kernel}${custom_name}_$(date +"%Y.%m.%d").img" rm -f ${build_image_file} + [[ "${PLATFORM}" == "amlogic" ]] && SKIP_MB="4" + [[ "${PLATFORM}" == "rockchip" ]] && SKIP_MB="16" + IMG_SIZE="$((SKIP_MB + BOOT_MB + ROOT_MB))" truncate -s ${IMG_SIZE}M ${build_image_file} >/dev/null 2>&1