view sh/c139-gen-fc-ffs-img @ 30:2d60f9a3032b default tip

LICENSE: public domain, copied from freecalypso-tools
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 24 Jun 2023 04:24:38 +0000
parents 2299f1ebbfd2
children
line wrap: on
line source

#!/bin/sh

# This shell script generates an fc-ffs.bin image specifically for FreeCalypso
# on C139.  It contains hard-coded FFS geometry of 64x7 (correct for 4 MiB
# flash only, FC Tourmaline), and it invokes c139-gen-fc-ffs-tree script to
# populate the FFS content.  The latter script is intended to be C139-specific:
# it uses aud-c139 audio mode config files, and in the future it will also
# populate PWT buzzer melodies that aren't applicable to other C1xx targets
# (too small FFS on C11x and no buzzer on C155).

if [ $# != 2 ]
then
	echo "usage: $0 rfbin-dir imei-file" 1>&2
	exit 1
fi

set -e

c139-gen-fc-ffs-tree "$1" "$2" fc-ffs

echo 'Generated file system tree in fc-ffs'

tiffs-mkfs -f /fc-ffs 64x7 fc-ffs fc-ffs.bin

echo 'Generated FFS image for FC firmware in fc-ffs.bin'