From a8e739bf5011a923818006213a432461c03d5225 Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Tue, 8 Sep 2026 12:30:10 -0700 Subject: [PATCH 1/3] Add arm64 aspeed build to CI Also experiment with building kernel without debug info for faster CI build. Signed-off-by: Saikrishna Arcot --- .azure-pipelines/build-template.yml | 3 ++- Makefile | 5 +++-- azure-pipelines.yml | 10 ++++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/build-template.yml b/.azure-pipelines/build-template.yml index d67409d52..e5c095005 100644 --- a/.azure-pipelines/build-template.yml +++ b/.azure-pipelines/build-template.yml @@ -11,6 +11,7 @@ parameters: values: - vs - pensando + - aspeed default: vs - name: pool @@ -75,7 +76,7 @@ jobs: export SECURE_UPGRADE_MODE=dev export SECURE_UPGRADE_SIGNING_CERT=$(System.DefaultWorkingDirectory)/build_trusted_key.pem fi - CONFIGURED_ARCH=${{ parameters.arch }} CONFIGURED_PLATFORM=${{ parameters.platform }} make + CONFIGURED_ARCH=${{ parameters.arch }} CONFIGURED_PLATFORM=${{ parameters.platform }} ADDITIONAL_BUILD_PROFILES=pkg.linux.nokerneldbginfo make displayName: "Compile sonic kernel" - script: | set -e diff --git a/Makefile b/Makefile index 2c4cc7609..a90e491c4 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,7 @@ endif SECURE_UPGRADE_MODE ?= SECURE_UPGRADE_SIGNING_CERT ?= SECURE_UPGRADE_KERNEL_CAFILE ?= $(SECURE_UPGRADE_SIGNING_CERT) +ADDITIONAL_BUILD_PROFILES ?= LINUX_HEADER_COMMON = linux-headers-$(KERNEL_VERSION)$(KERNEL_ABISUFFIX)-common-$(KERNEL_FEATURESET)_$(KERNEL_VERSION)-$(KERNEL_SUBVERSION)_all.deb LINUX_HEADER_ARCH = linux-headers-$(KVERSION)_$(KERNEL_VERSION)-$(KERNEL_SUBVERSION)_$(CONFIGURED_ARCH).deb @@ -99,9 +100,9 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : # TODO(trixie): Make a way to verify that our configs are being set ifeq ($(CROSS_BUILD_ENVIRON), y) - dpkg-buildpackage -b -us -uc -a$(CONFIGURED_ARCH) -Pcross,nocheck,nodoc -j$(SONIC_CONFIG_MAKE_JOBS) + dpkg-buildpackage -b -us -uc -a$(CONFIGURED_ARCH) -Pcross,nocheck,nodoc,$(ADDITIONAL_BUILD_PROFILES) -j$(SONIC_CONFIG_MAKE_JOBS) else - dpkg-buildpackage -b -us -uc -Pnodoc -j$(SONIC_CONFIG_MAKE_JOBS) + dpkg-buildpackage -b -us -uc -Pnodoc,$(ADDITIONAL_BUILD_PROFILES) -j$(SONIC_CONFIG_MAKE_JOBS) endif popd diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 205ce2cb6..9afcdd318 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -65,3 +65,13 @@ stages: old_linux_deb_pattern: linux-image-*-unsigned_*deb linux_deb_pattern: linux-image-*-unsigned_*deb + - template: .azure-pipelines/build-template.yml + parameters: + arch: arm64 + platform: aspeed + pool: sonicso1ES-arm64 + old_artifact_name: sonic-linux-kernel.aspeed.arm64 + artifact_name: sonic-linux-kernel.aspeed.arm64 + old_linux_deb_pattern: linux-image-*-unsigned_*deb + linux_deb_pattern: linux-image-*-unsigned_*deb + From 05d6c7e8a2f52149e04a42591be3722ffcfbaa36 Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Tue, 8 Sep 2026 12:45:45 -0700 Subject: [PATCH 2/3] Exclude aspeed platform from kconfig diff Signed-off-by: Saikrishna Arcot --- .azure-pipelines/build-template.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.azure-pipelines/build-template.yml b/.azure-pipelines/build-template.yml index e5c095005..4fde5226f 100644 --- a/.azure-pipelines/build-template.yml +++ b/.azure-pipelines/build-template.yml @@ -65,6 +65,7 @@ jobs: itemPattern: ${{ parameters.old_linux_deb_pattern }} targetPath: $(Agent.TempDirectory)/ displayName: "Download the linux-image artifact from the last build with a different kernel version" + condition: ${{ not(eq(parameters.platform, aspeed)) }} - script: | openssl req -new -noenc -utf8 -sha256 -days 30 -batch -x509 -subj "/CN=Autogenerated pipeline build key" -outform PEM -out build_trusted_key.pem -keyout /dev/null displayName: "Generate additional secure boot certificate" @@ -92,6 +93,7 @@ jobs: --output $(System.DefaultWorkingDirectory)/kconfig-diff-${{ parameters.platform }}-${{ parameters.arch }}.rst cat $(System.DefaultWorkingDirectory)/kconfig-diff-${{ parameters.platform }}-${{ parameters.arch }}.rst displayName: "Compute the kconfig diff" + condition: ${{ not(eq(parameters.platform, aspeed)) }} - publish: $(System.DefaultWorkingDirectory)/ artifact: ${{ parameters.artifact_name }} displayName: "Archive sonic kernel debian packages" From 6a1364d206605c500389ebfc400cf7631ca7c20f Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Tue, 8 Sep 2026 14:20:30 -0700 Subject: [PATCH 3/3] Fix syntax Signed-off-by: Saikrishna Arcot --- .azure-pipelines/build-template.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/build-template.yml b/.azure-pipelines/build-template.yml index 4fde5226f..97d654932 100644 --- a/.azure-pipelines/build-template.yml +++ b/.azure-pipelines/build-template.yml @@ -65,7 +65,7 @@ jobs: itemPattern: ${{ parameters.old_linux_deb_pattern }} targetPath: $(Agent.TempDirectory)/ displayName: "Download the linux-image artifact from the last build with a different kernel version" - condition: ${{ not(eq(parameters.platform, aspeed)) }} + condition: ${{ not(eq(parameters.platform, 'aspeed')) }} - script: | openssl req -new -noenc -utf8 -sha256 -days 30 -batch -x509 -subj "/CN=Autogenerated pipeline build key" -outform PEM -out build_trusted_key.pem -keyout /dev/null displayName: "Generate additional secure boot certificate" @@ -93,7 +93,7 @@ jobs: --output $(System.DefaultWorkingDirectory)/kconfig-diff-${{ parameters.platform }}-${{ parameters.arch }}.rst cat $(System.DefaultWorkingDirectory)/kconfig-diff-${{ parameters.platform }}-${{ parameters.arch }}.rst displayName: "Compute the kconfig diff" - condition: ${{ not(eq(parameters.platform, aspeed)) }} + condition: ${{ not(eq(parameters.platform, 'aspeed')) }} - publish: $(System.DefaultWorkingDirectory)/ artifact: ${{ parameters.artifact_name }} displayName: "Archive sonic kernel debian packages"