sonic-buildimage/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as9716-32d.postinst
jostar-yang 6641a6b1a1
[as9716-32d] Add to support PDDF (#6902)
Add PDDF support for Accton as9716-32d platform

Co-authored-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-04-14 14:43:52 -07:00

28 lines
1019 B
Plaintext

# Special arrangement to make PDDF mode default
# Disable monitor, monitor-fan, monitor-psu (not enabling them would imply they will be disabled by default)
# Enable pddf-platform-monitor
# Steps to check syseeprom i2c address
modprobe i2c-i801
modprobe i2c-dev
use_57_eeprom=false
(i2cget -y -f 0 0x57 0x0) > /dev/null 2>&1
if [ $? -eq 0 ]; then
use_57_eeprom=true
fi
if $use_57_eeprom ; then
echo "The board has system EEPROM at I2C address 0x57"
# syseeprom is at the i2c address 0x57. Change the PDDF JSON file
sed -i 's@"topo_info": {"parent_bus": "0x0", "dev_addr": "0x56", "dev_type": "24c02"},@\
"topo_info": {"parent_bus": "0x0", "dev_addr": "0x57", "dev_type": "24c02"},@g' \
/usr/share/sonic/device/x86_64-accton_as9716_32d-r0/pddf/pddf-device.json
sync
fi
depmod -a
systemctl enable pddf-platform-init.service
systemctl start pddf-platform-init.service
systemctl enable as9716-32d-pddf-platform-monitor.service
systemctl start as9716-32d-pddf-platform-monitor.service