diff --git a/Makefile.work b/Makefile.work index 21e40fb633..0fde2e3893 100644 --- a/Makefile.work +++ b/Makefile.work @@ -568,6 +568,7 @@ SONIC_BUILD_INSTRUCTION := $(MAKE) \ GZ_COMPRESS_PROGRAM=$(GZ_COMPRESS_PROGRAM) \ MIRROR_SNAPSHOT=$(MIRROR_SNAPSHOT) \ SONIC_VERSION_CONTROL_COMPONENTS=$(SONIC_VERSION_CONTROL_COMPONENTS) \ + ONIE_IMAGE_PART_SIZE=$(ONIE_IMAGE_PART_SIZE) \ SONIC_OS_VERSION=$(SONIC_OS_VERSION) \ $(SONIC_OVERRIDE_BUILD_VARS) diff --git a/installer/install.sh b/installer/install.sh index 7f3feae42b..4d8ad75a16 100755 --- a/installer/install.sh +++ b/installer/install.sh @@ -96,6 +96,13 @@ echo "onie_platform: $onie_platform" # Get platform specific linux kernel command line arguments ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="" +# Start with build time value, set either using env variable +# or from onie-image.conf. onie-mk-demo.sh will string replace +# below value to env value. Platform specific installer.conf +# will override this value if necessary by reading $onie_platform +# after this. +ONIE_IMAGE_PART_SIZE="%%ONIE_IMAGE_PART_SIZE%%" + # Default var/log device size in MB VAR_LOG_SIZE=4096 @@ -138,9 +145,8 @@ fi # with "OS" or "DIAG". demo_type="%%DEMO_TYPE%%" -# The build system prepares this script by replacing %%ONIE_IMAGE_PART_SIZE%% -# with the partition size -demo_part_size="%%ONIE_IMAGE_PART_SIZE%%" +# take final partition size after platform installer.conf override +demo_part_size=$ONIE_IMAGE_PART_SIZE # The build system prepares this script by replacing %%IMAGE_VERSION%% # with git revision hash as a version identifier diff --git a/slave.mk b/slave.mk index ae4e6171c8..6a51dc6ae9 100644 --- a/slave.mk +++ b/slave.mk @@ -384,6 +384,7 @@ $(info "SECURE_UPGRADE_DEV_SIGNING_KEY" : "$(SECURE_UPGRADE_DEV_SIGNING_KEY)") $(info "SECURE_UPGRADE_SIGNING_CERT" : "$(SECURE_UPGRADE_SIGNING_CERT)") $(info "SECURE_UPGRADE_PROD_SIGNING_TOOL": "$(SECURE_UPGRADE_PROD_SIGNING_TOOL)") $(info "SECURE_UPGRADE_PROD_TOOL_ARGS" : "$(SECURE_UPGRADE_PROD_TOOL_ARGS)") +$(info "ONIE_IMAGE_PART_SIZE" : "$(ONIE_IMAGE_PART_SIZE)") $(info "ENABLE_DHCP_GRAPH_SERVICE" : "$(ENABLE_DHCP_GRAPH_SERVICE)") $(info "SHUTDOWN_BGP_ON_START" : "$(SHUTDOWN_BGP_ON_START)") $(info "ENABLE_PFCWD_ON_START" : "$(ENABLE_PFCWD_ON_START)") @@ -1435,6 +1436,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \ TARGET_MACHINE=$(dep_machine) \ IMAGE_TYPE=$($*_IMAGE_TYPE) \ TARGET_PATH=$(TARGET_PATH) \ + ONIE_IMAGE_PART_SIZE=$(ONIE_IMAGE_PART_SIZE) \ SONIC_ENFORCE_VERSIONS=$(SONIC_ENFORCE_VERSIONS) \ TRUSTED_GPG_URLS=$(TRUSTED_GPG_URLS) \ SONIC_ENABLE_SECUREBOOT_SIGNATURE="$(SONIC_ENABLE_SECUREBOOT_SIGNATURE)" \ @@ -1462,6 +1464,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \ PASSWORD="$(PASSWORD)" \ TARGET_MACHINE=$(dep_machine) \ IMAGE_TYPE=$($*_IMAGE_TYPE) \ + ONIE_IMAGE_PART_SIZE=$(ONIE_IMAGE_PART_SIZE) \ SONIC_ENABLE_IMAGE_SIGNATURE="$(SONIC_ENABLE_IMAGE_SIGNATURE)" \ SECURE_UPGRADE_MODE="$(SECURE_UPGRADE_MODE)" \ SECURE_UPGRADE_DEV_SIGNING_KEY="$(SECURE_UPGRADE_DEV_SIGNING_KEY)" \