1*91f16700Schasinglulu# 2*91f16700Schasinglulu# Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved. 3*91f16700Schasinglulu# 4*91f16700Schasinglulu# SPDX-License-Identifier: BSD-3-Clause 5*91f16700Schasinglulu# 6*91f16700Schasinglulu# 7*91f16700Schasinglulu# This Makefile generates the image files used in the Trusted Firmware-A 8*91f16700Schasinglulu# document from the dia file. 9*91f16700Schasinglulu# 10*91f16700Schasinglulu# The PNG files in the present directory have been generated using Dia version 11*91f16700Schasinglulu# 0.97.2, which can be obtained from https://wiki.gnome.org/Apps/Dia/Download 12*91f16700Schasinglulu# 13*91f16700Schasinglulu 14*91f16700Schasinglulu# generate_image use the tool dia generate png from dia file 15*91f16700Schasinglulu# $(1) = layers 16*91f16700Schasinglulu# $(2) = image file name 17*91f16700Schasinglulu# $(3) = image file format 18*91f16700Schasinglulu# $(4) = addition opts 19*91f16700Schasinglulu# $(5) = dia source file 20*91f16700Schasingluludefine generate_image 21*91f16700Schasinglulu dia --show-layers=$(1) --filter=$(3) --export=$(2) $(4) $(5) 22*91f16700Schasingluluendef 23*91f16700Schasinglulu 24*91f16700SchasingluluRESET_DIA = reset_code_flow.dia 25*91f16700SchasingluluRESET_PNGS = \ 26*91f16700Schasinglulu default_reset_code.png \ 27*91f16700Schasinglulu reset_code_no_cpu_check.png \ 28*91f16700Schasinglulu reset_code_no_boot_type_check.png \ 29*91f16700Schasinglulu reset_code_no_checks.png \ 30*91f16700Schasinglulu 31*91f16700Schasinglulu# The $(RESET_DIA) file is organized in several layers. 32*91f16700Schasinglulu# Each image is generated by combining and exporting the appropriate set of 33*91f16700Schasinglulu# layers. 34*91f16700Schasingluludefault_reset_code_layers = "Frontground,Background,cpu_type_check,boot_type_check" 35*91f16700Schasinglulureset_code_no_cpu_check_layers = "Frontground,Background,no_cpu_type_check,boot_type_check" 36*91f16700Schasinglulureset_code_no_boot_type_check_layers= "Frontground,Background,cpu_type_check,no_boot_type_check" 37*91f16700Schasinglulureset_code_no_checks_layers = "Frontground,Background,no_cpu_type_check,no_boot_type_check" 38*91f16700Schasinglulu 39*91f16700Schasingluludefault_reset_code_opts = 40*91f16700Schasinglulureset_code_no_cpu_check_opts = 41*91f16700Schasinglulureset_code_no_boot_type_check_opts = 42*91f16700Schasinglulureset_code_no_checks_opts = 43*91f16700Schasinglulu 44*91f16700SchasingluluINT_DIA = int_handling.dia 45*91f16700SchasingluluINT_PNGS = \ 46*91f16700Schasinglulu sec-int-handling.png \ 47*91f16700Schasinglulu non-sec-int-handling.png 48*91f16700Schasinglulu 49*91f16700Schasinglulu# The $(INT_DIA) file is organized in several layers. 50*91f16700Schasinglulu# Each image is generated by combining and exporting the appropriate set of 51*91f16700Schasinglulu# layers. 52*91f16700Schasinglulunon-sec-int-handling_layers = "non_sec_int_bg,legend,non_sec_int_note,non_sec_int_handling" 53*91f16700Schasinglulusec-int-handling_layers = "sec_int_bg,legend,sec_int_note,sec_int_handling" 54*91f16700Schasinglulu 55*91f16700Schasinglulunon-sec-int-handling_opts = --size=1692x 56*91f16700Schasinglulusec-int-handling_opts = --size=1570x 57*91f16700Schasinglulu 58*91f16700SchasingluluXLAT_DIA = xlat_align.dia 59*91f16700SchasingluluXLAT_PNG = xlat_align.png 60*91f16700Schasinglulu 61*91f16700Schasingluluxlat_align_layers = "bg,translations" 62*91f16700Schasingluluxlat_align_opts = 63*91f16700Schasinglulu 64*91f16700SchasingluluRMM_DIA = rmm_cold_boot_generic.dia 65*91f16700SchasingluluRMM_PNG = rmm_cold_boot_generic.png 66*91f16700Schasinglulu 67*91f16700Schasinglulurmm_cold_boot_generic_layers = "background" 68*91f16700Schasinglulurmm_cold_boot_generic_opts = 69*91f16700Schasinglulu 70*91f16700SchasingluluRMM_EL3_MANIFEST_DIA = rmm_el3_manifest_struct.dia 71*91f16700SchasingluluRMM_EL3_MANIFEST_PNG = rmm_el3_manifest_struct.png 72*91f16700Schasinglulu 73*91f16700Schasinglulurmm_el3_manifest_struct_layers = "Background" 74*91f16700Schasinglulurmm_el3_manifest_struct_opts = 75*91f16700Schasinglulu 76*91f16700SchasingluluPSA_FWU_DIA = PSA-FWU.dia 77*91f16700SchasingluluPSA_FWU_PNG = PSA-FWU.png 78*91f16700Schasinglulu 79*91f16700SchasingluluFWU-update_struct_layers = "background" 80*91f16700SchasingluluFWU-update_struct_opts = 81*91f16700Schasinglulu 82*91f16700SchasingluluMB_DESIGN_DIA = measured_boot_design.dia 83*91f16700SchasingluluMB_DESIGN_PNG = measured_boot_design.png 84*91f16700Schasinglulu 85*91f16700Schasinglulumeasured_boot_design_layers = "background" 86*91f16700Schasinglulumeasured_boot_design_opts = 87*91f16700Schasinglulu 88*91f16700Schasingluluall:$(RESET_PNGS) $(INT_PNGS) $(XLAT_PNG) $(RMM_PNG) $(RMM_EL3_MANIFEST_PNG) $(PSA_FWU_PNG) $(MB_DESIGN_PNG) 89*91f16700Schasinglulu 90*91f16700Schasinglulu$(RESET_PNGS):$(RESET_DIA) 91*91f16700Schasinglulu $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<) 92*91f16700Schasinglulu 93*91f16700Schasinglulu$(INT_PNGS):$(INT_DIA) 94*91f16700Schasinglulu $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<) 95*91f16700Schasinglulu 96*91f16700Schasinglulu$(XLAT_PNG):$(XLAT_DIA) 97*91f16700Schasinglulu $(call generate_image,$($(patsubst %.png,%_layers,$@)),$(patsubst %.png,%.svg,$@),svg,$($(patsubst %.png,%_opts,$@)),$<) 98*91f16700Schasinglulu inkscape -z $(patsubst %.png,%.svg,$@) -e $@ -d 45 99*91f16700Schasinglulu 100*91f16700Schasinglulu$(RMM_PNG):$(RMM_DIA) 101*91f16700Schasinglulu $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<) 102*91f16700Schasinglulu 103*91f16700Schasinglulu$(RMM_EL3_MANIFEST_PNG):$(RMM_EL3_MANIFEST_DIA) 104*91f16700Schasinglulu $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<) 105*91f16700Schasinglulu 106*91f16700Schasinglulu$(PSA_FWU_PNG):$(PSA_FWU_DIA) 107*91f16700Schasinglulu $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<) 108*91f16700Schasinglulu 109*91f16700Schasinglulu$(MB_DESIGN_PNG):$(MB_DESIGN_DIA) 110*91f16700Schasinglulu $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<) 111