Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# * PASSWORD: Desired password -- default at rules/config
# * KEEP_SLAVE_ON: Keeps slave container up after building-process concludes.
# * SOURCE_FOLDER: host path to be mount as /var/src, only effective when KEEP_SLAVE_ON=yes
# * SONIC_BUILD_JOB: Specifying number of concurrent build job(s) to run
#
###############################################################################

Expand Down Expand Up @@ -59,7 +60,8 @@ SONIC_BUILD_INSTRUCTION := make \
SHUTDOWN_BGP_ON_START=$(SHUTDOWN_BGP_ON_START) \
ENABLE_SYNCD_RPC=$(ENABLE_SYNCD_RPC) \
PASSWORD=$(PASSWORD) \
USERNAME=$(USERNAME)
USERNAME=$(USERNAME) \
SONIC_BUILD_JOBS=$(SONIC_BUILD_JOBS)

.PHONY: sonic-slave-build sonic-slave-bash init

Expand Down
8 changes: 6 additions & 2 deletions slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ ifeq ($(PASSWORD),)
override PASSWORD := $(DEFAULT_PASSWORD)
endif

MAKEFLAGS += -j $(SONIC_CONFIG_BUILD_JOBS)
ifeq ($(SONIC_BUILD_JOBS),)
override SONIC_BUILD_JOBS := $(SONIC_CONFIG_BUILD_JOBS)
endif

MAKEFLAGS += -j $(SONIC_BUILD_JOBS)
export SONIC_CONFIG_MAKE_JOBS

###############################################################################
Expand All @@ -86,7 +90,7 @@ $(info )
$(info Build Configuration)
$(info "CONFIGURED_PLATFORM" : "$(if $(PLATFORM),$(PLATFORM),$(CONFIGURED_PLATFORM))")
$(info "SONIC_CONFIG_PRINT_DEPENDENCIES" : "$(SONIC_CONFIG_PRINT_DEPENDENCIES)")
$(info "SONIC_CONFIG_BUILD_JOBS" : "$(SONIC_CONFIG_BUILD_JOBS)")
$(info "SONIC_BUILD_JOBS" : "$(SONIC_BUILD_JOBS)")
$(info "SONIC_CONFIG_MAKE_JOBS" : "$(SONIC_CONFIG_MAKE_JOBS)")
$(info "DEFAULT_USERNAME" : "$(DEFAULT_USERNAME)")
$(info "DEFAULT_PASSWORD" : "$(DEFAULT_PASSWORD)")
Expand Down