-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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>
- Loading branch information
Nadiya
authored and
Shuotian Cheng
committed
Jan 13, 2017
1 parent
3873996
commit ae4b72e
Showing
5 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters