@echo off

echo Backup MAC Address
MACBACK

echo Update Root File System
socflash cs=0 if=..\..\..\fw\235.bin offset=0x300000 count=0xd00000 skip=0x300000

echo Update Kernel
socflash cs=0 if=..\..\..\fw\235.bin offset=0x100000 count=0x1F0000 skip=0x100000

echo Erase User Configuration
socflash cs=0 if=..\..\..\fw\235.bin offset=0x40000 count=0xC0000 skip=0x40000

echo Update Bootloader
socflash cs=0 if=..\..\..\fw\235.bin count=0x40000

echo Restore MAC Address
socflash cs=0 if=mac.bin offset=0x2F0000 count=0x10000
del mac.bin

echo Wait 90 seconds for BMC Ready...

TYPE NUL | CHOICE /C:YN /N /T:Y,30 > NUL
TYPE NUL | CHOICE /C:YN /N /T:Y,30 > NUL
TYPE NUL | CHOICE /C:YN /N /T:Y,30 > NUL

echo Done, please update FRU Data by platform.

