blob: 7d6b4a9608fa72ffc60e762aee17f07db9aade8b [file] [log] [blame]
#!/bin/bash
cfg_file_name=$1
img_file_name=$2
vol_name=$3
file_size=$4
vol_size=$[$file_size*942-512]
echo "[ubifs]" > $cfg_file_name
echo "mode=ubi" >> $cfg_file_name
echo "image=${img_file_name}" >> $cfg_file_name
echo "vol_id=0" >> $cfg_file_name
echo "vol_size=${vol_size}KiB" >> $cfg_file_name
echo "vol_type=dynamic" >> $cfg_file_name
echo "vol_name=${vol_name}" >> $cfg_file_name
echo "vol_flags=autoresize" >> $cfg_file_name