#!/bin/bash | |
FLASH_SIZE=$1 | |
if [ x"$FLASH_SIZE" = x"" ]; then | |
echo "Use the built-in flash size of partition.bin" | |
else | |
echo "set new flash size:$FLASH_SIZE MB" | |
fi | |
./bin2conf partition.bin $FLASH_SIZE > sample.conf | |
read -p "edit sample.conf and input any key to continue " any_key | |
bash ./conf2ini.sh && rm -f conf2ini.sh | |
if [ $? -ne 0 ]; then | |
echo "generate partition2.bin partition2.ini error" | |
cat partition2.ini | |
exit -1 | |
else | |
echo "generate new partition.2.bin and partition2.ini and check." | |
fi | |