| #!/bin/bash |
| if [ $1 = ] ;then |
| echo "Please entry inpath outpath and size(MB)" |
| exit 0 |
| fi |
| |
| if [ $2 = ] ;then |
| echo "Please entry inpath outpath and size(MB)" |
| exit 0 |
| fi |
| |
| if [ $3 = ] ;then |
| echo "Please entry inpath outpath and size(MB)" |
| exit 0 |
| fi |
| |
| CUSTOM_IN_DIR=$1 |
| CUSTOM_OUT_DIRR=$2 |
| CUSTOM_FS_SIZE=$3 |
| |
| CUSTOM_FS_PEB=$[$CUSTOM_FS_SIZE* 8 - 1] |
| |
| mkfs.ubifs -r ${CUSTOM_IN_DIR} -m 2048 -e 129024 -c ${CUSTOM_FS_PEB} -x zlib -o custom.img; \ |
| bash ubifs.sh customfs.cfg custom.img customfs ${CUSTOM_FS_SIZE}; \ |
| ubinize -o ${CUSTOM_OUT_DIRR} -m 2048 -p 128KiB -s 512 customfs.cfg; \ |
| rm custom.img customfs.cfg;\ |