diff --git a/Makefile.work b/Makefile.work index 9fe410a2ef48..19fd70b05e08 100644 --- a/Makefile.work +++ b/Makefile.work @@ -43,6 +43,12 @@ # * ENABLE_AUTO_TECH_SUPPORT: Enable the configuration for event-driven techsupport & coredump mgmt feature # * Default: y # * Values: y,n +# * INCLUDE_BOOTCHART: Install SONiC bootchart +# * Default: y +# * Values: y,n +# * ENABLE_BOOTCHART: Enable SONiC bootchart +# * Default: n +# * Values: y,n # ############################################################################### @@ -368,6 +374,8 @@ SONIC_BUILD_INSTRUCTION := make \ ENABLE_AUTO_TECH_SUPPORT=$(ENABLE_AUTO_TECH_SUPPORT) \ BUILD_MULTIASIC_KVM=$(BUILD_MULTIASIC_KVM) \ ENABLE_ASAN=$(ENABLE_ASAN) \ + SONIC_INCLUDE_BOOTCHART=$(INCLUDE_BOOTCHART) \ + SONIC_ENABLE_BOOTCHART=$(ENABLE_BOOTCHART) \ ENABLE_FIPS_FEATURE=$(ENABLE_FIPS_FEATURE) \ ENABLE_FIPS=$(ENABLE_FIPS) \ $(SONIC_OVERRIDE_BUILD_VARS) diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 659921d50aa9..c522e63d3274 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -420,6 +420,18 @@ sudo chmod og-rw $FILESYSTEM_ROOT_ETC_SONIC/core_analyzer.rc.json sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install libffi-dev libssl-dev +{% if include_bootchart == 'y' %} +sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install systemd-bootchart +sudo tee $FILESYSTEM_ROOT_ETC/systemd/bootchart.conf > /dev/null < docker-swss-: # $(call docker-image-save,from,to) -# Sonic docker images are always created with username as extension. During the save operation, +# Sonic docker images are always created with username as extension. During the save operation, # it removes the username extension from docker image and saved them as compressed tar file for SONiC image generation. # The save operation is protected with lock for parallel build. # @@ -403,7 +414,7 @@ define docker-image-save endef # $(call docker-image-load,from) -# Sonic docker images are always created with username as extension. During the load operation, +# Sonic docker images are always created with username as extension. During the load operation, # it loads the docker image from compressed tar file and tag them with username as extension. # The load operation is protected with lock for parallel build. # @@ -1151,6 +1162,8 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \ $(shell [[ ! -z '$($(component)_VERSION)' && ! -z '$($(component)_NAME)' ]] && \ echo $($(component)_NAME)==$($(component)_VERSION)))" export include_mux="$(INCLUDE_MUX)" + export include_bootchart="$(INCLUDE_BOOTCHART)" + export enable_bootchart="$(ENABLE_BOOTCHART)" $(foreach docker, $($*_DOCKERS),\ export docker_image="$(docker)" export docker_image_name="$(basename $(docker))"