blob: a135fc486ed1dac9b3a725706de5ccf509d137d5 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#!/bin/bash
2if [ $1 = ] ;then
3echo "Please entry inpath outpath and size(MB)"
4exit 0
5fi
6
7if [ $2 = ] ;then
8echo "Please entry inpath outpath and size(MB)"
9exit 0
10fi
11
12if [ $3 = ] ;then
13echo "Please entry inpath outpath and size(MB)"
14exit 0
15fi
16
17CUSTOM_IN_DIR=$1
18CUSTOM_OUT_DIRR=$2
19CUSTOM_FS_SIZE=$3
20
21CUSTOM_FS_PEB=$[$CUSTOM_FS_SIZE* 8 - 1]
22
23mkfs.ubifs -r ${CUSTOM_IN_DIR} -m 2048 -e 129024 -c ${CUSTOM_FS_PEB} -x zlib -o custom.img; \
24bash ubifs.sh customfs.cfg custom.img customfs ${CUSTOM_FS_SIZE}; \
25ubinize -o ${CUSTOM_OUT_DIRR} -m 2048 -p 128KiB -s 512 customfs.cfg; \
26rm custom.img customfs.cfg;\