Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Initial commit for PMON2.0 #50

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
052a349
Adding Initial commit for PMON2.0
lkunjumon May 24, 2021
3d44892
pmon2.0:support to read sai.profile
lkunjumon May 25, 2021
077fb39
Updated pmon2 sfp support
lkunjumon May 27, 2021
d1c533d
Adding pmon2.0 support for platform db98cx8580-32cd
lkunjumon May 31, 2021
7a3bbe6
Adding sfp_event changes for pmon2.0
lkunjumon May 31, 2021
a79d181
Fix for sfp info read from eeprom
lkunjumon May 31, 2021
2a8b61a
Adding sfp ports support
lkunjumon May 31, 2021
d762069
Adding pmon2.0 support for amd platform
lkunjumon May 31, 2021
23d9afe
Adding maintainer
lkunjumon May 31, 2021
f4c5dd2
Adding support for pmon2.0 python3 changes
lkunjumon Jun 2, 2021
d9dd919
Adding pmon2.0 support for platform sonic-platform-db98cx8580-32cd
lkunjumon Jun 3, 2021
c301a65
Adding LGTM fix
lkunjumon Jul 5, 2021
9b9c0d4
LGTM fix
lkunjumon Jul 5, 2021
4623a25
Adding LGTM fix
lkunjumon Jul 7, 2021
f379394
Adding support firmware status
lkunjumon Jul 7, 2021
8afc9bb
Adding LGTM fix
lkunjumon Jul 7, 2021
06cbfba
Adding Lgtm fix
lkunjumon Jul 7, 2021
f31d338
Adding Intel platform changes
lkunjumon Jul 12, 2021
935353d
Adding lgtm fixes for Intel
lkunjumon Jul 12, 2021
c06bbce
Typo in package name
lkunjumon Jul 14, 2021
4f98358
Support to retrieve HW watchdog device .
lkunjumon Jul 15, 2021
d1ff6ae
support to retrieve HW watchdog in 12.8T falcon
lkunjumon Jul 15, 2021
8047bbf
Adding platform changes for intel
lkunjumon Jul 21, 2021
b8fdef6
Adding platform changes
lkunjumon Jul 21, 2021
53dd052
Adding platform changes for Intel
lkunjumon Jul 26, 2021
347af22
Support to retrieve sai.profile path in Intel
lkunjumon Jul 29, 2021
a1ca97d
Adding support to firmware status
lkunjumon Jul 30, 2021
fba922c
Adding firmware status support to arm64 platform
lkunjumon Aug 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions platform/marvell-arm64/one-image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ $(SONIC_ONE_IMAGE)_MACHINE = marvell-arm64
$(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie
$(SONIC_ONE_IMAGE)_INSTALLS += $(SYSTEMD_SONIC_GENERATOR)
$(SONIC_ONE_IMAGE)_INSTALLS += $(LINUX_KERNEL_DTB)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(FALCON_DB98CX8540_16CD_PLATFORM)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(FALCON_DB98CX8580_32CD_PLATFORM)

ifeq ($(INSTALL_DEBUG_TOOLS),y)
$(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_DBG_IMAGES)
$(SONIC_ONE_IMAGE)_DOCKERS += $(filter-out $(patsubst %-$(DBG_IMAGE_MARK).gz,%.gz, $(SONIC_INSTALL_DOCKER_DBG_IMAGES)), $(SONIC_INSTALL_DOCKER_IMAGES))
Expand Down
12 changes: 12 additions & 0 deletions platform/marvell-arm64/platform-db98cx8540-16cd.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# FALCON Platform

FALCON_VERSION = 1.0
export FALCON_VERSION

FALCON_DB98CX8540_16CD_PLATFORM = sonic-platform-db98cx8540-16cd-db98cx8540_$(FALCON_VERSION)_$(CONFIGURED_ARCH).deb
$(FALCON_DB98CX8540_16CD_PLATFORM)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-db98cx8540-16cd
$(FALCON_DB98CX8540_16CD_PLATFORM)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
$(FALCON_DB98CX8540_16CD_PLATFORM)_PLATFORM = arm64-marvell_db98cx8540_16cd-r0

SONIC_DPKG_DEBS += $(FALCON_DB98CX8540_16CD_PLATFORM)

12 changes: 12 additions & 0 deletions platform/marvell-arm64/platform-db98cx8580-32cd.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# FALCON Platform

FALCON_VERSION = 1.0
export FALCON_VERSION

FALCON_DB98CX8580_32CD_PLATFORM = sonic-platform-db98cx8580-32cd-db98cx8580_$(FALCON_VERSION)_$(CONFIGURED_ARCH).deb
$(FALCON_DB98CX8580_32CD_PLATFORM)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-db98cx8580-32cd
$(FALCON_DB98CX8580_32CD_PLATFORM)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
$(FALCON_DB98CX8580_32CD_PLATFORM)_PLATFORM = arm64-marvell_db98cx8580_32cd-r0

SONIC_DPKG_DEBS += $(FALCON_DB98CX8580_32CD_PLATFORM)

3 changes: 3 additions & 0 deletions platform/marvell-arm64/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ include $(PLATFORM_PATH)/docker-saiserver-mrvl.mk
include $(PLATFORM_PATH)/libsaithrift-dev.mk
include $(PLATFORM_PATH)/one-image.mk
include $(PLATFORM_PATH)/linux-kernel-arm64.mk
include $(PLATFORM_PATH)/platform-db98cx8540-16cd.mk
include $(PLATFORM_PATH)/platform-db98cx8580-32cd.mk

INCLUDE_SYSTEM_TELEMETRY = ""


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

# Platform init script for db98cx8540-16cd

# Load required kernel-mode drivers
load_kernel_drivers() {
# Remove modules loaded during Linux init
# FIX-ME: This will be removed in the future when Linux init no longer loads these
rmmod i2c_mux_gpio
rmmod i2c_dev
rmmod i2c_mv64xxx

# Carefully control the load order here to ensure consistent i2c bus numbering
modprobe i2c_mv64xxx
modprobe i2c_dev
modprobe i2c_mux_gpio
modprobe eeprom
}

# - Main entry

# Install kernel drivers required for i2c bus access
load_kernel_drivers

# LOGIC to enumerate SFP eeprom devices - send 0x50 to kernel i2c driver - initialize devices
# the mux may be enumerated at number 4 or 5 so we check for the mux and skip if needed
# Get list of the mux channels
# Enumerate the SFP eeprom device on each mux channel
echo optoe2 0x50 > /sys/bus/i2c/devices/i2c-0/new_device

exit 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Platform db98cx8540-16cd Service
Before=pmon.service
After=sysinit.target
DefaultDependencies=no

[Service]
ExecStart=/usr/local/bin/db98cx8540-16cd-init.sh
KillSignal=SIGKILL
SuccessExitStatus=SIGKILL
#StandardOutput=tty

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env python

import os
from setuptools import setup
os.listdir

setup(
name='sonic_platform',
version='1.0',
description='Module to initialize platforms',

packages=['sonic_platform'],
package_dir={'sonic_platform': 'db98cx8540/sonic_platform'},
)

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
__all__ = ["platform", "chassis"]
from sonic_platform import *

Loading