sonic-buildimage/platform/marvell-armhf/sonic-platform-nokia/nokia-7215_plt_setup.sh
carl-nokia 0a9d7a2145
[devices]: Add support for the Nokia-7215 platform (#5827)
Platform: armhf-nokia_ixs7215_52x-r0
HwSKU: Nokia-7215
ASIC: marvell
Port Config: 48x1G + 4x10G

Co-authored-by: dflynn <dennis.flynn@nokia.com>
Co-authored-by: Carl Keene <keene@nokia.com>
2020-11-18 17:00:40 -08:00

36 lines
848 B
Bash
Executable File

#!/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"
}
main $@