blob: eef5648d4a36d003b797844f619e5071f7703610 [file] [log] [blame]
Sandrine Bailleux876c7ad2015-12-15 14:27:17 +00001#! /bin/bash
2
3#
4# This script generates the image files used in the ARM Trusted Firmware Reset
5# Design document from the 'reset_code_flow.dia' file.
6#
7# The PNG files in the present directory have been generated using Dia version
8# 0.97.2, which can be obtained from https://wiki.gnome.org/Apps/Dia/Download
9#
10
11set -e
12
13# Usage: generate_image <layers> <image_filename>
14function generate_image
15{
16 dia \
17 --show-layers=$1 \
18 --filter=png \
19 --export=$2 \
20 reset_code_flow.dia
21
22}
23
24# The 'reset_code_flow.dia' file is organized in several layers.
25# Each image is generated by combining and exporting the appropriate set of
26# layers.
27generate_image \
28 Frontground,Background,cpu_type_check,boot_type_check \
29 default_reset_code.png
30
31generate_image \
32 Frontground,Background,no_cpu_type_check,boot_type_check \
33 reset_code_no_cpu_check.png
34
35generate_image \
36 Frontground,Background,cpu_type_check,no_boot_type_check \
37 reset_code_no_boot_type_check.png
38
39generate_image \
40 Frontground,Background,no_cpu_type_check,no_boot_type_check \
41 reset_code_no_checks.png