Add switch ASIC vendor and platform for Nephos (#1082)
- Add switch ASIC vendor: Nephos - Add Nephos platform: Ingrasys S9130-32X Signed-off-by: Sam Yang <yang.kaiyu@gmail.com>
This commit is contained in:
parent
24c84942cb
commit
b945010243
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -69,3 +69,6 @@
|
|||||||
[submodule "platform/broadcom/sonic-platform-modules-cel"]
|
[submodule "platform/broadcom/sonic-platform-modules-cel"]
|
||||||
path = platform/broadcom/sonic-platform-modules-cel
|
path = platform/broadcom/sonic-platform-modules-cel
|
||||||
url = https://github.com/celestica-Inc/sonic-platform-modules-cel.git
|
url = https://github.com/celestica-Inc/sonic-platform-modules-cel.git
|
||||||
|
[submodule "platform/nephos/sonic-platform-modules-ingrasys"]
|
||||||
|
path = platform/nephos/sonic-platform-modules-ingrasys
|
||||||
|
url = https://github.com/Ingrasys-sonic/sonic-platform-modules-ingrasys-nephos.git
|
||||||
|
@ -141,6 +141,9 @@ sudo chroot $FILESYSTEM_ROOT update-initramfs -u
|
|||||||
## Install latest intel igb driver
|
## Install latest intel igb driver
|
||||||
sudo cp target/debs/igb.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-4-amd64/kernel/drivers/net/ethernet/intel/igb/igb.ko
|
sudo cp target/debs/igb.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-4-amd64/kernel/drivers/net/ethernet/intel/igb/igb.ko
|
||||||
|
|
||||||
|
## Install latest intel ixgbe driver
|
||||||
|
sudo cp target/debs/ixgbe.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-4-amd64/kernel/drivers/net/ethernet/intel/ixgbe/ixgbe.ko
|
||||||
|
|
||||||
## Install docker
|
## Install docker
|
||||||
echo '[INFO] Install docker'
|
echo '[INFO] Install docker'
|
||||||
## Install apparmor utils since they're missing and apparmor is enabled in the kernel
|
## Install apparmor utils since they're missing and apparmor is enabled in the kernel
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
# name lanes alias index
|
||||||
|
Ethernet0 0,1,2,3 Ethernet1/1 1
|
||||||
|
Ethernet4 4,5,6,7 Ethernet2/1 2
|
||||||
|
Ethernet8 8,9,10,11 Ethernet3/1 3
|
||||||
|
Ethernet12 12,13,14,15 Ethernet4/1 4
|
||||||
|
Ethernet16 16,17,18,19 Ethernet5/1 5
|
||||||
|
Ethernet20 20,21,22,23 Ethernet6/1 6
|
||||||
|
Ethernet24 24,25,26,27 Ethernet7/1 7
|
||||||
|
Ethernet28 28,29,30,31 Ethernet8/1 8
|
||||||
|
Ethernet32 32,33,34,35 Ethernet9/1 9
|
||||||
|
Ethernet36 36,37,38,39 Ethernet10/1 10
|
||||||
|
Ethernet40 40,41,42,43 Ethernet11/1 11
|
||||||
|
Ethernet44 44,45,46,47 Ethernet12/1 12
|
||||||
|
Ethernet48 48,49,50,51 Ethernet13/1 13
|
||||||
|
Ethernet52 52,53,54,55 Ethernet14/1 14
|
||||||
|
Ethernet56 56,57,58,59 Ethernet15/1 15
|
||||||
|
Ethernet60 60,61,62,63 Ethernet16/1 16
|
||||||
|
Ethernet64 64,65,66,67 Ethernet17/1 17
|
||||||
|
Ethernet68 68,69,70,71 Ethernet18/1 18
|
||||||
|
Ethernet72 72,73,74,75 Ethernet19/1 19
|
||||||
|
Ethernet76 76,77,78,79 Ethernet20/1 20
|
||||||
|
Ethernet80 80,81,82,83 Ethernet21/1 21
|
||||||
|
Ethernet84 84,85,86,87 Ethernet22/1 22
|
||||||
|
Ethernet88 88,89,90,91 Ethernet23/1 23
|
||||||
|
Ethernet92 92,93,94,95 Ethernet24/1 24
|
||||||
|
Ethernet96 96,97,98,99 Ethernet25/1 25
|
||||||
|
Ethernet100 100,101,102,103 Ethernet26/1 26
|
||||||
|
Ethernet104 104,105,106,107 Ethernet27/1 27
|
||||||
|
Ethernet108 108,109,110,111 Ethernet28/1 28
|
||||||
|
Ethernet112 112,113,114,115 Ethernet29/1 29
|
||||||
|
Ethernet116 116,117,118,119 Ethernet30/1 30
|
||||||
|
Ethernet120 120,121,122,123 Ethernet31/1 31
|
||||||
|
Ethernet124 124,125,126,127 Ethernet32/1 32
|
@ -0,0 +1,2 @@
|
|||||||
|
SAI_INIT_CONFIG_FILE=/etc/nps/tau-s9130-32x100G.cfg
|
||||||
|
SAI_DSH_CONFIG_FILE=/etc/nps/tau-s9130-32x100G.dsh
|
12
device/ingrasys/x86_64-ingrasys_s9130_32x-r0/fancontrol
Normal file
12
device/ingrasys/x86_64-ingrasys_s9130_32x-r0/fancontrol
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Configuration file generated by pwmconfig, changes will be lost
|
||||||
|
INTERVAL=10
|
||||||
|
DEVPATH=hwmon5=devices/pci0000:00/0000:00:1f.3/i2c-0/i2c-8/8-002f
|
||||||
|
DEVNAME=hwmon5=w83795adg
|
||||||
|
FCTEMPS=hwmon5/device/pwm2=hwmon1/temp1_input hwmon5/device/pwm1=hwmon1/temp1_input
|
||||||
|
FCFANS=hwmon5/device/pwm2=hwmon5/device/fan8_input hwmon5/device/pwm2=hwmon5/device/fan7_input hwmon5/device/pwm2=hwmon5/device/fan6_input hwmon5/device/pwm2=hwmon5/device/fan5_input hwmon5/device/pwm1=hwmon5/device/fan4_input hwmon5/device/pwm1=hwmon5/device/fan3_input hwmon5/device/pwm1=hwmon5/device/fan2_input hwmon5/device/pwm1=hwmon5/device/fan1_input
|
||||||
|
# TODO: check the temp value with HW after board ready
|
||||||
|
MINTEMP=hwmon5/device/pwm2=20 hwmon5/device/pwm1=20
|
||||||
|
MAXTEMP=hwmon5/device/pwm2=60 hwmon5/device/pwm1=60
|
||||||
|
MINSTART=hwmon5/device/pwm2=75 hwmon5/device/pwm1=75
|
||||||
|
MINSTOP=hwmon5/device/pwm2=22 hwmon5/device/pwm1=22
|
||||||
|
|
@ -0,0 +1,3 @@
|
|||||||
|
CONSOLE_PORT=0x3f8
|
||||||
|
CONSOLE_DEV=0
|
||||||
|
CONSOLE_SPEED=115200
|
151
device/ingrasys/x86_64-ingrasys_s9130_32x-r0/minigraph.xml
Normal file
151
device/ingrasys/x86_64-ingrasys_s9130_32x-r0/minigraph.xml
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
<DeviceMiniGraph xmlns="Microsoft.Search.Autopilot.Evolution" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<CpgDec>
|
||||||
|
<IsisRouters xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
|
||||||
|
<PeeringSessions>
|
||||||
|
<BGPSession>
|
||||||
|
<StartRouter>OCPSCH0104001MS</StartRouter>
|
||||||
|
<StartPeer>10.10.1.26</StartPeer>
|
||||||
|
<EndRouter>OCPSCH01040GGLF</EndRouter>
|
||||||
|
<EndPeer>10.10.1.25</EndPeer>
|
||||||
|
<Multihop>1</Multihop>
|
||||||
|
<HoldTime>10</HoldTime>
|
||||||
|
<KeepAliveTime>3</KeepAliveTime>
|
||||||
|
</BGPSession>
|
||||||
|
<BGPSession>
|
||||||
|
<StartRouter>OCPSCH0104002MS</StartRouter>
|
||||||
|
<StartPeer>10.10.2.26</StartPeer>
|
||||||
|
<EndRouter>OCPSCH01040GGLF</EndRouter>
|
||||||
|
<EndPeer>10.10.2.25</EndPeer>
|
||||||
|
<Multihop>1</Multihop>
|
||||||
|
<HoldTime>10</HoldTime>
|
||||||
|
<KeepAliveTime>3</KeepAliveTime>
|
||||||
|
</BGPSession>
|
||||||
|
</PeeringSessions>
|
||||||
|
<Routers xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
|
||||||
|
<a:BGPRouterDeclaration>
|
||||||
|
<a:ASN>64536</a:ASN>
|
||||||
|
<a:Hostname>OCPSCH01040GGLF</a:Hostname>
|
||||||
|
<a:Peers>
|
||||||
|
<BGPPeer>
|
||||||
|
<Address>10.10.1.26</Address>
|
||||||
|
<RouteMapIn i:nil="true"/>
|
||||||
|
<RouteMapOut i:nil="true"/>
|
||||||
|
</BGPPeer>
|
||||||
|
<BGPPeer>
|
||||||
|
<Address>10.10.2.26</Address>
|
||||||
|
<RouteMapIn i:nil="true"/>
|
||||||
|
<RouteMapOut i:nil="true"/>
|
||||||
|
</BGPPeer>
|
||||||
|
</a:Peers>
|
||||||
|
<a:RouteMaps/>
|
||||||
|
</a:BGPRouterDeclaration>
|
||||||
|
<a:BGPRouterDeclaration>
|
||||||
|
<a:ASN>64542</a:ASN>
|
||||||
|
<a:Hostname>OCPSCH0104001MS</a:Hostname>
|
||||||
|
<a:RouteMaps/>
|
||||||
|
</a:BGPRouterDeclaration>
|
||||||
|
<a:BGPRouterDeclaration>
|
||||||
|
<a:ASN>64543</a:ASN>
|
||||||
|
<a:Hostname>OCPSCH0104002MS</a:Hostname>
|
||||||
|
<a:RouteMaps/>
|
||||||
|
</a:BGPRouterDeclaration>
|
||||||
|
</Routers>
|
||||||
|
</CpgDec>
|
||||||
|
<DpgDec>
|
||||||
|
<DeviceDataPlaneInfo>
|
||||||
|
<IPSecTunnels/>
|
||||||
|
<LoopbackIPInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
|
||||||
|
<a:LoopbackIPInterface>
|
||||||
|
<Name>HostIP</Name>
|
||||||
|
<AttachTo>Loopback0</AttachTo>
|
||||||
|
<a:Prefix xmlns:b="Microsoft.Search.Autopilot.NetMux">
|
||||||
|
<b:IPPrefix>100.0.0.9/32</b:IPPrefix>
|
||||||
|
</a:Prefix>
|
||||||
|
<a:PrefixStr>100.0.0.9/32</a:PrefixStr>
|
||||||
|
</a:LoopbackIPInterface>
|
||||||
|
</LoopbackIPInterfaces>
|
||||||
|
<ManagementIPInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
|
||||||
|
</ManagementIPInterfaces>
|
||||||
|
<MplsInterfaces/>
|
||||||
|
<MplsTeInterfaces/>
|
||||||
|
<RsvpInterfaces/>
|
||||||
|
<Hostname>OCPSCH01040GGLF</Hostname>
|
||||||
|
<PortChannelInterfaces/>
|
||||||
|
<VlanInterfaces/>
|
||||||
|
<IPInterfaces>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:nil="true"/>
|
||||||
|
<AttachTo>Ethernet0</AttachTo>
|
||||||
|
<Prefix>10.10.1.25/30</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:nil="true"/>
|
||||||
|
<AttachTo>Ethernet4</AttachTo>
|
||||||
|
<Prefix>10.10.2.25/30</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
</IPInterfaces>
|
||||||
|
<DataAcls/>
|
||||||
|
<AclInterfaces/>
|
||||||
|
<DownstreamSummaries/>
|
||||||
|
<DownstreamSummarySet xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
|
||||||
|
</DeviceDataPlaneInfo>
|
||||||
|
</DpgDec>
|
||||||
|
<PngDec>
|
||||||
|
<DeviceInterfaceLinks>
|
||||||
|
<DeviceLinkBase i:type="DeviceInterfaceLink">
|
||||||
|
<Bandwidth>40000</Bandwidth>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>OCPSCH0104001MS</EndDevice>
|
||||||
|
<EndPort>Ethernet24</EndPort>
|
||||||
|
<StartDevice>OCPSCH01040GGLF</StartDevice>
|
||||||
|
<StartPort>Ethernet0</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase i:type="DeviceInterfaceLink">
|
||||||
|
<Bandwidth>40000</Bandwidth>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>OCPSCH0104002MS</EndDevice>
|
||||||
|
<EndPort>Ethernet24</EndPort>
|
||||||
|
<StartDevice>OCPSCH01040GGLF</StartDevice>
|
||||||
|
<StartPort>Ethernet4</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
</DeviceInterfaceLinks>
|
||||||
|
<Devices>
|
||||||
|
<Device i:type="LeafRouter">
|
||||||
|
<Hostname>OCPSCH01040GGLF</Hostname>
|
||||||
|
<HwSku>INGRASYS-S9130-32X</HwSku>
|
||||||
|
</Device>
|
||||||
|
</Devices>
|
||||||
|
</PngDec>
|
||||||
|
<MetadataDeclaration>
|
||||||
|
<Devices xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
|
||||||
|
<a:DeviceMetadata>
|
||||||
|
<a:Name>OCPSCH01040GGLF</a:Name>
|
||||||
|
<a:Properties>
|
||||||
|
<a:DeviceProperty>
|
||||||
|
<a:Name>DhcpResources</a:Name>
|
||||||
|
<a:Reference i:nil="true"/>
|
||||||
|
<a:Value></a:Value>
|
||||||
|
</a:DeviceProperty>
|
||||||
|
<a:DeviceProperty>
|
||||||
|
<a:Name>NtpResources</a:Name>
|
||||||
|
<a:Reference i:nil="true"/>
|
||||||
|
<a:Value>0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org</a:Value>
|
||||||
|
</a:DeviceProperty>
|
||||||
|
<a:DeviceProperty>
|
||||||
|
<a:Name>SyslogResources</a:Name>
|
||||||
|
<a:Reference i:nil="true"/>
|
||||||
|
<a:Value></a:Value>
|
||||||
|
</a:DeviceProperty>
|
||||||
|
<a:DeviceProperty>
|
||||||
|
<a:Name>ErspanDestinationIpv4</a:Name>
|
||||||
|
<a:Reference i:nil="true"/>
|
||||||
|
<a:Value>2.2.2.2</a:Value>
|
||||||
|
</a:DeviceProperty>
|
||||||
|
</a:Properties>
|
||||||
|
</a:DeviceMetadata>
|
||||||
|
</Devices>
|
||||||
|
<Properties xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
|
||||||
|
</MetadataDeclaration>
|
||||||
|
<Hostname>OCPSCH01040GGLF</Hostname>
|
||||||
|
<HwSku>INGRASYS-S9130-32X</HwSku>
|
||||||
|
</DeviceMiniGraph>
|
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# Ingrasys S9130-32X
|
||||||
|
#
|
||||||
|
# Platform and model specific eeprom subclass, inherits from the base class,
|
||||||
|
# and provides the followings:
|
||||||
|
# - the eeprom format definition
|
||||||
|
# - specific encoder/decoder if there is special need
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
try:
|
||||||
|
from sonic_eeprom import eeprom_tlvinfo
|
||||||
|
except ImportError, e:
|
||||||
|
raise ImportError (str(e) + "- required module not found")
|
||||||
|
|
||||||
|
|
||||||
|
class board(eeprom_tlvinfo.TlvInfoDecoder):
|
||||||
|
|
||||||
|
def __init__(self, name, path, cpld_root, ro):
|
||||||
|
self.eeprom_path = "/sys/class/i2c-adapter/i2c-0/0-0055/eeprom"
|
||||||
|
super(board, self).__init__(self.eeprom_path, 0, '', True)
|
187
device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/sfputil.py
Normal file
187
device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/sfputil.py
Normal file
@ -0,0 +1,187 @@
|
|||||||
|
# sfputil.py
|
||||||
|
#
|
||||||
|
# Platform-specific SFP transceiver interface for SONiC
|
||||||
|
#
|
||||||
|
|
||||||
|
try:
|
||||||
|
import time
|
||||||
|
from sonic_sfp.sfputilbase import SfpUtilBase
|
||||||
|
except ImportError as e:
|
||||||
|
raise ImportError("%s - required module not found" % str(e))
|
||||||
|
|
||||||
|
|
||||||
|
class SfpUtil(SfpUtilBase):
|
||||||
|
"""Platform-specific SfpUtil class"""
|
||||||
|
|
||||||
|
PORT_START = 1
|
||||||
|
PORT_END = 32
|
||||||
|
PORTS_IN_BLOCK = 32
|
||||||
|
EEPROM_OFFSET = 20
|
||||||
|
ABS_GPIO_BASE_0_15 = 240
|
||||||
|
ABS_GPIO_BASE_16_31 = 224
|
||||||
|
LP_MODE_GPIO_BASE_0_15 = 176
|
||||||
|
LP_MODE_GPIO_BASE_16_31 = 160
|
||||||
|
RST_GPIO_BASE_0_15 = 144
|
||||||
|
RST_GPIO_BASE_16_31 = 128
|
||||||
|
|
||||||
|
GPIO_VAL_PATH = "/sys/class/gpio/gpio{0}/value"
|
||||||
|
|
||||||
|
_port_to_eeprom_mapping = {}
|
||||||
|
|
||||||
|
@property
|
||||||
|
def port_start(self):
|
||||||
|
return self.PORT_START
|
||||||
|
|
||||||
|
@property
|
||||||
|
def port_end(self):
|
||||||
|
return self.PORT_END
|
||||||
|
|
||||||
|
@property
|
||||||
|
def qsfp_ports(self):
|
||||||
|
return range(0, self.PORTS_IN_BLOCK + 1)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def port_to_eeprom_mapping(self):
|
||||||
|
return self._port_to_eeprom_mapping
|
||||||
|
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
# Override port_to_eeprom_mapping for class initialization
|
||||||
|
eeprom_path = '/sys/class/i2c-adapter/i2c-{0}/{0}-0050/eeprom'
|
||||||
|
for x in range(self.port_start, self.port_end + 1):
|
||||||
|
port_eeprom_path = eeprom_path.format(x + self.EEPROM_OFFSET)
|
||||||
|
self.port_to_eeprom_mapping[x] = port_eeprom_path
|
||||||
|
|
||||||
|
SfpUtilBase.__init__(self)
|
||||||
|
|
||||||
|
def get_presence(self, port_num):
|
||||||
|
# Check for invalid port_num
|
||||||
|
if port_num < self.port_start or port_num > self.port_end:
|
||||||
|
return False
|
||||||
|
|
||||||
|
# open corrsponding gpio file
|
||||||
|
try:
|
||||||
|
if port_num <= 16:
|
||||||
|
gpio_base = self.ABS_GPIO_BASE_0_15
|
||||||
|
else :
|
||||||
|
gpio_base = self.ABS_GPIO_BASE_16_31
|
||||||
|
gpio_index = gpio_base + ((port_num - 1) % 16)
|
||||||
|
gpio_file_path = self.GPIO_VAL_PATH.format(gpio_index)
|
||||||
|
gpio_file = open(gpio_file_path)
|
||||||
|
except IOError as e:
|
||||||
|
print "Error: unable to open file: %s" % str(e)
|
||||||
|
return False
|
||||||
|
|
||||||
|
# content is a string containing the gpio value
|
||||||
|
gpio_val = int(gpio_file.readline().rstrip())
|
||||||
|
gpio_file.close()
|
||||||
|
|
||||||
|
# the gpio pin is ACTIVE_LOW but reversed
|
||||||
|
if gpio_val == 0:
|
||||||
|
return False
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
# open corrsponding gpio file
|
||||||
|
try:
|
||||||
|
if port_num <= 16:
|
||||||
|
gpio_base = self.LP_MODE_GPIO_BASE_0_15
|
||||||
|
else :
|
||||||
|
gpio_base = self.LP_MODE_GPIO_BASE_16_31
|
||||||
|
gpio_index = gpio_base + ((port_num - 1) % 16)
|
||||||
|
gpio_file_path = self.GPIO_VAL_PATH.format(gpio_index)
|
||||||
|
gpio_file = open(gpio_file_path)
|
||||||
|
except IOError as e:
|
||||||
|
print "Error: unable to open file: %s" % str(e)
|
||||||
|
return False
|
||||||
|
|
||||||
|
# content is a string containing the gpio value
|
||||||
|
gpio_val = int(gpio_file.readline().rstrip())
|
||||||
|
gpio_file.close()
|
||||||
|
|
||||||
|
if gpio_val == 0:
|
||||||
|
return False
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
# open corrsponding gpio file
|
||||||
|
try:
|
||||||
|
if port_num <= 16:
|
||||||
|
gpio_base = self.LP_MODE_GPIO_BASE_0_15
|
||||||
|
else :
|
||||||
|
gpio_base = self.LP_MODE_GPIO_BASE_16_31
|
||||||
|
gpio_index = gpio_base + ((port_num - 1) % 16)
|
||||||
|
gpio_file_path = self.GPIO_VAL_PATH.format(gpio_index)
|
||||||
|
gpio_file = open(gpio_file_path, "r+")
|
||||||
|
except IOError as e:
|
||||||
|
print "Error: unable to open file: %s" % str(e)
|
||||||
|
return False
|
||||||
|
|
||||||
|
# the gpio pin is ACTIVE_HIGH
|
||||||
|
if lpmode is True:
|
||||||
|
gpio_val = "1"
|
||||||
|
else:
|
||||||
|
gpio_val = "0"
|
||||||
|
|
||||||
|
# write value to gpio
|
||||||
|
gpio_file.seek(0)
|
||||||
|
gpio_file.write(gpio_val)
|
||||||
|
gpio_file.close()
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
def reset(self, port_num):
|
||||||
|
# Check for invalid port_num
|
||||||
|
if port_num < self.port_start or port_num > self.port_end:
|
||||||
|
return False
|
||||||
|
|
||||||
|
# open corrsponding gpio file
|
||||||
|
try:
|
||||||
|
if port_num <= 16:
|
||||||
|
gpio_base = self.RST_GPIO_BASE_0_15
|
||||||
|
else :
|
||||||
|
gpio_base = self.RST_GPIO_BASE_16_31
|
||||||
|
gpio_index = gpio_base + ((port_num - 1) % 16)
|
||||||
|
gpio_file_path = self.GPIO_VAL_PATH.format(gpio_index)
|
||||||
|
gpio_file = open(gpio_file_path, "w")
|
||||||
|
except IOError as e:
|
||||||
|
print "Error: unable to open file: %s" % str(e)
|
||||||
|
return False
|
||||||
|
|
||||||
|
# set the gpio to take port into reset
|
||||||
|
# the gpio pin is ACTIVE_LOW but reversed
|
||||||
|
gpio_val = "1"
|
||||||
|
# write value to gpio
|
||||||
|
gpio_file.seek(0)
|
||||||
|
gpio_file.write(gpio_val)
|
||||||
|
gpio_file.close()
|
||||||
|
|
||||||
|
# Sleep 1 second to let it settle
|
||||||
|
time.sleep(1)
|
||||||
|
|
||||||
|
# open corrsponding gpio file
|
||||||
|
try:
|
||||||
|
gpio_file = open(gpio_file_path, "w")
|
||||||
|
except IOError as e:
|
||||||
|
print "Error: unable to open file: %s" % str(e)
|
||||||
|
return False
|
||||||
|
|
||||||
|
# set gpio back low to take port out of reset
|
||||||
|
# the gpio pin is ACTIVE_LOW but reversed
|
||||||
|
gpio_val = "0"
|
||||||
|
# write value to gpio
|
||||||
|
gpio_file.seek(0)
|
||||||
|
gpio_file.write(gpio_val)
|
||||||
|
gpio_file.close()
|
||||||
|
|
||||||
|
return True
|
69
device/ingrasys/x86_64-ingrasys_s9130_32x-r0/sensors.conf
Normal file
69
device/ingrasys/x86_64-ingrasys_s9130_32x-r0/sensors.conf
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
# libsensors configuration file
|
||||||
|
chip "i350bb-*"
|
||||||
|
ignore loc1
|
||||||
|
|
||||||
|
chip "jc42-*"
|
||||||
|
|
||||||
|
bus "i2c-8" "i2c-mux-0 (chan_id 7)"
|
||||||
|
chip "w83795adg-*"
|
||||||
|
label in0 "0.9V"
|
||||||
|
set in0_max 0.945
|
||||||
|
set in0_min 0.855
|
||||||
|
label in1 "VDD_CORE"
|
||||||
|
set in1_max 0.945
|
||||||
|
set in1_min 0.855
|
||||||
|
label in2 "1.2V"
|
||||||
|
set in2_max 1.26
|
||||||
|
set in2_min 1.14
|
||||||
|
label in3 "1.8V"
|
||||||
|
set in3_max 1.89
|
||||||
|
set in3_min 1.71
|
||||||
|
label in4 "1.01V"
|
||||||
|
set in4_max 1.0605
|
||||||
|
set in4_min 0.9595
|
||||||
|
ignore in5
|
||||||
|
ignore in6
|
||||||
|
ignore in7
|
||||||
|
ignore in11
|
||||||
|
label in12 "3.3VDD"
|
||||||
|
set in12_max 3.465
|
||||||
|
set in12_min 3.135
|
||||||
|
# in12 and in13 are the same source
|
||||||
|
ignore in13
|
||||||
|
label fan1 "FANTRAY 1-A"
|
||||||
|
label fan2 "FANTRAY 1-B"
|
||||||
|
label fan3 "FANTRAY 2-A"
|
||||||
|
label fan4 "FANTRAY 2-B"
|
||||||
|
label fan5 "FANTRAY 3-A"
|
||||||
|
label fan6 "FANTRAY 3-B"
|
||||||
|
label fan7 "FANTRAY 4-A"
|
||||||
|
label fan8 "FANTRAY 4-B"
|
||||||
|
ignore temp1
|
||||||
|
ignore temp2
|
||||||
|
ignore temp3
|
||||||
|
ignore temp4
|
||||||
|
ignore temp5
|
||||||
|
ignore temp6
|
||||||
|
ignore intrusion0
|
||||||
|
|
||||||
|
chip "tmp75-i2c-*-4A"
|
||||||
|
label temp1 "BMC board Temp"
|
||||||
|
set temp1_max 50
|
||||||
|
set temp1_max_hyst 45
|
||||||
|
|
||||||
|
bus "i2c-0" "i2c-main"
|
||||||
|
chip "tmp75-i2c-*-4F"
|
||||||
|
label temp1 "x86 CPU board Temp"
|
||||||
|
set temp1_max 50
|
||||||
|
set temp1_max_hyst 45
|
||||||
|
|
||||||
|
bus "i2c-12" "i2c-mux-1 (chan_id 3)"
|
||||||
|
chip "tmp75-i2c-*-4C"
|
||||||
|
label temp1 "rear MAC Temp"
|
||||||
|
set temp1_max 50
|
||||||
|
set temp1_max_hyst 45
|
||||||
|
|
||||||
|
chip "tmp75-i2c-*-49"
|
||||||
|
label temp1 "front MAC Temp"
|
||||||
|
set temp1_max 50
|
||||||
|
set temp1_max_hyst 45
|
1
dockers/docker-orchagent-nephos
Symbolic link
1
dockers/docker-orchagent-nephos
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
docker-orchagent
|
@ -20,6 +20,8 @@ if [ "$ASIC" == "broadcom" ]; then
|
|||||||
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
||||||
elif [ "$ASIC" == "cavium" ]; then
|
elif [ "$ASIC" == "cavium" ]; then
|
||||||
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
||||||
|
elif [ "$ASIC" == "nephos" ]; then
|
||||||
|
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec /usr/bin/orchagent ${ORCHAGENT_ARGS}
|
exec /usr/bin/orchagent ${ORCHAGENT_ARGS}
|
||||||
|
@ -3,11 +3,15 @@ Description=switch state service
|
|||||||
Requires=database.service
|
Requires=database.service
|
||||||
{% if sonic_asic_platform == 'broadcom' %}
|
{% if sonic_asic_platform == 'broadcom' %}
|
||||||
Requires=opennsl-modules-3.16.0-4-amd64.service
|
Requires=opennsl-modules-3.16.0-4-amd64.service
|
||||||
|
{% elif sonic_asic_platform == 'nephos' %}
|
||||||
|
Requires=nps-modules-3.16.0-4-amd64.service
|
||||||
{% endif %}
|
{% endif %}
|
||||||
After=database.service
|
After=database.service
|
||||||
After=interfaces-config.service
|
After=interfaces-config.service
|
||||||
{% if sonic_asic_platform == 'broadcom' %}
|
{% if sonic_asic_platform == 'broadcom' %}
|
||||||
After=opennsl-modules-3.16.0-4-amd64.service
|
After=opennsl-modules-3.16.0-4-amd64.service
|
||||||
|
{% elif sonic_asic_platform == 'nephos' %}
|
||||||
|
After=nps-modules-3.16.0-4-amd64.service
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
18
platform/nephos/docker-orchagent-nephos.mk
Normal file
18
platform/nephos/docker-orchagent-nephos.mk
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# docker image for orchagent
|
||||||
|
|
||||||
|
DOCKER_ORCHAGENT_NEPHOS = docker-orchagent-nephos.gz
|
||||||
|
$(DOCKER_ORCHAGENT_NEPHOS)_PATH = $(DOCKERS_PATH)/docker-orchagent
|
||||||
|
$(DOCKER_ORCHAGENT_NEPHOS)_DEPENDS += $(SWSS) $(REDIS_TOOLS)
|
||||||
|
$(DOCKER_ORCHAGENT_NEPHOS)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||||
|
SONIC_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_NEPHOS)
|
||||||
|
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_NEPHOS)
|
||||||
|
|
||||||
|
$(DOCKER_ORCHAGENT_NEPHOS)_CONTAINER_NAME = swss
|
||||||
|
$(DOCKER_ORCHAGENT_NEPHOS)_RUN_OPT += --net=host --privileged -t
|
||||||
|
$(DOCKER_ORCHAGENT_NEPHOS)_RUN_OPT += -v /etc/network/interfaces:/etc/network/interfaces:ro
|
||||||
|
$(DOCKER_ORCHAGENT_NEPHOS)_RUN_OPT += -v /etc/network/interfaces.d/:/etc/network/interfaces.d/:ro
|
||||||
|
$(DOCKER_ORCHAGENT_NEPHOS)_RUN_OPT += -v /host/machine.conf:/host/machine.conf:ro
|
||||||
|
$(DOCKER_ORCHAGENT_NEPHOS)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||||
|
$(DOCKER_ORCHAGENT_NEPHOS)_RUN_OPT += -v /var/log/swss:/var/log/swss:rw
|
||||||
|
|
||||||
|
$(DOCKER_ORCHAGENT_NEPHOS)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
|
7
platform/nephos/docker-ptf-nephos.mk
Normal file
7
platform/nephos/docker-ptf-nephos.mk
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# docker image for docker-ptf-nephos
|
||||||
|
|
||||||
|
DOCKER_PTF_NEPHOS = docker-ptf-nephos.gz
|
||||||
|
$(DOCKER_PTF_NEPHOS)_PATH = $(DOCKERS_PATH)/docker-ptf-saithrift
|
||||||
|
$(DOCKER_PTF_NEPHOS)_DEPENDS += $(PYTHON_SAITHRIFT_NEPHOS)
|
||||||
|
$(DOCKER_PTF_NEPHOS)_LOAD_DOCKERS += $(DOCKER_PTF)
|
||||||
|
SONIC_DOCKER_IMAGES += $(DOCKER_PTF_NEPHOS)
|
17
platform/nephos/docker-syncd-nephos-rpc.mk
Normal file
17
platform/nephos/docker-syncd-nephos-rpc.mk
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# docker image for nephos syncd with rpc
|
||||||
|
|
||||||
|
DOCKER_SYNCD_NEPHOS_RPC = docker-syncd-nephos-rpc.gz
|
||||||
|
$(DOCKER_SYNCD_NEPHOS_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-nephos-rpc
|
||||||
|
$(DOCKER_SYNCD_NEPHOS_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT)
|
||||||
|
$(DOCKER_SYNCD_NEPHOS_RPC)_FILES += $(DSSERVE) $(NPX_DIAG)
|
||||||
|
$(DOCKER_SYNCD_NEPHOS_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_NEPHOS)
|
||||||
|
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_NEPHOS_RPC)
|
||||||
|
ifeq ($(ENABLE_SYNCD_RPC),y)
|
||||||
|
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_NEPHOS_RPC)
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(DOCKER_SYNCD_NEPHOS_RPC)_CONTAINER_NAME = syncd
|
||||||
|
$(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += --net=host --privileged -t
|
||||||
|
$(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||||
|
$(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd
|
||||||
|
$(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
51
platform/nephos/docker-syncd-nephos-rpc/Dockerfile.j2
Normal file
51
platform/nephos/docker-syncd-nephos-rpc/Dockerfile.j2
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
FROM docker-syncd-nephos
|
||||||
|
|
||||||
|
## Make apt-get non-interactive
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
COPY \
|
||||||
|
{% for deb in docker_syncd_nephos_rpc_debs.split(' ') -%}
|
||||||
|
debs/{{ deb }}{{' '}}
|
||||||
|
{%- endfor -%}
|
||||||
|
debs/
|
||||||
|
|
||||||
|
RUN dpkg -P syncd
|
||||||
|
|
||||||
|
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
|
||||||
|
{% for deb in docker_syncd_nephos_rpc_debs.split(' ') -%}
|
||||||
|
dpkg_apt debs/{{ deb }}{{'; '}}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
|
## Pre-install the fundamental packages
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get -y install \
|
||||||
|
net-tools \
|
||||||
|
python-pip \
|
||||||
|
build-essential \
|
||||||
|
libssl-dev \
|
||||||
|
libffi-dev \
|
||||||
|
python-dev \
|
||||||
|
wget \
|
||||||
|
cmake \
|
||||||
|
&& wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \
|
||||||
|
&& tar xvfz 1.0.0.tar.gz \
|
||||||
|
&& cd nanomsg-1.0.0 \
|
||||||
|
&& mkdir -p build \
|
||||||
|
&& cmake . \
|
||||||
|
&& make install \
|
||||||
|
&& ldconfig \
|
||||||
|
&& cd .. \
|
||||||
|
&& rm -fr nanomsg-1.0.0 \
|
||||||
|
&& rm -f 1.0.0.tar.gz \
|
||||||
|
&& pip install cffi==1.7.0 \
|
||||||
|
&& pip install --upgrade cffi==1.7.0 \
|
||||||
|
&& pip install nnpy \
|
||||||
|
&& mkdir -p /opt \
|
||||||
|
&& cd /opt \
|
||||||
|
&& wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \
|
||||||
|
&& apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \
|
||||||
|
&& rm -rf /root/deps
|
||||||
|
|
||||||
|
COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/bin/supervisord"]
|
10
platform/nephos/docker-syncd-nephos-rpc/ptf_nn_agent.conf
Normal file
10
platform/nephos/docker-syncd-nephos-rpc/ptf_nn_agent.conf
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[program:ptf_nn_agent]
|
||||||
|
command=/usr/bin/python /opt/ptf_nn_agent.py --device-socket 1@tcp://0.0.0.0:10900 -i 1-3@Ethernet12 --set-iface-rcv-buffer=109430400
|
||||||
|
process_name=ptf_nn_agent
|
||||||
|
stdout_logfile=/tmp/ptf_nn_agent.out.log
|
||||||
|
stderr_logfile=/tmp/ptf_nn_agent.err.log
|
||||||
|
redirect_stderr=false
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
startsecs=1
|
||||||
|
numprocs=1
|
19
platform/nephos/docker-syncd-nephos.mk
Normal file
19
platform/nephos/docker-syncd-nephos.mk
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# docker image for nephos syncd
|
||||||
|
|
||||||
|
DOCKER_SYNCD_NEPHOS = docker-syncd-nephos.gz
|
||||||
|
$(DOCKER_SYNCD_NEPHOS)_PATH = $(PLATFORM_PATH)/docker-syncd-nephos
|
||||||
|
$(DOCKER_SYNCD_NEPHOS)_DEPENDS += $(SYNCD)
|
||||||
|
$(DOCKER_SYNCD_NEPHOS)_FILES += $(DSSERVE) $(NPX_DIAG)
|
||||||
|
$(DOCKER_SYNCD_NEPHOS)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||||
|
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_NEPHOS)
|
||||||
|
ifneq ($(ENABLE_SYNCD_RPC),y)
|
||||||
|
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_NEPHOS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(DOCKER_SYNCD_NEPHOS)_CONTAINER_NAME = syncd
|
||||||
|
$(DOCKER_SYNCD_NEPHOS)_RUN_OPT += --net=host --privileged -t
|
||||||
|
$(DOCKER_SYNCD_NEPHOS)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||||
|
$(DOCKER_SYNCD_NEPHOS)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd
|
||||||
|
$(DOCKER_SYNCD_NEPHOS)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||||
|
|
||||||
|
$(DOCKER_SYNCD_NEPHOS)_BASE_IMAGE_FILES += npx_diag:/usr/bin/npx_diag
|
31
platform/nephos/docker-syncd-nephos/Dockerfile.j2
Executable file
31
platform/nephos/docker-syncd-nephos/Dockerfile.j2
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
FROM docker-config-engine
|
||||||
|
|
||||||
|
## Make apt-get non-interactive
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
|
||||||
|
COPY \
|
||||||
|
{% for deb in docker_syncd_nephos_debs.split(' ') -%}
|
||||||
|
debs/{{ deb }}{{' '}}
|
||||||
|
{%- endfor -%}
|
||||||
|
debs/
|
||||||
|
|
||||||
|
RUN dpkg -i \
|
||||||
|
{% for deb in docker_syncd_nephos_debs.split(' ') -%}
|
||||||
|
debs/{{ deb }}{{' '}}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
|
## TODO: add kmod into Depends
|
||||||
|
RUN apt-get install -f kmod
|
||||||
|
|
||||||
|
COPY ["files/dsserve", "files/npx_diag", "start.sh", "/usr/bin/"]
|
||||||
|
RUN chmod +x /usr/bin/dsserve /usr/bin/npx_diag
|
||||||
|
|
||||||
|
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"]
|
BIN
platform/nephos/docker-syncd-nephos/base_image_files/npx_diag
Executable file
BIN
platform/nephos/docker-syncd-nephos/base_image_files/npx_diag
Executable file
Binary file not shown.
7
platform/nephos/docker-syncd-nephos/start.sh
Executable file
7
platform/nephos/docker-syncd-nephos/start.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
rm -f /var/run/rsyslogd.pid
|
||||||
|
|
||||||
|
supervisorctl start rsyslogd
|
||||||
|
|
||||||
|
supervisorctl start syncd
|
28
platform/nephos/docker-syncd-nephos/supervisord.conf
Normal file
28
platform/nephos/docker-syncd-nephos/supervisord.conf
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
[supervisord]
|
||||||
|
logfile_maxbytes=1MB
|
||||||
|
logfile_backups=2
|
||||||
|
nodaemon=true
|
||||||
|
|
||||||
|
[program:start.sh]
|
||||||
|
command=/usr/bin/start.sh
|
||||||
|
priority=1
|
||||||
|
autostart=true
|
||||||
|
autorestart=false
|
||||||
|
stdout_logfile=syslog
|
||||||
|
stderr_logfile=syslog
|
||||||
|
|
||||||
|
[program:rsyslogd]
|
||||||
|
command=/usr/sbin/rsyslogd -n
|
||||||
|
priority=2
|
||||||
|
autostart=false
|
||||||
|
autorestart=false
|
||||||
|
stdout_logfile=syslog
|
||||||
|
stderr_logfile=syslog
|
||||||
|
|
||||||
|
[program:syncd]
|
||||||
|
command=/usr/bin/syncd_start.sh
|
||||||
|
priority=3
|
||||||
|
autostart=false
|
||||||
|
autorestart=false
|
||||||
|
stdout_logfile=syslog
|
||||||
|
stderr_logfile=syslog
|
7
platform/nephos/libsaithrift-dev.mk
Normal file
7
platform/nephos/libsaithrift-dev.mk
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# libsaithrift-dev package
|
||||||
|
|
||||||
|
LIBSAITHRIFT_DEV_NEPHOS = libsaithrift-dev_0.9.4_amd64.deb
|
||||||
|
$(LIBSAITHRIFT_DEV_NEPHOS)_SRC_PATH = $(SRC_PATH)/SAI
|
||||||
|
$(LIBSAITHRIFT_DEV_NEPHOS)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(NEPHOS_SAI) $(NEPHOS_SAI_DEV)
|
||||||
|
$(LIBSAITHRIFT_DEV_NEPHOS)_RDEPENDS += $(LIBTHRIFT) $(NEPHOS_SAI)
|
||||||
|
SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_NEPHOS)
|
9
platform/nephos/one-image.mk
Normal file
9
platform/nephos/one-image.mk
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# sonic nephos one image installer
|
||||||
|
|
||||||
|
SONIC_ONE_IMAGE = sonic-nephos.bin
|
||||||
|
$(SONIC_ONE_IMAGE)_MACHINE = nephos
|
||||||
|
$(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie
|
||||||
|
$(SONIC_ONE_IMAGE)_DEPENDS += $(NEPHOS_NPS_KERNEL)
|
||||||
|
$(SONIC_ONE_IMAGE)_INSTALLS += $(INGRASYS_S9130_32X_PLATFORM_MODULE)
|
||||||
|
$(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES)
|
||||||
|
SONIC_INSTALLERS += $(SONIC_ONE_IMAGE)
|
11
platform/nephos/platform-modules-ingrasys.mk
Normal file
11
platform/nephos/platform-modules-ingrasys.mk
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Ingrasys S9130-32X Platform modules
|
||||||
|
|
||||||
|
INGRASYS_S9130_32X_PLATFORM_MODULE_VERSION = 1.0.0
|
||||||
|
|
||||||
|
export INGRASYS_S9130_32X_PLATFORM_MODULE_VERSION
|
||||||
|
|
||||||
|
INGRASYS_S9130_32X_PLATFORM_MODULE = sonic-platform-ingrasys-s9130-32x_$(INGRASYS_S9130_32X_PLATFORM_MODULE_VERSION)_amd64.deb
|
||||||
|
$(INGRASYS_S9130_32X_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-ingrasys
|
||||||
|
$(INGRASYS_S9130_32X_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
|
||||||
|
$(INGRASYS_S9130_32X_PLATFORM_MODULE)_PLATFORM = x86_64-ingrasys_s9130_32x-r0
|
||||||
|
SONIC_DPKG_DEBS += $(INGRASYS_S9130_32X_PLATFORM_MODULE)
|
0
platform/nephos/platform.conf
Normal file
0
platform/nephos/platform.conf
Normal file
6
platform/nephos/python-saithrift.mk
Normal file
6
platform/nephos/python-saithrift.mk
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# python-saithrift package
|
||||||
|
|
||||||
|
PYTHON_SAITHRIFT_NEPHOS = python-saithrift_0.9.4_amd64.deb
|
||||||
|
$(PYTHON_SAITHRIFT_NEPHOS)_SRC_PATH = $(SRC_PATH)/SAI
|
||||||
|
$(PYTHON_SAITHRIFT_NEPHOS)_DEPENDS += $(NEPHOS_SAI_DEV) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV)
|
||||||
|
SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_NEPHOS)
|
29
platform/nephos/rules.mk
Normal file
29
platform/nephos/rules.mk
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
include $(PLATFORM_PATH)/sdk.mk
|
||||||
|
include $(PLATFORM_PATH)/sai.mk
|
||||||
|
include $(PLATFORM_PATH)/platform-modules-ingrasys.mk
|
||||||
|
include $(PLATFORM_PATH)/docker-orchagent-nephos.mk
|
||||||
|
include $(PLATFORM_PATH)/docker-syncd-nephos.mk
|
||||||
|
include $(PLATFORM_PATH)/docker-syncd-nephos-rpc.mk
|
||||||
|
include $(PLATFORM_PATH)/one-image.mk
|
||||||
|
include $(PLATFORM_PATH)/libsaithrift-dev.mk
|
||||||
|
include $(PLATFORM_PATH)/python-saithrift.mk
|
||||||
|
include $(PLATFORM_PATH)/docker-ptf-nephos.mk
|
||||||
|
|
||||||
|
NPX_DIAG = npx_diag
|
||||||
|
$(NPX_DIAG)_URL = "https://github.com/NephosInc/SONiC/raw/master/sdk/npx_diag_2.0.1-20171020"
|
||||||
|
|
||||||
|
DSSERVE = dsserve
|
||||||
|
$(DSSERVE)_URL = "https://sonicstorage.blob.core.windows.net/packages/20170518/dsserve?sv=2015-04-05&sr=b&sig=gyNbgSL%2FvpMXDdpboVkIJcTKMRdGgEaOR9OukHhEsu8%3D&se=2030-03-31T23%3A06%3A35Z&sp=r"
|
||||||
|
|
||||||
|
SONIC_ONLINE_FILES += $(NPX_DIAG) $(DSSERVE)
|
||||||
|
|
||||||
|
SONIC_ALL += $(SONIC_ONE_IMAGE) \
|
||||||
|
$(DOCKER_FPM) \
|
||||||
|
$(DOCKER_PTF_NEPHOS) \
|
||||||
|
$(DOCKER_SYNCD_NEPHOS_RPC)
|
||||||
|
|
||||||
|
# Inject nephos sai into sairedis
|
||||||
|
$(LIBSAIREDIS)_DEPENDS += $(NEPHOS_SAI) $(NEPHOS_SAI_DEV) $(LIBSAITHRIFT_DEV_NEPHOS)
|
||||||
|
|
||||||
|
# Runtime dependency on nephos sai is set only for syncd
|
||||||
|
$(SYNCD)_RDEPENDS += $(NEPHOS_SAI)
|
9
platform/nephos/sai.mk
Normal file
9
platform/nephos/sai.mk
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
NEPHOS_SAI = libsainps_2.0.1-20171020_amd64.deb
|
||||||
|
$(NEPHOS_SAI)_URL = "https://github.com/NephosInc/SONiC/raw/master/sai/libsainps_2.0.1-20171020_amd64.deb"
|
||||||
|
|
||||||
|
NEPHOS_SAI_DEV = libsainps-dev_2.0.1-20171020_amd64.deb
|
||||||
|
$(eval $(call add_derived_package,$(NEPHOS_SAI),$(NEPHOS_SAI_DEV)))
|
||||||
|
$(NEPHOS_SAI_DEV)_URL = "https://github.com/NephosInc/SONiC/raw/master/sai/libsainps-dev_2.0.1-20171020_amd64.deb"
|
||||||
|
|
||||||
|
SONIC_ONLINE_DEBS += $(NEPHOS_SAI) $(NEPHOS_SAI_DEV)
|
||||||
|
$(NEPHOS_SAI_DEV)_DEPENDS += $(NEPHOS_SAI)
|
4
platform/nephos/sdk.mk
Normal file
4
platform/nephos/sdk.mk
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
NEPHOS_NPS_KERNEL = nps-modules-3.16.0-4-amd64_2.0.1-20171020_amd64.deb
|
||||||
|
$(NEPHOS_NPS_KERNEL)_URL = "https://github.com/NephosInc/SONiC/raw/master/sdk/nps-modules-3.16.0-4-amd64_2.0.1-20171020_amd64.deb"
|
||||||
|
|
||||||
|
SONIC_ONLINE_DEBS += $(NEPHOS_NPS_KERNEL)
|
1
platform/nephos/sonic-platform-modules-ingrasys
Submodule
1
platform/nephos/sonic-platform-modules-ingrasys
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit a30557e54dd3918c41859a78254df23b48dea7b5
|
8
rules/ixgbe.mk
Normal file
8
rules/ixgbe.mk
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# initramfs-tools package
|
||||||
|
|
||||||
|
IXGBE_DRIVER_VERSION = 5.2.4
|
||||||
|
export IXGBE_DRIVER_VERSION
|
||||||
|
|
||||||
|
IXGBE_DRIVER = ixgbe.ko
|
||||||
|
$(IXGBE_DRIVER)_SRC_PATH = $(SRC_PATH)/ixgbe
|
||||||
|
SONIC_MAKE_DEBS += $(IXGBE_DRIVER)
|
2
slave.mk
2
slave.mk
@ -379,7 +379,7 @@ $(DOCKER_LOAD_TARGETS) : $(TARGET_PATH)/%.gz-load : .platform docker-start $$(TA
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
# targets for building installers with base image
|
# targets for building installers with base image
|
||||||
$(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : .platform onie-image.conf $$(addprefix $(DEBS_PATH)/,$$($$*_DEPENDS)) $$(addprefix $(DEBS_PATH)/,$$($$*_INSTALLS)) $$(addprefix $(FILES_PATH)/,$$($$*_FILES)) $(addprefix $(DEBS_PATH)/,$(INITRAMFS_TOOLS) $(LINUX_KERNEL) $(IGB_DRIVER) $(SONIC_DEVICE_DATA) $(SONIC_UTILS)) $$(addprefix $(TARGET_PATH)/,$$($$*_DOCKERS)) $$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE))
|
$(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : .platform onie-image.conf $$(addprefix $(DEBS_PATH)/,$$($$*_DEPENDS)) $$(addprefix $(DEBS_PATH)/,$$($$*_INSTALLS)) $$(addprefix $(FILES_PATH)/,$$($$*_FILES)) $(addprefix $(DEBS_PATH)/,$(INITRAMFS_TOOLS) $(LINUX_KERNEL) $(IGB_DRIVER) $(IXGBE_DRIVER) $(SONIC_DEVICE_DATA) $(SONIC_UTILS)) $$(addprefix $(TARGET_PATH)/,$$($$*_DOCKERS)) $$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE))
|
||||||
$(HEADER)
|
$(HEADER)
|
||||||
# Pass initramfs and linux kernel explicitly. They are used for all platforms
|
# Pass initramfs and linux kernel explicitly. They are used for all platforms
|
||||||
export initramfs_tools="$(DEBS_PATH)/$(INITRAMFS_TOOLS)"
|
export initramfs_tools="$(DEBS_PATH)/$(INITRAMFS_TOOLS)"
|
||||||
|
22
src/ixgbe/Makefile
Normal file
22
src/ixgbe/Makefile
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
.ONESHELL:
|
||||||
|
SHELL = /bin/bash
|
||||||
|
.SHELLFLAGS += -e
|
||||||
|
|
||||||
|
MAIN_TARGET = ixgbe.ko
|
||||||
|
|
||||||
|
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
||||||
|
rm -rf ./ixgbe-$(IXGBE_DRIVER_VERSION)
|
||||||
|
wget -O ixgbe-$(IXGBE_DRIVER_VERSION).tar.gz "https://downloadmirror.intel.com/14687/eng/ixgbe-5.2.4.tar.gz"
|
||||||
|
tar xzf ixgbe-$(IXGBE_DRIVER_VERSION).tar.gz
|
||||||
|
|
||||||
|
# Patch
|
||||||
|
pushd ./ixgbe-$(IXGBE_DRIVER_VERSION)
|
||||||
|
|
||||||
|
# Build the package
|
||||||
|
pushd src
|
||||||
|
export BUILD_KERNEL=3.16.0-4-amd64
|
||||||
|
make
|
||||||
|
popd
|
||||||
|
|
||||||
|
popd
|
||||||
|
mv ./ixgbe-$(IXGBE_DRIVER_VERSION)/src/$* $(DEST)/
|
Reference in New Issue
Block a user