xf.li | 742dd02 | 2023-06-08 01:43:32 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | FLASH_SIZE=$1 |
| 4 | if [ x"$FLASH_SIZE" = x"" ]; then |
| 5 | echo "Use the built-in flash size of partition.bin" |
| 6 | else |
| 7 | echo "set new flash size:$FLASH_SIZE MB" |
| 8 | fi |
| 9 | |
| 10 | ./bin2conf partition.bin $FLASH_SIZE > sample.conf |
| 11 | |
| 12 | read -p "edit sample.conf and input any key to continue " any_key |
| 13 | bash ./conf2ini.sh && rm -f conf2ini.sh |
| 14 | if [ $? -ne 0 ]; then |
| 15 | echo "generate partition2.bin partition2.ini error" |
| 16 | cat partition2.ini |
| 17 | exit -1 |
| 18 | else |
| 19 | echo "generate new partition.2.bin and partition2.ini and check." |
| 20 | fi |
| 21 | |