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

Fix links of debian git server #37

Closed
wants to merge 51 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
51ef9e0
[baseimage]: update base image from jessie to stretch
lguohan Sep 5, 2017
711869a
[baseimage]: use debian 4.9.0-3 kernel
lguohan Sep 1, 2017
18072c6
[baseimage]: upgrade initramfs to 0.130
lguohan Sep 1, 2017
a5bf380
[baseimage]: install systemd-sysv in the base image
lguohan Sep 2, 2017
11728d0
[baseimage]: build root filesystem via overlay fs instead of aufs
lguohan Sep 2, 2017
5aef866
[baseimage]: Disable consistent network device naming
lguohan Sep 3, 2017
9f3a8db
[baseimage]: let docker in base image use overlay fs instead of aufs
lguohan Sep 5, 2017
0d46190
[baseimage]: update igb driver to 5.3.5.10
lguohan Sep 3, 2017
e97b5f6
[libnl]: upgrade libnl3 from 3.2.27-1 to 3.2.27-2
lguohan Sep 3, 2017
df2d88d
[docker-syncd]: install kmod in docker-syncd-brcm without prompt
lguohan Sep 5, 2017
928b215
[sonic-slave]: add deps for build initramfs 0.130
lguohan Sep 9, 2017
7e2fd30
[build]: insert overlay kmod for base image build
lguohan Sep 13, 2017
9ece52a
[build]: build stretch-based sonic slave docker
lguohan Sep 23, 2017
4c81756
[build]: sonic-slave-stretch- sha both Dockerfile and Dockerfile.user
lguohan Sep 26, 2017
8954414
[opennsl]: use opennsl kernel module based on kernel 4.9.0-3
lguohan Sep 5, 2017
62ce1f2
[temp]: disable building platform drivers tempoerarily
lguohan Sep 3, 2017
2c775ce
[kernel]: fix linux-headers common deb file name
lguohan Nov 6, 2017
9d6e41b
update build instructions
lguohan Nov 6, 2017
75ac918
[kernel]: update kernel submodule and remove standalone igb driver
lguohan Dec 6, 2017
fd6a293
[baseimage]: install acl package
lguohan Dec 11, 2017
59cdc3b
[baseimage]: install tacacs dependencies
lguohan Dec 11, 2017
825df08
[Mellanox]: Upgrade MFT package to 4.8.26 (#3)
marian-pritsak Dec 27, 2017
f119783
[Mellanox]: Update recipe for hw-management (#4)
marian-pritsak Dec 30, 2017
e8847f5
[platform]: enable platform driver for dell s6000 (#5)
lguohan Jan 3, 2018
8928676
[kernel]: upgrade linux kernel to 4.9.0-5 (4.9.65-3+deb9u2) (#8)
lguohan Jan 10, 2018
4cc80d1
[ixgbe]: compile and install ixgbe to 4.9.0-5 kernel
lguohan Jan 10, 2018
5c7a4b6
[mellanox]: Use KVERSION variable in mft recipe (#11)
marian-pritsak Jan 25, 2018
f5c4208
[mellanox]: Adapt to new hw-management package (#12)
marian-pritsak Jan 26, 2018
724d1e9
[devices]: enable platform modules for various platforms
lguohan Feb 12, 2018
0cae8ed
[dell]: update to stretch-kernel based dell modules
lguohan Feb 13, 2018
101c444
[platform]: incorporate sonic-platform-modules-cel into sonic buildim…
lguohan Feb 16, 2018
4defb4c
[devices]: enable sonic-platform-modules-cel
lguohan Feb 16, 2018
6610ab3
[celestica] change to use lm75 standard driver (#19)
pwisutti Feb 28, 2018
9544ae0
[Delta]: Modify delta-ag9032v1 driver for kernel 4.9 (#20)
nealtai Mar 1, 2018
49e36ee
[build]: add stretch target to build in stretch docker
lguohan Mar 1, 2018
b9d9974
[build]: build initramfs, libwrap, tacacs packages under stretch docker
lguohan Mar 1, 2018
00cb443
[broadcom]: update opennsl module to 3.4.1.11-1
lguohan Mar 3, 2018
72ffe2b
[bug fix]: fix delta ag9032v1 driver compilation. disable ag9064
lguohan Mar 3, 2018
5438bb7
[baseimage]: move update initramfs to later stage
lguohan Mar 5, 2018
5a0edb3
[device]: Enable arista drivers for sonic-linux-kernel 4.9 (#21)
Staphylo Mar 27, 2018
54e0978
[device]: add the new platform ag9064 (#23)
Mar 27, 2018
089c1dd
[devices]: Added new Mellanox MSN2010 platform (#24)
Apr 2, 2018
8e6754b
[devices]: disable compiling ag9064 and ag5648
lguohan Apr 6, 2018
1114057
[devices]: Modified and fixed delta ag5648 modules. (#30)
StanleyCi Apr 14, 2018
d6575ac
[devices]: modified and fixed delta ag9064 modules (#28)
Apr 14, 2018
b9b00cb
[mellanox]: fix SAI build makefile (#29)
mykolaf Apr 14, 2018
6263b0b
[devices]: disable compiling ag9064 and ag5648
lguohan Apr 6, 2018
56134cd
[baseimage]: Add derived package to initramfs-tools (#33)
yurypm Apr 18, 2018
05e55e9
Add support 4.9 support for 7260CX3 (#34)
Staphylo Apr 27, 2018
61b5a5d
[delta]: Enable ag5648, et-6248brb, ag9064 and fix the build error o…
StanleyCi May 2, 2018
960246e
Fix links of debian git server
yurypm Jun 4, 2018
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
15 changes: 9 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
url = https://github.com/Azure/sonic-swss-common
[submodule "sonic-linux-kernel"]
path = src/sonic-linux-kernel
url = https://github.com/Azure/sonic-linux-kernel
url = https://github.com/lguohan/sonic-linux-kernel
branch = stretch
[submodule "sonic-sairedis"]
path = src/sonic-sairedis
url = https://github.com/Azure/sonic-sairedis
Expand Down Expand Up @@ -37,13 +38,15 @@
url = https://github.com/Azure/sonic-utilities
[submodule "platform/broadcom/sonic-platform-modules-s6000"]
path = platform/broadcom/sonic-platform-modules-s6000
url = https://github.com/Azure/sonic-platform-modules-s6000
url = https://github.com/lguohan/sonic-platform-modules-s6000
branch = stretch
[submodule "platform/broadcom/sonic-platform-modules-arista"]
path = platform/broadcom/sonic-platform-modules-arista
url = https://github.com/aristanetworks/sonic
[submodule "platform/broadcom/sonic-platform-modules-dell"]
path = platform/broadcom/sonic-platform-modules-dell
url = https://github.com/Azure/sonic-platform-modules-dell
url = https://github.com/lguohan/sonic-platform-modules-dell
branch = stretch
[submodule "platform/broadcom/sonic-platform-modules-ingrasys"]
path = platform/broadcom/sonic-platform-modules-ingrasys
url = https://github.com/Ingrasys-sonic/sonic-platform-modules-ingrasys
Expand All @@ -56,9 +59,6 @@
[submodule "platform/broadcom/sonic-platform-modules-accton"]
path = platform/broadcom/sonic-platform-modules-accton
url = https://github.com/edge-core/sonic-platform-modules-accton.git
[submodule "platform/broadcom/sonic-platform-modules-cel"]
path = platform/broadcom/sonic-platform-modules-cel
url = https://github.com/celestica-Inc/sonic-platform-modules-cel.git
[submodule "src/sonic-frr/frr"]
path = src/sonic-frr/frr
url = https://github.com/FRRouting/frr.git
Expand All @@ -77,3 +77,6 @@
[submodule "platform/broadcom/sonic-platform-modules-mitac"]
path = platform/broadcom/sonic-platform-modules-mitac
url = https://github.com/MiTAC-EBU/sonic-platform-modules-mitac.git
[submodule "platform/mellanox/hw-management"]
path = platform/mellanox/hw-management
url = https://github.com/Mellanox/hw-mgmt/
18 changes: 15 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,21 @@ $(shell rm -f .screen)

MAKEFLAGS += -B

ifeq ($(BLDENV), stretch)
SLAVE_BASE_TAG = $(shell sha1sum sonic-slave-stretch/Dockerfile | awk '{print substr($$1,0,11);}')
SLAVE_TAG = $(shell cat sonic-slave-stretch/Dockerfile.user sonic-slave-stretch/Dockerfile | sha1sum | awk '{print substr($$1,0,11);}')
SLAVE_BASE_IMAGE = sonic-slave-stretch-base
SLAVE_IMAGE = sonic-slave-stretch-$(USER)
SLAVE_DIR = sonic-slave-stretch
else
SLAVE_BASE_TAG = $(shell sha1sum sonic-slave/Dockerfile | awk '{print substr($$1,0,11);}')
SLAVE_TAG = $(shell cat sonic-slave/Dockerfile.user sonic-slave/Dockerfile | sha1sum | awk '{print substr($$1,0,11);}')
SLAVE_BASE_IMAGE = sonic-slave-base
SLAVE_IMAGE = sonic-slave-$(USER)
SLAVE_DIR = sonic-slave
endif

INSMOD_OVERLAY := sudo modprobe overlay
DOCKER_RUN := docker run --rm=true --privileged \
-v $(PWD):/sonic \
-w /sonic \
Expand All @@ -45,7 +55,7 @@ DOCKER_BASE_BUILD = docker build --no-cache \
-t $(SLAVE_BASE_IMAGE) \
--build-arg http_proxy=$(http_proxy) \
--build-arg https_proxy=$(https_proxy) \
sonic-slave && \
$(SLAVE_DIR) && \
docker tag $(SLAVE_BASE_IMAGE):latest $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG)

DOCKER_BUILD = docker build --no-cache \
Expand All @@ -54,8 +64,8 @@ DOCKER_BUILD = docker build --no-cache \
--build-arg guid=$(shell id -g) \
--build-arg hostname=$(shell echo $$HOSTNAME) \
-t $(SLAVE_IMAGE) \
-f sonic-slave/Dockerfile.user \
sonic-slave && \
-f $(SLAVE_DIR)/Dockerfile.user \
$(SLAVE_DIR) && \
docker tag $(SLAVE_IMAGE):latest $(SLAVE_IMAGE):$(SLAVE_TAG)

SONIC_BUILD_INSTRUCTION := make \
Expand Down Expand Up @@ -84,6 +94,7 @@ SONIC_BUILD_INSTRUCTION := make \
@docker inspect --type image $(SLAVE_IMAGE):$(SLAVE_TAG) &> /dev/null || \
{ echo Image $(SLAVE_IMAGE):$(SLAVE_TAG) not found. Building... ; \
$(DOCKER_BUILD) ; }
@$(INSMOD_OVERLAY)
ifeq "$(KEEP_SLAVE_ON)" "yes"
ifdef SOURCE_FOLDER
@$(DOCKER_RUN) -v $(SOURCE_FOLDER):/var/$(USER)/src $(SLAVE_IMAGE):$(SLAVE_TAG) bash -c "$(SONIC_BUILD_INSTRUCTION) $@; /bin/bash"
Expand All @@ -105,6 +116,7 @@ sonic-slave-bash :
@docker inspect --type image $(SLAVE_IMAGE):$(SLAVE_TAG) &> /dev/null || \
{ echo Image $(SLAVE_IMAGE):$(SLAVE_TAG) not found. Building... ; \
$(DOCKER_BUILD) ; }
@$(INSMOD_OVERLAY)
@$(DOCKER_RUN) -t $(SLAVE_IMAGE):$(SLAVE_TAG) bash

init :
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,9 @@ The SONiC installer contains all docker images needed. SONiC uses one image for
For Broadcom ASIC, we build ONIE and EOS image. EOS image is used for Arista devices, ONIE image is used for all other Broadcom ASIC based devices.

make configure PLATFORM=broadcom
BLDENV=stretch make stretch
# build ONIE image
make target/sonic-broadcom.bin
# build EOS image
make target/sonic-aboot-broadcom.swi

You may find the rules/config file useful. It contains configuration options for the build process, like adding more verbosity or showing dependencies, username and password for base image etc.

Expand Down
26 changes: 15 additions & 11 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ PASSWORD_ENCRYPTED=$2
set -x -e

## docker engine version (with platform)
DOCKER_VERSION=1.11.1-0~jessie_amd64
DOCKER_VERSION=1.11.1-0~stretch_amd64
LINUX_KERNEL_VERSION=4.9.0-5

## Working directory to prepare the file system
FILESYSTEM_ROOT=./fsroot
Expand Down Expand Up @@ -68,7 +69,7 @@ touch $FILESYSTEM_ROOT/$PLATFORM_DIR/firsttime

## Build a basic Debian system by debootstrap
echo '[INFO] Debootstrap...'
sudo http_proxy=$http_proxy debootstrap --variant=minbase --arch amd64 jessie $FILESYSTEM_ROOT http://debian-archive.trafficmanager.net/debian
sudo http_proxy=$http_proxy debootstrap --variant=minbase --arch amd64 stretch $FILESYSTEM_ROOT http://debian-archive.trafficmanager.net/debian

## Config hostname and hosts, otherwise 'sudo ...' will complain 'sudo: unable to resolve host ...'
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '$HOSTNAME' > /etc/hostname"
Expand Down Expand Up @@ -98,7 +99,7 @@ sudo LANG=C chroot $FILESYSTEM_ROOT bash -c 'apt-mark auto `apt-mark showmanual`
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y update
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y upgrade
echo '[INFO] Install packages for building image'
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install makedev psmisc
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install makedev psmisc systemd-sysv

## Create device files
echo '[INFO] MAKEDEV'
Expand All @@ -112,12 +113,15 @@ sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c 'cd /dev && MAKEDEV generic'
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install busybox
echo '[INFO] Install SONiC linux kernel image'
## Note: duplicate apt-get command to ensure every line return zero
sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/initramfs-tools-core_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/initramfs-tools_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/linux-image-3.16.0-5-amd64_*.deb || \
sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/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

## Update initramfs for booting with squashfs+aufs
## Update initramfs for booting with squashfs+overlay
cat files/initramfs-tools/modules | sudo tee -a $FILESYSTEM_ROOT/etc/initramfs-tools/modules > /dev/null

## Hook into initramfs: change fs type from vfat to ext4 on arista switches
Expand Down Expand Up @@ -149,13 +153,10 @@ sudo cp files/initramfs-tools/mgmt-intf-dhcp $FILESYSTEM_ROOT/etc/initramfs-tool
sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-bottom/mgmt-intf-dhcp
sudo cp files/initramfs-tools/union-fsck $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/union-fsck
sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/union-fsck
sudo chroot $FILESYSTEM_ROOT update-initramfs -u

## Install latest intel igb driver
sudo cp target/debs/igb.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-5-amd64/kernel/drivers/net/ethernet/intel/igb/igb.ko
pushd $FILESYSTEM_ROOT/usr/share/initramfs-tools/scripts/init-bottom && sudo patch -p1 < $OLDPWD/files/initramfs-tools/udev.patch; popd

## Install latest intel ixgbe driver
sudo cp target/debs/ixgbe.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-5-amd64/kernel/drivers/net/ethernet/intel/ixgbe/ixgbe.ko
sudo cp target/debs/ixgbe.ko $FILESYSTEM_ROOT/lib/modules/${LINUX_KERNEL_VERSION}-amd64/kernel/drivers/net/ethernet/intel/ixgbe/ixgbe.ko

## Install docker
echo '[INFO] Install docker'
Expand Down Expand Up @@ -261,7 +262,7 @@ sudo sed -i '
' $FILESYSTEM_ROOT/etc/monit/monitrc

sudo tee -a $FILESYSTEM_ROOT/etc/monit/monitrc > /dev/null <<'EOF'
check filesystem root-aufs with path /
check filesystem root-overlay with path /
if space usage > 90% for 5 times within 10 cycles then alert
check system $HOST
if memory usage > 90% for 5 times within 10 cycles then alert
Expand Down Expand Up @@ -355,6 +356,9 @@ if [ "${enable_organization_extensions}" = "y" ]; then
fi
fi

## Update initramfs
sudo chroot $FILESYSTEM_ROOT update-initramfs -u

## Clean up apt
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get autoremove
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get autoclean
Expand Down
20 changes: 10 additions & 10 deletions device/arista/x86_64-arista_7050_qx32/sensors.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
# ------------------------------------------------
#

bus "i2c-2" "SCD SMBus master 0 bus 0"
bus "i2c-3" "SCD SMBus master 0 bus 1"
bus "i2c-5" "SCD SMBus master 0 bus 3"
bus "i2c-6" "SCD SMBus master 0 bus 4"
bus "i2c-7" "SCD SMBus master 0 bus 5"
bus "i2c-5" "SCD 0000:04:00.0 SMBus master 0 bus 0"
bus "i2c-6" "SCD 0000:04:00.0 SMBus master 0 bus 1"
bus "i2c-8" "SCD 0000:04:00.0 SMBus master 0 bus 3"
bus "i2c-9" "SCD 0000:04:00.0 SMBus master 0 bus 4"
bus "i2c-10" "SCD 0000:04:00.0 SMBus master 0 bus 5"

chip "k10temp-pci-00c3"
label temp1 "Cpu temp sensor"

chip "lm73-i2c-3-48"
chip "lm73-i2c-6-48"
label temp1 "Back panel temp sensor"
set temp1_max 65
#set temp1_max_alarm 75 # read-only

chip "max6658-i2c-2-4c"
chip "max6658-i2c-5-4c"
label temp1 "Board temp sensor"
set temp1_max 65
set temp1_crit 75
Expand All @@ -26,7 +26,7 @@ chip "max6658-i2c-2-4c"
set temp2_crit 75

# disabled because of some eeprom corruption risks
#chip "pmbus-i2c-3-4e"
#chip "pmbus-i2c-6-4e"
# label temp1 "Power controller sensor 1"
# set temp1_max 60
# set temp1_crit 70
Expand All @@ -37,7 +37,7 @@ chip "max6658-i2c-2-4c"

# ignore curr1

chip "dps460-i2c-5-58"
chip "dps460-i2c-8-58"
label temp1 "Power supply 1 inlet temp sensor"
# maximum and critical thresholds are not supported for this psu
set temp1_max 60
Expand All @@ -59,7 +59,7 @@ chip "dps460-i2c-5-58"
set curr2_max 36
set curr2_crit 37

chip "dps460-i2c-6-58"
chip "dps460-i2c-9-58"
label temp1 "Power supply 2 inlet temp sensor"
# maximum and critical thresholds are not supported for this psu
set temp1_max 60
Expand Down
10 changes: 5 additions & 5 deletions device/arista/x86_64-arista_7050_qx32s/sensors.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# ------------------------------------------------
#

bus "i2c-2" "SCD SMBus master 0 bus 0"
bus "i2c-3" "SCD SMBus master 0 bus 1"
bus "i2c-5" "SCD SMBus master 0 bus 3"
bus "i2c-6" "SCD SMBus master 0 bus 4"
bus "i2c-7" "SCD SMBus master 0 bus 5"
bus "i2c-2" "SCD 0000:02:00.0 SMBus master 0 bus 0"
bus "i2c-3" "SCD 0000:02:00.0 SMBus master 0 bus 1"
bus "i2c-5" "SCD 0000:02:00.0 SMBus master 0 bus 3"
bus "i2c-6" "SCD 0000:02:00.0 SMBus master 0 bus 4"
bus "i2c-7" "SCD 0000:02:00.0 SMBus master 0 bus 5"

chip "k10temp-pci-00c3"
label temp1 "Cpu temp sensor"
Expand Down
10 changes: 5 additions & 5 deletions device/celestica/x86_64-cel_seastone-r0/sensors.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,28 @@ chip "dps460-i2c-*-5b"
set in3_lcrit 11.0

# These sensors located on Main Switch Board.
chip "dx010_lm75b-i2c-*-48"
chip "lm75b-i2c-*-48"
label temp1 "Front-panel temp sensor 1"
set temp1_max 43
set temp1_max_hyst 28

chip "dx010_lm75b-i2c-*-49"
chip "lm75b-i2c-*-49"
label temp1 "Front-panel temp sensor 2"
set temp1_max 43
set temp1_max_hyst 28

chip "dx010_lm75b-i2c-*-4a"
chip "lm75b-i2c-*-4a"
label temp1 "ASIC temp sensor"
set temp1_max 43
set temp1_max_hyst 28

# These sensors located on CPU Board.
chip "dx010_lm75b-i2c-*-48"
chip "lm75b-i2c-*-48"
label temp1 "Rear-panel temp sensor 1"
set temp1_max 43
set temp1_max_hyst 28

chip "dx010_lm75b-i2c-*-4e"
chip "lm75b-i2c-*-4e"
label temp1 "Rear-panel temp sensor 2"
set temp1_max 43
set temp1_max_hyst 28
10 changes: 5 additions & 5 deletions device/delta/x86_64-delta_ag9032v1-r0/plugins/sfputil.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def get_presence(self, port_num):
return False

try:
reg_file = open("/sys/devices/platform/delta-ag9032v1-cpld.0/sfp_present")
reg_file = open("/sys/devices/platform/delta-ag9032v1-swpld.0/sfp_present")
except IOError as e:
print "Error: unable to open file: %s" % str(e)
return False
Expand All @@ -76,7 +76,7 @@ def get_low_power_mode(self, port_num):
return False

try:
reg_file = open("/sys/devices/platform/delta-ag9032v1-cpld.0/sfp_lpmode")
reg_file = open("/sys/devices/platform/delta-ag9032v1-swpld.0/sfp_lpmode")
except IOError as e:
print "Error: unable to open file: %s" % str(e)

Expand All @@ -100,7 +100,7 @@ def set_low_power_mode(self, port_num, lpmode):
return False

try:
reg_file = open("/sys/devices/platform/delta-ag9032v1-cpld.0/sfp_lpmode", "r+")
reg_file = open("/sys/devices/platform/delta-ag9032v1-swpld.0/sfp_lpmode", "r+")
except IOError as e:
print "Error: unable to open file: %s" % str(e)
return False
Expand Down Expand Up @@ -129,7 +129,7 @@ def set_low_power_mode(self, port_num, lpmode):
return True

def reset(self, port_num):
QSFP_RESET_REGISTER_DEVICE_FILE = "/sys/devices/platform/delta-ag9032v1-cpld.0/sfp_reset"
QSFP_RESET_REGISTER_DEVICE_FILE = "/sys/devices/platform/delta-ag9032v1-swpld.0/sfp_reset"

# Check for invalid port_num
if port_num < self.port_start or port_num > self.port_end:
Expand Down Expand Up @@ -172,4 +172,4 @@ def reset(self, port_num):
reg_file.write(hex(reg_value))
reg_file.close()

return True
return True
Loading