From f579f61e4cfd1750d3bd01a5fbe6b0a0c8a701fe Mon Sep 17 00:00:00 2001 From: FuzailBrcm <51665572+FuzailBrcm@users.noreply.github.com> Date: Tue, 10 May 2022 00:47:38 +0530 Subject: [PATCH] Fix for Accton platform build failure when doing incremental build (#10541) --- platform/broadcom/platform-modules-accton.mk | 2 +- platform/pddf/i2c/debian/control | 3 +++ platform/pddf/i2c/debian/sonic-platform-pddf-sym.install | 1 + platform/pddf/i2c/debian/sonic-platform-pddf-sym.postinst | 2 ++ platform/pddf/platform-modules-pddf.mk | 3 +++ 5 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 platform/pddf/i2c/debian/sonic-platform-pddf-sym.install create mode 100644 platform/pddf/i2c/debian/sonic-platform-pddf-sym.postinst diff --git a/platform/broadcom/platform-modules-accton.mk b/platform/broadcom/platform-modules-accton.mk index 1e2bfdcf82de..85e7ff1f5641 100755 --- a/platform/broadcom/platform-modules-accton.mk +++ b/platform/broadcom/platform-modules-accton.mk @@ -44,7 +44,7 @@ export ACCTON_AS7315_27XB_PLATFORM_MODULE_VERSION ACCTON_AS7712_32X_PLATFORM_MODULE = sonic-platform-accton-as7712-32x_$(ACCTON_AS7712_32X_PLATFORM_MODULE_VERSION)_amd64.deb $(ACCTON_AS7712_32X_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-accton -$(ACCTON_AS7712_32X_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) +$(ACCTON_AS7712_32X_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) $(PDDF_PLATFORM_MODULE_SYM) $(ACCTON_AS7712_32X_PLATFORM_MODULE)_PLATFORM = x86_64-accton_as7712_32x-r0 SONIC_DPKG_DEBS += $(ACCTON_AS7712_32X_PLATFORM_MODULE) diff --git a/platform/pddf/i2c/debian/control b/platform/pddf/i2c/debian/control index afd96c3d260a..a6056598dd6e 100755 --- a/platform/pddf/i2c/debian/control +++ b/platform/pddf/i2c/debian/control @@ -9,4 +9,7 @@ Package: sonic-platform-pddf Architecture: amd64 Description: kernel modules for platform devices such as psu, fan, sfp, led +Package: sonic-platform-pddf-sym +Architecture: amd64 +Description: PDDF kernel modules symbols which could be used for other platform modules build diff --git a/platform/pddf/i2c/debian/sonic-platform-pddf-sym.install b/platform/pddf/i2c/debian/sonic-platform-pddf-sym.install new file mode 100644 index 000000000000..a655ef1f64e8 --- /dev/null +++ b/platform/pddf/i2c/debian/sonic-platform-pddf-sym.install @@ -0,0 +1 @@ +Module.symvers.PDDF sonic/platform/pddf/i2c diff --git a/platform/pddf/i2c/debian/sonic-platform-pddf-sym.postinst b/platform/pddf/i2c/debian/sonic-platform-pddf-sym.postinst new file mode 100644 index 000000000000..0b34c29eed90 --- /dev/null +++ b/platform/pddf/i2c/debian/sonic-platform-pddf-sym.postinst @@ -0,0 +1,2 @@ +chmod 777 sonic/platform/pddf/i2c/Module.symvers.PDDF +chown $(stat -c "%u:%g" sonic/platform/pddf/i2c) sonic/platform/pddf/i2c/Module.symvers.PDDF diff --git a/platform/pddf/platform-modules-pddf.mk b/platform/pddf/platform-modules-pddf.mk index 5947c1806565..33d97e7fb50e 100644 --- a/platform/pddf/platform-modules-pddf.mk +++ b/platform/pddf/platform-modules-pddf.mk @@ -9,4 +9,7 @@ $(PDDF_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PDDF_PATH)/i2c $(PDDF_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) SONIC_DPKG_DEBS += $(PDDF_PLATFORM_MODULE) +PDDF_PLATFORM_MODULE_SYM = sonic-platform-pddf-sym_$(PDDF_PLATFORM_MODULE_VERSION)_amd64.deb +$(eval $(call add_derived_package,$(PDDF_PLATFORM_MODULE),$(PDDF_PLATFORM_MODULE_SYM))) + SONIC_STRETCH_DEBS += $(PDDF_PLATFORM_MODULE)