Skip to content

Commit

Permalink
[build]: support for DPKG local caching (#4117)
Browse files Browse the repository at this point in the history
DPKG caching framework provides the infrastructure to cache the sonic module/target .deb files into a local cache by tracking the target dependency files.SONIC build infrastructure is designed as a plugin framework where any new source code can be easily integrated into sonic as a module and that generates output as a .deb file. The source code compilation of a module is completely independent of other modules compilation. Inter module dependency is resolved through build artifacts like header files, libraries, and binaries in the form of Debian packages. For example module A depends on module B. While module A is being built, it uses B's .deb file to install it in the build docker.

The DPKG caching framework provides an infrastructure that caches a module's deb package and restores it back to the build directory if its dependency files are not modified. When a module is compiled for the first time, the generated deb package is stored at the DPKG cache location. On the subsequent build, first, it checks the module dependency file modification. If none of the dependent files is changed, it copies the deb package from the cache location, otherwise, it goes for local compilation and generates the deb package. The modified files should be checked-in to get the newer cache deb package.

This provides a huge improvement in build time and also supports the true incremental build by tracking the dependency files.

- How I did it
It takes two global arguments to enable the DPKG caching, the first one indicates the caching method and the second one describes the location of the cache.
SONIC_DPKG_CACHE_METHOD=cache
SONIC_DPKG_CACHE_SOURCE=

    where  SONIC_DPKG_CACHE_METHOD - Default method is 'cache' for deb package caching
                            none:     no caching
                            cache:    cache from local directory
Dependency file tracking:
Dependency files are tracked for each target in two levels.
1. Common make infrastructure files - rules/config, rules/functions, slave.mk etc.
2. Per module files - files which are specific to modules, Makefile, debian/rules, patch files, etc.

    For example: dependency files for Linux Kernel - src/sonic-linux-kernel,

            SPATH       := $($(LINUX_HEADERS_COMMON)_SRC_PATH)
            DEP_FILES   := $(SONIC_COMMON_FILES_LIST) rules/linux-kernel.mk rules/linux-kernel.dep
            DEP_FILES   += $(SONIC_COMMON_BASE_FILES_LIST)
            SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files))

            DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) \
                         $(KERNEL_PROCURE_METHOD) $(KERNEL_CACHE_PATH)

            $(LINUX_HEADERS_COMMON)_CACHE_MODE  := GIT_CONTENT_SHA
            $(LINUX_HEADERS_COMMON)_DEP_FLAGS   := $(DEP_FLAGS)
            $(LINUX_HEADERS_COMMON)_DEP_FILES   := $(DEP_FILES)
            $(LINUX_HEADERS_COMMON)_SMDEP_FILES := $(SMDEP_FILES)
            $(LINUX_HEADERS_COMMON)_SMDEP_PATHS := $(SPATH)
Cache file tracking:
The Cache file is a compressed TAR ball of a module's target DEB file and its derived-target DEB files.
The cache filename is formed with the following format

    FORMAT:
            <module deb filename>.<24 byte of DEP SHA hash >-<24 byte of MOD SHA hash>.tgz
            Eg:
              linux-headers-4.9.0-9-2-common_4.9.168-1+deb9u3_all.deb-23658712fd21bb776fa16f47-c0b63ef593d4a32643bca228.tgz

            < 24-byte DEP SHA value > - the SHA value is derived from all the dependent packages.
            < 24-byte MOD SHA value > - the SHA value is derived from either of the following.
                    GIT_COMMIT_SHA  - SHA value of the last git commit ID if it is a submodule
                    GIT_CONTENT_SHA - SHA value is generated from the content of the target dependency files.
Target Specific rules:
Caching can be enabled/disabled on a global level and also on the per-target level.

            $(addprefix $(DEBS_PATH)/, $(SONIC_DPKG_DEBS)) : $(DEBS_PATH)/% : .platform $$(addsuffix -install,$$(addprefix $(DEBS_PATH)/,$$($$*_DEPENDS))) \
                    $(call dpkg_depend,$(DEBS_PATH)/%.dep )
            $(HEADER)


            # Load the target deb from DPKG cache
            $(call LOAD_CACHE,$*,$@)


            # Skip building the target if it is already loaded from cache
            if [ -z '$($*_CACHE_LOADED)' ] ; then

                  .....
                 # Rules for Generating the target DEB file.
                  .....

                  # Save the target deb into DPKG cache
                  $(call SAVE_CACHE,$*,$@)
            fi


            $(FOOTER)


    The make rule-'$(call dpkg_depend,$(DEBS_PATH)/%.dep )' checks for target dependency file modification. If it is newer than the target, it will go for re-generation of that target.

    Two main macros 'LOAD_CACHE' and 'SAVE_CACHE' are used for loading and storing the cache contents.
    The 'LOAD_CACHE' macro is used to load the cache file from cache storage and extracts them into the target folder. It is done only if target dependency files are not modified by checking the GIT file status, otherwise, cache loading is skipped and full compilation is performed.
    It also updates the target-specific variable to indicate the cache is loaded or not.
    The 'SAVE_CACHE' macro generates the compressed tarball of the cache file and saves them into cache storage. Saving into the cache storage is protected with a lock.
- How to verify it

    The caching functionality is verified by enabling it in Linux kernel submodule.
    It uses the cache directory as 'target/cache' where Linux cache file gets stored on the first-time build and it is picked from the cache location during the subsequent clean build.
- Description for the changelog
The DPKG caching framework provides the infrastructure to save the module-specific deb file to be cached by tracking the module's dependency files.
If the module's dependency files are not changed, it restores the module deb files from the cache storage.

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

DOCUMENT PR:

           sonic-net/SONiC#559
  • Loading branch information
Kalimuthu-Velappan committed Mar 12, 2020
1 parent 8f0ff4b commit 7d2ebf8
Show file tree
Hide file tree
Showing 124 changed files with 2,207 additions and 127 deletions.
671 changes: 671 additions & 0 deletions Makefile.cache

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
# * Default: yes
# * Values: yes, no
# * KERNEL_PROCURE_METHOD: Specifying method of obtaining kernel Debian package: download or build
# * SONIC_DPKG_CACHE_METHOD: Specifying method of obtaining the Debian packages from cache: none or cache
# * SONIC_DPKG_CACHE_SOURCE: Debian package cache location when cache enabled for debian packages
#
###############################################################################

Expand Down Expand Up @@ -107,6 +109,10 @@ DOCKER_RUN := docker run --rm=true --privileged \

include rules/config

ifneq ($(SONIC_DPKG_CACHE_SOURCE),)
DOCKER_RUN += -v "$(SONIC_DPKG_CACHE_SOURCE):/dpkg_cache:rw"
endif

ifeq ($(SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD), y)
DOCKER_RUN += -v /var/run/docker.sock:/var/run/docker.sock
endif
Expand Down Expand Up @@ -172,12 +178,15 @@ SONIC_BUILD_INSTRUCTION := make \
SONIC_ENABLE_PFCWD_ON_START=$(ENABLE_PFCWD_ON_START) \
SONIC_ENABLE_SYNCD_RPC=$(ENABLE_SYNCD_RPC) \
SONIC_INSTALL_DEBUG_TOOLS=$(INSTALL_DEBUG_TOOLS) \
MDEBUG=$(MDEBUG) \
PASSWORD=$(PASSWORD) \
USERNAME=$(USERNAME) \
SONIC_BUILD_JOBS=$(SONIC_BUILD_JOBS) \
SONIC_USE_DOCKER_BUILDKIT=$(SONIC_USE_DOCKER_BUILDKIT) \
VS_PREPARE_MEM=$(VS_PREPARE_MEM) \
KERNEL_PROCURE_METHOD=$(KERNEL_PROCURE_METHOD) \
SONIC_DPKG_CACHE_METHOD=$(SONIC_DPKG_CACHE_METHOD) \
SONIC_DPKG_CACHE_SOURCE=$(SONIC_DPKG_CACHE_SOURCE) \
HTTP_PROXY=$(http_proxy) \
HTTPS_PROXY=$(https_proxy) \
SONIC_ENABLE_SYSTEM_TELEMETRY=$(ENABLE_SYSTEM_TELEMETRY) \
Expand Down
10 changes: 10 additions & 0 deletions platform/broadcom/docker-ptf-brcm.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

DPATH := $($(DOCKER_PTF_BRCM)_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/docker-ptf-brcm.mk platform/broadcom/docker-ptf-brcm.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(DPATH))

$(DOCKER_PTF_BRCM)_CACHE_MODE := GIT_CONTENT_SHA
$(DOCKER_PTF_BRCM)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(DOCKER_PTF_BRCM)_DEP_FILES := $(DEP_FILES)

10 changes: 10 additions & 0 deletions platform/broadcom/docker-saiserver-brcm.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

DPATH := $($(DOCKER_SAISERVER_BRCM)_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/docker-saiserver-brcm.mk platform/broadcom/docker-saiserver-brcm.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(DPATH))

$(DOCKER_SAISERVER_BRCM)_CACHE_MODE := GIT_CONTENT_SHA
$(DOCKER_SAISERVER_BRCM)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(DOCKER_SAISERVER_BRCM)_DEP_FILES := $(DEP_FILES)

10 changes: 10 additions & 0 deletions platform/broadcom/docker-syncd-brcm-rpc.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

DPATH := $($(DOCKER_SYNCD_BRCM_RPC)_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) $(PLATFORM_PATH)/docker-syncd-brcm-rpc.mk $(PLATFORM_PATH)/docker-syncd-brcm-rpc.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(DPATH))

$(DOCKER_SYNCD_BRCM_RPC)_CACHE_MODE := GIT_CONTENT_SHA
$(DOCKER_SYNCD_BRCM_RPC)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(DOCKER_SYNCD_BRCM_RPC)_DEP_FILES := $(DEP_FILES)

11 changes: 11 additions & 0 deletions platform/broadcom/docker-syncd-brcm.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#DPKG FRK
DPATH := $($(DOCKER_SYNCD_BASE)_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/docker-syncd-brcm.mk platform/broadcom/docker-syncd-brcm.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(DPATH))

$(DOCKER_SYNCD_BASE)_CACHE_MODE := GIT_CONTENT_SHA
$(DOCKER_SYNCD_BASE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(DOCKER_SYNCD_BASE)_DEP_FILES := $(DEP_FILES)

$(eval $(call add_dbg_docker,$(DOCKER_SYNCD_BASE),$(DOCKER_SYNCD_BASE_DBG)))
13 changes: 13 additions & 0 deletions platform/broadcom/libsaithrift-dev.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#DPKG FRK
SPATH := $($(LIBSAITHRIFT_DEV)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/libsaithrift-dev.mk platform/broadcom/libsaithrift-dev.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
SMDEP_PATHS := $(SPATH) $(SPATH)/bm/behavioral-model $(SPATH)/test/ptf $(SPATH)/test/saithrift/ctypesgen
$(foreach path, $(SMDEP_PATHS), $(eval $(path) :=$(filter-out $(SMDEP_PATHS),$(addprefix $(path)/, $(shell cd $(path) && git ls-files | grep -Ev " " )))))

$(LIBSAITHRIFT_DEV)_CACHE_MODE := GIT_CONTENT_SHA
$(LIBSAITHRIFT_DEV)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(LIBSAITHRIFT_DEV)_DEP_FILES := $(DEP_FILES)
$(LIBSAITHRIFT_DEV)_SMDEP_FILES := $(foreach path, $(SMDEP_PATHS), $($(path)))
$(LIBSAITHRIFT_DEV)_SMDEP_PATHS := $(SMDEP_PATHS)

2 changes: 2 additions & 0 deletions platform/broadcom/one-aboot.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#DPKG FRK
$(SONIC_ONE_ABOOT_IMAGE)_CACHE_MODE := none
2 changes: 2 additions & 0 deletions platform/broadcom/one-image.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#DPKG FRK
$(SONIC_ONE_IMAGE)_CACHE_MODE := none
2 changes: 2 additions & 0 deletions platform/broadcom/one-pde-image.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#DPKG FRK
$(SONIC_ONE_PDE_IMAGE)_CACHE_MODE := none
10 changes: 10 additions & 0 deletions platform/broadcom/platform-modules-accton.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

MPATH := $($(ACCTON_AS7712_32X_PLATFORM_MODULE)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/platform-modules-accton.mk platform/broadcom/platform-modules-accton.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(MPATH))

$(ACCTON_AS7712_32X_PLATFORM_MODULE)_CACHE_MODE := GIT_CONTENT_SHA
$(ACCTON_AS7712_32X_PLATFORM_MODULE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(ACCTON_AS7712_32X_PLATFORM_MODULE)_DEP_FILES := $(DEP_FILES)

10 changes: 10 additions & 0 deletions platform/broadcom/platform-modules-alphanetworks.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

MPATH := $($(ALPHANETWORKS_SNH60A0_320FV2_PLATFORM_MODULE)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/platform-modules-alphanetworks.mk platform/broadcom/platform-modules-alphanetworks.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(MPATH))

$(ALPHANETWORKS_SNH60A0_320FV2_PLATFORM_MODULE)_CACHE_MODE := GIT_CONTENT_SHA
$(ALPHANETWORKS_SNH60A0_320FV2_PLATFORM_MODULE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(ALPHANETWORKS_SNH60A0_320FV2_PLATFORM_MODULE)_DEP_FILES := $(DEP_FILES)

13 changes: 13 additions & 0 deletions platform/broadcom/platform-modules-arista.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

MPATH := $($(ARISTA_PLATFORM_MODULE)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/platform-modules-arista.mk platform/broadcom/platform-modules-arista.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
SMDEP_FILES := $(addprefix $(MPATH)/,$(shell cd $(MPATH) && git ls-files))


$(ARISTA_PLATFORM_MODULE)_CACHE_MODE := GIT_CONTENT_SHA
$(ARISTA_PLATFORM_MODULE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(ARISTA_PLATFORM_MODULE)_DEP_FILES := $(DEP_FILES)
$(ARISTA_PLATFORM_MODULE)_SMDEP_FILES := $(SMDEP_FILES)
$(ARISTA_PLATFORM_MODULE)_SMDEP_PATHS := $(MPATH)

10 changes: 10 additions & 0 deletions platform/broadcom/platform-modules-brcm-xlr-gts.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

MPATH := $($(BRCM_XLR_GTS_PLATFORM_MODULE)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/platform-modules-brcm-xlr-gts.mk platform/broadcom/platform-modules-brcm-xlr-gts.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(MPATH))

$(BRCM_XLR_GTS_PLATFORM_MODULE)_CACHE_MODE := GIT_CONTENT_SHA
$(BRCM_XLR_GTS_PLATFORM_MODULE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(BRCM_XLR_GTS_PLATFORM_MODULE)_DEP_FILES := $(DEP_FILES)

10 changes: 10 additions & 0 deletions platform/broadcom/platform-modules-cel.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

MPATH := $($(CEL_DX010_PLATFORM_MODULE)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/platform-modules-cel.mk platform/broadcom/platform-modules-cel.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(MPATH))

$(CEL_DX010_PLATFORM_MODULE)_CACHE_MODE := GIT_CONTENT_SHA
$(CEL_DX010_PLATFORM_MODULE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(CEL_DX010_PLATFORM_MODULE)_DEP_FILES := $(DEP_FILES)

10 changes: 10 additions & 0 deletions platform/broadcom/platform-modules-dell.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

MPATH := $($(DELL_Z9100_PLATFORM_MODULE)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/platform-modules-dell.mk platform/broadcom/platform-modules-dell.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(MPATH))

$(DELL_Z9100_PLATFORM_MODULE)_CACHE_MODE := GIT_CONTENT_SHA
$(DELL_Z9100_PLATFORM_MODULE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(DELL_Z9100_PLATFORM_MODULE)_DEP_FILES := $(DEP_FILES)

10 changes: 10 additions & 0 deletions platform/broadcom/platform-modules-delta.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

MPATH := $($(DELTA_AG9032V1_PLATFORM_MODULE)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/platform-modules-delta.mk platform/broadcom/platform-modules-delta.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(MPATH))

$(DELTA_AG9032V1_PLATFORM_MODULE)_CACHE_MODE := GIT_CONTENT_SHA
$(DELTA_AG9032V1_PLATFORM_MODULE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(DELTA_AG9032V1_PLATFORM_MODULE)_DEP_FILES := $(DEP_FILES)

10 changes: 10 additions & 0 deletions platform/broadcom/platform-modules-ingrasys.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

MPATH := $($(INGRASYS_S9100_PLATFORM_MODULE)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/platform-modules-ingrasys.mk platform/broadcom/platform-modules-ingrasys.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(MPATH))

$(INGRASYS_S9100_PLATFORM_MODULE)_CACHE_MODE := GIT_CONTENT_SHA
$(INGRASYS_S9100_PLATFORM_MODULE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(INGRASYS_S9100_PLATFORM_MODULE)_DEP_FILES := $(DEP_FILES)

10 changes: 10 additions & 0 deletions platform/broadcom/platform-modules-inventec.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

MPATH := $($(INVENTEC_D7032Q28B_PLATFORM_MODULE)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/platform-modules-inventec.mk platform/broadcom/platform-modules-inventec.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(MPATH))

$(INVENTEC_D7032Q28B_PLATFORM_MODULE)_CACHE_MODE := GIT_CONTENT_SHA
$(INVENTEC_D7032Q28B_PLATFORM_MODULE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(INVENTEC_D7032Q28B_PLATFORM_MODULE)_DEP_FILES := $(DEP_FILES)

10 changes: 10 additions & 0 deletions platform/broadcom/platform-modules-juniper.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

SPATH := $($(JUNIPER_QFX5210_PLATFORM_MODULE)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/platform-modules-juniper.mk platform/broadcom/platform-modules-juniper.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(SPATH))

$(JUNIPER_QFX5210_PLATFORM_MODULE)_CACHE_MODE := GIT_CONTENT_SHA
$(JUNIPER_QFX5210_PLATFORM_MODULE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(JUNIPER_QFX5210_PLATFORM_MODULE)_DEP_FILES := $(DEP_FILES)

10 changes: 10 additions & 0 deletions platform/broadcom/platform-modules-mitac.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

MPATH := $($(MITAC_LY1200_32X_PLATFORM_MODULE)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/platform-modules-mitac.mk platform/broadcom/platform-modules-mitac.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(MPATH))

$(MITAC_LY1200_32X_PLATFORM_MODULE)_CACHE_MODE := GIT_CONTENT_SHA
$(MITAC_LY1200_32X_PLATFORM_MODULE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(MITAC_LY1200_32X_PLATFORM_MODULE)_DEP_FILES := $(DEP_FILES)

10 changes: 10 additions & 0 deletions platform/broadcom/platform-modules-quanta.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

MPATH := $($(QUANTA_IX1B_32X_PLATFORM_MODULE)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/platform-modules-quanta.mk platform/broadcom/platform-modules-quanta.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(MPATH))

$(QUANTA_IX1B_32X_PLATFORM_MODULE)_CACHE_MODE := GIT_CONTENT_SHA
$(QUANTA_IX1B_32X_PLATFORM_MODULE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(QUANTA_IX1B_32X_PLATFORM_MODULE)_DEP_FILES := $(DEP_FILES)

10 changes: 10 additions & 0 deletions platform/broadcom/platform-modules-s6000.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

MPATH := $($(DELL_S6000_PLATFORM_MODULE)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/platform-modules-s6000.mk platform/broadcom/platform-modules-s6000.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(MPATH))

$(DELL_S6000_PLATFORM_MODULE)_CACHE_MODE := GIT_CONTENT_SHA
$(DELL_S6000_PLATFORM_MODULE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(DELL_S6000_PLATFORM_MODULE)_DEP_FILES := $(DEP_FILES)

2 changes: 2 additions & 0 deletions platform/broadcom/raw-image.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#DPKG FRK
$(SONIC_RAW_IMAGE)_CACHE_MODE := none
25 changes: 25 additions & 0 deletions platform/broadcom/rules.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#DPKG FRK
include $(PLATFORM_PATH)/sai-modules.dep
include $(PLATFORM_PATH)/sai.dep
include $(PLATFORM_PATH)/platform-modules-s6000.dep
include $(PLATFORM_PATH)/platform-modules-dell.dep
include $(PLATFORM_PATH)/platform-modules-arista.dep
include $(PLATFORM_PATH)/platform-modules-ingrasys.dep
include $(PLATFORM_PATH)/platform-modules-accton.dep
include $(PLATFORM_PATH)/platform-modules-alphanetworks.dep
include $(PLATFORM_PATH)/platform-modules-inventec.dep
include $(PLATFORM_PATH)/platform-modules-cel.dep
include $(PLATFORM_PATH)/platform-modules-delta.dep
include $(PLATFORM_PATH)/platform-modules-quanta.dep
#include $(PLATFORM_PATH)/platform-modules-mitac.dep
include $(PLATFORM_PATH)/platform-modules-juniper.dep
include $(PLATFORM_PATH)/platform-modules-brcm-xlr-gts.dep
include $(PLATFORM_PATH)/docker-syncd-brcm.dep
include $(PLATFORM_PATH)/docker-syncd-brcm-rpc.dep
include $(PLATFORM_PATH)/docker-saiserver-brcm.dep
include $(PLATFORM_PATH)/one-image.dep
include $(PLATFORM_PATH)/one-pde-image.dep
include $(PLATFORM_PATH)/raw-image.dep
include $(PLATFORM_PATH)/one-aboot.dep
include $(PLATFORM_PATH)/libsaithrift-dev.dep
include $(PLATFORM_PATH)/docker-ptf-brcm.dep
10 changes: 10 additions & 0 deletions platform/broadcom/sai-modules.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

MPATH := $($(BRCM_OPENNSL_KERNEL)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/sai-modules.mk platform/broadcom/sai-modules.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(MPATH))

$(BRCM_OPENNSL_KERNEL)_CACHE_MODE := GIT_CONTENT_SHA
$(BRCM_OPENNSL_KERNEL)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(BRCM_OPENNSL_KERNEL)_DEP_FILES := $(DEP_FILES)

14 changes: 14 additions & 0 deletions platform/broadcom/sai.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

#DPKG FRK
SPATH := $($(BRCM_SAI)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/broadcom/sai.mk platform/broadcom/sai.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)

$(BRCM_SAI)_CACHE_MODE := GIT_CONTENT_SHA
$(BRCM_SAI)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(BRCM_SAI)_DEP_FILES := $(DEP_FILES)

$(BRCM_SAI_DEV)_CACHE_MODE := GIT_CONTENT_SHA
$(BRCM_SAI_DEV)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(BRCM_SAI_DEV)_DEP_FILES := $(DEP_FILES)

This file was deleted.

2 changes: 0 additions & 2 deletions platform/broadcom/sonic-platform-modules-juniper/debian/files

This file was deleted.

10 changes: 10 additions & 0 deletions platform/vs/docker-sonic-vs.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#DPKG FRK
DPATH := $($(DOCKER_SONIC_VS)_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/vs/docker-sonic-vs.mk platform/vs/docker-sonic-vs.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(DPATH))

$(DOCKER_SONIC_VS)_CACHE_MODE := GIT_CONTENT_SHA
$(DOCKER_SONIC_VS)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(DOCKER_SONIC_VS)_DEP_FILES := $(DEP_FILES)

11 changes: 11 additions & 0 deletions platform/vs/docker-syncd-vs.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#DPKG FRK
DPATH := $($(DOCKER_SYNCD_BASE)_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/vs/docker-syncd-vs.mk platform/vs/docker-syncd-vs.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(DPATH))

$(DOCKER_SYNCD_BASE)_CACHE_MODE := GIT_CONTENT_SHA
$(DOCKER_SYNCD_BASE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(DOCKER_SYNCD_BASE)_DEP_FILES := $(DEP_FILES)

$(eval $(call add_dbg_docker,$(DOCKER_SYNCD_BASE),$(DOCKER_SYNCD_BASE_DBG)))
2 changes: 2 additions & 0 deletions platform/vs/kvm-image.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#DPKG FRK
$(SONIC_KVM_IMAGE)_CACHE_MODE := none
2 changes: 2 additions & 0 deletions platform/vs/one-image.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#DPKG FRK
$(SONIC_ONE_IMAGE)_CACHE_MODE := none
2 changes: 2 additions & 0 deletions platform/vs/onie.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#DPKG FRK
$(ONIE_RECOVERY_IMAGE)_CACHE_MODE := none
8 changes: 8 additions & 0 deletions platform/vs/rules.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
include $(PLATFORM_PATH)/syncd-vs.dep
include $(PLATFORM_PATH)/sonic-version.dep
include $(PLATFORM_PATH)/docker-sonic-vs.dep
include $(PLATFORM_PATH)/docker-syncd-vs.dep
include $(PLATFORM_PATH)/one-image.dep
include $(PLATFORM_PATH)/onie.dep
include $(PLATFORM_PATH)/kvm-image.dep

2 changes: 2 additions & 0 deletions platform/vs/sonic-version.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#DPKG FRK
$(SONIC_VERSION)_CACHE_MODE := none
11 changes: 11 additions & 0 deletions platform/vs/syncd-vs.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#DPKG FRK
DPATH := $($(SYNCD_VS)_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/vs/syncd-vs.mk platform/vs/syncd-vs.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(DPATH))

$(SYNCD_VS)_CACHE_MODE := GIT_CONTENT_SHA
$(SYNCD_VS)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SYNCD_VS)_DEP_FILES := $(DEP_FILES)

$(eval $(call add_dbg_docker,$(SYNCD_VS),$(SYNCD_VS_DBG)))
12 changes: 12 additions & 0 deletions rules/asyncsnmp-py3.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

SPATH := $($(ASYNCSNMP_PY3)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/asyncsnmp-py3.mk rules/asyncsnmp-py3.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files))

$(ASYNCSNMP_PY3)_CACHE_MODE := GIT_CONTENT_SHA
$(ASYNCSNMP_PY3)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(ASYNCSNMP_PY3)_DEP_FILES := $(DEP_FILES)
$(ASYNCSNMP_PY3)_SMDEP_FILES := $(SMDEP_FILES)
$(ASYNCSNMP_PY3)_SMDEP_PATHS := $(SPATH)

10 changes: 10 additions & 0 deletions rules/bash.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

SPATH := $($(BASH)_SRC_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/bash.mk rules/bash.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(SPATH))

$(BASH)_CACHE_MODE := GIT_CONTENT_SHA
$(BASH)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(BASH)_DEP_FILES := $(DEP_FILES)

Loading

0 comments on commit 7d2ebf8

Please sign in to comment.