sonic-buildimage/platform/marvell-armhf/sonic-platform-nokia/nokia-7215_plt_setup.sh

39 lines
910 B
Bash
Raw Normal View History

#!/bin/bash
fw_uboot_env_cfg()
{
echo "Setting up U-Boot environment..."
MACH_FILE="/host/machine.conf"
PLATFORM=`sed -n 's/onie_platform=\(.*\)/\1/p' $MACH_FILE`
if [ "$PLATFORM" = "armhf-nokia_ixs7215_52x-r0" ]; then
# Ixs7215 / IPD6448M board Uboot ENV offset
FW_ENV_DEFAULT='/dev/mtd0 0x00100000 0x10000 0x10000'
demo_part=$(sgdisk -p /dev/sda | grep -e "SONiC-OS")
if [ -z "$demo_part" ]; then
# ET6448M Board - For Backward compatibility
FW_ENV_DEFAULT='/dev/mtd0 0x00500000 0x80000 0x100000 8'
fi
else
FW_ENV_DEFAULT='/dev/mtd0 0x00500000 0x80000 0x100000 8'
fi
echo "Using pre-configured uboot env"
echo $FW_ENV_DEFAULT > /etc/fw_env.config
}
main()
{
fw_uboot_env_cfg
echo "Nokia-IXS7215: /dev/mtd0 FW_ENV_DEFAULT"
python /etc/entropy.py &
/bin/sh /etc/inband_mgmt.sh
}
main $@