Qixiang Xu | 1327527 | 2017-07-11 20:33:12 +0800 | [diff] [blame] | 1 | # |
Javier Almansa Sobrino | 37bf69c | 2022-04-07 18:26:49 +0100 | [diff] [blame] | 2 | # Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved. |
Qixiang Xu | 1327527 | 2017-07-11 20:33:12 +0800 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | # |
John Tsichritzis | 63801cd | 2019-07-05 14:22:12 +0100 | [diff] [blame] | 7 | # This Makefile generates the image files used in the Trusted Firmware-A |
Qixiang Xu | 1327527 | 2017-07-11 20:33:12 +0800 | [diff] [blame] | 8 | # document from the dia file. |
| 9 | # |
| 10 | # The PNG files in the present directory have been generated using Dia version |
| 11 | # 0.97.2, which can be obtained from https://wiki.gnome.org/Apps/Dia/Download |
| 12 | # |
| 13 | |
| 14 | # generate_image use the tool dia generate png from dia file |
| 15 | # $(1) = layers |
| 16 | # $(2) = image file name |
| 17 | # $(3) = image file format |
| 18 | # $(4) = addition opts |
| 19 | # $(5) = dia source file |
| 20 | define generate_image |
| 21 | dia --show-layers=$(1) --filter=$(3) --export=$(2) $(4) $(5) |
| 22 | endef |
| 23 | |
| 24 | RESET_DIA = reset_code_flow.dia |
| 25 | RESET_PNGS = \ |
| 26 | default_reset_code.png \ |
| 27 | reset_code_no_cpu_check.png \ |
| 28 | reset_code_no_boot_type_check.png \ |
| 29 | reset_code_no_checks.png \ |
| 30 | |
| 31 | # The $(RESET_DIA) file is organized in several layers. |
| 32 | # Each image is generated by combining and exporting the appropriate set of |
| 33 | # layers. |
| 34 | default_reset_code_layers = "Frontground,Background,cpu_type_check,boot_type_check" |
| 35 | reset_code_no_cpu_check_layers = "Frontground,Background,no_cpu_type_check,boot_type_check" |
| 36 | reset_code_no_boot_type_check_layers= "Frontground,Background,cpu_type_check,no_boot_type_check" |
| 37 | reset_code_no_checks_layers = "Frontground,Background,no_cpu_type_check,no_boot_type_check" |
| 38 | |
| 39 | default_reset_code_opts = |
| 40 | reset_code_no_cpu_check_opts = |
| 41 | reset_code_no_boot_type_check_opts = |
| 42 | reset_code_no_checks_opts = |
| 43 | |
| 44 | INT_DIA = int_handling.dia |
| 45 | INT_PNGS = \ |
| 46 | sec-int-handling.png \ |
| 47 | non-sec-int-handling.png |
| 48 | |
| 49 | # The $(INT_DIA) file is organized in several layers. |
| 50 | # Each image is generated by combining and exporting the appropriate set of |
| 51 | # layers. |
| 52 | non-sec-int-handling_layers = "non_sec_int_bg,legend,non_sec_int_note,non_sec_int_handling" |
| 53 | sec-int-handling_layers = "sec_int_bg,legend,sec_int_note,sec_int_handling" |
| 54 | |
| 55 | non-sec-int-handling_opts = --size=1692x |
| 56 | sec-int-handling_opts = --size=1570x |
| 57 | |
| 58 | XLAT_DIA = xlat_align.dia |
| 59 | XLAT_PNG = xlat_align.png |
| 60 | |
| 61 | xlat_align_layers = "bg,translations" |
| 62 | xlat_align_opts = |
| 63 | |
Javier Almansa Sobrino | 37bf69c | 2022-04-07 18:26:49 +0100 | [diff] [blame] | 64 | RMM_DIA = rmm_cold_boot_generic.dia |
| 65 | RMM_PNG = rmm_cold_boot_generic.png |
| 66 | |
| 67 | rmm_cold_boot_generic_layers = "background" |
| 68 | rmm_cold_boot_generic_opts = |
| 69 | |
| 70 | RMM_EL3_MANIFEST_DIA = rmm_el3_manifest_struct.dia |
| 71 | RMM_EL3_MANIFEST_PNG = rmm_el3_manifest_struct.png |
| 72 | |
| 73 | rmm_el3_manifest_struct_layers = "Background" |
| 74 | rmm_el3_manifest_struct_opts = |
| 75 | |
Manish V Badarkhe | bd83655 | 2022-07-04 10:00:29 +0100 | [diff] [blame] | 76 | PSA_FWU_DIA = PSA-FWU.dia |
| 77 | PSA_FWU_PNG = PSA-FWU.png |
| 78 | |
| 79 | FWU-update_struct_layers = "background" |
| 80 | FWU-update_struct_opts = |
| 81 | |
Manish V Badarkhe | b2def91 | 2023-06-12 21:33:35 +0100 | [diff] [blame] | 82 | MB_DESIGN_DIA = measured_boot_design.dia |
| 83 | MB_DESIGN_PNG = measured_boot_design.png |
| 84 | |
| 85 | measured_boot_design_layers = "background" |
| 86 | measured_boot_design_opts = |
| 87 | |
| 88 | all:$(RESET_PNGS) $(INT_PNGS) $(XLAT_PNG) $(RMM_PNG) $(RMM_EL3_MANIFEST_PNG) $(PSA_FWU_PNG) $(MB_DESIGN_PNG) |
Qixiang Xu | 1327527 | 2017-07-11 20:33:12 +0800 | [diff] [blame] | 89 | |
| 90 | $(RESET_PNGS):$(RESET_DIA) |
| 91 | $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<) |
| 92 | |
| 93 | $(INT_PNGS):$(INT_DIA) |
| 94 | $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<) |
| 95 | |
| 96 | $(XLAT_PNG):$(XLAT_DIA) |
| 97 | $(call generate_image,$($(patsubst %.png,%_layers,$@)),$(patsubst %.png,%.svg,$@),svg,$($(patsubst %.png,%_opts,$@)),$<) |
| 98 | inkscape -z $(patsubst %.png,%.svg,$@) -e $@ -d 45 |
Javier Almansa Sobrino | 37bf69c | 2022-04-07 18:26:49 +0100 | [diff] [blame] | 99 | |
| 100 | $(RMM_PNG):$(RMM_DIA) |
| 101 | $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<) |
| 102 | |
| 103 | $(RMM_EL3_MANIFEST_PNG):$(RMM_EL3_MANIFEST_DIA) |
| 104 | $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<) |
Manish V Badarkhe | bd83655 | 2022-07-04 10:00:29 +0100 | [diff] [blame] | 105 | |
| 106 | $(PSA_FWU_PNG):$(PSA_FWU_DIA) |
| 107 | $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<) |
Manish V Badarkhe | b2def91 | 2023-06-12 21:33:35 +0100 | [diff] [blame] | 108 | |
| 109 | $(MB_DESIGN_PNG):$(MB_DESIGN_DIA) |
| 110 | $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<) |