Merge pull request #4 from Azure/master
sync from Azure to Project-arlo
This commit is contained in:
commit
6b7d777ef3
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,6 @@
|
||||
# OS-generated files
|
||||
.DS_Store
|
||||
|
||||
# Build system related
|
||||
.platform
|
||||
.screen
|
||||
|
@ -61,7 +61,11 @@ SLAVE_IMAGE = sonic-slave-$(USER)
|
||||
SLAVE_DIR = sonic-slave
|
||||
endif
|
||||
|
||||
OVERLAY_MODULE_CHECK := lsmod | grep "^overlay " > /dev/null 2>&1 || (echo "ERROR: Module 'overlay' not loaded. Try running 'sudo modprobe overlay'."; exit 1)
|
||||
OVERLAY_MODULE_CHECK := \
|
||||
lsmod | grep -q "^overlay " &>/dev/null || \
|
||||
zgrep -q 'CONFIG_OVERLAY_FS=y' /proc/config.gz &>/dev/null || \
|
||||
grep -q 'CONFIG_OVERLAY_FS=y' /boot/config-$(shell uname -r) &>/dev/null || \
|
||||
(echo "ERROR: Module 'overlay' not loaded. Try running 'sudo modprobe overlay'."; exit 1)
|
||||
|
||||
BUILD_TIMESTAMP := $(shell date +%Y%m%d\.%H%M%S)
|
||||
|
||||
@ -117,6 +121,7 @@ SONIC_BUILD_INSTRUCTION := make \
|
||||
PASSWORD=$(PASSWORD) \
|
||||
USERNAME=$(USERNAME) \
|
||||
SONIC_BUILD_JOBS=$(SONIC_BUILD_JOBS) \
|
||||
SONIC_USE_DOCKER_BUILDKIT=$(SONIC_USE_DOCKER_BUILDKIT) \
|
||||
VS_PREPARE_MEM=$(VS_PREPARE_MEM) \
|
||||
KERNEL_PROCURE_METHOD=$(KERNEL_PROCURE_METHOD) \
|
||||
HTTP_PROXY=$(http_proxy) \
|
||||
|
@ -30,7 +30,7 @@ set -x -e
|
||||
|
||||
## docker engine version (with platform)
|
||||
DOCKER_VERSION=5:18.09.2~3-0~debian-stretch
|
||||
LINUX_KERNEL_VERSION=4.9.0-8-2
|
||||
LINUX_KERNEL_VERSION=4.9.0-9-2
|
||||
|
||||
## Working directory to prepare the file system
|
||||
FILESYSTEM_ROOT=./fsroot
|
||||
@ -121,7 +121,7 @@ sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/initramfs-tools_*.deb || \
|
||||
sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/linux-image-${LINUX_KERNEL_VERSION}-amd64_*.deb || \
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install acl
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install dmidecode
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install dmidecode
|
||||
|
||||
## Update initramfs for booting with squashfs+overlay
|
||||
cat files/initramfs-tools/modules | sudo tee -a $FILESYSTEM_ROOT/etc/initramfs-tools/modules > /dev/null
|
||||
@ -409,7 +409,7 @@ fi
|
||||
## Organization specific extensions such as Configuration & Scripts for features like AAA, ZTP...
|
||||
if [ "${enable_organization_extensions}" = "y" ]; then
|
||||
if [ -f files/build_templates/organization_extensions.sh ]; then
|
||||
sudo chmod 755 files/build_templates/organization_extensions.sh
|
||||
sudo chmod 755 files/build_templates/organization_extensions.sh
|
||||
./files/build_templates/organization_extensions.sh -f $FILESYSTEM_ROOT -h $HOSTNAME
|
||||
fi
|
||||
fi
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
try:
|
||||
import time
|
||||
import string
|
||||
from ctypes import create_string_buffer
|
||||
from sonic_sfp.sfputilbase import SfpUtilBase
|
||||
except ImportError as e:
|
||||
raise ImportError("%s - required module not found" % str(e))
|
||||
@ -110,11 +112,63 @@ class SfpUtil(SfpUtilBase):
|
||||
|
||||
return False
|
||||
|
||||
def get_low_power_mode(self, port_num):
|
||||
raise NotImplementedError
|
||||
|
||||
def set_low_power_mode(self, port_num, lpmode):
|
||||
raise NotImplementedError
|
||||
def get_low_power_mode(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self.port_start or port_num > self.port_end:
|
||||
return False
|
||||
|
||||
try:
|
||||
eeprom = None
|
||||
|
||||
if not self.get_presence(port_num):
|
||||
return False
|
||||
|
||||
eeprom = open(self.port_to_eeprom_mapping[port_num], "rb")
|
||||
eeprom.seek(93)
|
||||
lpmode = ord(eeprom.read(1))
|
||||
|
||||
if ((lpmode & 0x3) == 0x3):
|
||||
return True # Low Power Mode if "Power override" bit is 1 and "Power set" bit is 1
|
||||
else:
|
||||
return False # High Power Mode if one of the following conditions is matched:
|
||||
# 1. "Power override" bit is 0
|
||||
# 2. "Power override" bit is 1 and "Power set" bit is 0
|
||||
except IOError as e:
|
||||
print "Error: unable to open file: %s" % str(e)
|
||||
return False
|
||||
finally:
|
||||
if eeprom is not None:
|
||||
eeprom.close()
|
||||
time.sleep(0.01)
|
||||
|
||||
def set_low_power_mode(self, port_num, lpmode):
|
||||
# Check for invalid port_num
|
||||
if port_num < self.port_start or port_num > self.port_end:
|
||||
return False
|
||||
|
||||
try:
|
||||
eeprom = None
|
||||
|
||||
if not self.get_presence(port_num):
|
||||
return False # Port is not present, unable to set the eeprom
|
||||
|
||||
# Fill in write buffer
|
||||
regval = 0x3 if lpmode else 0x1 # 0x3:Low Power Mode, 0x1:High Power Mode
|
||||
buffer = create_string_buffer(1)
|
||||
buffer[0] = chr(regval)
|
||||
|
||||
# Write to eeprom
|
||||
eeprom = open(self.port_to_eeprom_mapping[port_num], "r+b")
|
||||
eeprom.seek(93)
|
||||
eeprom.write(buffer[0])
|
||||
return True
|
||||
except IOError as e:
|
||||
print "Error: unable to open file: %s" % str(e)
|
||||
return False
|
||||
finally:
|
||||
if eeprom is not None:
|
||||
eeprom.close()
|
||||
time.sleep(0.01)
|
||||
|
||||
def reset(self, port_num):
|
||||
if port_num < self.port_start or port_num > self.port_end:
|
||||
|
@ -0,0 +1,39 @@
|
||||
{
|
||||
"instance": 0,
|
||||
"chip_list": [
|
||||
{
|
||||
"id": "asic-0",
|
||||
"chip_family": "Tofino",
|
||||
"instance": 0,
|
||||
"pcie_sysfs_prefix": "/sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0",
|
||||
"pcie_domain": 0,
|
||||
"pcie_bus": 5,
|
||||
"pcie_fn": 0,
|
||||
"pcie_dev": 0,
|
||||
"pcie_int_mode": 1,
|
||||
"sds_fw_path": "share/tofino_sds_fw/avago/firmware"
|
||||
}
|
||||
],
|
||||
"p4_devices": [
|
||||
{
|
||||
"device-id": 0,
|
||||
"p4_programs": [
|
||||
{
|
||||
"p4_pipelines": [
|
||||
{
|
||||
"p4_pipeline_name": "pipe",
|
||||
"config": "share/tofinopd/switch/pipe/tofino.bin",
|
||||
"context": "share/tofinopd/switch/pipe/context.json"
|
||||
}
|
||||
],
|
||||
"program-name": "switch",
|
||||
"switchsai": "lib/libswitchsai.so",
|
||||
"bfrt-config": "share/tofinopd/switch/bf-rt.json",
|
||||
"model_json_path" : "share/switch/aug_model.json",
|
||||
"switchapi_port_add": false,
|
||||
"non_default_port_ppgs": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
{
|
||||
"instance": 0,
|
||||
"chip_list": [
|
||||
{
|
||||
"id": "asic-0",
|
||||
"chip_family": "Tofino",
|
||||
"instance": 0,
|
||||
"pcie_sysfs_prefix": "/sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0",
|
||||
"pcie_domain": 0,
|
||||
"pcie_bus": 5,
|
||||
"pcie_fn": 0,
|
||||
"pcie_dev": 0,
|
||||
"pcie_int_mode": 1,
|
||||
"sds_fw_path": "share/tofino_sds_fw/avago/firmware"
|
||||
}
|
||||
],
|
||||
"p4_devices": [
|
||||
{
|
||||
"device-id": 0,
|
||||
"p4_programs": [
|
||||
{
|
||||
"p4_pipelines": [
|
||||
{
|
||||
"p4_pipeline_name": "pipe",
|
||||
"config": "share/tofinopd/switch/pipe/tofino.bin",
|
||||
"context": "share/tofinopd/switch/pipe/context.json"
|
||||
}
|
||||
],
|
||||
"program-name": "switch",
|
||||
"switchsai": "lib/libswitchsai.so",
|
||||
"bfrt-config": "share/tofinopd/switch/bf-rt.json",
|
||||
"model_json_path" : "share/switch/aug_model.json",
|
||||
"switchapi_port_add": false,
|
||||
"non_default_port_ppgs": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -17,6 +17,7 @@ import json
|
||||
try:
|
||||
from sonic_platform_base.chassis_base import ChassisBase
|
||||
from sonic_platform.fan import Fan
|
||||
from sonic_platform.psu import Psu
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
@ -26,6 +27,7 @@ CONFIG_DB_PATH = "/etc/sonic/config_db.json"
|
||||
SMC_CPLD_PATH = "/sys/devices/platform/e1031.smc/version"
|
||||
MMC_CPLD_PATH = "/sys/devices/platform/e1031.smc/getreg"
|
||||
NUM_FAN = 3
|
||||
NUM_PSU = 2
|
||||
|
||||
|
||||
class Chassis(ChassisBase):
|
||||
@ -36,6 +38,9 @@ class Chassis(ChassisBase):
|
||||
for index in range(0, NUM_FAN):
|
||||
fan = Fan(index)
|
||||
self._fan_list.append(fan)
|
||||
for index in range(0, NUM_PSU):
|
||||
psu = Psu(index)
|
||||
self._psu_list.append(psu)
|
||||
ChassisBase.__init__(self)
|
||||
|
||||
def __get_register_value(self, path, register):
|
||||
|
61
device/celestica/x86_64-cel_e1031-r0/sonic_platform/psu.py
Normal file
61
device/celestica/x86_64-cel_e1031-r0/sonic_platform/psu.py
Normal file
@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
#############################################################################
|
||||
# Celestica
|
||||
#
|
||||
# Module contains an implementation of SONiC Platform Base API and
|
||||
# provides the PSUs status which are available in the platform
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
import os.path
|
||||
import sonic_platform
|
||||
|
||||
try:
|
||||
from sonic_platform_base.psu_base import PsuBase
|
||||
from sonic_platform.fan import Fan
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
FAN_E1031_SPEED_PATH = "/sys/class/hwmon/hwmon{}/fan1_input"
|
||||
FAN_MAX_RPM = 11000
|
||||
|
||||
|
||||
class Psu(PsuBase):
|
||||
"""Platform-specific Psu class"""
|
||||
|
||||
def __init__(self, psu_index):
|
||||
PsuBase.__init__(self)
|
||||
self.index = psu_index
|
||||
|
||||
def get_fan(self):
|
||||
"""
|
||||
Retrieves object representing the fan module contained in this PSU
|
||||
Returns:
|
||||
An object dervied from FanBase representing the fan module
|
||||
contained in this PSU
|
||||
"""
|
||||
fan_speed_path = FAN_E1031_SPEED_PATH.format(
|
||||
str(self.index+3))
|
||||
try:
|
||||
with open(fan_speed_path) as fan_speed_file:
|
||||
fan_speed_rpm = int(fan_speed_file.read())
|
||||
except IOError:
|
||||
fan_speed = 0
|
||||
|
||||
fan_speed = float(fan_speed_rpm)/FAN_MAX_RPM * 100
|
||||
fan = Fan(0)
|
||||
fan.fan_speed = int(fan_speed) if int(fan_speed) <= 100 else 100
|
||||
return fan
|
||||
|
||||
def set_status_led(self, color):
|
||||
"""
|
||||
Sets the state of the PSU status LED
|
||||
Args:
|
||||
color: A string representing the color with which to set the PSU status LED
|
||||
Note: Only support green and off
|
||||
Returns:
|
||||
bool: True if status LED state is set successfully, False if not
|
||||
"""
|
||||
# Hardware not supported
|
||||
return False
|
@ -17,6 +17,7 @@ import json
|
||||
try:
|
||||
from sonic_platform_base.chassis_base import ChassisBase
|
||||
from sonic_platform.fan import Fan
|
||||
from sonic_platform.psu import Psu
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
@ -24,6 +25,7 @@ BIOS_VERSION_PATH = "/sys/class/dmi/id/bios_version"
|
||||
GETREG_PATH = "/sys/devices/platform/dx010_cpld/getreg"
|
||||
CONFIG_DB_PATH = "/etc/sonic/config_db.json"
|
||||
NUM_FAN = 5
|
||||
NUM_PSU = 2
|
||||
CPLD_ADDR_MAPPING = {
|
||||
"CPLD1": "0x100",
|
||||
"CPLD2": "0x200",
|
||||
@ -41,6 +43,9 @@ class Chassis(ChassisBase):
|
||||
for index in range(0, NUM_FAN):
|
||||
fan = Fan(index)
|
||||
self._fan_list.append(fan)
|
||||
for index in range(0, NUM_PSU):
|
||||
psu = Psu(index)
|
||||
self._psu_list.append(psu)
|
||||
ChassisBase.__init__(self)
|
||||
|
||||
def __get_register_value(self, path, register):
|
||||
|
@ -0,0 +1,78 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
#############################################################################
|
||||
# Celestica
|
||||
#
|
||||
# Module contains an implementation of SONiC Platform Base API and
|
||||
# provides the PSUs status which are available in the platform
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
import os.path
|
||||
import sonic_platform
|
||||
|
||||
try:
|
||||
from sonic_platform_base.psu_base import PsuBase
|
||||
from sonic_platform.fan import Fan
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
FAN_DX010_SPEED_PATH = "/sys/class/hwmon/hwmon{}/fan1_input"
|
||||
GREEN_LED_PATH = "/sys/devices/platform/leds_dx010/leds/dx010:green:p-{}/brightness"
|
||||
FAN_MAX_RPM = 11000
|
||||
|
||||
|
||||
class Psu(PsuBase):
|
||||
"""Platform-specific Psu class"""
|
||||
|
||||
def __init__(self, psu_index):
|
||||
PsuBase.__init__(self)
|
||||
self.index = psu_index
|
||||
self.green_led_path = GREEN_LED_PATH.format(self.index+1)
|
||||
|
||||
def get_fan(self):
|
||||
"""
|
||||
Retrieves object representing the fan module contained in this PSU
|
||||
Returns:
|
||||
An object dervied from FanBase representing the fan module
|
||||
contained in this PSU
|
||||
"""
|
||||
|
||||
fan_speed_path = FAN_DX010_SPEED_PATH.format(
|
||||
str(self.index+8))
|
||||
try:
|
||||
with open(fan_speed_path) as fan_speed_file:
|
||||
fan_speed_rpm = int(fan_speed_file.read())
|
||||
except IOError:
|
||||
fan_speed = 0
|
||||
|
||||
fan_speed = float(fan_speed_rpm)/FAN_MAX_RPM * 100
|
||||
fan = Fan(0)
|
||||
fan.fan_speed = int(fan_speed) if int(fan_speed) <= 100 else 100
|
||||
return fan
|
||||
|
||||
def set_status_led(self, color):
|
||||
"""
|
||||
Sets the state of the PSU status LED
|
||||
Args:
|
||||
color: A string representing the color with which to set the PSU status LED
|
||||
Note: Only support green and off
|
||||
Returns:
|
||||
bool: True if status LED state is set successfully, False if not
|
||||
"""
|
||||
|
||||
set_status_str = {
|
||||
self.STATUS_LED_COLOR_GREEN: '1',
|
||||
self.STATUS_LED_COLOR_OFF: '0'
|
||||
}.get(color, None)
|
||||
|
||||
if not set_status_str:
|
||||
return False
|
||||
|
||||
try:
|
||||
with open(self.green_led_path, 'w') as file:
|
||||
file.write(set_status_str)
|
||||
except IOError:
|
||||
return False
|
||||
|
||||
return True
|
@ -1,3 +1,2 @@
|
||||
CONSOLE_PORT=0x3f8
|
||||
CONSOLE_DEV=0
|
||||
CONSOLE_SPEED=115200
|
||||
|
@ -0,0 +1,40 @@
|
||||
{
|
||||
"instance": 0,
|
||||
"chip_list": [
|
||||
{
|
||||
"id": "asic-0",
|
||||
"chip_family": "Tofino",
|
||||
"instance": 0,
|
||||
"pcie_sysfs_prefix": "/sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0",
|
||||
"pcie_domain": 0,
|
||||
"pcie_bus": 5,
|
||||
"pcie_fn": 0,
|
||||
"pcie_dev": 0,
|
||||
"pcie_int_mode": 1,
|
||||
"sds_fw_path": "share/tofino_sds_fw/avago/firmware"
|
||||
}
|
||||
],
|
||||
"p4_devices": [
|
||||
{
|
||||
"device-id": 0,
|
||||
"agent0": "lib/platform/x86_64-ingrasys_s9180_32x-r0/libpltfm_mgr.so",
|
||||
"p4_programs": [
|
||||
{
|
||||
"p4_pipelines": [
|
||||
{
|
||||
"p4_pipeline_name": "pipe",
|
||||
"config": "share/tofinopd/switch/pipe/tofino.bin",
|
||||
"context": "share/tofinopd/switch/pipe/context.json"
|
||||
}
|
||||
],
|
||||
"program-name": "switch",
|
||||
"switchsai": "lib/libswitchsai.so",
|
||||
"bfrt-config": "share/tofinopd/switch/bf-rt.json",
|
||||
"model_json_path" : "share/switch/aug_model.json",
|
||||
"switchapi_port_add": false,
|
||||
"non_default_port_ppgs": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
{
|
||||
"instance": 0,
|
||||
"chip_list": [
|
||||
{
|
||||
"id": "asic-0",
|
||||
"chip_family": "Tofino",
|
||||
"instance": 0,
|
||||
"pcie_sysfs_prefix": "/sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0",
|
||||
"pcie_domain": 0,
|
||||
"pcie_bus": 5,
|
||||
"pcie_fn": 0,
|
||||
"pcie_dev": 0,
|
||||
"pcie_int_mode": 1,
|
||||
"sds_fw_path": "share/tofino_sds_fw/avago/firmware"
|
||||
}
|
||||
],
|
||||
"p4_devices": [
|
||||
{
|
||||
"device-id": 0,
|
||||
"agent0": "lib/platform/x86_64-ingrasys_s9280_64x-r0/libpltfm_mgr.so",
|
||||
"p4_programs": [
|
||||
{
|
||||
"p4_pipelines": [
|
||||
{
|
||||
"p4_pipeline_name": "pipe",
|
||||
"config": "share/tofinopd/switch/pipe/tofino.bin",
|
||||
"context": "share/tofinopd/switch/pipe/context.json"
|
||||
}
|
||||
],
|
||||
"program-name": "switch",
|
||||
"switchsai": "lib/libswitchsai.so",
|
||||
"bfrt-config": "share/tofinopd/switch/bf-rt.json",
|
||||
"model_json_path" : "share/switch/aug_model.json",
|
||||
"switchapi_port_add": false,
|
||||
"non_default_port_ppgs": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
{
|
||||
"instance": 0,
|
||||
"chip_list": [
|
||||
{
|
||||
"id": "asic-0",
|
||||
"chip_family": "Tofino",
|
||||
"instance": 0,
|
||||
"pcie_sysfs_prefix": "/sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0",
|
||||
"pcie_domain": 0,
|
||||
"pcie_bus": 5,
|
||||
"pcie_fn": 0,
|
||||
"pcie_dev": 0,
|
||||
"pcie_int_mode": 1,
|
||||
"sds_fw_path": "share/tofino_sds_fw/avago/firmware"
|
||||
}
|
||||
],
|
||||
"p4_devices": [
|
||||
{
|
||||
"device-id": 0,
|
||||
"agent0": "lib/platform/x86_64-wnc_osw1800-r0/libpltfm_mgr.so",
|
||||
"p4_programs": [
|
||||
{
|
||||
"p4_pipelines": [
|
||||
{
|
||||
"p4_pipeline_name": "pipe",
|
||||
"config": "share/tofinopd/switch/pipe/tofino.bin",
|
||||
"context": "share/tofinopd/switch/pipe/context.json"
|
||||
}
|
||||
],
|
||||
"program-name": "switch",
|
||||
"switchsai": "lib/libswitchsai.so",
|
||||
"bfrt-config": "share/tofinopd/switch/bf-rt.json",
|
||||
"model_json_path" : "share/switch/aug_model.json",
|
||||
"switchapi_port_add": false,
|
||||
"non_default_port_ppgs": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -1,11 +1,12 @@
|
||||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
||||
FROM debian:stretch
|
||||
|
||||
# Clean documentation in FROM image
|
||||
RUN find /usr/share/doc -depth \( -type f -o -type l \) ! -name copyright | xargs rm || true
|
||||
|
||||
# Clean doc directories that are empty or only contain empty directories
|
||||
RUN while [ -n "$(find /usr/share/doc -depth -type d -empty -print -exec rmdir {} +)" ]; do :; done
|
||||
RUN rm -rf \
|
||||
RUN while [ -n "$(find /usr/share/doc -depth -type d -empty -print -exec rmdir {} +)" ]; do :; done && \
|
||||
rm -rf \
|
||||
/usr/share/man/* \
|
||||
/usr/share/groff/* \
|
||||
/usr/share/info/* \
|
||||
@ -21,28 +22,22 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
COPY ["dpkg_01_drop", "/etc/dpkg/dpkg.cfg.d/01_drop"]
|
||||
COPY ["sources.list", "/etc/apt/sources.list"]
|
||||
COPY ["no_install_recommend_suggest", "/etc/apt/apt.conf.d"]
|
||||
RUN apt-get update
|
||||
|
||||
# Pre-install fundamental packages
|
||||
RUN apt-get -y install \
|
||||
less \
|
||||
perl \
|
||||
procps \
|
||||
python \
|
||||
rsyslog \
|
||||
vim-tiny
|
||||
|
||||
COPY ["etc/rsyslog.conf", "/etc/rsyslog.conf"]
|
||||
COPY ["etc/rsyslog.d/*", "/etc/rsyslog.d/"]
|
||||
COPY ["root/.vimrc", "/root/.vimrc"]
|
||||
|
||||
# Update apt cache and
|
||||
# pre-install fundamental packages
|
||||
RUN apt-get update && \
|
||||
apt-get -y install \
|
||||
less \
|
||||
perl \
|
||||
procps \
|
||||
python \
|
||||
rsyslog \
|
||||
vim-tiny \
|
||||
# Install dependencies of supervisor
|
||||
RUN apt-get -y install python-pkg-resources python-meld3
|
||||
python-pkg-resources \
|
||||
python-meld3
|
||||
|
||||
RUN mkdir -p /etc/supervisor
|
||||
RUN mkdir -p /var/log/supervisor
|
||||
|
||||
COPY ["etc/supervisor/supervisord.conf", "/etc/supervisor/"]
|
||||
RUN mkdir -p /etc/supervisor /var/log/supervisor
|
||||
|
||||
RUN apt-get -y purge \
|
||||
exim4 \
|
||||
@ -51,29 +46,29 @@ RUN apt-get -y purge \
|
||||
exim4-daemon-light
|
||||
|
||||
{% if docker_base_stretch_debs.strip() -%}
|
||||
# Copy built Debian packages
|
||||
{%- for deb in docker_base_stretch_debs.split(' ') %}
|
||||
COPY debs/{{ deb }} debs/
|
||||
{%- endfor %}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{{ copy_files("debs/", docker_base_stretch_debs.split(' '), "/debs/") }}
|
||||
|
||||
# Install built Debian packages and implicitly install their dependencies
|
||||
{%- for deb in docker_base_stretch_debs.split(' ') %}
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt debs/{{ deb }}
|
||||
{%- endfor %}
|
||||
{{ install_debian_packages(docker_base_stretch_debs.split(' ')) }}
|
||||
{%- endif %}
|
||||
|
||||
{% if docker_base_stretch_dbgs.strip() -%}
|
||||
# Install common debug-packages
|
||||
{%- for dbg_pkg in docker_base_stretch_dbgs.split(' ') %}
|
||||
RUN apt-get -y install {{ dbg_pkg }}
|
||||
{%- endfor %}
|
||||
RUN apt-get -y install docker_base_stretch_dbgs.split(' ') | join(' ')
|
||||
{% else %}
|
||||
RUN ln /usr/bin/vim.tiny /usr/bin/vim
|
||||
{%- endif %}
|
||||
|
||||
# Clean up apt
|
||||
# Remove /var/lib/apt/lists/*, could be obsoleted for derived images
|
||||
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
||||
RUN rm -rf /var/lib/apt/lists/*
|
||||
RUN apt-get clean -y && \
|
||||
apt-get autoclean -y && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/*
|
||||
|
||||
RUN rm -rf /tmp/*
|
||||
COPY ["etc/rsyslog.conf", "/etc/rsyslog.conf"]
|
||||
COPY ["etc/rsyslog.d/*", "/etc/rsyslog.d/"]
|
||||
COPY ["root/.vimrc", "/root/.vimrc"]
|
||||
|
||||
COPY ["etc/supervisor/supervisord.conf", "/etc/supervisor/"]
|
||||
|
@ -1,47 +1,49 @@
|
||||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
||||
FROM docker-base-stretch
|
||||
|
||||
## Make apt-get non-interactive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
# Dependencies for sonic-cfggen
|
||||
RUN apt-get install -y python-lxml python-yaml python-bitarray python-pip python-dev python-natsort python-setuptools
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
# Dependencies for sonic-cfggen
|
||||
python-lxml \
|
||||
python-yaml \
|
||||
python-bitarray \
|
||||
python-pip \
|
||||
python-dev \
|
||||
python-natsort \
|
||||
python-setuptools
|
||||
|
||||
RUN pip install --upgrade pip
|
||||
|
||||
RUN pip install netaddr ipaddr jinja2 pyangbind==0.5.10
|
||||
RUN pip install \
|
||||
netaddr \
|
||||
ipaddr \
|
||||
jinja2 \
|
||||
pyangbind==0.5.10
|
||||
|
||||
{% if docker_config_engine_stretch_debs.strip() %}
|
||||
COPY \
|
||||
{% for deb in docker_config_engine_stretch_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
{%- endif -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{{ copy_files("debs/", docker_config_engine_stretch_debs.split(' '), "/debs/") }}
|
||||
|
||||
{% if docker_config_engine_stretch_debs.strip() %}
|
||||
RUN dpkg -i \
|
||||
{% for deb in docker_config_engine_stretch_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor %}
|
||||
{%- endif -%}
|
||||
# Install locally-built Debian packages and implicitly install their dependencies
|
||||
{{ install_debian_packages(docker_config_engine_stretch_debs.split(' ')) }}
|
||||
{% endif %}
|
||||
|
||||
{% if docker_config_engine_stretch_whls.strip() %}
|
||||
COPY \
|
||||
{% for whl in docker_config_engine_stretch_whls.split(' ') -%}
|
||||
python-wheels/{{ whl }}{{' '}}
|
||||
{%- endfor -%}
|
||||
python-wheels/
|
||||
{%- endif -%}
|
||||
# Copy locally-built Python wheel dependencies
|
||||
{{ copy_files("python-wheels/", docker_config_engine_stretch_whls.split(' '), "/python-wheels/") }}
|
||||
|
||||
{% if docker_config_engine_stretch_whls.strip() %}
|
||||
RUN pip install \
|
||||
{% for whl in docker_config_engine_stretch_whls.split(' ') -%}
|
||||
python-wheels/{{ whl }}{{' '}}
|
||||
{%- endfor %}
|
||||
{%- endif -%}
|
||||
# Install locally-built Python wheel dependencies
|
||||
{{ install_python_wheels(docker_config_engine_stretch_whls.split(' ')) }}
|
||||
{% endif %}
|
||||
|
||||
## Clean up
|
||||
RUN apt-get purge -y python-pip python-dev; apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
||||
RUN rm -rf /debs /python-wheels
|
||||
RUN apt-get purge -y \
|
||||
python-pip \
|
||||
python-dev && \
|
||||
apt-get clean -y && \
|
||||
apt-get autoclean -y && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /debs /python-wheels
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
||||
FROM docker-config-engine-stretch
|
||||
|
||||
ARG docker_container_name
|
||||
@ -11,23 +12,18 @@ RUN apt-get update
|
||||
|
||||
{% if docker_database_debs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{%- for deb in docker_database_debs.split(' ') %}
|
||||
COPY debs/{{ deb }} /debs/
|
||||
{%- endfor %}
|
||||
{{ copy_files("debs/", docker_database_debs.split(' '), "/debs/") }}
|
||||
|
||||
# Install locally-built Debian packages and implicitly install their dependencies
|
||||
{%- for deb in docker_database_debs.split(' ') %}
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /debs/{{ deb }}
|
||||
{%- endfor %}
|
||||
{{ install_debian_packages(docker_database_debs.split(' ')) }}
|
||||
{%- endif %}
|
||||
|
||||
# Clean up
|
||||
RUN apt-get clean -y
|
||||
RUN apt-get autoclean -y
|
||||
RUN apt-get autoremove -y
|
||||
RUN rm -rf /debs ~/.cache
|
||||
|
||||
RUN sed -ri 's/^(save .*$)/# \1/g; \
|
||||
RUN apt-get clean -y && \
|
||||
apt-get autoclean -y && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /debs ~/.cache && \
|
||||
sed -ri 's/^(save .*$)/# \1/g; \
|
||||
s/^daemonize yes$/daemonize no/; \
|
||||
s/^logfile .*$/logfile ""/; \
|
||||
s/^# syslog-enabled no$/syslog-enabled no/; \
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
||||
FROM docker-config-engine-stretch
|
||||
|
||||
ARG docker_container_name
|
||||
@ -11,19 +12,17 @@ RUN apt-get update
|
||||
|
||||
{% if docker_dhcp_relay_debs.strip() -%}
|
||||
# Copy built Debian packages
|
||||
{%- for deb in docker_dhcp_relay_debs.split(' ') %}
|
||||
COPY debs/{{ deb }} debs/
|
||||
{%- endfor %}
|
||||
{{ copy_files("debs/", docker_dhcp_relay_debs.split(' '), "/debs/") }}
|
||||
|
||||
# Install built Debian packages and implicitly install their dependencies
|
||||
{%- for deb in docker_dhcp_relay_debs.split(' ') %}
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt debs/{{ deb }}
|
||||
{%- endfor %}
|
||||
{{ install_debian_packages(docker_dhcp_relay_debs.split(' ')) }}
|
||||
{%- endif %}
|
||||
|
||||
# Clean up
|
||||
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
||||
RUN rm -rf /debs
|
||||
RUN apt-get clean -y && \
|
||||
apt-get autoclean -y && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /debs
|
||||
|
||||
COPY ["docker_init.sh", "start.sh", "/usr/bin/"]
|
||||
COPY ["docker-dhcp-relay.supervisord.conf.j2", "wait_for_intf.sh.j2", "/usr/share/sonic/templates/"]
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
||||
FROM docker-config-engine-stretch
|
||||
|
||||
ARG docker_container_name
|
||||
@ -10,36 +11,41 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Update apt's cache of available packages
|
||||
RUN apt-get update
|
||||
|
||||
# Install required packages
|
||||
RUN apt-get install -y libdbus-1-3 libdaemon0 libjansson4 libc-ares2 iproute2 libpython2.7 libjson-c3 logrotate libunwind8
|
||||
|
||||
{% if docker_fpm_frr_debs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{%- for deb in docker_fpm_frr_debs.split(' ') %}
|
||||
COPY debs/{{ deb }} /debs/
|
||||
{%- endfor %}
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
libdbus-1-3 \
|
||||
libdaemon0 \
|
||||
libjansson4 \
|
||||
libc-ares2 \
|
||||
iproute2 \
|
||||
libpython2.7 \
|
||||
libjson-c3 \
|
||||
logrotate \
|
||||
libunwind8
|
||||
|
||||
RUN groupadd -g ${frr_user_gid} frr
|
||||
RUN useradd -u ${frr_user_uid} -g ${frr_user_gid} -M -s /bin/false frr
|
||||
|
||||
{% if docker_fpm_frr_debs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{{ copy_files("debs/", docker_fpm_frr_debs.split(' '), "/debs/") }}
|
||||
|
||||
# Install locally-built Debian packages and implicitly install their dependencies
|
||||
{%- for deb in docker_fpm_frr_debs.split(' ') %}
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /debs/{{ deb }}
|
||||
{%- endfor %}
|
||||
{{ install_debian_packages(docker_fpm_frr_debs.split(' ')) }}
|
||||
{%- endif %}
|
||||
|
||||
RUN chown -R ${frr_user_uid}:${frr_user_gid} /etc/frr/
|
||||
|
||||
# Clean up
|
||||
RUN apt-get clean -y
|
||||
RUN apt-get autoclean -y
|
||||
RUN apt-get autoremove -y
|
||||
RUN rm -rf /debs ~/.cache
|
||||
RUN apt-get clean -y && \
|
||||
apt-get autoclean -y && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /debs ~/.cache
|
||||
|
||||
COPY ["bgpcfgd", "start.sh", "/usr/bin/"]
|
||||
COPY ["*.j2", "/usr/share/sonic/templates/"]
|
||||
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
||||
COPY ["snmp.conf", "/etc/snmp/frr.conf"]
|
||||
|
||||
ENTRYPOINT ["/usr/bin/supervisord"]
|
||||
|
@ -11,6 +11,7 @@ hostname {{ DEVICE_METADATA['localhost']['hostname'] }}
|
||||
password zebra
|
||||
log syslog informational
|
||||
log facility local4
|
||||
agentx
|
||||
! enable password {# {{ en_passwd }} TODO: param needed #}
|
||||
{% endblock system_init %}
|
||||
!
|
||||
@ -29,6 +30,9 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
|
||||
no bgp default ipv4-unicast
|
||||
bgp graceful-restart restart-time 240
|
||||
bgp graceful-restart
|
||||
{% if DEVICE_METADATA['localhost']['type'] == 'ToRRouter' %}
|
||||
bgp graceful-restart preserve-fw-state
|
||||
{% endif %}
|
||||
{% for (name, prefix) in LOOPBACK_INTERFACE|pfx_filter %}
|
||||
{% if prefix | ipv4 and name == 'Loopback0' %}
|
||||
bgp router-id {{ prefix | ip }}
|
||||
|
@ -11,6 +11,7 @@ hostname {{ DEVICE_METADATA['localhost']['hostname'] }}
|
||||
password zebra
|
||||
log syslog informational
|
||||
log facility local4
|
||||
agentx
|
||||
! enable password {# {{ en_passwd }} TODO: param needed #}
|
||||
{% endblock system_init %}
|
||||
!
|
||||
@ -98,7 +99,7 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
|
||||
network {{ prefix | ip }}/32
|
||||
{% elif prefix | ipv6 and name == 'Loopback0' %}
|
||||
address-family ipv6
|
||||
network {{ prefix | ip }}/128
|
||||
network {{ prefix | ip }}/64
|
||||
exit-address-family
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
7
dockers/docker-fpm-frr/snmp.conf
Normal file
7
dockers/docker-fpm-frr/snmp.conf
Normal file
@ -0,0 +1,7 @@
|
||||
# This line allows the FRR docker to speak with the snmp container
|
||||
# Make sure this line matches the one in the snmp docker
|
||||
# snmp:/etc/snmp/snmpd.conf
|
||||
# To verify this works you need to have a valid bgp daemon running and configured
|
||||
# Check that a snmpwalk to 1.3.6.1.2.1.15 gives an output
|
||||
# Further verification: 1.3.6.1.2.1.15.2.0 = INTEGER: 65000 the returned value should be the confiugred ASN
|
||||
agentXSocket tcp:localhost:3161
|
@ -31,7 +31,7 @@ stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
|
||||
[program:zebra]
|
||||
command=/usr/lib/frr/zebra -A 127.0.0.1 -s 90000000 -M fpm
|
||||
command=/usr/lib/frr/zebra -A 127.0.0.1 -s 90000000 -M fpm -M snmp
|
||||
priority=4
|
||||
autostart=false
|
||||
autorestart=false
|
||||
@ -49,7 +49,7 @@ stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
|
||||
[program:bgpd]
|
||||
command=/usr/lib/frr/bgpd -A 127.0.0.1
|
||||
command=/usr/lib/frr/bgpd -A 127.0.0.1 -M snmp
|
||||
priority=5
|
||||
stopsignal=KILL
|
||||
autostart=false
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
||||
FROM docker-config-engine-stretch
|
||||
|
||||
ARG docker_container_name
|
||||
@ -9,37 +10,30 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
# Update apt's cache of available packages
|
||||
RUN apt-get update
|
||||
|
||||
|
||||
{% if docker_lldp_sv2_debs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{%- for deb in docker_lldp_sv2_debs.split(' ') %}
|
||||
COPY debs/{{ deb }} /debs/
|
||||
{%- endfor %}
|
||||
{{ copy_files("debs/", docker_lldp_sv2_debs.split(' '), "/debs/") }}
|
||||
|
||||
# Install locally-built Debian packages and implicitly install their dependencies
|
||||
{%- for deb in docker_lldp_sv2_debs.split(' ') %}
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /debs/{{ deb }}
|
||||
{%- endfor %}
|
||||
{{ install_debian_packages(docker_lldp_sv2_debs.split(' ')) }}
|
||||
{%- endif %}
|
||||
|
||||
{% if docker_lldp_sv2_whls.strip() -%}
|
||||
# Copy locally-built Python wheel dependencies
|
||||
{%- for whl in docker_lldp_sv2_whls.split(' ') %}
|
||||
COPY python-wheels/{{ whl }} /python-wheels/
|
||||
{%- endfor %}
|
||||
{{ copy_files("python-wheels/", docker_lldp_sv2_whls.split(' '), "/python-wheels/") }}
|
||||
|
||||
# Install locally-built Python wheel dependencies
|
||||
{%- for whl in docker_lldp_sv2_whls.split(' ') %}
|
||||
RUN pip install /python-wheels/{{ whl }}
|
||||
{%- endfor %}
|
||||
{{ install_python_wheels(docker_lldp_sv2_whls.split(' ')) }}
|
||||
{% endif %}
|
||||
|
||||
# Clean up
|
||||
RUN apt-get purge -y python-pip
|
||||
RUN apt-get clean -y
|
||||
RUN apt-get autoclean -y
|
||||
RUN apt-get autoremove -y
|
||||
RUN rm -rf /debs /python-wheels ~/.cache
|
||||
RUN apt-get purge -y python-pip && \
|
||||
apt-get clean -y && \
|
||||
apt-get autoclean -y && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /debs \
|
||||
/python-wheels \
|
||||
~/.cache
|
||||
|
||||
COPY ["start.sh", "/usr/bin/"]
|
||||
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
||||
FROM docker-config-engine-stretch
|
||||
|
||||
ARG docker_container_name
|
||||
@ -6,36 +7,44 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
|
||||
## Make apt-get non-interactive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get update && \
|
||||
apt-get install -f -y \
|
||||
ifupdown \
|
||||
arping \
|
||||
libdbus-1-3 \
|
||||
libdaemon0 \
|
||||
libjansson4 \
|
||||
libpython2.7 \
|
||||
iproute2 \
|
||||
ndisc6 \
|
||||
tcpdump \
|
||||
# Install redis-tools dependencies
|
||||
# TODO: implicitly install dependencies
|
||||
libjemalloc1 \
|
||||
libelf1 \
|
||||
libmnl0 \
|
||||
bridge-utils
|
||||
|
||||
RUN apt-get install -f -y ifupdown arping libdbus-1-3 libdaemon0 libjansson4 libpython2.7 iproute2
|
||||
RUN pip install \
|
||||
scapy==2.4.2 \
|
||||
setuptools \
|
||||
pyroute2==0.5.3 \
|
||||
netifaces==0.10.7 \
|
||||
monotonic==1.5
|
||||
|
||||
RUN apt-get install -f -y ndisc6 tcpdump
|
||||
RUN pip install scapy==2.4.2
|
||||
## Install redis-tools dependencies
|
||||
## TODO: implicitly install dependencies
|
||||
RUN apt-get -y install libjemalloc1
|
||||
{% if docker_orchagent_debs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{{ copy_files("debs/", docker_orchagent_debs.split(' '), "/debs/") }}
|
||||
|
||||
RUN apt-get install -y libelf1 libmnl0 bridge-utils
|
||||
|
||||
RUN pip install setuptools
|
||||
RUN pip install pyroute2==0.5.3 netifaces==0.10.7
|
||||
RUN pip install monotonic==1.5
|
||||
|
||||
COPY \
|
||||
{% for deb in docker_orchagent_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
RUN dpkg -i \
|
||||
{% for deb in docker_orchagent_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor %}
|
||||
# Install locally-built Debian packages and implicitly install their dependencies
|
||||
{{ install_debian_packages(docker_orchagent_debs.split(' ')) }}
|
||||
{%- endif %}
|
||||
|
||||
## Clean up
|
||||
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
||||
RUN rm -rf /debs
|
||||
RUN apt-get clean -y && \
|
||||
apt-get autoclean -y && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /debs
|
||||
|
||||
COPY ["files/arp_update", "/usr/bin"]
|
||||
COPY ["enable_counters.py", "/usr/bin"]
|
||||
|
@ -12,7 +12,8 @@
|
||||
{
|
||||
"SWITCH_TABLE:switch": {
|
||||
"ecmp_hash_seed": "{{ hash_seed }}",
|
||||
"lag_hash_seed": "{{ hash_seed }}"
|
||||
"lag_hash_seed": "{{ hash_seed }}",
|
||||
"fdb_aging_time": "600"
|
||||
},
|
||||
"OP": "SET"
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
||||
FROM docker-config-engine-stretch
|
||||
|
||||
ARG docker_container_name
|
||||
@ -7,50 +8,51 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Install required packages
|
||||
RUN apt-get update && apt-get install -y python-pip libpython2.7 ipmitool librrd8 librrd-dev rrdtool python-smbus ethtool
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
python-pip \
|
||||
libpython2.7 \
|
||||
ipmitool \
|
||||
librrd8 \
|
||||
librrd-dev \
|
||||
rrdtool \
|
||||
python-smbus \
|
||||
ethtool \
|
||||
dmidecode
|
||||
|
||||
{% if docker_platform_monitor_debs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{%- for deb in docker_platform_monitor_debs.split(' ') %}
|
||||
COPY debs/{{ deb }} /debs/
|
||||
{%- endfor %}
|
||||
{{ copy_files("debs/", docker_platform_monitor_debs.split(' '), "/debs/") }}
|
||||
|
||||
# Install locally-built Debian packages and implicitly install their dependencies
|
||||
{%- for deb in docker_platform_monitor_debs.split(' ') %}
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /debs/{{ deb }}
|
||||
{%- endfor %}
|
||||
{{ install_debian_packages(docker_platform_monitor_debs.split(' ')) }}
|
||||
{%- endif %}
|
||||
|
||||
{% if docker_platform_monitor_pydebs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{%- for deb in docker_platform_monitor_pydebs.split(' ') %}
|
||||
COPY python-debs/{{ deb }} /debs/
|
||||
{%- endfor %}
|
||||
{{ copy_files("python-debs/", docker_platform_monitor_pydebs.split(' '), "/debs/") }}
|
||||
|
||||
# Install locally-built Debian packages and implicitly install their dependencies
|
||||
{%- for deb in docker_platform_monitor_pydebs.split(' ') %}
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /debs/{{ deb }}
|
||||
{%- endfor %}
|
||||
{{ install_debian_packages(docker_platform_monitor_pydebs.split(' ')) }}
|
||||
{%- endif %}
|
||||
|
||||
{% if docker_platform_monitor_whls.strip() -%}
|
||||
# Copy locally-built Python wheel dependencies
|
||||
{%- for whl in docker_platform_monitor_whls.split(' ') %}
|
||||
COPY python-wheels/{{ whl }} /python-wheels/
|
||||
{%- endfor %}
|
||||
{{ copy_files("python-wheels/", docker_platform_monitor_whls.split(' '), "/python-wheels/") }}
|
||||
|
||||
# Install locally-built Python wheel dependencies
|
||||
{%- for whl in docker_platform_monitor_whls.split(' ') %}
|
||||
RUN pip install /python-wheels/{{ whl }}
|
||||
{%- endfor %}
|
||||
{{ install_python_wheels(docker_platform_monitor_whls.split(' ')) }}
|
||||
{% endif %}
|
||||
|
||||
# Clean up
|
||||
RUN apt-get purge -y python-pip
|
||||
RUN apt-get clean -y
|
||||
RUN apt-get autoclean -y
|
||||
RUN apt-get autoremove -y
|
||||
RUN rm -rf /debs /python-wheels ~/.cache
|
||||
RUN apt-get purge -y \
|
||||
python-pip && \
|
||||
apt-get clean -y && \
|
||||
apt-get autoclean -y && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /debs \
|
||||
/python-wheels \
|
||||
~/.cache
|
||||
|
||||
COPY ["docker_init.sh", "lm-sensors.sh", "/usr/bin/"]
|
||||
COPY ["docker-pmon.supervisord.conf.j2", "start.sh.j2", "/usr/share/sonic/templates/"]
|
||||
|
@ -69,3 +69,14 @@ stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
startsecs=0
|
||||
{% endif %}
|
||||
|
||||
{% if not skip_syseepromd %}
|
||||
[program:syseepromd]
|
||||
command=/usr/bin/syseepromd
|
||||
priority=8
|
||||
autostart=false
|
||||
autorestart=true
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
startsecs=0
|
||||
{% endif %}
|
||||
|
@ -48,3 +48,8 @@ supervisorctl start xcvrd
|
||||
{% if not skip_psud %}
|
||||
supervisorctl start psud
|
||||
{% endif %}
|
||||
|
||||
{% if not skip_syseepromd %}
|
||||
supervisorctl start syseepromd
|
||||
{% endif %}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
||||
FROM docker-config-engine-stretch
|
||||
|
||||
ARG docker_container_name
|
||||
@ -11,19 +12,17 @@ RUN apt-get update
|
||||
|
||||
{% if docker_router_advertiser_debs.strip() -%}
|
||||
# Copy built Debian packages
|
||||
{%- for deb in docker_router_advertiser_debs.split(' ') %}
|
||||
COPY debs/{{ deb }} debs/
|
||||
{%- endfor %}
|
||||
{{ copy_files("debs/", docker_router_advertiser_debs.split(' '), "/debs/") }}
|
||||
|
||||
# Install built Debian packages and implicitly install their dependencies
|
||||
{%- for deb in docker_router_advertiser_debs.split(' ') %}
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt debs/{{ deb }}
|
||||
{%- endfor %}
|
||||
{{ install_debian_packages(docker_router_advertiser_debs.split(' ')) }}
|
||||
{%- endif %}
|
||||
|
||||
# Clean up
|
||||
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
||||
RUN rm -rf /debs
|
||||
RUN apt-get clean -y && \
|
||||
apt-get autoclean -y && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /debs
|
||||
|
||||
COPY ["start.sh", "/usr/bin/"]
|
||||
COPY ["docker-router-advertiser.supervisord.conf", "/etc/supervisor/conf.d/"]
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
||||
FROM docker-config-engine-stretch
|
||||
|
||||
ARG docker_container_name
|
||||
@ -10,62 +11,65 @@ ENV PYTHONOPTIMIZE 1
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Update apt's cache of available packages
|
||||
RUN apt-get update
|
||||
|
||||
# Install curl so we can download and install pip later
|
||||
# Also install major root CA certificates for curl to reference
|
||||
RUN apt-get install -y curl ca-certificates
|
||||
|
||||
# Install gcc which is required for installing hiredis
|
||||
RUN apt-get install -y gcc make
|
||||
|
||||
# Install libdpkg-perl which is required for python3.6-3.6.0 as one of its specs i.e. no-pie-compile.specs
|
||||
# The file referenced (`/usr/share/dpkg/no-pie-compile.specs`) is in the `libdpkg-perl` package on Debian
|
||||
RUN apt-get install -y libdpkg-perl
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
curl \
|
||||
ca-certificates \
|
||||
gcc \
|
||||
make \
|
||||
libdpkg-perl
|
||||
|
||||
{% if docker_snmp_sv2_debs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{%- for deb in docker_snmp_sv2_debs.split(' ') %}
|
||||
COPY debs/{{ deb }} /debs/
|
||||
{%- endfor %}
|
||||
{{ copy_files("debs/", docker_snmp_sv2_debs.split(' '), "/debs/") }}
|
||||
|
||||
# Install locally-built Debian packages and implicitly install their dependencies
|
||||
{%- for deb in docker_snmp_sv2_debs.split(' ') %}
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /debs/{{ deb }}
|
||||
{%- endfor %}
|
||||
{{ install_debian_packages(docker_snmp_sv2_debs.split(' ')) }}
|
||||
{%- endif %}
|
||||
|
||||
# Install up-to-date version of pip
|
||||
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.6
|
||||
RUN python3.6 -m pip install --no-cache-dir hiredis
|
||||
|
||||
# Install pyyaml dependency for use by some plugins
|
||||
RUN python3.6 -m pip install --no-cache-dir pyyaml
|
||||
|
||||
# Install smbus dependency for use by some plugins
|
||||
RUN python3.6 -m pip install --no-cache-dir smbus
|
||||
RUN python3.6 -m pip install --no-cache-dir \
|
||||
hiredis \
|
||||
pyyaml \
|
||||
smbus
|
||||
|
||||
{% if docker_snmp_sv2_whls.strip() -%}
|
||||
# Copy locally-built Python wheel dependencies
|
||||
{%- for whl in docker_snmp_sv2_whls.split(' ') %}
|
||||
COPY python-wheels/{{ whl }} /python-wheels/
|
||||
{%- endfor %}
|
||||
{{ copy_files("python-wheels/", docker_snmp_sv2_whls.split(' '), "/python-wheels/") }}
|
||||
|
||||
# Install locally-built Python wheel dependencies
|
||||
{%- for whl in docker_snmp_sv2_whls.split(' ') %}
|
||||
RUN pip install /python-wheels/{{ whl }}
|
||||
{%- endfor %}
|
||||
{{ install_python_wheels(docker_snmp_sv2_whls.split(' ')) }}
|
||||
{% endif %}
|
||||
|
||||
RUN python3.6 -m sonic_ax_impl install
|
||||
|
||||
# Clean up
|
||||
RUN apt-get -y purge libpython3.6-dev libpython3.6 curl gcc make libdpkg-perl
|
||||
# Note: these packages should be removed with autoremove but actually not, so explicitly purged
|
||||
RUN apt-get -y purge libldap-2.4-2 libsasl2-2 libsasl2-modules libsasl2-modules-db
|
||||
RUN apt-get clean -y && apt-get autoclean -y && apt-get autoremove -y --purge
|
||||
RUN find / | grep -E "__pycache__" | xargs rm -rf
|
||||
RUN rm -rf /debs /python-wheels ~/.cache
|
||||
RUN apt-get -y purge \
|
||||
libpython3.6-dev \
|
||||
libpython3.6 \
|
||||
curl \
|
||||
gcc \
|
||||
make \
|
||||
libdpkg-perl \
|
||||
# Note: these packages should be removed with autoremove but actually not, so explicitly purged
|
||||
libldap-2.4-2 \
|
||||
libsasl2-2 \
|
||||
libsasl2-modules \
|
||||
libsasl2-modules-db && \
|
||||
apt-get clean -y && \
|
||||
apt-get autoclean -y && \
|
||||
apt-get autoremove -y --purge && \
|
||||
find / | grep -E "__pycache__" | xargs rm -rf && \
|
||||
rm -rf /debs /python-wheels ~/.cache
|
||||
|
||||
COPY ["start.sh", "/usr/bin/"]
|
||||
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
||||
|
@ -118,6 +118,14 @@ load 12 10 5
|
||||
#
|
||||
# Run as an AgentX master agent
|
||||
master agentx
|
||||
# internal socket to allow extension to other docker containers
|
||||
# Currently the other container using this is docker-fpm-frr
|
||||
# make sure this line matches bgp:/etc/snmp/frr.conf
|
||||
# please see testing procedure in the same file to verify this works
|
||||
# to verify the SNMP docker side look for the following string in the log file:
|
||||
# INFO snmp-subagent [ax_interface] INFO: Using agentx socket type tcp with path tcp:localhost:3161
|
||||
# INFO supervisord snmp-subagent INFO:ax_interface:Using agentx socket type tcp with path tcp:localhost:3161
|
||||
agentxsocket tcp:localhost:3161
|
||||
|
||||
#
|
||||
# SysDescription pass-through
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
||||
FROM docker-config-engine-stretch
|
||||
|
||||
ARG docker_container_name
|
||||
@ -6,29 +7,29 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
|
||||
## Make apt-get non-interactive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get update && \
|
||||
apt-get install -f -y \
|
||||
libdbus-1-3 \
|
||||
libdaemon0 \
|
||||
libjansson4 \
|
||||
# Install redis-tools dependencies
|
||||
# TODO: implicitly install dependencies
|
||||
libjemalloc1
|
||||
|
||||
RUN apt-get install -f -y libdbus-1-3 libdaemon0 libjansson4
|
||||
{% if docker_sonic_telemetry_debs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{{ copy_files("debs/", docker_sonic_telemetry_debs.split(' '), "/debs/") }}
|
||||
|
||||
## Install redis-tools dependencies
|
||||
## TODO: implicitly install dependencies
|
||||
RUN apt-get -y install libjemalloc1
|
||||
# Install locally-built Debian packages and implicitly install their dependencies
|
||||
{{ install_debian_packages(docker_sonic_telemetry_debs.split(' ')) }}
|
||||
{%- endif %}
|
||||
|
||||
COPY \
|
||||
{% for deb in docker_sonic_telemetry_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
RUN dpkg -i \
|
||||
{% for deb in docker_sonic_telemetry_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor %}
|
||||
RUN apt-get clean -y && \
|
||||
apt-get autoclean - && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /debs
|
||||
|
||||
COPY ["start.sh", "telemetry.sh", "dialout.sh", "/usr/bin/"]
|
||||
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
||||
|
||||
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
||||
RUN rm -rf /debs
|
||||
|
||||
ENTRYPOINT ["/usr/bin/supervisord"]
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
||||
FROM docker-config-engine-stretch
|
||||
|
||||
ARG docker_container_name
|
||||
@ -6,29 +7,30 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
|
||||
## Make apt-get non-interactive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get update && \
|
||||
apt-get install -f -y \
|
||||
libdbus-1-3 \
|
||||
libdaemon0 \
|
||||
libjansson4 \
|
||||
libpython2.7 \
|
||||
# Install redis-tools dependencies
|
||||
# TODO: implicitly install dependencies
|
||||
libjemalloc1
|
||||
|
||||
RUN apt-get install -f -y libdbus-1-3 libdaemon0 libjansson4 libpython2.7
|
||||
{% if docker_teamd_debs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{{ copy_files("debs/", docker_teamd_debs.split(' '), "/debs/") }}
|
||||
|
||||
## Install redis-tools dependencies
|
||||
## TODO: implicitly install dependencies
|
||||
RUN apt-get -y install libjemalloc1
|
||||
# Install locally-built Debian packages and implicitly install their dependencies
|
||||
{{ install_debian_packages(docker_teamd_debs.split(' ')) }}
|
||||
{%- endif %}
|
||||
|
||||
COPY \
|
||||
{% for deb in docker_teamd_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
RUN dpkg -i \
|
||||
{% for deb in docker_teamd_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor %}
|
||||
RUN apt-get clean -y && \
|
||||
apt-get autoclean -y && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /debs
|
||||
|
||||
COPY ["start.sh", "/usr/bin/"]
|
||||
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
||||
|
||||
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
||||
RUN rm -rf /debs
|
||||
|
||||
ENTRYPOINT ["/usr/bin/supervisord"]
|
||||
|
18
dockers/dockerfile-macros.j2
Normal file
18
dockers/dockerfile-macros.j2
Normal file
@ -0,0 +1,18 @@
|
||||
{% macro install_debian_packages(packages) -%}
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \
|
||||
{%- for deb in packages %}
|
||||
dpkg_apt /debs/{{ deb }} {%- if not loop.last %} && \ {%- endif %}
|
||||
{%- endfor %}
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro install_python_wheels(packages) -%}
|
||||
RUN cd /python-wheels/ && pip install {{ packages | join(' ') }}
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro copy_files(prefix, files, dest) -%}
|
||||
COPY \
|
||||
{%- for file in files %}
|
||||
{{ prefix }}/{{ file }} \
|
||||
{%- endfor %}
|
||||
{{ dest }}
|
||||
{%- endmacro %}
|
@ -130,8 +130,8 @@ start() {
|
||||
{%- else %}
|
||||
# Obtain our HWSKU as we will mount directories with these names in each docker
|
||||
HWSKU=`sonic-cfggen -d -v 'DEVICE_METADATA["localhost"]["hwsku"]'`
|
||||
HOSTNAME=`sonic-cfggen -d -v 'DEVICE_METADATA["localhost"]["hostname"]'`
|
||||
{%- endif %}
|
||||
HOSTNAME=`sonic-cfggen -m -v 'DEVICE_METADATA["localhost"]["hostname"]'`
|
||||
if [ -z "$HOSTNAME" ] || ! [[ $HOSTNAME =~ ^[a-zA-Z0-9.\-]*$ ]]; then
|
||||
HOSTNAME=`hostname`
|
||||
fi
|
||||
@ -175,19 +175,16 @@ start() {
|
||||
{%- endif %}
|
||||
{%- if sonic_asic_platform == "mellanox" %}
|
||||
{%- if docker_container_name == "syncd" %}
|
||||
-e SX_SNIFFER_ENABLE \
|
||||
-e SX_SNIFFER_TARGET \
|
||||
-e PRM_SNIFFER \
|
||||
-e PRM_SNIFFER_FILE_PATH \
|
||||
-v /var/log/mellanox/sniffer:/var/log/mellanox/sniffer:rw \
|
||||
-v mlnx_sdk_socket:/tmp \
|
||||
-v /dev/shm:/dev/shm:rw \
|
||||
{%- elif docker_container_name == "pmon" %}
|
||||
-v /var/run/hw-management:/var/run/hw-management:rw \
|
||||
-v mlnx_sdk_socket:/tmp \
|
||||
-v /dev/shm:/dev/shm:rw \
|
||||
{%- else %}
|
||||
--tmpfs /tmp \
|
||||
{%- endif %}
|
||||
{%- if docker_container_name == "pmon" %}
|
||||
-v /var/run/hw-management:/var/run/hw-management:rw \
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
-v /var/run/redis:/var/run/redis:rw \
|
||||
-v /usr/share/sonic/device/$PLATFORM:/usr/share/sonic/platform:ro \
|
||||
|
@ -4,7 +4,7 @@ Requires=database.service updategraph.service
|
||||
{% if sonic_asic_platform == 'broadcom' %}
|
||||
Requires=opennsl-modules.service
|
||||
{% elif sonic_asic_platform == 'nephos' %}
|
||||
Requires=nps-modules-4.9.0-8-2-amd64.service
|
||||
Requires=nps-modules-4.9.0-9-2-amd64.service
|
||||
{% endif %}
|
||||
After=database.service updategraph.service
|
||||
After=interfaces-config.service
|
||||
|
@ -4,14 +4,14 @@ Requires=database.service updategraph.service
|
||||
{% if sonic_asic_platform == 'broadcom' %}
|
||||
Requires=opennsl-modules.service
|
||||
{% elif sonic_asic_platform == 'nephos' %}
|
||||
Requires=nps-modules-4.9.0-8-2-amd64.service
|
||||
Requires=nps-modules-4.9.0-9-2-amd64.service
|
||||
{% endif %}
|
||||
After=database.service updategraph.service
|
||||
After=interfaces-config.service
|
||||
{% if sonic_asic_platform == 'broadcom' %}
|
||||
After=opennsl-modules.service
|
||||
{% elif sonic_asic_platform == 'nephos' %}
|
||||
After=nps-modules-4.9.0-8-2-amd64.service
|
||||
After=nps-modules-4.9.0-9-2-amd64.service
|
||||
{% endif %}
|
||||
After=swss.service
|
||||
Before=ntp-config.service
|
||||
|
@ -1,7 +1,7 @@
|
||||
[Unit]
|
||||
Description=Telemetry container
|
||||
Requires=swss.service
|
||||
After=swss.service
|
||||
Requires=database.service
|
||||
After=database.service
|
||||
Before=ntp-config.service
|
||||
|
||||
[Service]
|
||||
|
@ -54,5 +54,5 @@ if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-no
|
||||
}
|
||||
fi
|
||||
|
||||
# enable auto-logout for console ttyS* sessions
|
||||
tty | grep ttyS >/dev/null && TMOUT=300
|
||||
# Automatically log out console ttyS* sessions after 15 minutes of inactivity
|
||||
tty | grep ttyS >/dev/null && TMOUT=900
|
||||
|
@ -162,7 +162,7 @@ if [ "$install_env" = "onie" ]; then
|
||||
fi
|
||||
|
||||
# Creates a new partition for the DEMO OS.
|
||||
#
|
||||
#
|
||||
# arg $1 -- base block device
|
||||
#
|
||||
# Returns the created partition number in $demo_part
|
||||
@ -177,7 +177,7 @@ create_demo_gpt_partition()
|
||||
tmpfifo=$(mktemp -u)
|
||||
trap_push "rm $tmpfifo || true"
|
||||
mkfifo -m 600 "$tmpfifo"
|
||||
|
||||
|
||||
# See if demo partition already exists
|
||||
demo_part=$(sgdisk -p $blk_dev | grep -e "$demo_volume_label" -e "$legacy_volume_label" | awk '{print $1}')
|
||||
if [ -n "$demo_part" ] ; then
|
||||
@ -438,7 +438,7 @@ if [ "$install_env" = "onie" ]; then
|
||||
echo "Error: Unable to mount $demo_dev on $demo_mnt"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
elif [ "$install_env" = "sonic" ]; then
|
||||
demo_mnt="/host"
|
||||
eval running_sonic_revision=$(cat /etc/sonic/sonic_version.yml | grep build_version | cut -f2 -d" ")
|
||||
@ -595,12 +595,12 @@ menuentry '$demo_grub_entry' {
|
||||
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
|
||||
insmod part_msdos
|
||||
insmod ext2
|
||||
linux /$image_dir/boot/vmlinuz-4.9.0-8-2-amd64 root=$grub_cfg_root rw $GRUB_CMDLINE_LINUX \
|
||||
linux /$image_dir/boot/vmlinuz-4.9.0-9-2-amd64 root=$grub_cfg_root rw $GRUB_CMDLINE_LINUX \
|
||||
net.ifnames=0 biosdevname=0 \
|
||||
loop=$image_dir/$FILESYSTEM_SQUASHFS loopfstype=squashfs \
|
||||
apparmor=1 security=apparmor varlog_size=$VAR_LOG_SIZE usbcore.autosuspend=-1 $ONIE_PLATFORM_EXTRA_CMDLINE_LINUX
|
||||
echo 'Loading $demo_volume_label $demo_type initial ramdisk ...'
|
||||
initrd /$image_dir/boot/initrd.img-4.9.0-8-2-amd64
|
||||
initrd /$image_dir/boot/initrd.img-4.9.0-9-2-amd64
|
||||
}
|
||||
EOF
|
||||
|
||||
|
@ -7,6 +7,6 @@ Standards-Version: 3.9.3
|
||||
|
||||
Package: bfn-modules
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for bfn asic for mmap
|
||||
|
||||
|
@ -1,10 +1,5 @@
|
||||
ifdef BLDENV
|
||||
BFN_PLATFORM = bfnplatform_8.9.x.98de3ce_pr_deb9.deb
|
||||
$(BFN_PLATFORM)_URL = "https://github.com/barefootnetworks/sonic-release-pkgs/raw/rel_8_9/bfnplatform_8.9.x.98de3ce_pr_deb9.deb"
|
||||
else
|
||||
BFN_PLATFORM = bfnplatform_8.9.x.98de3ce_pr_deb8.deb
|
||||
$(BFN_PLATFORM)_URL = "https://github.com/barefootnetworks/sonic-release-pkgs/raw/rel_8_9/bfnplatform_8.9.x.98de3ce_pr_deb8.deb"
|
||||
endif
|
||||
BFN_PLATFORM = bfnplatform_8_9_1.x.ab1e16f.deb
|
||||
$(BFN_PLATFORM)_URL = "https://github.com/barefootnetworks/sonic-release-pkgs/raw/rel_8_9_1/bfnplatform_8_9_1.x.ab1e16f.deb"
|
||||
|
||||
SONIC_ONLINE_DEBS += $(BFN_PLATFORM) # $(BFN_SAI_DEV)
|
||||
$(BFN_SAI_DEV)_DEPENDS += $(BFN_PLATFORM)
|
||||
|
@ -1,10 +1,5 @@
|
||||
ifdef BLDENV
|
||||
BFN_SAI = bfnsdk_8.9.x.98de3ce_pr_deb9.deb
|
||||
$(BFN_SAI)_URL = "https://github.com/barefootnetworks/sonic-release-pkgs/raw/rel_8_9/bfnsdk_8.9.x.98de3ce_pr_deb9.deb"
|
||||
else
|
||||
BFN_SAI = bfnsdk_8.9.x.98de3ce_pr_deb8.deb
|
||||
$(BFN_SAI)_URL = "https://github.com/barefootnetworks/sonic-release-pkgs/raw/rel_8_9/bfnsdk_8.9.x.98de3ce_pr_deb8.deb"
|
||||
endif
|
||||
BFN_SAI = bfnsdk_8_9_1.x.ab1e16f.deb
|
||||
$(BFN_SAI)_URL = "https://github.com/barefootnetworks/sonic-release-pkgs/raw/rel_8_9_1/bfnsdk_8_9_1.x.ab1e16f.deb"
|
||||
|
||||
SONIC_ONLINE_DEBS += $(BFN_SAI) # $(BFN_SAI_DEV)
|
||||
$(BFN_SAI_DEV)_DEPENDS += $(BFN_SAI)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 7b7c79ee463b43e570c48915215cdbf6ec250225
|
||||
Subproject commit ad5abe1205c0bf6926d62a497a9b435aaeb174ee
|
@ -7,6 +7,6 @@ Standards-Version: 3.9.3
|
||||
|
||||
Package: sonic-platform-modules-bfn-montara
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
||||
|
@ -7,6 +7,6 @@ Standards-Version: 3.9.3
|
||||
|
||||
Package: sonic-platform-modules-bfn
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
||||
|
@ -15,7 +15,20 @@ wait_syncd() {
|
||||
done
|
||||
|
||||
# wait until bcm sdk is ready to get a request
|
||||
sleep 3
|
||||
counter=0
|
||||
while true; do
|
||||
/usr/bin/bcmcmd -t 1 "show unit" | grep BCM >/dev/null 2>&1
|
||||
rv=$?
|
||||
if [ $rv -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
counter=$((counter+1))
|
||||
if [ $counter -ge 60 ]; then
|
||||
echo "syncd is not ready to take commands after $counter re-tries; Exiting!"
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,26 +1,36 @@
|
||||
# Dell Z9100, S6100, Z9264F Platform modules
|
||||
# Dell S6000, Z9100, S6100, Z9264F Platform modules
|
||||
|
||||
DELL_Z9264F_PLATFORM_MODULE_VERSION = 1.1
|
||||
DELL_S6000_PLATFORM_MODULE_VERSION = 1.1
|
||||
DELL_Z9100_PLATFORM_MODULE_VERSION = 1.1
|
||||
DELL_S6100_PLATFORM_MODULE_VERSION = 1.1
|
||||
DELL_Z9264F_PLATFORM_MODULE_VERSION = 1.1
|
||||
|
||||
export DELL_Z9264F_PLATFORM_MODULE_VERSION
|
||||
export DELL_S6000_PLATFORM_MODULE_VERSION
|
||||
export DELL_Z9100_PLATFORM_MODULE_VERSION
|
||||
export DELL_S6100_PLATFORM_MODULE_VERSION
|
||||
export DELL_Z9264F_PLATFORM_MODULE_VERSION
|
||||
|
||||
|
||||
# Dell Z9100 Platform modules
|
||||
DELL_Z9100_PLATFORM_MODULE = platform-modules-z9100_$(DELL_Z9100_PLATFORM_MODULE_VERSION)_amd64.deb
|
||||
$(DELL_Z9100_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-dell
|
||||
$(DELL_Z9100_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
|
||||
$(DELL_Z9100_PLATFORM_MODULE)_PLATFORM = x86_64-dell_z9100_c2538-r0
|
||||
SONIC_DPKG_DEBS += $(DELL_Z9100_PLATFORM_MODULE)
|
||||
|
||||
# Dell S6100 Platform modules
|
||||
DELL_S6100_PLATFORM_MODULE = platform-modules-s6100_$(DELL_S6100_PLATFORM_MODULE_VERSION)_amd64.deb
|
||||
$(DELL_S6100_PLATFORM_MODULE)_PLATFORM = x86_64-dell_s6100_c2538-r0
|
||||
$(eval $(call add_extra_package,$(DELL_Z9100_PLATFORM_MODULE),$(DELL_S6100_PLATFORM_MODULE)))
|
||||
|
||||
# Dell Z9264F Platform modules
|
||||
DELL_Z9264F_PLATFORM_MODULE = platform-modules-z9264f_$(DELL_Z9264F_PLATFORM_MODULE_VERSION)_amd64.deb
|
||||
$(DELL_Z9264F_PLATFORM_MODULE)_PLATFORM = x86_64-dellemc_z9264f_c3538-r0
|
||||
$(eval $(call add_extra_package,$(DELL_Z9100_PLATFORM_MODULE),$(DELL_Z9264F_PLATFORM_MODULE)))
|
||||
|
||||
# Dell S6000 Platform modules
|
||||
DELL_S6000_PLATFORM_MODULE = platform-modules-s6000_$(DELL_S6000_PLATFORM_MODULE_VERSION)_amd64.deb
|
||||
$(DELL_S6000_PLATFORM_MODULE)_PLATFORM = x86_64-dell_s6000_s1220-r0
|
||||
$(eval $(call add_extra_package,$(DELL_Z9100_PLATFORM_MODULE),$(DELL_S6000_PLATFORM_MODULE)))
|
||||
|
||||
SONIC_STRETCH_DEBS += $(DELL_Z9100_PLATFORM_MODULE)
|
||||
|
@ -1,13 +0,0 @@
|
||||
# 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)
|
||||
$(DELL_S6000_PLATFORM_MODULE)_PLATFORM = x86_64-dell_s6000_s1220-r0
|
||||
SONIC_DPKG_DEBS += $(DELL_S6000_PLATFORM_MODULE)
|
||||
|
||||
SONIC_STRETCH_DEBS += $(DELL_S6000_PLATFORM_MODULE)
|
@ -1,6 +1,5 @@
|
||||
include $(PLATFORM_PATH)/sai-modules.mk
|
||||
include $(PLATFORM_PATH)/sai.mk
|
||||
include $(PLATFORM_PATH)/platform-modules-s6000.mk
|
||||
include $(PLATFORM_PATH)/platform-modules-dell.mk
|
||||
include $(PLATFORM_PATH)/platform-modules-arista.mk
|
||||
include $(PLATFORM_PATH)/platform-modules-ingrasys.mk
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Broadcom SAI modules
|
||||
|
||||
KVERSION = 4.9.0-8-2-amd64
|
||||
KVERSION = 4.9.0-9-2-amd64
|
||||
BRCM_OPENNSL_KERNEL_VERSION = 3.4.1.11-1
|
||||
|
||||
BRCM_OPENNSL_KERNEL = opennsl-modules_$(BRCM_OPENNSL_KERNEL_VERSION)_amd64.deb
|
||||
|
@ -1,9 +1,9 @@
|
||||
BRCM_SAI = libsaibcm_3.5.2.1_amd64.deb
|
||||
$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/3.5s/libsaibcm_3.5.2.1_amd64.deb?sv=2015-04-05&sr=b&sig=VsOGePXPU9TtxXxQTkLfM%2FIzW6BL8q6RxP6QputuuEU%3D&se=2156-03-28T05%3A37%3A02Z&sp=r"
|
||||
BRCM_SAI = libsaibcm_3.5.2.3_amd64.deb
|
||||
$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/3.5/libsaibcm_3.5.2.3_amd64.deb?sv=2015-04-05&sr=b&sig=anY6TeLouYsw7L6hfpH%2BTHOkvF8M3WR%2B6P2C7Dh8sHg%3D&se=2033-02-20T17%3A19%3A46Z&sp=r"
|
||||
|
||||
BRCM_SAI_DEV = libsaibcm-dev_3.5.2.1_amd64.deb
|
||||
BRCM_SAI_DEV = libsaibcm-dev_3.5.2.3_amd64.deb
|
||||
$(eval $(call add_derived_package,$(BRCM_SAI),$(BRCM_SAI_DEV)))
|
||||
$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/3.5s/libsaibcm-dev_3.5.2.1_amd64.deb?sv=2015-04-05&sr=b&sig=3pWbROLKK5ZuVcAra%2BYo1pk4B0k1P3C76wVw4KiqOtY%3D&se=2156-03-28T05%3A35%3A35Z&sp=r"
|
||||
$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/3.5/libsaibcm-dev_3.5.2.3_amd64.deb?sv=2015-04-05&sr=b&sig=o%2BVIKwVnlNv8LAvVzcS2kIXc0%2BIKaTzmA8LIkIfsh6c%3D&se=2033-02-20T17%3A20%3A03Z&sp=r"
|
||||
|
||||
SONIC_ONLINE_DEBS += $(BRCM_SAI)
|
||||
$(BRCM_SAI_DEV)_DEPENDS += $(BRCM_SAI)
|
||||
|
@ -10,5 +10,5 @@ Standards-Version: 3.9.3
|
||||
Package: opennsl-modules
|
||||
Architecture: amd64
|
||||
Section: main
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for broadcom SAI
|
||||
|
@ -1 +1 @@
|
||||
lib/modules/4.9.0-8-2-amd64/extra
|
||||
lib/modules/4.9.0-9-2-amd64/extra
|
||||
|
@ -1,5 +1,5 @@
|
||||
systems/linux/user/x86-smp_generic_64-2_6/linux-bcm-knet.ko lib/modules/4.9.0-8-2-amd64/extra
|
||||
systems/linux/user/x86-smp_generic_64-2_6/linux-kernel-bde.ko lib/modules/4.9.0-8-2-amd64/extra
|
||||
systems/linux/user/x86-smp_generic_64-2_6/linux-user-bde.ko lib/modules/4.9.0-8-2-amd64/extra
|
||||
systems/linux/user/x86-smp_generic_64-2_6/linux-knet-cb.ko lib/modules/4.9.0-8-2-amd64/extra
|
||||
systems/linux/user/x86-smp_generic_64-2_6/linux-bcm-knet.ko lib/modules/4.9.0-9-2-amd64/extra
|
||||
systems/linux/user/x86-smp_generic_64-2_6/linux-kernel-bde.ko lib/modules/4.9.0-9-2-amd64/extra
|
||||
systems/linux/user/x86-smp_generic_64-2_6/linux-user-bde.ko lib/modules/4.9.0-9-2-amd64/extra
|
||||
systems/linux/user/x86-smp_generic_64-2_6/linux-knet-cb.ko lib/modules/4.9.0-9-2-amd64/extra
|
||||
systemd/opennsl-modules.service lib/systemd/system
|
||||
|
@ -60,7 +60,7 @@ kdist_config: prep-deb-files
|
||||
kdist_clean: clean
|
||||
dh_testdir
|
||||
dh_clean
|
||||
SDK=$(realpath .) LINUX_UAPI_SPLIT=1 DEBIAN_LINUX_HEADER=1 BUILD_KNET_CB=1 KERNDIR=/usr/src/linux-headers-4.9.0-8-2-amd64 KERNEL_SRC=/usr/src/linux-headers-4.9.0-8-2-amd64 $(MAKE) -C systems/linux/user/x86-smp_generic_64-2_6 clean
|
||||
SDK=$(realpath .) LINUX_UAPI_SPLIT=1 DEBIAN_LINUX_HEADER=1 BUILD_KNET_CB=1 KERNDIR=/usr/src/linux-headers-4.9.0-9-2-amd64 KERNEL_SRC=/usr/src/linux-headers-4.9.0-9-2-amd64 $(MAKE) -C systems/linux/user/x86-smp_generic_64-2_6 clean
|
||||
# rm -f driver/*.o driver/*.ko
|
||||
#
|
||||
### end KERNEL SETUP
|
||||
@ -78,7 +78,7 @@ build-arch-stamp:
|
||||
dh_testdir
|
||||
|
||||
# Add here command to compile/build the package.
|
||||
SDK=$(realpath .) LINUX_UAPI_SPLIT=1 DEBIAN_LINUX_HEADER=1 BUILD_KNET_CB=1 KERNDIR=/usr/src/linux-headers-4.9.0-8-2-amd64 KERNEL_SRC=/usr/src/linux-headers-4.9.0-8-2-amd64 $(MAKE) -C systems/linux/user/x86-smp_generic_64-2_6
|
||||
SDK=$(realpath .) LINUX_UAPI_SPLIT=1 DEBIAN_LINUX_HEADER=1 BUILD_KNET_CB=1 KERNDIR=/usr/src/linux-headers-4.9.0-9-2-amd64 KERNEL_SRC=/usr/src/linux-headers-4.9.0-9-2-amd64 $(MAKE) -C systems/linux/user/x86-smp_generic_64-2_6
|
||||
|
||||
touch $@
|
||||
|
||||
@ -103,7 +103,7 @@ clean:
|
||||
rm -f build-arch-stamp build-indep-stamp configure-stamp
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
SDK=$(realpath .) LINUX_UAPI_SPLIT=1 DEBIAN_LINUX_HEADER=1 BUILD_KNET_CB=1 KERNDIR=/usr/src/linux-headers-4.9.0-8-2-amd64 KERNEL_SRC=/usr/src/linux-headers-4.9.0-8-2-amd64 $(MAKE) -C systems/linux/user/x86-smp_generic_64-2_6 clean
|
||||
SDK=$(realpath .) LINUX_UAPI_SPLIT=1 DEBIAN_LINUX_HEADER=1 BUILD_KNET_CB=1 KERNDIR=/usr/src/linux-headers-4.9.0-9-2-amd64 KERNEL_SRC=/usr/src/linux-headers-4.9.0-9-2-amd64 $(MAKE) -C systems/linux/user/x86-smp_generic_64-2_6 clean
|
||||
|
||||
dh_clean
|
||||
|
||||
|
@ -7,11 +7,11 @@ Standards-Version: 3.9.3
|
||||
|
||||
Package: sonic-platform-alphanetworks-snh60a0-320fv2
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
||||
Package: sonic-platform-alphanetworks-snh60b0-640f
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 7b7c79ee463b43e570c48915215cdbf6ec250225
|
||||
Subproject commit ad5abe1205c0bf6926d62a497a9b435aaeb174ee
|
@ -7,11 +7,11 @@ Standards-Version: 3.9.3
|
||||
|
||||
Package: platform-modules-dx010
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
||||
|
||||
Package: platform-modules-haliburton
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
46
platform/broadcom/sonic-platform-modules-dell/common/dell_lpc_mon.sh
Executable file
46
platform/broadcom/sonic-platform-modules-dell/common/dell_lpc_mon.sh
Executable file
@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
REV=$(lspci -xxx -s 0:0.0 | grep rev | awk -F 'rev ' '{print $2}' | sed 's/)//')
|
||||
if [ $REV -gt 2 ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
test_val=(55 aa)
|
||||
num_val=${#test_val[@]}
|
||||
index=0
|
||||
poll_interval=300
|
||||
cpld_scratch_reg=0x102
|
||||
smf_scratch_reg=0x202
|
||||
|
||||
function log_crit() {
|
||||
local msg=$1
|
||||
|
||||
`logger -p user.crit -t DELL_LPC_BUS_MON $msg`
|
||||
}
|
||||
|
||||
function validate_lpc() {
|
||||
local reg=$1
|
||||
local val=$2
|
||||
local reg_str="CPLD scratch register"
|
||||
|
||||
if [ $reg == $smf_scratch_reg ]
|
||||
then
|
||||
reg_str="SMF scratch register"
|
||||
fi
|
||||
io_rd_wr.py --set --val $val --offset $reg
|
||||
get_val=$(io_rd_wr.py --get --offset $reg | cut -d " " -f3)
|
||||
if [ $val != $get_val ]
|
||||
then
|
||||
log_crit "LPC bus has deteriorated on this unit. \
|
||||
$reg_str has value $get_val while expected is $val \
|
||||
Please contact technical support"
|
||||
fi
|
||||
}
|
||||
while true
|
||||
do
|
||||
val=${test_val[$index]}
|
||||
validate_lpc $cpld_scratch_reg $val
|
||||
validate_lpc $smf_scratch_reg $val
|
||||
index=$(((index+1)%num_val))
|
||||
sleep $poll_interval
|
||||
done
|
@ -5,18 +5,22 @@ Maintainer: Dell Team <support@dell.com>
|
||||
Build-Depends: debhelper (>= 8.0.0), bzip2
|
||||
Standards-Version: 3.9.3
|
||||
|
||||
Package: platform-modules-z9264f
|
||||
Package: platform-modules-s6000
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
||||
Package: platform-modules-z9100
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
||||
Package: platform-modules-s6100
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
||||
Package: platform-modules-z9264f
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
@ -0,0 +1,2 @@
|
||||
s6000/systemd/platform-modules-s6000.service etc/systemd/system
|
||||
common/io_rd_wr.py usr/local/bin
|
@ -0,0 +1,7 @@
|
||||
# postinst script for S6000
|
||||
|
||||
# Enable Dell-S6000-platform-service
|
||||
depmod -a
|
||||
systemctl enable platform-modules-s6000.service
|
||||
systemctl start platform-modules-s6000.service
|
||||
#DEBHELPER#
|
@ -2,7 +2,9 @@ s6100/scripts/iom_power_*.sh usr/local/bin
|
||||
s6100/scripts/s6100_platform.sh usr/local/bin
|
||||
common/dell_i2c_utils.sh usr/local/bin
|
||||
common/io_rd_wr.py usr/local/bin
|
||||
common/dell_lpc_mon.sh usr/local/bin
|
||||
common/platform_reboot usr/share/sonic/device/x86_64-dell_s6100_c2538-r0
|
||||
s6100/scripts/platform_sensors.py usr/local/bin
|
||||
s6100/scripts/sensors usr/bin
|
||||
s6100/systemd/platform-modules-s6100.service etc/systemd/system
|
||||
s6100/systemd/s6100-lpc-monitor.service etc/systemd/system
|
||||
|
@ -4,4 +4,8 @@
|
||||
depmod -a
|
||||
systemctl enable platform-modules-s6100.service
|
||||
systemctl start platform-modules-s6100.service
|
||||
|
||||
systemctl enable s6100-lpc-monitor.service
|
||||
systemctl start s6100-lpc-monitor.service
|
||||
|
||||
#DEBHELPER#
|
||||
|
@ -1,13 +1,11 @@
|
||||
z9100/scripts/check_qsfp.sh usr/local/bin
|
||||
z9100/scripts/z9100_platform.sh usr/local/bin
|
||||
common/dell_i2c_utils.sh usr/local/bin
|
||||
common/dell_lpc_mon.sh usr/local/bin
|
||||
common/io_rd_wr.py usr/local/bin
|
||||
common/platform_reboot usr/share/sonic/device/x86_64-dell_z9100_c2538-r0
|
||||
z9100/scripts/platform_sensors.py usr/local/bin
|
||||
z9100/scripts/z9100_qsfp_monitor.py usr/local/bin
|
||||
z9100/scripts/z9100_preemp_db.py usr/local/bin
|
||||
z9100/scripts/qsfp_monitor usr/local/bin
|
||||
z9100/scripts/sensors usr/bin
|
||||
z9100/cfg/z9100-modules.conf etc/modules-load.d
|
||||
z9100/systemd/platform-modules-z9100.service etc/systemd/system
|
||||
z9100/systemd/z9100-qsfp-monitor.service etc/systemd/system
|
||||
z9100/systemd/z9100-lpc-monitor.service etc/systemd/system
|
||||
|
@ -5,8 +5,8 @@ depmod -a
|
||||
systemctl enable platform-modules-z9100.service
|
||||
systemctl start platform-modules-z9100.service
|
||||
|
||||
# Enable Dell-Z9100-Qsfp-Monitor-service
|
||||
systemctl enable z9100-qsfp-monitor.service
|
||||
systemctl start z9100-qsfp-monitor.service
|
||||
|
||||
systemctl enable z9100-lpc-monitor.service
|
||||
systemctl start z9100-lpc-monitor.service
|
||||
|
||||
#DEBHELPER#
|
||||
|
@ -5,7 +5,7 @@ export INSTALL_MOD_DIR:=extra
|
||||
KVERSION ?= $(shell uname -r)
|
||||
KERNEL_SRC := /lib/modules/$(KVERSION)
|
||||
MOD_SRC_DIR:= $(shell pwd)
|
||||
MODULE_DIRS:= s6100 z9100 z9264f
|
||||
MODULE_DIRS:= s6000 z9100 s6100 z9264f
|
||||
COMMON_DIR := common
|
||||
|
||||
%:
|
||||
@ -30,6 +30,10 @@ override_dh_auto_install:
|
||||
$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \
|
||||
cp $(MOD_SRC_DIR)/$${mod}/modules/*.ko \
|
||||
debian/platform-modules-$${mod}/$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \
|
||||
if [ $$mod = "s6000" ]; then \
|
||||
dh_installdirs -pplatform-modules-$${mod} usr/local/bin ; \
|
||||
cp -r $(MOD_SRC_DIR)/$${mod}/scripts/* debian/platform-modules-$${mod}/usr/local/bin; \
|
||||
fi; \
|
||||
done)
|
||||
|
||||
override_dh_usrlocal:
|
||||
|
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Dell S6100 LPC bus monitoring poller
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
ExecStart=/usr/local/bin/dell_lpc_mon.sh
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
if [ -r /usr/local/bin/z9100_qsfp_monitor.py ]; then
|
||||
python /usr/local/bin/z9100_qsfp_monitor.py &
|
||||
fi
|
File diff suppressed because it is too large
Load Diff
@ -1,522 +0,0 @@
|
||||
import os
|
||||
import re
|
||||
import signal
|
||||
import subprocess
|
||||
import sys
|
||||
import imp
|
||||
import syslog
|
||||
import time
|
||||
import os.path
|
||||
import z9100_preemp_db
|
||||
from sonic_sfp.bcmshell import bcmshell
|
||||
|
||||
SYSLOG_IDENTIFIER = "dell_qsfp_monitor"
|
||||
|
||||
HWSKU_KEY = 'DEVICE_METADATA.localhost.hwsku'
|
||||
PLATFORM_KEY = 'DEVICE_METADATA.localhost.platform'
|
||||
SONIC_CFGGEN_PATH = '/usr/local/bin/sonic-cfggen'
|
||||
PLATFORM_ROOT_PATH = '/usr/share/sonic/device'
|
||||
PLATFORM_SPECIFIC_CLASS_NAME = "SfpUtil"
|
||||
PLATFORM_SPECIFIC_MODULE_NAME = "sfputil"
|
||||
|
||||
# Global platform-specific sfputil class instance
|
||||
platform_sfputil = None
|
||||
|
||||
# Timer Value
|
||||
DEFAULT_WAIT_FOR_SWSS_SYNCD = 45
|
||||
MINIMUM_WAIT_FOR_BCM_SHELL = 3
|
||||
MINIMUM_WAIT_FOR_SWSS_SYNCD = 5
|
||||
MINIMUM_RETRY_FOR_SWSS_DB = 10
|
||||
|
||||
|
||||
# ========================== Syslog wrappers ==========================
|
||||
def log_debug(msg):
|
||||
syslog.openlog(SYSLOG_IDENTIFIER)
|
||||
syslog.syslog(syslog.LOG_DEBUG, msg)
|
||||
syslog.closelog()
|
||||
|
||||
|
||||
def log_info(msg):
|
||||
syslog.openlog(SYSLOG_IDENTIFIER)
|
||||
syslog.syslog(syslog.LOG_INFO, msg)
|
||||
syslog.closelog()
|
||||
|
||||
|
||||
def log_warning(msg):
|
||||
syslog.openlog(SYSLOG_IDENTIFIER)
|
||||
syslog.syslog(syslog.LOG_WARNING, msg)
|
||||
syslog.closelog()
|
||||
|
||||
|
||||
def log_error(msg):
|
||||
syslog.openlog(SYSLOG_IDENTIFIER)
|
||||
syslog.syslog(syslog.LOG_ERR, msg)
|
||||
syslog.closelog()
|
||||
|
||||
|
||||
# ========================== Signal Handling ==========================
|
||||
def signal_handler(sig, frame):
|
||||
if sig == signal.SIGHUP:
|
||||
log_info("Caught SIGHUP - ignoring...")
|
||||
return
|
||||
elif sig == signal.SIGINT:
|
||||
log_info("Caught SIGINT - exiting...")
|
||||
sys.exit(128 + sig)
|
||||
elif sig == signal.SIGTERM:
|
||||
log_info("Caught SIGTERM - exiting...")
|
||||
sys.exit(128 + sig)
|
||||
else:
|
||||
log_warning("Caught unhandled signal '" + sig + "'")
|
||||
|
||||
|
||||
class BcmShell(bcmshell):
|
||||
bcm_port_mapping = {}
|
||||
|
||||
def port_mapping_populate(self):
|
||||
try:
|
||||
content = self.run("ps")
|
||||
count = 0
|
||||
for line in content.split("\n"):
|
||||
PSOutput = re.search(r"(?P<port_name>(xe|ce)\d+)"
|
||||
"\(\s*(?P<bcm_id>\d+)\).+\s+"
|
||||
"(?P<speed>\d+)G", line)
|
||||
if PSOutput is not None:
|
||||
port = "Ethernet" + str(count)
|
||||
self.bcm_port_mapping[port] = list()
|
||||
self.bcm_port_mapping[port].append(
|
||||
int(PSOutput.group("bcm_id")))
|
||||
self.bcm_port_mapping[port].append(
|
||||
PSOutput.group("port_name"))
|
||||
speed = PSOutput.group("speed")
|
||||
if ((speed == "100") or (speed == "40")):
|
||||
lane_count = 4
|
||||
count = count + 4
|
||||
elif (speed == "50"):
|
||||
lane_count = 2
|
||||
count = count + 2
|
||||
else:
|
||||
lane_count = 1
|
||||
count = count + 1
|
||||
self.bcm_port_mapping[port].append(str(lane_count))
|
||||
self.bcm_port_mapping[port].append(speed)
|
||||
if (speed == "10"):
|
||||
del self.bcm_port_mapping[port]
|
||||
except:
|
||||
log_error("Unable to read bcm port status")
|
||||
sys.exit(3)
|
||||
|
||||
def execute_command(self, cmd):
|
||||
self.cmd(cmd)
|
||||
|
||||
|
||||
class dell_qsfp_monitor(object):
|
||||
"""
|
||||
Class which configures the preEmphasis Settings corresponding to
|
||||
optics inserted. This script will run only once after reload.
|
||||
Support Insertion/Removal of optics is not provided
|
||||
Attributes:
|
||||
"""
|
||||
|
||||
# Instantiate BCM Shell
|
||||
def __init__(self):
|
||||
self.bcm_shell = BcmShell()
|
||||
self.bcm_shell.port_mapping_populate()
|
||||
|
||||
# For the given eeprom data, return the PreEmphasisDB to be used
|
||||
def get_preemphasis_db(self, port, eeprom_dict):
|
||||
preemphasis_db = {}
|
||||
|
||||
if (eeprom_dict == {}):
|
||||
return z9100_preemp_db.preEmphasis_100g
|
||||
else:
|
||||
qsfp_identifier = eeprom_dict["Identifier"]
|
||||
cable_length = eeprom_dict["Length Cable Assembly(m)"]
|
||||
|
||||
if (qsfp_identifier == "QSFP28"):
|
||||
if (cable_length == 0.75):
|
||||
preemphasis_db = z9100_preemp_db.preEmphasis_100g_dac_750mm
|
||||
elif (cable_length == 1):
|
||||
preemphasis_db = z9100_preemp_db.preEmphasis_100g_dac_1_0m
|
||||
elif (cable_length == 1.5):
|
||||
preemphasis_db = z9100_preemp_db.preEmphasis_100g_dac_1_5m
|
||||
elif (cable_length == 2):
|
||||
preemphasis_db = z9100_preemp_db.preEmphasis_100g_dac_2_0m
|
||||
elif (cable_length == 3):
|
||||
preemphasis_db = z9100_preemp_db.preEmphasis_100g_dac_3_0m
|
||||
elif (qsfp_identifier == "QSFP+"):
|
||||
preemphasis_db = z9100_preemp_db.preEmphasis_40g
|
||||
|
||||
return preemphasis_db
|
||||
|
||||
# For Given Port, Lane and PreEmp Register, retrive the value from
|
||||
# PreEmphasisDB which needs to be programmed into ASIC,
|
||||
# In case of Fanned-out ports, use the values from base port
|
||||
def get_preemphasis_value(self, port, bcm_hw_lane,
|
||||
preemphasis_dict, preemp_idx):
|
||||
portIdStr = re.findall('\d+', port)
|
||||
portId = int(portIdStr[0])
|
||||
basePortId = (portId//4)*4
|
||||
portIndex = "Ethernet" + str(basePortId)
|
||||
value = preemphasis_dict[portIndex][bcm_hw_lane][preemp_idx]
|
||||
|
||||
return value
|
||||
|
||||
# For Given port, return bcmPortname (Ex:- ce21, xe4, ce0 )
|
||||
def get_bcm_port_name(self, port):
|
||||
if (self.bcm_shell.bcm_port_mapping == {}):
|
||||
log_error("bcm port mapping is null")
|
||||
sys.exit(3)
|
||||
bcm_port_name = self.bcm_shell.bcm_port_mapping[port][1]
|
||||
|
||||
return bcm_port_name
|
||||
|
||||
# Return the number of lanes for the port
|
||||
# (Ex:- 100G - 4, 50G - 2, 40G - 4)
|
||||
def get_lane_count(self, port):
|
||||
if (self.bcm_shell.bcm_port_mapping == {}):
|
||||
log_error("bcm port mapping is null")
|
||||
sys.exit(3)
|
||||
laneCntStr = self.bcm_shell.bcm_port_mapping[port][2]
|
||||
lane_count = int(laneCntStr)
|
||||
|
||||
return lane_count
|
||||
|
||||
# For Given port, return bcmPortname (Ex:- ce21, xe4, ce0 )
|
||||
def get_bcm_port_speed(self, port):
|
||||
if (self.bcm_shell.bcm_port_mapping == {}):
|
||||
log_error("bcm port mapping is null")
|
||||
sys.exit(3)
|
||||
bcm_port_speed = self.bcm_shell.bcm_port_mapping[port][3]
|
||||
|
||||
return bcm_port_speed
|
||||
|
||||
# For Given, Port and lane_id, return the hardware lane number
|
||||
def get_bcm_lane_info(self, port, lane_id):
|
||||
lane_count = self.get_lane_count(port)
|
||||
portIdStr = re.findall('\d+', port)
|
||||
portId = int(portIdStr[0])
|
||||
basePortId = (portId//4)*4
|
||||
portIndex = "Ethernet" + str(basePortId)
|
||||
if ((portId % 4) == 0):
|
||||
laneIndex = lane_id
|
||||
elif ((portId % 2) == 0):
|
||||
if (lane_count == 2):
|
||||
laneIndex = lane_id + 2
|
||||
else:
|
||||
laneIndex = (PortId - basePortId)
|
||||
else:
|
||||
laneIndex = (PortId - basePortId)
|
||||
|
||||
return z9100_preemp_db.lane_mapping[portIndex][laneIndex]
|
||||
|
||||
# Form the AMS_TX_AMP_CTL command string
|
||||
# "serdes_driver_current" config variable in BCM Chipset
|
||||
def form_bcm_phy_ams_cmd(self, port, preemphasis_dict):
|
||||
ams_idx = 0
|
||||
ams_cmd = list()
|
||||
|
||||
bcm_port_name = self.get_bcm_port_name(port)
|
||||
lane_count = self.get_lane_count(port)
|
||||
for lane_id in range(lane_count):
|
||||
bcm_hw_lane = self.get_bcm_lane_info(port, lane_id)
|
||||
value = self.get_preemphasis_value(port, bcm_hw_lane,
|
||||
preemphasis_dict, ams_idx)
|
||||
ams_cmd_str = "phy " + bcm_port_name + " AMS_TX_CTL2r." + str(
|
||||
bcm_hw_lane) + " AMS_TX_AMP_CTL" + "=" + hex(value)
|
||||
ams_cmd.append(ams_cmd_str)
|
||||
|
||||
return ams_cmd
|
||||
|
||||
# Form the TXFIR_POST command string
|
||||
# "serdes_preemphasis" Bits 23:16 config variable in BCM Chipset
|
||||
def form_bcm_phy_txfir_post_cmd(self, port, preemphasis_dict):
|
||||
txfir_post_idx = 1
|
||||
txfir_post_cmd = list()
|
||||
|
||||
bcm_port_name = self.get_bcm_port_name(port)
|
||||
lane_count = self.get_lane_count(port)
|
||||
for lane_id in range(lane_count):
|
||||
bcm_hw_lane = self.get_bcm_lane_info(port, lane_id)
|
||||
value = self.get_preemphasis_value(port, bcm_hw_lane,
|
||||
preemphasis_dict,
|
||||
txfir_post_idx)
|
||||
txfir_post_str_p1 = "phy " + bcm_port_name + " CL93N72_UT_CTL2r."
|
||||
txfir_post_str_p2 = txfir_post_str_p1 + str(bcm_hw_lane)
|
||||
txfir_post_str_p3 = txfir_post_str_p2 + " CL93N72_TXFIR_POST"
|
||||
txfir_post_cmd_str = txfir_post_str_p3 + "=" + hex(value)
|
||||
txfir_post_cmd.append(txfir_post_cmd_str)
|
||||
|
||||
return txfir_post_cmd
|
||||
|
||||
# Form the TXFIR_MAIN command string
|
||||
# "serdes_preemphasis" Bits 15:8 config variable in BCM Chipset
|
||||
def form_bcm_phy_txfir_main_cmd(self, port, preemphasis_dict):
|
||||
txfir_main_idx = 2
|
||||
txfir_main_cmd = list()
|
||||
|
||||
bcm_port_name = self.get_bcm_port_name(port)
|
||||
lane_count = self.get_lane_count(port)
|
||||
for lane_id in range(lane_count):
|
||||
bcm_hw_lane = self.get_bcm_lane_info(port, lane_id)
|
||||
value = self.get_preemphasis_value(port, bcm_hw_lane,
|
||||
preemphasis_dict,
|
||||
txfir_main_idx)
|
||||
txfir_main_str_p1 = "phy " + bcm_port_name + " CL93N72_UT_CTL3r."
|
||||
txfir_main_str_p2 = txfir_main_str_p1 + str(bcm_hw_lane)
|
||||
txfir_main_str_p3 = txfir_main_str_p2 + " CL93N72_TXFIR_MAIN"
|
||||
txfir_main_cmd_str = txfir_main_str_p3 + "=" + hex(value)
|
||||
txfir_main_cmd.append(txfir_main_cmd_str)
|
||||
|
||||
return txfir_main_cmd
|
||||
|
||||
# Form the TXFIR_PRE command string
|
||||
# "serdes_preemphasis" Bits 7:0 config variable in BCM Chipset
|
||||
def form_bcm_phy_txfir_pre_cmd(self, port, preemphasis_dict):
|
||||
txfir_pre_idx = 3
|
||||
txfir_pre_cmd = list()
|
||||
|
||||
bcm_port_name = self.get_bcm_port_name(port)
|
||||
lane_count = self.get_lane_count(port)
|
||||
for lane_id in range(lane_count):
|
||||
bcm_hw_lane = self.get_bcm_lane_info(port, lane_id)
|
||||
value = self.get_preemphasis_value(port, bcm_hw_lane,
|
||||
preemphasis_dict,
|
||||
txfir_pre_idx)
|
||||
txfir_pre_str_p1 = "phy " + bcm_port_name + " CL93N72_UT_CTL2r."
|
||||
txfir_pre_str_p2 = txfir_pre_str_p1 + str(bcm_hw_lane)
|
||||
txfir_pre_str_p3 = txfir_pre_str_p2 + " CL93N72_TXFIR_PRE"
|
||||
txfir_pre_cmd_str = txfir_pre_str_p3 + "=" + hex(value)
|
||||
txfir_pre_cmd.append(txfir_pre_cmd_str)
|
||||
|
||||
return txfir_pre_cmd
|
||||
|
||||
# For the Given port and eeprom_dict, configure
|
||||
# the preemphasis settings. This invokes the bcmcmd and configures
|
||||
# the preemphasis settings for each lane in all the ports
|
||||
def preemphasis_set(self, port, eeprom_dict):
|
||||
preemphasis_dict = self.get_preemphasis_db(port, eeprom_dict)
|
||||
lane_count = self.get_lane_count(port)
|
||||
|
||||
ams_cmd = self.form_bcm_phy_ams_cmd(port, preemphasis_dict)
|
||||
txfir_pre_cmd = self.form_bcm_phy_txfir_pre_cmd(port,
|
||||
preemphasis_dict)
|
||||
txfir_post_cmd = self.form_bcm_phy_txfir_post_cmd(port,
|
||||
preemphasis_dict)
|
||||
txfir_main_cmd = self.form_bcm_phy_txfir_main_cmd(port,
|
||||
preemphasis_dict)
|
||||
for lane_id in range(lane_count):
|
||||
self.bcm_shell.execute_command(ams_cmd[lane_id])
|
||||
self.bcm_shell.execute_command(txfir_pre_cmd[lane_id])
|
||||
self.bcm_shell.execute_command(txfir_post_cmd[lane_id])
|
||||
self.bcm_shell.execute_command(txfir_main_cmd[lane_id])
|
||||
|
||||
return 0
|
||||
|
||||
# Loop through all the ports, read the eeprom and configure
|
||||
# PreEmphasis Values based on eeprom data
|
||||
def run(self):
|
||||
self.bcm_shell.bcm_port_mapping
|
||||
|
||||
for logical_port in self.bcm_shell.bcm_port_mapping:
|
||||
eeprom_dict = get_eeprom_info_dict(logical_port)
|
||||
ret_val = self.preemphasis_set(logical_port, eeprom_dict)
|
||||
|
||||
|
||||
# ============================= Functions =============================
|
||||
# Populate Eeprom Info Dict
|
||||
# Based on the existing sfputil infra
|
||||
def get_eeprom_info_dict(logical_port_name):
|
||||
eeprom_info_dict = {}
|
||||
phy_port_list = logical_port_name_to_physical_port_list(logical_port_name)
|
||||
|
||||
for physical_port in phy_port_list:
|
||||
if not platform_sfputil.get_presence(physical_port):
|
||||
return eeprom_info_dict
|
||||
eeprom_dict = platform_sfputil.get_eeprom_dict(physical_port)
|
||||
|
||||
# Only print detected sfp ports for oneline
|
||||
if eeprom_dict is not None:
|
||||
eeprom_iface_dict = eeprom_dict.get('interface')
|
||||
eeprom_info_dict = eeprom_iface_dict.get('data')
|
||||
|
||||
return eeprom_info_dict
|
||||
|
||||
|
||||
# Returns platform and HW SKU
|
||||
def get_platform_and_hwsku():
|
||||
try:
|
||||
proc = subprocess.Popen([SONIC_CFGGEN_PATH, '-H', '-v', PLATFORM_KEY],
|
||||
stdout=subprocess.PIPE,
|
||||
shell=False,
|
||||
stderr=subprocess.STDOUT)
|
||||
stdout = proc.communicate()[0]
|
||||
proc.wait()
|
||||
platform = stdout.rstrip('\n')
|
||||
|
||||
proc = subprocess.Popen([SONIC_CFGGEN_PATH, '-d', '-v', HWSKU_KEY],
|
||||
stdout=subprocess.PIPE,
|
||||
shell=False,
|
||||
stderr=subprocess.STDOUT)
|
||||
stdout = proc.communicate()[0]
|
||||
proc.wait()
|
||||
hwsku = stdout.rstrip('\n')
|
||||
except OSError, e:
|
||||
raise OSError("Cannot detect platform")
|
||||
|
||||
return (platform, hwsku)
|
||||
|
||||
|
||||
def logical_port_name_to_physical_port_list(port_name):
|
||||
if port_name.startswith("Ethernet"):
|
||||
if platform_sfputil.is_logical_port(port_name):
|
||||
return platform_sfputil.get_logical_to_physical(port_name)
|
||||
else:
|
||||
print "Error: Invalid port '%s'" % port_name
|
||||
return None
|
||||
else:
|
||||
return [int(port_name)]
|
||||
|
||||
|
||||
# Returns path to port config file
|
||||
def get_path_to_port_config_file():
|
||||
# Get platform and hwsku
|
||||
(platform, hwsku) = get_platform_and_hwsku()
|
||||
|
||||
# Load platform module from source
|
||||
platform_path = "/".join([PLATFORM_ROOT_PATH, platform])
|
||||
hwsku_path = "/".join([platform_path, hwsku])
|
||||
|
||||
# First check for the presence of the new 'port_config.ini' file
|
||||
port_config_file_path = "/".join([hwsku_path, "port_config.ini"])
|
||||
if not os.path.isfile(port_config_file_path):
|
||||
# port_config.ini doesn't exist.
|
||||
# Try loading the legacy 'portmap.ini' file
|
||||
port_config_file_path = "/".join([hwsku_path, "portmap.ini"])
|
||||
|
||||
return port_config_file_path
|
||||
|
||||
|
||||
# Wait for bcmshell to be running
|
||||
def check_bcm_shell_status():
|
||||
while (1):
|
||||
# Check if bcmshell is ready.
|
||||
# Execute ps command,
|
||||
# If bcmShell is not ready it raises exception
|
||||
# Wait till bcmcmd returns success
|
||||
cmd = "bcmcmd ps"
|
||||
try:
|
||||
result = subprocess.check_output(cmd, shell=True)
|
||||
return 0
|
||||
except subprocess.CalledProcessError as e:
|
||||
log_info("Waiting for bcmShell to get ready !!!")
|
||||
time.sleep(MINIMUM_WAIT_FOR_BCM_SHELL)
|
||||
continue
|
||||
return 0
|
||||
|
||||
|
||||
# Wait for syncd to be running
|
||||
def check_swss_sycnd_status():
|
||||
redis_db_cnt = 0
|
||||
while (1):
|
||||
# Check if syncd starts and redisDb populated
|
||||
# Wait till redis Db return valid output
|
||||
cmd_p1 = "docker exec -i swss bash -c "
|
||||
cmd_p2 = cmd_p1 + "\"echo -en \\\"SELECT 1\\\\nHLEN HIDDEN\\\" | "
|
||||
cmd = cmd_p2 + "redis-cli | sed -n 2p\""
|
||||
try:
|
||||
result = subprocess.check_output(cmd, shell=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
# Wait till swss is spawned
|
||||
log_info("Waiting for swss to spawn !!!")
|
||||
time.sleep(MINIMUM_WAIT_FOR_SWSS_SYNCD)
|
||||
continue
|
||||
if (result.rstrip() == "5"):
|
||||
# Check if bcm_shell server,client is ready
|
||||
ret = check_bcm_shell_status()
|
||||
return ret
|
||||
else:
|
||||
if (redis_db_cnt == MINIMUM_RETRY_FOR_SWSS_DB):
|
||||
log_error("Fail : RedisDb in swss not populated")
|
||||
sys.exit(2)
|
||||
|
||||
# Wait till redisDb is populated
|
||||
log_info("Waiting for redisDb to be populated !!!")
|
||||
time.sleep(MINIMUM_WAIT_FOR_SWSS_SYNCD)
|
||||
redis_db_cnt = redis_db_cnt + 1
|
||||
return 0
|
||||
|
||||
|
||||
# Loads platform specific sfputil module from source
|
||||
def load_platform_sfputil():
|
||||
global platform_sfputil
|
||||
|
||||
# Get platform and hwsku
|
||||
(platform, hwsku) = get_platform_and_hwsku()
|
||||
|
||||
# Load platform module from source
|
||||
platform_path = "/".join([PLATFORM_ROOT_PATH, platform])
|
||||
hwsku_path = "/".join([platform_path, hwsku])
|
||||
|
||||
try:
|
||||
module_file = "/".join([platform_path, "plugins",
|
||||
PLATFORM_SPECIFIC_MODULE_NAME + ".py"])
|
||||
module = imp.load_source(PLATFORM_SPECIFIC_MODULE_NAME, module_file)
|
||||
except IOError, e:
|
||||
log_error("Failed to load platform module '%s': %s" %
|
||||
(PLATFORM_SPECIFIC_MODULE_NAME, str(e)), True)
|
||||
return -1
|
||||
|
||||
try:
|
||||
platform_sfputil_class = getattr(module, PLATFORM_SPECIFIC_CLASS_NAME)
|
||||
platform_sfputil = platform_sfputil_class()
|
||||
except AttributeError, e:
|
||||
log_error("Failed to instantiate '%s' class: %s" %
|
||||
(PLATFORM_SPECIFIC_CLASS_NAME, str(e)), True)
|
||||
return -2
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
def main():
|
||||
log_info("Starting up...")
|
||||
|
||||
if not os.geteuid() == 0:
|
||||
log_error("Must be root to run this daemon")
|
||||
print "Error: Must be root to run this daemon"
|
||||
sys.exit(1)
|
||||
|
||||
# Register our signal handlers
|
||||
signal.signal(signal.SIGHUP, signal_handler)
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
signal.signal(signal.SIGTERM, signal_handler)
|
||||
|
||||
# Default Wait Time till SWSS spawns
|
||||
time.sleep(DEFAULT_WAIT_FOR_SWSS_SYNCD)
|
||||
|
||||
err = check_swss_sycnd_status()
|
||||
if (err != 0):
|
||||
log_error("Error timeout for swss service spawn")
|
||||
sys.exit(3)
|
||||
|
||||
# Use the existing sfputil infra to read the eeprom data of inserted Qsfps
|
||||
err = load_platform_sfputil()
|
||||
if (err != 0):
|
||||
sys.exit(2)
|
||||
|
||||
# Load port info
|
||||
try:
|
||||
port_config_file_path = get_path_to_port_config_file()
|
||||
platform_sfputil.read_porttab_mappings(port_config_file_path)
|
||||
except Exception, e:
|
||||
log_error("Error reading port info (%s)" % str(e), True)
|
||||
sys.exit(3)
|
||||
|
||||
# Instantiate Dell QSFP Monitor object
|
||||
dell_qsfpd = dell_qsfp_monitor()
|
||||
dell_qsfpd.run()
|
||||
|
||||
log_info("QSFP Monitor Completed Successfully...")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Dell Z9100 LPC bus monitoring poller
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
ExecStart=/usr/local/bin/dell_lpc_mon.sh
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
@ -1,11 +0,0 @@
|
||||
[Unit]
|
||||
Description=Dell Z9100 Qsfp Monitor
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/bin/qsfp_monitor start
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -7,21 +7,21 @@ Standards-Version: 3.9.3
|
||||
|
||||
Package: platform-modules-ag9032v1
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
||||
Package: platform-modules-ag9064
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
||||
Package: platform-modules-ag5648
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
||||
Package: platform-modules-et-6248brb
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
||||
|
@ -25,7 +25,7 @@ start)
|
||||
modprobe dni_gpio
|
||||
modprobe delta_et-6248brb_platform
|
||||
|
||||
if [ `uname -a | awk '{print $3}'` = "4.9.0-8-2-amd64" ]; then
|
||||
if [ `uname -a | awk '{print $3}'` = "4.9.0-9-2-amd64" ]; then
|
||||
echo "453" > "/sys/class/gpio/export"
|
||||
echo "454" > "/sys/class/gpio/export"
|
||||
echo "455" > "/sys/class/gpio/export"
|
||||
|
@ -7,7 +7,7 @@ FAN2_RPM="/sys/bus/i2c/devices/0-002e/fan2_input"
|
||||
FAN_TRAY1_LED="/sys/devices/platform/delta-et6248brb-gpio.0/FAN/fan1_led_ag"
|
||||
FAN_TRAY2_LED="/sys/devices/platform/delta-et6248brb-gpio.0/FAN/fan2_led_ag"
|
||||
|
||||
if [ `uname -a | awk '{print $3}'` = "4.9.0-8-2-amd64" ]; then
|
||||
if [ `uname -a | awk '{print $3}'` = "4.9.0-9-2-amd64" ]; then
|
||||
SYS_LED_G="/sys/class/gpio/gpio453/value"
|
||||
SYS_LED_R="/sys/class/gpio/gpio454/value"
|
||||
PWR_LED_G="/sys/class/gpio/gpio455/value"
|
||||
|
@ -7,25 +7,25 @@ Standards-Version: 3.9.3
|
||||
|
||||
Package: platform-modules-d7032q28b
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led
|
||||
|
||||
Package: platform-modules-d7054q28b
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led
|
||||
|
||||
Package: platform-modules-d6254qs
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led
|
||||
|
||||
Package: platform-modules-d6556
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led
|
||||
|
||||
Package: platform-modules-d7264q28b
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led
|
||||
|
@ -1,50 +0,0 @@
|
||||
# Object files
|
||||
*.o
|
||||
*.ko
|
||||
*.obj
|
||||
*.elf
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Libraries
|
||||
*.lib
|
||||
*.a
|
||||
*.la
|
||||
*.lo
|
||||
|
||||
# Shared objects (inc. Windows DLLs)
|
||||
*.dll
|
||||
*.so
|
||||
*.so.*
|
||||
*.dylib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
*.i*86
|
||||
*.x86_64
|
||||
*.hex
|
||||
|
||||
# Debug files
|
||||
*.dSYM/
|
||||
*.su
|
||||
|
||||
# Kernel Module Compile Results
|
||||
*.mod*
|
||||
*.cmd
|
||||
*.o.d
|
||||
.tmp_versions/
|
||||
modules.order
|
||||
Module.symvers
|
||||
Mkfile.old
|
||||
dkms.conf
|
||||
|
||||
# Debian packaging
|
||||
*.debhelper.log
|
||||
*.postinst.debhelper
|
||||
*.postrm.debhelper
|
||||
*.prerm.debhelper
|
||||
*.substvars
|
@ -1,5 +0,0 @@
|
||||
platform-modules-s6000 (1.0) unstable; urgency=low
|
||||
|
||||
* Initial release
|
||||
|
||||
-- Shuotian Cheng <shuche@microsoft.com> Mon, 11 Nov 2015 11:11:11 -0800
|
@ -1 +0,0 @@
|
||||
8
|
@ -1,12 +0,0 @@
|
||||
Source: platform-modules-s6000
|
||||
Section: main
|
||||
Priority: extra
|
||||
Maintainer: Shuotian Cheng <shuche@microsoft.com>
|
||||
Build-Depends: debhelper (>= 8.0.0), bzip2
|
||||
Standards-Version: 3.9.3
|
||||
|
||||
Package: platform-modules-s6000
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
@ -1,16 +0,0 @@
|
||||
Provides linux sysfs interface to Dell S6000 platform hardware peripherals
|
||||
Copyright (C) 2016 Microsoft
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
@ -1,2 +0,0 @@
|
||||
systemd/platform-modules-s6000.service lib/systemd/system
|
||||
scripts/io_rd_wr.py usr/local/bin
|
@ -1,32 +0,0 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
export INSTALL_MOD_DIR:=extra
|
||||
|
||||
PACKAGE_NAME := platform-modules-s6000
|
||||
KVERSION ?= $(shell uname -r)
|
||||
KERNEL_SRC := /lib/modules/$(KVERSION)
|
||||
MODULE_SRC := $(shell pwd)/modules
|
||||
SCRIPT_SRC := $(shell pwd)/scripts
|
||||
|
||||
%:
|
||||
dh $@ --with=systemd
|
||||
|
||||
override_dh_auto_build:
|
||||
make -C $(KERNEL_SRC)/build M=$(MODULE_SRC)
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_installdirs -p$(PACKAGE_NAME) $(KERNEL_SRC)/$(INSTALL_MOD_DIR)
|
||||
cp $(MODULE_SRC)/*.ko debian/$(PACKAGE_NAME)/$(KERNEL_SRC)/$(INSTALL_MOD_DIR)
|
||||
dh_installdirs -p$(PACKAGE_NAME) usr/local/bin
|
||||
cp -r $(SCRIPT_SRC)/* debian/$(PACKAGE_NAME)/usr/local/bin
|
||||
|
||||
override_dh_usrlocal:
|
||||
|
||||
override_dh_pysupport:
|
||||
|
||||
override_dh_clean:
|
||||
dh_clean
|
||||
rm -f $(MODULE_SRC)/*.o $(MODULE_SRC)/*.ko $(MODULE_SRC)/*.mod.c $(MODULE_SRC)/.*.cmd
|
||||
rm -f $(MODULE_SRC)/Module.markers $(MODULE_SRC)/Module.symvers $(MODULE_SRC)/modules.order
|
||||
rm -rf $(MODULE_SRC)/.tmp_versions
|
||||
|
@ -1,93 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
#Script to read/write the io based registers
|
||||
|
||||
import sys
|
||||
import os
|
||||
import getopt
|
||||
import struct
|
||||
|
||||
io_resource='/dev/port'
|
||||
|
||||
def usage():
|
||||
''' This is the Usage Method '''
|
||||
|
||||
print 'Utility for IO read/write'
|
||||
print '\t\t io_rd_wr.py --get --offset <offset>'
|
||||
print '\t\t io_rd_wr.py --set --val <val> --offset <offset>'
|
||||
sys.exit(1)
|
||||
|
||||
def io_reg_read(io_resource,offset):
|
||||
fd=os.open(io_resource, os.O_RDONLY)
|
||||
if(fd<0):
|
||||
print 'file open failed %s"%io_resource'
|
||||
return
|
||||
if(os.lseek(fd, offset, os.SEEK_SET) != offset):
|
||||
print 'lseek failed on %s'%io_resource
|
||||
return
|
||||
buf=os.read(fd,1)
|
||||
reg_val1=ord(buf)
|
||||
print 'reg value %x'%reg_val1
|
||||
os.close(fd)
|
||||
|
||||
def io_reg_write(io_resource,offset,val):
|
||||
fd=os.open(io_resource,os.O_RDWR)
|
||||
if(fd<0):
|
||||
print 'file open failed %s"%io_resource'
|
||||
return
|
||||
if(os.lseek(fd, offset, os.SEEK_SET) != offset):
|
||||
print 'lseek failed on %s'%io_resource
|
||||
return
|
||||
ret=os.write(fd,struct.pack('B',val))
|
||||
if(ret != 1):
|
||||
print 'write failed %d'%ret
|
||||
return
|
||||
os.close(fd)
|
||||
|
||||
def main(argv):
|
||||
|
||||
''' The main function will read the user input from the
|
||||
command line argument and process the request '''
|
||||
|
||||
opts = ''
|
||||
val = ''
|
||||
choice = ''
|
||||
resouce = ''
|
||||
offset = ''
|
||||
|
||||
try:
|
||||
opts, args = getopt.getopt(argv, "hgs:" , \
|
||||
["val=","offset=","help", "get", "set"])
|
||||
|
||||
except getopt.GetoptError:
|
||||
usage()
|
||||
|
||||
for opt,arg in opts:
|
||||
|
||||
if opt in ('-h','--help'):
|
||||
choice = 'help'
|
||||
|
||||
elif opt in ('-g', '--get'):
|
||||
choice = 'get'
|
||||
|
||||
elif opt in ('-s', '--set'):
|
||||
choice = 'set'
|
||||
|
||||
elif opt == '--offset':
|
||||
offset = int(arg,16)
|
||||
|
||||
elif opt == '--val':
|
||||
val = int(arg,16)
|
||||
|
||||
if choice == 'get' and offset != '':
|
||||
io_reg_read(io_resource,offset)
|
||||
|
||||
elif choice == 'set' and offset != '' and val != '':
|
||||
io_reg_write(io_resource,offset,val)
|
||||
|
||||
else:
|
||||
usage()
|
||||
|
||||
#Calling the main method
|
||||
if __name__ == "__main__":
|
||||
main(sys.argv[1:])
|
||||
|
@ -7,11 +7,11 @@ Standards-Version: 3.9.3
|
||||
|
||||
Package: platform-modules-e582-48x2q4z
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
||||
Package: platform-modules-e582-48x6q
|
||||
Architecture: amd64
|
||||
Depends: linux-image-4.9.0-8-2-amd64
|
||||
Depends: linux-image-4.9.0-9-2-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
||||
|
@ -1,32 +1,27 @@
|
||||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
||||
FROM docker-syncd-mlnx
|
||||
|
||||
## Make apt-get non-interactive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
COPY \
|
||||
{% for deb in docker_syncd_mlnx_rpc_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
{% if docker_syncd_mlnx_rpc_debs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{{ copy_files("debs/", docker_syncd_mlnx_rpc_debs.split(' '), "/debs/") }}
|
||||
|
||||
COPY \
|
||||
{% for deb in docker_syncd_mlnx_rpc_pydebs.split(' ') -%}
|
||||
python-debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
# Install locally-built Debian packages and implicitly install their dependencies
|
||||
{{ install_debian_packages(docker_syncd_mlnx_rpc_debs.split(' ')) }}
|
||||
{% endif %}
|
||||
|
||||
{% if docker_syncd_mlnx_rpc_pydebs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{{ copy_files("python-debs/", docker_syncd_mlnx_rpc_pydebs.split(' '), "/debs/") }}
|
||||
|
||||
# Install locally-built Debian packages and implicitly install their dependencies
|
||||
{{ install_debian_packages(docker_syncd_mlnx_rpc_pydebs.split(' ')) }}
|
||||
{% endif %}
|
||||
|
||||
RUN apt-get purge -y syncd
|
||||
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
|
||||
{% for deb in docker_syncd_mlnx_rpc_debs.split(' ') -%}
|
||||
dpkg_apt debs/{{ deb }}{{'; '}}
|
||||
{%- endfor %}
|
||||
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
|
||||
{% for deb in docker_syncd_mlnx_rpc_pydebs.split(' ') -%}
|
||||
dpkg_apt debs/{{ deb }}{{'; '}}
|
||||
{%- endfor %}
|
||||
|
||||
## Pre-install the fundamental packages
|
||||
RUN apt-get update \
|
||||
&& apt-get -y install \
|
||||
@ -58,5 +53,5 @@ RUN apt-get update \
|
||||
&& rm -rf /root/deps
|
||||
|
||||
COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
|
||||
|
||||
|
||||
ENTRYPOINT ["/usr/bin/supervisord"]
|
||||
|
@ -1,3 +1,4 @@
|
||||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
||||
FROM docker-config-engine-stretch
|
||||
|
||||
ARG docker_container_name
|
||||
@ -6,37 +7,33 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
|
||||
## Make apt-get non-interactive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
libxml2
|
||||
|
||||
COPY \
|
||||
{% for deb in docker_syncd_mlnx_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
{% if docker_syncd_mlnx_debs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{{ copy_files("debs/", docker_syncd_mlnx_debs.split(' '), "/debs/") }}
|
||||
|
||||
COPY \
|
||||
{% for deb in docker_syncd_mlnx_pydebs.split(' ') -%}
|
||||
python-debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
# Install locally-built Debian packages and implicitly install their dependencies
|
||||
{{ install_debian_packages(docker_syncd_mlnx_debs.split(' ')) }}
|
||||
{% endif %}
|
||||
|
||||
RUN apt-get install -y libxml2
|
||||
{% if docker_syncd_mlnx_pydebs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{{ copy_files("python-debs/", docker_syncd_mlnx_pydebs.split(' '), "/debs/") }}
|
||||
|
||||
RUN dpkg -i \
|
||||
{% for deb in docker_syncd_mlnx_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor %}
|
||||
# Install locally-built Debian packages and implicitly install their dependencies
|
||||
{{ install_debian_packages(docker_syncd_mlnx_pydebs.split(' ')) }}
|
||||
{% endif %}
|
||||
|
||||
RUN dpkg -i \
|
||||
{% for deb in docker_syncd_mlnx_pydebs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor %}
|
||||
## Clean up
|
||||
RUN apt-get clean -y && \
|
||||
apt-get autoclean -y && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /debs
|
||||
|
||||
COPY ["start.sh", "/usr/bin/"]
|
||||
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
||||
|
||||
## Clean up
|
||||
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
||||
RUN rm -rf /debs
|
||||
|
||||
ENTRYPOINT ["/usr/bin/supervisord"]
|
||||
|
@ -2,12 +2,12 @@
|
||||
|
||||
MLNX_FW_BASE_URL = $(MLNX_SDK_BASE_URL)
|
||||
|
||||
MLNX_SPC_FW_VERSION = 13.2000.1140
|
||||
MLNX_SPC_FW_VERSION = 13.2000.1420
|
||||
MLNX_SPC_FW_FILE = fw-SPC-rel-$(subst .,_,$(MLNX_SPC_FW_VERSION))-EVB.mfa
|
||||
$(MLNX_SPC_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC_FW_FILE)
|
||||
SONIC_ONLINE_FILES += $(MLNX_SPC_FW_FILE)
|
||||
|
||||
MLNX_SPC2_FW_VERSION = 29.2000.1140
|
||||
MLNX_SPC2_FW_VERSION = 29.2000.1420
|
||||
MLNX_SPC2_FW_FILE = fw-SPC2-rel-$(subst .,_,$(MLNX_SPC2_FW_VERSION))-EVB.mfa
|
||||
$(MLNX_SPC2_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC2_FW_FILE)
|
||||
SONIC_ONLINE_FILES += $(MLNX_SPC2_FW_FILE)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user