1a2c320a8SPaul Beesley# 269447290SJavier Almansa Sobrino# Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved. 3a2c320a8SPaul Beesley# 4a2c320a8SPaul Beesley# SPDX-License-Identifier: BSD-3-Clause 5a2c320a8SPaul Beesley# 6a2c320a8SPaul Beesley# 7bd97f83aSJohn Tsichritzis# This Makefile generates the image files used in the Trusted Firmware-A 8a2c320a8SPaul Beesley# document from the dia file. 9a2c320a8SPaul Beesley# 10a2c320a8SPaul Beesley# The PNG files in the present directory have been generated using Dia version 11a2c320a8SPaul Beesley# 0.97.2, which can be obtained from https://wiki.gnome.org/Apps/Dia/Download 12a2c320a8SPaul Beesley# 13a2c320a8SPaul Beesley 14a2c320a8SPaul Beesley# generate_image use the tool dia generate png from dia file 15a2c320a8SPaul Beesley# $(1) = layers 16a2c320a8SPaul Beesley# $(2) = image file name 17a2c320a8SPaul Beesley# $(3) = image file format 18a2c320a8SPaul Beesley# $(4) = addition opts 19a2c320a8SPaul Beesley# $(5) = dia source file 20a2c320a8SPaul Beesleydefine generate_image 21a2c320a8SPaul Beesley dia --show-layers=$(1) --filter=$(3) --export=$(2) $(4) $(5) 22a2c320a8SPaul Beesleyendef 23a2c320a8SPaul Beesley 24a2c320a8SPaul BeesleyRESET_DIA = reset_code_flow.dia 25a2c320a8SPaul BeesleyRESET_PNGS = \ 26a2c320a8SPaul Beesley default_reset_code.png \ 27a2c320a8SPaul Beesley reset_code_no_cpu_check.png \ 28a2c320a8SPaul Beesley reset_code_no_boot_type_check.png \ 29a2c320a8SPaul Beesley reset_code_no_checks.png \ 30a2c320a8SPaul Beesley 31a2c320a8SPaul Beesley# The $(RESET_DIA) file is organized in several layers. 32a2c320a8SPaul Beesley# Each image is generated by combining and exporting the appropriate set of 33a2c320a8SPaul Beesley# layers. 34a2c320a8SPaul Beesleydefault_reset_code_layers = "Frontground,Background,cpu_type_check,boot_type_check" 35a2c320a8SPaul Beesleyreset_code_no_cpu_check_layers = "Frontground,Background,no_cpu_type_check,boot_type_check" 36a2c320a8SPaul Beesleyreset_code_no_boot_type_check_layers= "Frontground,Background,cpu_type_check,no_boot_type_check" 37a2c320a8SPaul Beesleyreset_code_no_checks_layers = "Frontground,Background,no_cpu_type_check,no_boot_type_check" 38a2c320a8SPaul Beesley 39a2c320a8SPaul Beesleydefault_reset_code_opts = 40a2c320a8SPaul Beesleyreset_code_no_cpu_check_opts = 41a2c320a8SPaul Beesleyreset_code_no_boot_type_check_opts = 42a2c320a8SPaul Beesleyreset_code_no_checks_opts = 43a2c320a8SPaul Beesley 44a2c320a8SPaul BeesleyINT_DIA = int_handling.dia 45a2c320a8SPaul BeesleyINT_PNGS = \ 46a2c320a8SPaul Beesley sec-int-handling.png \ 47a2c320a8SPaul Beesley non-sec-int-handling.png 48a2c320a8SPaul Beesley 49a2c320a8SPaul Beesley# The $(INT_DIA) file is organized in several layers. 50a2c320a8SPaul Beesley# Each image is generated by combining and exporting the appropriate set of 51a2c320a8SPaul Beesley# layers. 52a2c320a8SPaul Beesleynon-sec-int-handling_layers = "non_sec_int_bg,legend,non_sec_int_note,non_sec_int_handling" 53a2c320a8SPaul Beesleysec-int-handling_layers = "sec_int_bg,legend,sec_int_note,sec_int_handling" 54a2c320a8SPaul Beesley 55a2c320a8SPaul Beesleynon-sec-int-handling_opts = --size=1692x 56a2c320a8SPaul Beesleysec-int-handling_opts = --size=1570x 57a2c320a8SPaul Beesley 58a2c320a8SPaul BeesleyXLAT_DIA = xlat_align.dia 59a2c320a8SPaul BeesleyXLAT_PNG = xlat_align.png 60a2c320a8SPaul Beesley 61a2c320a8SPaul Beesleyxlat_align_layers = "bg,translations" 62a2c320a8SPaul Beesleyxlat_align_opts = 63a2c320a8SPaul Beesley 6469447290SJavier Almansa SobrinoRMM_DIA = rmm_cold_boot_generic.dia 6569447290SJavier Almansa SobrinoRMM_PNG = rmm_cold_boot_generic.png 6669447290SJavier Almansa Sobrino 6769447290SJavier Almansa Sobrinormm_cold_boot_generic_layers = "background" 6869447290SJavier Almansa Sobrinormm_cold_boot_generic_opts = 6969447290SJavier Almansa Sobrino 7069447290SJavier Almansa SobrinoRMM_EL3_MANIFEST_DIA = rmm_el3_manifest_struct.dia 7169447290SJavier Almansa SobrinoRMM_EL3_MANIFEST_PNG = rmm_el3_manifest_struct.png 7269447290SJavier Almansa Sobrino 7369447290SJavier Almansa Sobrinormm_el3_manifest_struct_layers = "Background" 7469447290SJavier Almansa Sobrinormm_el3_manifest_struct_opts = 7569447290SJavier Almansa Sobrino 76eb3d4015SManish V BadarkhePSA_FWU_DIA = PSA-FWU.dia 77eb3d4015SManish V BadarkhePSA_FWU_PNG = PSA-FWU.png 78eb3d4015SManish V Badarkhe 79eb3d4015SManish V BadarkheFWU-update_struct_layers = "background" 80eb3d4015SManish V BadarkheFWU-update_struct_opts = 81eb3d4015SManish V Badarkhe 82*5038f1f9SManish V BadarkheMB_DESIGN_DIA = measured_boot_design.dia 83*5038f1f9SManish V BadarkheMB_DESIGN_PNG = measured_boot_design.png 84*5038f1f9SManish V Badarkhe 85*5038f1f9SManish V Badarkhemeasured_boot_design_layers = "background" 86*5038f1f9SManish V Badarkhemeasured_boot_design_opts = 87*5038f1f9SManish V Badarkhe 88*5038f1f9SManish V Badarkheall:$(RESET_PNGS) $(INT_PNGS) $(XLAT_PNG) $(RMM_PNG) $(RMM_EL3_MANIFEST_PNG) $(PSA_FWU_PNG) $(MB_DESIGN_PNG) 89a2c320a8SPaul Beesley 90a2c320a8SPaul Beesley$(RESET_PNGS):$(RESET_DIA) 91a2c320a8SPaul Beesley $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<) 92a2c320a8SPaul Beesley 93a2c320a8SPaul Beesley$(INT_PNGS):$(INT_DIA) 94a2c320a8SPaul Beesley $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<) 95a2c320a8SPaul Beesley 96a2c320a8SPaul Beesley$(XLAT_PNG):$(XLAT_DIA) 97a2c320a8SPaul Beesley $(call generate_image,$($(patsubst %.png,%_layers,$@)),$(patsubst %.png,%.svg,$@),svg,$($(patsubst %.png,%_opts,$@)),$<) 98a2c320a8SPaul Beesley inkscape -z $(patsubst %.png,%.svg,$@) -e $@ -d 45 9969447290SJavier Almansa Sobrino 10069447290SJavier Almansa Sobrino$(RMM_PNG):$(RMM_DIA) 10169447290SJavier Almansa Sobrino $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<) 10269447290SJavier Almansa Sobrino 10369447290SJavier Almansa Sobrino$(RMM_EL3_MANIFEST_PNG):$(RMM_EL3_MANIFEST_DIA) 10469447290SJavier Almansa Sobrino $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<) 105eb3d4015SManish V Badarkhe 106eb3d4015SManish V Badarkhe$(PSA_FWU_PNG):$(PSA_FWU_DIA) 107eb3d4015SManish V Badarkhe $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<) 108*5038f1f9SManish V Badarkhe 109*5038f1f9SManish V Badarkhe$(MB_DESIGN_PNG):$(MB_DESIGN_DIA) 110*5038f1f9SManish V Badarkhe $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<) 111