sonic-buildimage/platform/broadcom/sonic-platform-modules-brcm-xlr-gts/utils/brcm-xlr-gts-platform-setup
Olivier Singla 708999ad61 [devices]: Add Broadcom XLR/GTS (BCM9COMX2XMC) support for Tomahawk switch (BCM956960K) (#2682)
These patches add support for the Broadcom XMC card (XLR/GTS). At this moment
only Tomahawk switch (BCM956960K) is supported. Add
device/broadcom/x86_64-bcm_xlr-r0 and
platform/broadcom/sonic-platform-modules-brcm-xlr-gts files
2019-06-09 12:09:31 -07:00

24 lines
828 B
Bash
Executable File

#!/bin/sh
. /host/machine.conf
# We boot SONiC from an XMC card : identify the switch at run-time and update the SKU
if [ "${onie_machine}" = "bcm_xlr" ]; then
grep "HandleLidSwitch=ignore" /etc/systemd/logind.conf > /dev/null
if [ ! $? = 0 ]; then
echo "HandleLidSwitch=ignore" >> /etc/systemd/logind.conf
echo "IdleAction=ignore" >> /etc/systemd/logind.conf
systemctl is-active --quiet systemd-logind
if [ $? = 0 ]; then
systemctl restart systemd-logind
fi
fi
/usr/bin/brcm-xlr-gts-create-eeprom-file.py
brcm_sw=$(lspci | grep -m1 "Ethernet controller: Broadcom " | grep "Device" | sed 's/(.*//' | awk '{print $NF}')
case "$brcm_sw" in
b960)
echo "BCM956960K t1" > /usr/share/sonic/device/${onie_platform}/default_sku
;;
esac
fi