buildsystem: move STORAGE_SIZE to the general buildsystem

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
This commit is contained in:
Ian Leonard 2022-10-24 00:47:02 +00:00
parent 7fb1002d7f
commit d417519f98
3 changed files with 4 additions and 2 deletions

View File

@ -62,6 +62,9 @@
# Default system partition offset, in sectors, eg. 2048
SYSTEM_PART_START=8192
# Size of storage partition, in MB. Must be >=32
STORAGE_SIZE=32
# build with swap support (yes / no)
SWAP_SUPPORT="yes"

View File

@ -53,6 +53,7 @@ function do_mkimage() {
EXTRA_CMDLINE="${EXTRA_CMDLINE}" \
SYSTEM_SIZE="${SYSTEM_SIZE}" \
SYSTEM_PART_START="${SYSTEM_PART_START}" \
STORAGE_SIZE="${STORAGE_SIZE:-32}" \
OVA_SIZE="${OVA_SIZE}" \
${SCRIPTS}/mkimage
}

View File

@ -18,8 +18,6 @@ if [ -z "${SYSTEM_SIZE}" -o -z "${SYSTEM_PART_START}" ]; then
exit 1
fi
STORAGE_SIZE=32 # STORAGE_SIZE must be >= 32 !
DISK_START_PADDING=$(( (${SYSTEM_PART_START} + 2048 - 1) / 2048 ))
DISK_GPT_PADDING=1
DISK_SIZE=$(( ${DISK_START_PADDING} + ${SYSTEM_SIZE} + ${STORAGE_SIZE} + ${DISK_GPT_PADDING} ))