# <- this is for comment / total file size must be less than 4KB

# Setup the installation command.
setenv stop_cmd 'go 0'
setenv crc_check_cmd 'if test $crcTestResult -ne 1; then run stop_cmd; else printenv crcTestResult; fi;'
setenv set_size_cmd 'setenv FactoryUpgradeSizeTable $FactoryUpgradeSizeTable Index_$main_idx=$filesize'
setenv set_sub_size_cmd 'setenv FactoryUpgradeSizeTable ${FactoryUpgradeSizeTable} Index_${main_idx}-${sub_idx}=$filesize'
setenv write_data_cmd 'writeDataToRawPartition $main_idx $sub_idx $blockSize $partitionName $volumeName'
setenv write_data_check_cmd 'if test $writeResult -ne 0; then run stop_cmd; else echo "ok"; fi;'
setenv set_install_done 'setenv installation_done 1'
setenv usb_load_key_file 'fatload usb 0 $dataStartAddr ${file_to_load}'
setenv usb_load_crc_file 'fatload usb 0 $crcStartAddr ${file_to_load}.crc'
setenv usb_load_key 'if test $enable_crc_check -eq 1; then run usb_load_crc_file; run usb_load_key_file; checkcrc32; run crc_check_cmd; else run usb_load_key_file; fi'

# Initiate the mboot environment variables for installation.
setenv dataStartAddr 0x24200000
setenv crcStartAddr  0x24300000
setenv crcTestResult 0x0
setenv blockSize 0x10000
setenv partitionName FACTORY
setenv volumeName factory
setenv enable_crc_check 0

# Reset and clear the mboot environment variables.
setenv FactoryUpgradeBitmap
setenv FactoryUpgradeSizeTable

% <- this is end of file symbol
