Skip to content

Commit 7593c63

Browse files
Unify smartswitch and non-smartswitch images for Mellanox and Cisco (#23995)
Cherry-pick changes in PR Remove SMARTSWITCH build flag across platforms #23974 and PR [build] Set INCLUDE_DHCP_SERVER default value to n. #23986 to 202505 branch Why I did it The reason for this change is to avoid separate qualification for smartswitch images and non-smartswitch images. The only difference between the two previously was the presence of dhcp_server container as part of the image. Since dhcp_server doesn't take up much space (in the image) or memory (when running), the idea is to enabled dhcp_server for all Mellanox and Cisco devices so both smartswitch and non-smartswitch can use the same image binary. Normal non-smartswitch devices can still function as usual by having dhcp_server disabled in config_db.json. * Cherry-pick changes in PR #23974 and PR #23986 to 202505 branch Signed-off-by: Prabhat Aravind <[email protected]>
1 parent b032cfd commit 7593c63

File tree

4 files changed

+4
-22
lines changed

4 files changed

+4
-22
lines changed

.azure-pipelines/azure-pipelines-build.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ jobs:
4646
docker_syncd_rpc_image: no
4747
syncd_rpc_image: no
4848
platform_rpc: no
49-
ss_image: no
5049
${{ if parameters.qemuOrCrossBuild }}:
5150
SONIC_SLAVE_DOCKER_DRIVER: 'vfs'
5251
CACHE_MODE: 'none'
@@ -115,7 +114,6 @@ jobs:
115114
- name: mellanox
116115
variables:
117116
dbg_image: yes
118-
ss_image: yes
119117
docker_syncd_rpc_image: yes
120118
syncd_rpc_image: yes
121119
platform_rpc: mlnx
@@ -145,6 +143,9 @@ jobs:
145143
- template: .azure-pipelines/template-daemon.yml@buildimage
146144
- bash: |
147145
set -ex
146+
if echo $(GROUP_NAME) | grep mellanox; then
147+
BUILD_OPTIONS="$BUILD_OPTIONS INCLUDE_DHCP_SERVER=y"
148+
fi
148149
if [ $(GROUP_NAME) == pensando ]; then
149150
make $BUILD_OPTIONS target/sonic-pensando.tar
150151
elif [ $(GROUP_NAME) == vs ]; then
@@ -182,10 +183,6 @@ jobs:
182183
make $BUILD_OPTIONS INSTALL_DEBUG_TOOLS=y target/sonic-$(GROUP_NAME).bin
183184
mv target/sonic-$(GROUP_NAME).bin target/sonic-$(GROUP_NAME)-dbg.bin
184185
fi
185-
if [ $(ss_image) == yes ]; then
186-
make $BUILD_OPTIONS SMARTSWITCH=1 INCLUDE_DHCP_SERVER=y target/sonic-$(GROUP_NAME).bin
187-
mv target/sonic-$(GROUP_NAME).bin target/sonic-$(GROUP_NAME)-smartswitch.bin
188-
fi
189186
if [ $(swi_image) == yes ]; then
190187
make $BUILD_OPTIONS ENABLE_IMAGE_SIGNATURE=y target/sonic-aboot-$(GROUP_NAME).swi
191188
fi

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ endif
3737
PLATFORM_PATH := platform/$(if $(PLATFORM),$(PLATFORM),$(CONFIGURED_PLATFORM))
3838
PLATFORM_CHECKOUT := platform/checkout
3939
PLATFORM_CHECKOUT_FILE := $(PLATFORM_CHECKOUT)/$(PLATFORM).ini
40-
ifeq ($(SMARTSWITCH),1)
41-
PLATFORM_CHECKOUT_FILE := $(PLATFORM_CHECKOUT)/$(PLATFORM)-smartswitch.ini
42-
endif
4340
PLATFORM_CHECKOUT_CMD := $(shell if [ -f $(PLATFORM_CHECKOUT_FILE) ]; then PLATFORM_PATH=$(PLATFORM_PATH) j2 $(PLATFORM_CHECKOUT)/template.j2 $(PLATFORM_CHECKOUT_FILE); fi)
4441
MAKE_WITH_RETRY := ./scripts/run_with_retry $(MAKE)
4542

platform/checkout/cisco-8000-smartswitch.ini

Lines changed: 0 additions & 4 deletions
This file was deleted.

rules/config

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ DEFAULT_BUILD_LOG_TIMESTAMP = none
4242
# CHANGE_DEFAULT_PASSWORD - enforce default user/users to change password on 1st login
4343
CHANGE_DEFAULT_PASSWORD ?= n
4444

45-
# Default value for SMARTSWITCH
46-
SMARTSWITCH ?= 0
47-
4845
# DEFAULT_USERNAME - default username for installer build
4946
DEFAULT_USERNAME = admin
5047

@@ -155,14 +152,9 @@ INCLUDE_NAT = y
155152
# INCLUDE_DHCP_RELAY - build and install dhcp-relay package
156153
INCLUDE_DHCP_RELAY = y
157154

158-
# INCLUDE_DHCP_SERVER - build and install dhcp-server package
155+
# INCLUDE_DHCP_SERVER - build dhcp-server package and enable based on config_db.json
159156
INCLUDE_DHCP_SERVER ?= n
160157

161-
# Conditionally enable DHCP_SERVER when SMARTSWITCH is set to 1
162-
ifeq ($(SMARTSWITCH), 1)
163-
INCLUDE_DHCP_SERVER = y
164-
endif
165-
166158
# INCLUDE_P4RT - build docker-p4rt for P4RT support
167159
INCLUDE_P4RT = n
168160

0 commit comments

Comments
 (0)