[platform]: Add rules to build cavium platform modules (#186)
* Added rules to build cavium platform modules * Use correct kernel version Signed-off-by: Nadiya.Stetskovych <Nadiya.Stetskovych@cavium.com>
This commit is contained in:
parent
387399663f
commit
ae4b72e866
4
platform/cavium/cavm_platform_modules.mk
Normal file
4
platform/cavium/cavm_platform_modules.mk
Normal file
@ -0,0 +1,4 @@
|
||||
CAVM_PLATFORM_DEB = cavm_platform_modules.deb
|
||||
$(CAVM_PLATFORM_DEB)_SRC_PATH = $(PLATFORM_PATH)/cavm_platform_modules
|
||||
SONIC_MAKE_DEBS += $(CAVM_PLATFORM_DEB)
|
||||
|
6
platform/cavium/cavm_platform_modules/DEBIAN/changelog
Normal file
6
platform/cavium/cavm_platform_modules/DEBIAN/changelog
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
cavm-platform-modules (1.0) unstable; urgency=low
|
||||
|
||||
* Initial release
|
||||
|
||||
-- Nadiya.Stetskovych@cavium.com Thu, 12 Jan 2017 19:24:41 +0200
|
6
platform/cavium/cavm_platform_modules/DEBIAN/control
Executable file
6
platform/cavium/cavm_platform_modules/DEBIAN/control
Executable file
@ -0,0 +1,6 @@
|
||||
Package: cavm-platform-modules
|
||||
Version: 1.0
|
||||
Architecture: amd64
|
||||
Depends: linux-image-3.16.0-4-amd64
|
||||
Maintainer: Nadiya.Stetskovych@cavium.com
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
26
platform/cavium/cavm_platform_modules/Makefile
Normal file
26
platform/cavium/cavm_platform_modules/Makefile
Normal file
@ -0,0 +1,26 @@
|
||||
.ONESHELL:
|
||||
SHELL = /bin/bash
|
||||
.SHELLFLAGS += -e
|
||||
|
||||
MAIN_TARGET = cavm_platform_modules.deb
|
||||
DEB_BUILD_DIR = cavm-platform-modules-deb
|
||||
|
||||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
||||
# get sources
|
||||
rm -rf SONiC
|
||||
git clone https://github.com/edge-core/SONiC.git
|
||||
|
||||
# build
|
||||
pushd SONiC/AS7512-32X/module/
|
||||
|
||||
KERNEL_SRC=/lib/modules/$(KVERSION)/build make
|
||||
popd
|
||||
mkdir -p $(DEB_BUILD_DIR)/lib/modules/$(KVERSION)
|
||||
|
||||
cp SONiC/AS7512-32X/module/*.ko $(DEB_BUILD_DIR)/lib/modules/$(KVERSION)
|
||||
cp -r DEBIAN $(DEB_BUILD_DIR)
|
||||
dpkg-deb -b $(DEB_BUILD_DIR) $(MAIN_TARGET)
|
||||
|
||||
mv $(MAIN_TARGET) $(DEST)/
|
||||
rm -rf $(DEB_BUILD_DIR)
|
||||
|
@ -3,6 +3,7 @@ include $(PLATFORM_GENERIC_PATH)/rules.mk
|
||||
include $(PLATFORM_PATH)/cavm-sai.mk
|
||||
include $(PLATFORM_PATH)/docker-syncd-cavm.mk
|
||||
include $(PLATFORM_PATH)/docker-orchagent-cavm.mk
|
||||
include $(PLATFORM_PATH)/cavm_platform_modules.mk
|
||||
|
||||
SONIC_ALL += $(DOCKER_SYNCD_CAVM) \
|
||||
$(DOCKER_ORCHAGENT_CAVM)
|
||||
|
Loading…
Reference in New Issue
Block a user