From 807d6f203e2046d6f149ef8c77789f608e99eaa1 Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Wed, 4 May 2022 18:44:26 +0300 Subject: [PATCH 1/2] [sonic_debian_extension] install systemd-bootchart Signed-off-by: Stepan Blyschak --- Makefile.work | 4 ++++ files/build_templates/sonic_debian_extension.j2 | 9 +++++++++ rules/config | 3 +++ slave.mk | 12 +++++++++--- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/Makefile.work b/Makefile.work index cc404b9d7184..3be998b231c1 100644 --- a/Makefile.work +++ b/Makefile.work @@ -43,6 +43,9 @@ # * ENABLE_AUTO_TECH_SUPPORT: Enable the configuration for event-driven techsupport & coredump mgmt feature # * Default: y # * Values: y,n +# * INCLUDE_BOOTCHART: Enable SONiC bootchart +# * Default: n +# * Values: y,n # ############################################################################### @@ -355,6 +358,7 @@ 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_OVERRIDE_BUILD_VARS) .PHONY: sonic-slave-build sonic-slave-bash init reset diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 516df5fd224f..60d68e72bd81 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -425,6 +425,15 @@ 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. # @@ -400,7 +405,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. # @@ -1146,6 +1151,7 @@ $(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)" $(foreach docker, $($*_DOCKERS),\ export docker_image="$(docker)" export docker_image_name="$(basename $(docker))" From af9daaeacf9d95c2e4dc94aabb1217c736f0c1bb Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Wed, 1 Jun 2022 16:50:20 +0300 Subject: [PATCH 2/2] enable bootchart Signed-off-by: Stepan Blyschak --- Makefile.work | 6 +++++- files/build_templates/sonic_debian_extension.j2 | 3 +++ rules/config | 3 +++ slave.mk | 7 +++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Makefile.work b/Makefile.work index 3be998b231c1..11731982beb4 100644 --- a/Makefile.work +++ b/Makefile.work @@ -43,7 +43,10 @@ # * ENABLE_AUTO_TECH_SUPPORT: Enable the configuration for event-driven techsupport & coredump mgmt feature # * Default: y # * Values: y,n -# * INCLUDE_BOOTCHART: Enable SONiC bootchart +# * INCLUDE_BOOTCHART: Install SONiC bootchart +# * Default: y +# * Values: y,n +# * ENABLE_BOOTCHART: Enable SONiC bootchart # * Default: n # * Values: y,n # @@ -359,6 +362,7 @@ SONIC_BUILD_INSTRUCTION := make \ BUILD_MULTIASIC_KVM=$(BUILD_MULTIASIC_KVM) \ ENABLE_ASAN=$(ENABLE_ASAN) \ SONIC_INCLUDE_BOOTCHART=$(INCLUDE_BOOTCHART) \ + SONIC_ENABLE_BOOTCHART=$(ENABLE_BOOTCHART) \ $(SONIC_OVERRIDE_BUILD_VARS) .PHONY: sonic-slave-build sonic-slave-bash init reset diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 60d68e72bd81..4e611d971cae 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -432,6 +432,9 @@ sudo tee $FILESYSTEM_ROOT_ETC/systemd/bootchart.conf > /dev/null <