From 523a738068bc1975edc44b6954c028b23d02077d Mon Sep 17 00:00:00 2001 From: lguohan Date: Thu, 2 Feb 2017 18:28:06 -0800 Subject: [PATCH] add dell platform driver to broadcom one image (#242) --- .gitmodules | 3 +++ platform/broadcom/one-image.mk | 2 +- platform/broadcom/platform-modules-s6000.mk | 10 ++++++++++ platform/broadcom/rules.mk | 1 + .../broadcom/sonic-platform-modules-s6000 | 1 + platform/mellanox/hw-management.mk | 1 + platform/mellanox/mft.mk | 1 + rules/linux-kernel.mk | 19 ++++++++++++++----- src/sonic-linux-kernel | 2 +- 9 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 platform/broadcom/platform-modules-s6000.mk create mode 160000 platform/broadcom/sonic-platform-modules-s6000 diff --git a/.gitmodules b/.gitmodules index c8b1acdb78..d9188126bf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -47,3 +47,6 @@ [submodule "src/sonic-utilities"] path = src/sonic-utilities url = https://github.com/Azure/sonic-utilities +[submodule "platform/broadcom/sonic-platform-modules-s6000"] + path = platform/broadcom/sonic-platform-modules-s6000 + url = https://github.com/Azure/sonic-platform-modules-s6000 diff --git a/platform/broadcom/one-image.mk b/platform/broadcom/one-image.mk index 0b91fdba30..59939fb72e 100644 --- a/platform/broadcom/one-image.mk +++ b/platform/broadcom/one-image.mk @@ -3,6 +3,6 @@ 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)_DEPENDS += $(BRCM_OPENNSL_KERNEL) $(DELL_S6000_PLATFORM_MODULE) $(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES) SONIC_INSTALLERS += $(SONIC_ONE_IMAGE) diff --git a/platform/broadcom/platform-modules-s6000.mk b/platform/broadcom/platform-modules-s6000.mk new file mode 100644 index 0000000000..a32ab67c7a --- /dev/null +++ b/platform/broadcom/platform-modules-s6000.mk @@ -0,0 +1,10 @@ +# Dell S6000 Platform modules + +DELL_S6000_PLATFORM_MODULE_VERSION = 1.0 + +export DELL_S6000_PLATFORM_MODULE_VERSION + +DELL_S6000_PLATFORM_MODULE = platform-modules-s6000_$(DELL_S6000_PLATFORM_MODULE_VERSION)_amd64.deb +$(DELL_S6000_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-s6000 +$(DELL_S6000_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) +SONIC_DPKG_DEBS += $(DELL_S6000_PLATFORM_MODULE) diff --git a/platform/broadcom/rules.mk b/platform/broadcom/rules.mk index 80e2d38004..cd34b9c23b 100644 --- a/platform/broadcom/rules.mk +++ b/platform/broadcom/rules.mk @@ -1,5 +1,6 @@ include $(PLATFORM_PATH)/sdk.mk include $(PLATFORM_PATH)/sai.mk +include $(PLATFORM_PATH)/platform-modules-s6000.mk include $(PLATFORM_PATH)/docker-orchagent-brcm.mk include $(PLATFORM_PATH)/docker-syncd-brcm.mk include $(PLATFORM_PATH)/one-image.mk diff --git a/platform/broadcom/sonic-platform-modules-s6000 b/platform/broadcom/sonic-platform-modules-s6000 new file mode 160000 index 0000000000..1f6c70e7db --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-s6000 @@ -0,0 +1 @@ +Subproject commit 1f6c70e7db890851510a36892b602c534e4f41a7 diff --git a/platform/mellanox/hw-management.mk b/platform/mellanox/hw-management.mk index 1aa6386230..47863d180d 100644 --- a/platform/mellanox/hw-management.mk +++ b/platform/mellanox/hw-management.mk @@ -6,4 +6,5 @@ export MLNX_HW_MANAGEMENT_VERSION MLNX_HW_MANAGEMENT = hw-management_1.mlnx.$(MLNX_HW_MANAGEMENT_VERSION)_amd64.deb $(MLNX_HW_MANAGEMENT)_SRC_PATH = $(PLATFORM_PATH)/hw-management +$(MLNX_HW_MANAGEMENT)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) SONIC_MAKE_DEBS += $(MLNX_HW_MANAGEMENT) diff --git a/platform/mellanox/mft.mk b/platform/mellanox/mft.mk index 7dea01789a..966cb48c01 100644 --- a/platform/mellanox/mft.mk +++ b/platform/mellanox/mft.mk @@ -2,6 +2,7 @@ MFT = mft-4.5.0-31.amd64.deb $(MFT)_SRC_PATH = $(PLATFORM_PATH)/mft +$(MFT)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) SONIC_MAKE_DEBS += $(MFT) KERNEL_MFT = kernel-mft-dkms_4.5.0-3.16.0-4-amd64_all.deb diff --git a/rules/linux-kernel.mk b/rules/linux-kernel.mk index 4646766653..228b48a9d3 100644 --- a/rules/linux-kernel.mk +++ b/rules/linux-kernel.mk @@ -1,9 +1,18 @@ # linux kernel package -KVERSION = 3.16.0-4-amd64 +KVERSION_SHORT = 3.16.0-4 +KVERSION = $(KVERSION_SHORT)-amd64 +KERNEL_VERSION = 3.16.36 +KERNEL_SUBVERSION = 1+deb8u2 -export KVERSION +export KVERSION_SHORT KVERSION KERNEL_VERSION KERNEL_SUBVERSION -LINUX_KERNEL = linux-image-3.16.0-4-amd64_3.16.36-1+deb8u2_amd64.deb -$(LINUX_KERNEL)_SRC_PATH = $(SRC_PATH)/sonic-linux-kernel -SONIC_MAKE_DEBS += $(LINUX_KERNEL) +LINUX_HEADERS_COMMON = linux-headers-$(KVERSION_SHORT)-common_$(KERNEL_VERSION)-$(KERNEL_SUBVERSION)_amd64.deb +$(LINUX_HEADERS_COMMON)_SRC_PATH = $(SRC_PATH)/sonic-linux-kernel +SONIC_MAKE_DEBS += $(LINUX_HEADERS_COMMON) + +LINUX_HEADERS = linux-headers-$(KVERSION)_$(KERNEL_VERSION)-$(KERNEL_SUBVERSION)_amd64.deb +$(eval $(call add_derived_package,$(LINUX_HEADERS_COMMON),$(LINUX_HEADERS))) + +LINUX_KERNEL = linux-image-$(KVERSION)_$(KERNEL_VERSION)-$(KERNEL_SUBVERSION)_amd64.deb +$(eval $(call add_derived_package,$(LINUX_HEADERS_COMMON),$(LINUX_KERNEL))) diff --git a/src/sonic-linux-kernel b/src/sonic-linux-kernel index 7f3b4e4949..777792e7e8 160000 --- a/src/sonic-linux-kernel +++ b/src/sonic-linux-kernel @@ -1 +1 @@ -Subproject commit 7f3b4e4949aa39481221a0ebf88d055676091916 +Subproject commit 777792e7e8fcdcd4b994f4dfca8ea5369855960c