Skip to content

Commit

Permalink
Merge pull request #27 from lkunjumon/xyz
Browse files Browse the repository at this point in the history
 Updating default  Uboot ENV offset
  • Loading branch information
Sabareesh-Kumar-Anandan authored Jan 31, 2021
2 parents e6e5b04 + 25e99cd commit 6310a38
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 28 deletions.
18 changes: 4 additions & 14 deletions platform/marvell-arm64/sonic-platform-tg4810m/tg4810m_plt_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,16 @@ fw_uboot_env_cfg()

if [ "$PLATFORM" = "arm64-delta_tg4810m-r0" ]; then
# TG410M 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'
FW_ENV_DEFAULT='/dev/mtd1 0x00000000 0x00010000 0x00001000'
echo "Using pre-configured uboot env"
echo $FW_ENV_DEFAULT > /etc/fw_env.config
fi

echo "Using pre-configured uboot env"
echo $FW_ENV_DEFAULT > /etc/fw_env.config

}


main()
{
#fw_uboot_env_cfg
fw_uboot_env_cfg
echo "Delta-TG4810M: /dev/mtd0 FW_ENV_DEFAULT"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ def _get_transceiver_status(self):

if smbus_present == 0:
logger.log_info(" PMON - smbus ERROR - DEBUG sfp_event ")
cmdstatus, sfpstatus = cmd.getstatusoutput('i2cget -y 0 0x41 0x3') #need to verify the cpld register logic
cmdstatus, sfpstatus = cmd.getstatusoutput('i2cget -y 2 0x41 0x3') #need to verify the cpld register logic
sfpstatus = int(sfpstatus, 16)
else:
bus = smbus.SMBus(0)
bus = smbus.SMBus(2)
DEVICE_ADDRESS = 0x41
DEVICE_REG = 0x3
sfpstatus = bus.read_byte_data(DEVICE_ADDRESS, DEVICE_REG)
Expand Down
16 changes: 4 additions & 12 deletions platform/marvell-arm64/sonic-platform-tg48m-p/tg48m-p_plt_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,17 @@ fw_uboot_env_cfg()
MACH_FILE="/host/machine.conf"
PLATFORM=`sed -n 's/onie_platform=\(.*\)/\1/p' $MACH_FILE`
if [ "$PLATFORM" = "arm64-delta_tg48m_poe-r0" ]; then
# TG48M-P board Uboot ENV offset
FW_ENV_DEFAULT='/dev/mtd1 00010000 00001000 '

demo_part=$(sgdisk -p /dev/sda | grep -e "SONiC-OS")
if [ -z "$demo_part" ]; then
FW_ENV_DEFAULT='/dev/mtd1 00010000 00001000 8'
fi
else
FW_ENV_DEFAULT='/dev/mtd1 00010000 00001000 8'
FW_ENV_DEFAULT='/dev/mtd1 0x00000000 0x00010000 0x00001000'
echo "Using pre-configured uboot env"
echo $FW_ENV_DEFAULT > /etc/fw_env.config
fi
echo "Using pre-configured uboot env"
echo $FW_ENV_DEFAULT > /etc/fw_env.config
}


main()
{
fw_uboot_env_cfg
echo "Delta-TG48M-P: /dev/mtd0 FW_ENV_DEFAULT"
echo "Delta-TG48M-P: /dev/mtd1 FW_ENV_DEFAULT"
}

main $@

0 comments on commit 6310a38

Please sign in to comment.