[make] introducing new build option KERNEL_PROCURE_METHOD (#1837)
* [make] introducing new build option KERNEL_BUILD_METHOD - Kernel could be built from source files with method 'build' - Kernel could be downloaded from Azure storage with method 'download' Signed-off-by: Ying Xie <ying.xie@microsoft.com> * Replace BUILD with PROCURE * fix typo
This commit is contained in:
parent
e3abf0c070
commit
3c33737d58
4
Makefile
4
Makefile
@ -15,7 +15,8 @@
|
||||
# * 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/$(USER)/src, only effective when KEEP_SLAVE_ON=yes
|
||||
# * SONIC_BUILD_JOB: Specifying number of concurrent build job(s) to run
|
||||
# * SONIC_BUILD_JOBS: Specifying number of concurrent build job(s) to run
|
||||
# * KERNEL_PROCURE_METHOD: Specifying method of obtaining kernel Debian package: download or build
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
@ -69,6 +70,7 @@ SONIC_BUILD_INSTRUCTION := make \
|
||||
PASSWORD=$(PASSWORD) \
|
||||
USERNAME=$(USERNAME) \
|
||||
SONIC_BUILD_JOBS=$(SONIC_BUILD_JOBS) \
|
||||
KERNEL_PROCURE_METHOD=$(KERNEL_PROCURE_METHOD) \
|
||||
HTTP_PROXY=$(http_proxy) \
|
||||
HTTPS_PROXY=$(https_proxy) \
|
||||
SONIC_ENABLE_SYSTEM_TELEMETRY=$(ENABLE_SYSTEM_TELEMETRY)
|
||||
|
@ -66,3 +66,8 @@ ENABLE_ORGANIZATION_EXTENSIONS = y
|
||||
|
||||
# ENABLE_SYSTEM_TELEMETRY - build docker-sonic-telemetry for system telemetry support
|
||||
# ENABLE_SYSTEM_TELEMETRY = y
|
||||
|
||||
# DEFAULT_KERNEL_PROCURE_METHOD - default method for obtaining kernel
|
||||
# build: build kernel from source
|
||||
# download: download pre-built kernel from Azure storage.
|
||||
DEFAULT_KERNEL_PROCURE_METHOD = build
|
||||
|
8
slave.mk
8
slave.mk
@ -99,6 +99,10 @@ ifeq ($(SONIC_BUILD_JOBS),)
|
||||
override SONIC_BUILD_JOBS := $(SONIC_CONFIG_BUILD_JOBS)
|
||||
endif
|
||||
|
||||
ifeq ($(KERNEL_PROCURE_METHOD),)
|
||||
override KERNEL_PROCURE_METHOD := $(DEFAULT_KERNEL_PROCURE_METHOD)
|
||||
endif
|
||||
|
||||
MAKEFLAGS += -j $(SONIC_BUILD_JOBS)
|
||||
export SONIC_CONFIG_MAKE_JOBS
|
||||
|
||||
@ -127,6 +131,7 @@ $(info "HTTPS_PROXY" : "$(HTTPS_PROXY)")
|
||||
$(info "ENABLE_SYSTEM_TELEMETRY" : "$(ENABLE_SYSTEM_TELEMETRY)")
|
||||
$(info "SONIC_DEBUGGING_ON" : "$(SONIC_DEBUGGING_ON)")
|
||||
$(info "SONIC_PROFILING_ON" : "$(SONIC_PROFILING_ON)")
|
||||
$(info "KERNEL_PROCURE_METHOD" : "$(KERNEL_PROCURE_METHOD)")
|
||||
$(info )
|
||||
|
||||
###############################################################################
|
||||
@ -134,6 +139,8 @@ $(info )
|
||||
## All rules must go after includes for propper targets expansion
|
||||
###############################################################################
|
||||
|
||||
export kernel_procure_method="$(KERNEL_PROCURE_METHOD)"
|
||||
|
||||
###############################################################################
|
||||
## Local targets
|
||||
###############################################################################
|
||||
@ -149,6 +156,7 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_COPY_DEBS)) : $(DEBS_PATH)/% : .platform
|
||||
{ cp $($(deb)_PATH)/$(deb) $(DEBS_PATH)/ $(LOG) || exit 1 ; } ; )
|
||||
$(FOOTER)
|
||||
|
||||
|
||||
SONIC_TARGET_LIST += $(addprefix $(DEBS_PATH)/, $(SONIC_COPY_DEBS))
|
||||
|
||||
# Copy regular files from local directory
|
||||
|
Loading…
Reference in New Issue
Block a user