shell script that partition and flash an OS on an sdcard using a simple configuration file
ShellMIT
flashSD
shell script that partition and flash an OS on an sdcard using a simple configuration file
The configuration file needs to be in the same directory as the script and be named profile.
It describe every part of the SDcard to be flashed in a trivial way:
On should create a list of variable named P1 to PN for each part to flash.
The format is the following:
PX=",,,,"
where all numbers are in M or k or bytes:
: is the offset of the file or partition on the sdcard. Leave 'default' for auto calculation.
: is the size of the partition or file. The file will be truncated is size is smaller than filesize. Leave default for auto calculation.
: is the filesystem id. Add a * to tell the partition is bootable
: is [ file[.offset] | archive.[fs] | partition.[fs] ]
- : flash a raw file on no partition. the .offset is optional and allow to skip the begining of the file
- : format a new partition, mount it and extract the archive in it
- : create an empty partition (with or without fs)
- [fs]: represents the extension used with mkfs. It is mandatory for archive and optional for partition
: is the file to flash
'default': means auto calculate
Some example for profiles will be added to the profiles directory. To not hesitate to contribute yours.