summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-03-10 13:17:22 -0300
committerRenato Botelho <renato@netgate.com>2016-03-10 13:17:22 -0300
commitbe4a566183eb98e16b1711aefeb6c55b4d01056e (patch)
treee762efc8d0df05f2ebd9075b96e64a0aa2c1ef72
parent35104e0345c476509b64c66857d638712c7700a0 (diff)
downloadpfsense-be4a566183eb98e16b1711aefeb6c55b4d01056e.zip
pfsense-be4a566183eb98e16b1711aefeb6c55b4d01056e.tar.gz
Calculate first partition size
-rw-r--r--tools/builder_common.sh4
-rw-r--r--tools/builder_defaults.sh2
2 files changed, 2 insertions, 4 deletions
diff --git a/tools/builder_common.sh b/tools/builder_common.sh
index f49cf39..a82fda6 100644
--- a/tools/builder_common.sh
+++ b/tools/builder_common.sh
@@ -402,8 +402,6 @@ print_flags() {
printf " Git Branch or Tag: %s\n" $GIT_REPO_BRANCH_OR_TAG
printf " MODULES_OVERRIDE: %s\n" $MODULES_OVERRIDE
printf " VMDK_DISK_CAPACITY_IN_GB: %s\n" $VMDK_DISK_CAPACITY_IN_GB
- printf " OVA_FIRST_PART_SIZE_IN_GB: %s\n" $OVA_FIRST_PART_SIZE_IN_GB
- printf " OVA_SWAP_PART_SIZE_IN_GB: %s\n" $OVA_SWAP_PART_SIZE_IN_GB
printf " OVFTEMPLATE: %s\n" $OVFTEMPLATE
printf " OVFVMDK: %s\n" $OVFVMDK
printf " SRC_CONF: %s\n" $SRC_CONF
@@ -845,6 +843,8 @@ create_ova_image() {
mkdir -p ${OVA_TMP}
+ # first partition size (freebsd-ufs)
+ local OVA_FIRST_PART_SIZE_IN_GB=$((VMDK_DISK_CAPACITY_IN_GB-OVA_SWAP_PART_SIZE_IN_GB))
# Calculate real swap size, removing 128 blocks (65536 bytes) beginning/loader
local OVA_SWAP_PART_SIZE=$((${OVA_SWAP_PART_SIZE_IN_GB}*1024*1024*1024-65536))
diff --git a/tools/builder_defaults.sh b/tools/builder_defaults.sh
index 18a7bdf..f4e4a28 100644
--- a/tools/builder_defaults.sh
+++ b/tools/builder_defaults.sh
@@ -210,8 +210,6 @@ export OVFRAW=${OVFRAW:-"${PRODUCT_NAME}-disk1.raw"}
export OVFVMDK=${OVFVMDK:-"${PRODUCT_NAME}-disk1.vmdk"}
# 8 gigabyte on disk VMDK size
export VMDK_DISK_CAPACITY_IN_GB=${VMDK_DISK_CAPACITY_IN_GB:-"8"}
-# first partition size (freebsd-ufs)
-export OVA_FIRST_PART_SIZE_IN_GB=${OVA_FIRST_PART_SIZE_IN_GB:-"6"}
# swap partition size (freebsd-swap)
export OVA_SWAP_PART_SIZE_IN_GB=${OVA_SWAP_PART_SIZE_IN_GB:-"2"}
# Temporary place to save files
OpenPOWER on IntegriCloud