[Mellanox]: Update recipe for hw-management (#4)
Update package revision Create submodule for sources Signed-off-by: marian-pritsak <marianp@mellanox.com>
This commit is contained in:
parent
9aebe09854
commit
cd1d1b1896
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -81,3 +81,6 @@
|
|||||||
[submodule "platform/barefoot/sonic-platform-modules-arista"]
|
[submodule "platform/barefoot/sonic-platform-modules-arista"]
|
||||||
path = platform/barefoot/sonic-platform-modules-arista
|
path = platform/barefoot/sonic-platform-modules-arista
|
||||||
url = https://github.com/aristanetworks/sonic
|
url = https://github.com/aristanetworks/sonic
|
||||||
|
[submodule "platform/mellanox/hw-management"]
|
||||||
|
path = platform/mellanox/hw-management
|
||||||
|
url = https://github.com/Mellanox/hw-mgmt/
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
# Mellanox HW Management
|
# Mellanox HW Management
|
||||||
|
|
||||||
MLNX_HW_MANAGEMENT_VERSION = V1.0.0190
|
MLNX_HW_MANAGEMENT_VERSION = onl.deb9.13.12.2017
|
||||||
|
|
||||||
export MLNX_HW_MANAGEMENT_VERSION
|
export MLNX_HW_MANAGEMENT_VERSION
|
||||||
|
|
||||||
MLNX_HW_MANAGEMENT = hw-management_1.mlnx.$(MLNX_HW_MANAGEMENT_VERSION)_amd64.deb
|
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)_SRC_PATH = $(PLATFORM_PATH)/hw-management
|
||||||
$(MLNX_HW_MANAGEMENT)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
|
$(MLNX_HW_MANAGEMENT)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
|
||||||
SONIC_MAKE_DEBS += $(MLNX_HW_MANAGEMENT)
|
SONIC_DPKG_DEBS += $(MLNX_HW_MANAGEMENT)
|
||||||
|
@ -1,59 +0,0 @@
|
|||||||
From 22fef644b1150677353ab0559828ea45a982d901 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andriy Moroz <c_andriym@mellanox.com>
|
|
||||||
Date: Wed, 11 Jul 2018 16:51:07 +0300
|
|
||||||
Subject: [PATCH] Add systemd service config
|
|
||||||
|
|
||||||
Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
|
|
||||||
---
|
|
||||||
debian/control | 2 +-
|
|
||||||
debian/hw-management.service | 10 ++++++++++
|
|
||||||
debian/rules | 2 +-
|
|
||||||
3 files changed, 12 insertions(+), 2 deletions(-)
|
|
||||||
create mode 100644 debian/hw-management.service
|
|
||||||
|
|
||||||
diff --git a/debian/control b/debian/control
|
|
||||||
index 048cd61..7e3a545 100644
|
|
||||||
--- a/debian/control
|
|
||||||
+++ b/debian/control
|
|
||||||
@@ -1,7 +1,7 @@
|
|
||||||
Source: hw-management
|
|
||||||
Priority: extra
|
|
||||||
Maintainer: Adir Atias <adira@dev-r-vrt-128-008>
|
|
||||||
-Build-Depends:
|
|
||||||
+Build-Depends: dh-systemd
|
|
||||||
Standards-Version:
|
|
||||||
Section: libs
|
|
||||||
Homepage: http://www.mellanox.com
|
|
||||||
diff --git a/debian/hw-management.service b/debian/hw-management.service
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..d18916d
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/debian/hw-management.service
|
|
||||||
@@ -0,0 +1,11 @@
|
|
||||||
+[Unit]
|
|
||||||
+Description=Mellanox Hardware Management
|
|
||||||
+
|
|
||||||
+[Service]
|
|
||||||
+Type=oneshot
|
|
||||||
+EnvironmentFile=/host/machine.conf
|
|
||||||
+ExecStart=/bin/bash -c "/usr/share/sonic/device/$onie_platform/hw-management start"
|
|
||||||
+ExecStop=/bin/bash -c "/usr/share/sonic/device/$onie_platform/hw-management stop"
|
|
||||||
+
|
|
||||||
+[Install]
|
|
||||||
+WantedBy=multi-user.target
|
|
||||||
diff --git a/debian/rules b/debian/rules
|
|
||||||
index fc38817..fba4150 100755
|
|
||||||
--- a/debian/rules
|
|
||||||
+++ b/debian/rules
|
|
||||||
@@ -8,7 +8,7 @@ K_SRC ?= "/lib/modules/$(KVERSION)/build"
|
|
||||||
pwd=$(shell pwd)
|
|
||||||
|
|
||||||
%:
|
|
||||||
- dh $@
|
|
||||||
+ dh $@ --with systemd
|
|
||||||
|
|
||||||
override_dh_auto_configure:
|
|
||||||
|
|
||||||
--
|
|
||||||
1.9.1
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
|||||||
.ONESHELL:
|
|
||||||
SHELL = /bin/bash
|
|
||||||
|
|
||||||
MAIN_TARGET = hw-management_1.mlnx.$(MLNX_HW_MANAGEMENT_VERSION)_amd64.deb
|
|
||||||
|
|
||||||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
|
||||||
# get sources
|
|
||||||
sudo rm -rf hw-management
|
|
||||||
git clone https://github.com/Mellanox/hw-mgmt/ -b $(MLNX_HW_MANAGEMENT_VERSION) hw-management
|
|
||||||
|
|
||||||
# build
|
|
||||||
pushd hw-management
|
|
||||||
git am ../*.patch
|
|
||||||
sed "s~@SED_VERSION@~$(MLNX_HW_MANAGEMENT_VERSION)~" -i debian/changelog
|
|
||||||
chmod +x ./debian/rules
|
|
||||||
sudo ./debian/rules binary KVERSION=$(KVERSION)
|
|
||||||
popd
|
|
||||||
|
|
||||||
mv $* $(DEST)/
|
|
Loading…
Reference in New Issue
Block a user