Skip to content

Commit 606db58

Browse files
[brcm-th-svk]: Fix errors in BCM956960K switch (#4390)
Fix Broadcom TH SVK boot up crash
1 parent a2cc6b6 commit 606db58

4 files changed

Lines changed: 10 additions & 6 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/config_th_32x100.bcm
1+
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/th_32x100.config.bcm

device/broadcom/x86_64-bcm_xlr-r0/BCM956960K/config_th_32x100.bcm renamed to device/broadcom/x86_64-bcm_xlr-r0/BCM956960K/th_32x100.config.bcm

File renamed without changes.

device/broadcom/x86_64-bcm_xlr-r0/plugins/eeprom.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
# - the eeprom format definition
99
# - specific encoder/decoder if there is special need
1010
#
11-
# Note: the file /etc/sys_eeprom.bin is generated by the script
12-
# brcm-xlr-gts-create-eeprom-file.py
11+
# Note: the file /usr/share/sonic/platform/sys_eeprom.bin is generated
12+
# by the script brcm-xlr-gts-create-eeprom-file.py
1313
#############################################################################
1414

15+
import os
16+
1517
try:
1618
from sonic_eeprom import eeprom_tlvinfo
1719
except ImportError, e:
@@ -21,7 +23,9 @@
2123
class board(eeprom_tlvinfo.TlvInfoDecoder):
2224

2325
def __init__(self, name, path, cpld_root, ro):
24-
self.eeprom_path = "/etc/sys_eeprom.bin"
26+
self.eeprom_path = "/usr/share/sonic/platform/sys_eeprom.bin"
27+
if os.path.isfile(self.eeprom_path) is False:
28+
self.eeprom_path = "/usr/share/sonic/device/x86_64-bcm_xlr-r0/sys_eeprom.bin"
2529
super(board, self).__init__(self.eeprom_path, 0, '', False, True)
2630

2731
def serial_number_str(self, e):

platform/broadcom/sonic-platform-modules-brcm-xlr-gts/utils/brcm-xlr-gts-create-eeprom-file.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ def main():
9393
tlvinfo_header.totallen = len(tlvinfo_data.dump())+4;
9494

9595
try:
96-
f = open('/etc/sys_eeprom.bin', 'w+')
96+
f = open('/usr/share/sonic/device/x86_64-bcm_xlr-r0/sys_eeprom.bin', 'w+')
9797
f.write(tlvinfo_header.dump())
9898
f.write(tlvinfo_data.dump())
9999
f.write(crc(tlvinfo_header.dump(), tlvinfo_data.dump()))
100100
f.close()
101101
except:
102-
print('Unable to write file /etc/sys_eeprom.bin')
102+
print('Unable to write file /usr/share/sonic/device/x86_64-bcm_xlr-r0/sys_eeprom.bin')
103103

104104
if __name__== "__main__":
105105
main()

0 commit comments

Comments
 (0)