[image]: load platform specific settings in sonic-to-sonic upgrade (#710)
This commit is contained in:
parent
c1c8a122be
commit
7472cd303e
@ -1,5 +1,7 @@
|
||||
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="processor.max_cstate=1 intel_idle.max_cstate=0"
|
||||
|
||||
if [ "$install_env" = "onie" ]; then
|
||||
|
||||
echo "Replace ONIE reboot with Dell reset commands"
|
||||
|
||||
# set I2C GPIO mux
|
||||
@ -21,3 +23,5 @@ i2cset -y 0 0x31 1 0xfd
|
||||
EOF
|
||||
|
||||
chmod a+x /sbin/reboot
|
||||
|
||||
fi
|
||||
|
@ -36,7 +36,14 @@ if [ $(id -u) -ne 0 ]
|
||||
fi
|
||||
|
||||
# get running machine from conf file
|
||||
[ -r /etc/machine.conf ] && . /etc/machine.conf
|
||||
if [ -r /etc/machine.conf ]; then
|
||||
. /etc/machine.conf
|
||||
elif [ -r /host/machine.conf ]; then
|
||||
. /host/machine.conf
|
||||
else
|
||||
echo "cannot find machine.conf"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "onie_platform: $onie_platform"
|
||||
|
||||
@ -57,9 +64,10 @@ if [ -d "/etc/sonic" ]; then
|
||||
else
|
||||
echo "Installing SONiC in ONIE"
|
||||
install_env="onie"
|
||||
[ -r platforms/$onie_platform ] && source platforms/$onie_platform
|
||||
fi
|
||||
|
||||
[ -r platforms/$onie_platform ] && . platforms/$onie_platform
|
||||
|
||||
# Install demo on same block device as ONIE
|
||||
onie_dev=$(blkid | grep ONIE-BOOT | head -n 1 | awk '{print $1}' | sed -e 's/:.*$//')
|
||||
blk_dev=$(echo $onie_dev | sed -e 's/[1-9][0-9]*$//' | sed -e 's/\([0-9]\)\(p\)/\1/')
|
||||
|
Reference in New Issue
Block a user