blob: ec42243733bac84f0c1ce174d8dba4ec51a156e7 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#!/bin/bash
2
3if [ x"$PAGESIZE" = x"" ]; then
4 PAGESIZE=0x800
5fi
6
7if [ x"$ERASEBLOCK" = x"" ]; then
8 ERASEBLOCK=0x20000
9fi
10
11JFFS2_COMPRESS_TYPE=$3
12COMPR_OPT="-X lzma"
13
14if [ x"$JFFS2_COMPRESS_TYPE" = x"zlib" ]; then
15 COMPR_OPT="-X zlib"
16fi
17
18if [ x"$JFFS2_COMPRESS_TYPE" = x"lzo" ]; then
19 COMPR_OPT="-X lzo"
20fi
21
22mkfs.jffs2_lzma -v $COMPR_OPT --pagesize=$PAGESIZE --eraseblock=$ERASEBLOCK --little-endian --no-cleanmarkers --squash -d $1 -o $2
23if [ $? -ne 0 ]; then
24 echo "mkfs.jffs2_lzma error"
25 exit -1
26else
27 echo "mkfs.jffs2_lzma ok"
28fi
29
30exit 0