diff options
Diffstat (limited to 'scripts/gen_sit.sh')
-rwxr-xr-x | scripts/gen_sit.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/gen_sit.sh b/scripts/gen_sit.sh new file mode 100755 index 0000000..cca5a39 --- /dev/null +++ b/scripts/gen_sit.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ $# -lt 1 ]; then + echo "Must set the sector offset of secondary image" + exit -1 +fi + +sector_num=`printf "0x%X" $1` + +sed -e s/%sectornum%/${sector_num}/g scripts/sit_template > sit_gen +chmod +x sit_gen + +./sit_gen +objcopy -I binary -O binary --pad-to 512 sit.bin + +rm sit_gen +echo "Generated sit.bin" |