add INSTALLS, LAZY_INSTALLS, DEPENDS targets to image build (#1159)
1. _INSTALLS defines the packages to be installed in the image at the build time. 2. _LAZY_INSTALLS defines the packages to be installed in the image at the first run time 3. _DEPENDS defines the packages to at the build dependency of the image
This commit is contained in:
parent
e784aafbda
commit
f4e37a66f9
@ -3,6 +3,6 @@
|
||||
SONIC_ONE_ABOOT_IMAGE = sonic-aboot-broadcom.swi
|
||||
$(SONIC_ONE_ABOOT_IMAGE)_MACHINE = broadcom
|
||||
$(SONIC_ONE_ABOOT_IMAGE)_IMAGE_TYPE = aboot
|
||||
$(SONIC_ONE_ABOOT_IMAGE)_DEPENDS += $(BRCM_OPENNSL_KERNEL) $(ARISTA_PLATFORM_MODULE)
|
||||
$(SONIC_ONE_ABOOT_IMAGE)_INSTALLS += $(BRCM_OPENNSL_KERNEL) $(ARISTA_PLATFORM_MODULE)
|
||||
$(SONIC_ONE_ABOOT_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES)
|
||||
SONIC_INSTALLERS += $(SONIC_ONE_ABOOT_IMAGE)
|
||||
|
@ -3,8 +3,8 @@
|
||||
SONIC_ONE_IMAGE = sonic-broadcom.bin
|
||||
$(SONIC_ONE_IMAGE)_MACHINE = broadcom
|
||||
$(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie
|
||||
$(SONIC_ONE_IMAGE)_DEPENDS += $(BRCM_OPENNSL_KERNEL)
|
||||
$(SONIC_ONE_IMAGE)_INSTALLS += $(DELL_S6000_PLATFORM_MODULE) \
|
||||
$(SONIC_ONE_IMAGE)_INSTALLS += $(BRCM_OPENNSL_KERNEL)
|
||||
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(DELL_S6000_PLATFORM_MODULE) \
|
||||
$(DELL_Z9100_PLATFORM_MODULE) \
|
||||
$(DELL_S6100_PLATFORM_MODULE) \
|
||||
$(INGRASYS_S8900_54XC_PLATFORM_MODULE) \
|
||||
|
@ -3,7 +3,7 @@
|
||||
SONIC_RAW_IMAGE = sonic-broadcom.raw
|
||||
$(SONIC_RAW_IMAGE)_MACHINE = broadcom
|
||||
$(SONIC_RAW_IMAGE)_IMAGE_TYPE = raw
|
||||
$(SONIC_RAW_IMAGE)_DEPENDS += $(BRCM_OPENNSL_KERNEL)
|
||||
$(SONIC_RAW_IMAGE)_INSTALLS += $($(SONIC_ONE_IMAGE)_INSTALLS)
|
||||
$(SONIC_RAW_IMAGE)_INSTALLS += $(BRCM_OPENNSL_KERNEL)
|
||||
$(SONIC_RAW_IMAGE)_LAZY_INSTALLS += $($(SONIC_ONE_IMAGE)_LAZY_INSTALLS)
|
||||
$(SONIC_RAW_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES)
|
||||
SONIC_INSTALLERS += $(SONIC_RAW_IMAGE)
|
||||
|
@ -3,7 +3,7 @@
|
||||
SONIC_ONE_IMAGE = sonic-cavium.bin
|
||||
$(SONIC_ONE_IMAGE)_MACHINE = cavium
|
||||
$(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie
|
||||
$(SONIC_ONE_IMAGE)_DEPENDS += $(CAVM_PLATFORM_DEB)
|
||||
$(SONIC_ONE_IMAGE)_DEPENDS += $(CAVM_XPNET_DEB)
|
||||
$(SONIC_ONE_IMAGE)_INSTALLS += $(CAVM_PLATFORM_DEB)
|
||||
$(SONIC_ONE_IMAGE)_INSTALLS += $(CAVM_XPNET_DEB)
|
||||
$(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES)
|
||||
SONIC_INSTALLERS += $(SONIC_ONE_IMAGE)
|
||||
|
@ -3,6 +3,6 @@
|
||||
SONIC_ONE_IMAGE = sonic-centec.bin
|
||||
$(SONIC_ONE_IMAGE)_MACHINE = centec
|
||||
$(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie
|
||||
$(SONIC_ONE_IMAGE)_DEPENDS += $(CENTEC_SDK_KERNEL)
|
||||
$(SONIC_ONE_IMAGE)_INSTALLS += $(CENTEC_SDK_KERNEL)
|
||||
$(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES)
|
||||
SONIC_INSTALLERS += $(SONIC_ONE_IMAGE)
|
||||
|
@ -3,6 +3,6 @@
|
||||
SONIC_GENERIC_ABOOT_IMAGE = sonic-aboot-generic.swi
|
||||
$(SONIC_GENERIC_ABOOT_IMAGE)_MACHINE = generic
|
||||
$(SONIC_GENERIC_ABOOT_IMAGE)_IMAGE_TYPE = aboot
|
||||
$(SONIC_GENERIC_ABOOT_IMAGE)_DEPENDS =
|
||||
$(SONIC_GENERIC_ABOOT_IMAGE)_INSTALLS =
|
||||
$(SONIC_GENERIC_ABOOT_IMAGE)_DOCKERS =
|
||||
SONIC_INSTALLERS += $(SONIC_GENERIC_ABOOT_IMAGE)
|
||||
|
@ -3,6 +3,6 @@
|
||||
SONIC_GENERIC_ONIE_IMAGE = sonic-generic.bin
|
||||
$(SONIC_GENERIC_ONIE_IMAGE)_MACHINE = generic
|
||||
$(SONIC_GENERIC_ONIE_IMAGE)_IMAGE_TYPE = onie
|
||||
$(SONIC_GENERIC_ONIE_IMAGE)_DEPENDS =
|
||||
$(SONIC_GENERIC_ONIE_IMAGE)_INSTALLS =
|
||||
$(SONIC_GENERIC_ONIE_IMAGE)_DOCKERS =
|
||||
SONIC_INSTALLERS += $(SONIC_GENERIC_ONIE_IMAGE)
|
||||
|
@ -3,7 +3,7 @@
|
||||
SONIC_ONE_IMAGE = sonic-mellanox.bin
|
||||
$(SONIC_ONE_IMAGE)_MACHINE = mellanox
|
||||
$(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie
|
||||
$(SONIC_ONE_IMAGE)_DEPENDS += $(SX_KERNEL) $(KERNEL_MFT) $(MFT) $(MLNX_HW_MANAGEMENT)
|
||||
$(SONIC_ONE_IMAGE)_INSTALLS += $(SX_KERNEL) $(KERNEL_MFT) $(MFT) $(MLNX_HW_MANAGEMENT)
|
||||
$(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES)
|
||||
$(SONIC_ONE_IMAGE)_FILES += $(MLNX_FW_FILE)
|
||||
SONIC_INSTALLERS += $(SONIC_ONE_IMAGE)
|
||||
|
19
slave.mk
19
slave.mk
@ -380,7 +380,20 @@ $(DOCKER_LOAD_TARGETS) : $(TARGET_PATH)/%.gz-load : .platform docker-start $$(TA
|
||||
###############################################################################
|
||||
|
||||
# targets for building installers with base image
|
||||
$(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : .platform onie-image.conf $$(addprefix $(DEBS_PATH)/,$$($$*_DEPENDS)) $$(addprefix $(DEBS_PATH)/,$$($$*_INSTALLS)) $$(addprefix $(FILES_PATH)/,$$($$*_FILES)) $(addprefix $(DEBS_PATH)/,$(INITRAMFS_TOOLS) $(LINUX_KERNEL) $(IGB_DRIVER) $(SONIC_DEVICE_DATA) $(SONIC_UTILS)) $$(addprefix $(TARGET_PATH)/,$$($$*_DOCKERS)) $$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE))
|
||||
$(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
|
||||
.platform \
|
||||
onie-image.conf \
|
||||
$$(addsuffix -install,$$(addprefix $(DEBS_PATH)/,$$($$*_DEPENDS))) \
|
||||
$$(addprefix $(DEBS_PATH)/,$$($$*_INSTALLS)) \
|
||||
$$(addprefix $(DEBS_PATH)/,$$($$*_LAZY_INSTALLS)) \
|
||||
$$(addprefix $(FILES_PATH)/,$$($$*_FILES)) \
|
||||
$(addprefix $(DEBS_PATH)/,$(INITRAMFS_TOOLS) \
|
||||
$(LINUX_KERNEL) \
|
||||
$(IGB_DRIVER) \
|
||||
$(SONIC_DEVICE_DATA) \
|
||||
$(SONIC_UTILS)) \
|
||||
$$(addprefix $(TARGET_PATH)/,$$($$*_DOCKERS)) \
|
||||
$$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE))
|
||||
$(HEADER)
|
||||
# Pass initramfs and linux kernel explicitly. They are used for all platforms
|
||||
export initramfs_tools="$(DEBS_PATH)/$(INITRAMFS_TOOLS)"
|
||||
@ -392,8 +405,8 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : .platform
|
||||
export enable_organization_extensions="$(ENABLE_ORGANIZATION_EXTENSIONS)"
|
||||
export enable_dhcp_graph_service="$(ENABLE_DHCP_GRAPH_SERVICE)"
|
||||
export shutdown_bgp_on_start="$(SHUTDOWN_BGP_ON_START)"
|
||||
export installer_debs="$(addprefix $(DEBS_PATH)/,$($*_DEPENDS))"
|
||||
export lazy_installer_debs="$(foreach deb, $($*_INSTALLS),$(foreach device, $($(deb)_PLATFORM),$(addprefix $(device)@, $(DEBS_PATH)/$(deb))))"
|
||||
export installer_debs="$(addprefix $(DEBS_PATH)/,$($*_INSTALLS))"
|
||||
export lazy_installer_debs="$(foreach deb, $($*_LAZY_INSTALLS),$(foreach device, $($(deb)_PLATFORM),$(addprefix $(device)@, $(DEBS_PATH)/$(deb))))"
|
||||
export installer_images="$(addprefix $(TARGET_PATH)/,$($*_DOCKERS))"
|
||||
export config_engine_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE))"
|
||||
export swsssdk_py2_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SWSSSDK_PY2))"
|
||||
|
Loading…
Reference in New Issue
Block a user