blob: 7d6b4a9608fa72ffc60e762aee17f07db9aade8b [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#!/bin/bash
2cfg_file_name=$1
3img_file_name=$2
4vol_name=$3
5file_size=$4
6
7vol_size=$[$file_size*942-512]
8
9
10echo "[ubifs]" > $cfg_file_name
11echo "mode=ubi" >> $cfg_file_name
12echo "image=${img_file_name}" >> $cfg_file_name
13echo "vol_id=0" >> $cfg_file_name
14echo "vol_size=${vol_size}KiB" >> $cfg_file_name
15echo "vol_type=dynamic" >> $cfg_file_name
16echo "vol_name=${vol_name}" >> $cfg_file_name
17echo "vol_flags=autoresize" >> $cfg_file_name