Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 2 additions & 4 deletions device/celestica/x86_64-cel_seastone-r0/sonic_platform/sfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,10 @@ def __get_sfp_info(self):
port_name = "Unknown"
sfp_type = "Unknown"

if self.port_num >= QSFP_PORT_START and self.port_num <= QSFP_TYPE:
if self.port_num >= QSFP_PORT_START and self.port_num <= QSFP_PORT_END:
sfp_type = QSFP_TYPE
port_name = "QSFP" + str(self.port_num - QSFP_PORT_START + 1)
elif self.port_num >= SFP_PORT_START and self.port_num <= SFP_PORT_END:
sfp_type = SFP_TYPE
port_name = "SFP" + str(self.port_num - SFP_PORT_START + 1)

return sfp_type, port_name

def __convert_string_to_num(self, value_str):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ dx010/scripts/fancontrol.sh etc/init.d
dx010/scripts/fancontrol.service lib/systemd/system
services/fancontrol/fancontrol usr/local/bin
dx010/modules/sonic_platform-1.0-py2-none-any.whl usr/share/sonic/device/x86_64-cel_seastone-r0
dx010/modules/sonic_platform-1.0-py3-none-any.whl usr/share/sonic/device/x86_64-cel_seastone-r0
services/platform_api/platform_api_mgnt.sh usr/local/bin
12 changes: 7 additions & 5 deletions platform/broadcom/sonic-platform-modules-cel/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ MODULE_DIRS:= dx010 haliburton silverstone seastone2
override_dh_auto_build:
(for mod in $(MODULE_DIRS); do \
make -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules; \
cd $(MOD_SRC_DIR)/$${mod}; \
python2.7 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
cd $(MOD_SRC_DIR); \
if [ $$mod = "seastone2" ]; then \
cd services/platform_api; \
python2 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
fi \
python2.7 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
continue; \
fi; \
cd $(MOD_SRC_DIR)/$${mod}; \
python2.7 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why we need setup both pyth2.7 and python3?

done)

override_dh_auto_install:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@ PREV_REBOOT_CAUSE="/host/reboot-cause/"
DEVICE="/usr/share/sonic/device"
PLATFORM=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
FILES=$DEVICE/$PLATFORM/api_files
PY2_PACK=$DEVICE/$PLATFORM/sonic_platform-1.0-py2-none-any.whl
PY3_PACK=$DEVICE/$PLATFORM/sonic_platform-1.0-py3-none-any.whl

install() {
# Install sonic-platform package
if [ -e $DEVICE/$PLATFORM/sonic_platform-1.0-py2-none-any.whl ]; then
pip install $DEVICE/$PLATFORM/sonic_platform-1.0-py2-none-any.whl
# Install python2.7 sonic-platform package
if [ -e $PY2_PACK ]; then
pip install $PY2_PACK
fi

# Install python3 sonic-platform package
if [ -e $PY3_PACK ]; then
pip3 install $PY3_PACK
fi

}

init() {
Expand Down