Makefile 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. #
  2. # Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. #
  7. # This Makefile generates the image files used in the Trusted Firmware-A
  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. # generate_image use the tool dia generate png from dia file
  14. # $(1) = layers
  15. # $(2) = image file name
  16. # $(3) = image file format
  17. # $(4) = addition opts
  18. # $(5) = dia source file
  19. define generate_image
  20. dia --show-layers=$(1) --filter=$(3) --export=$(2) $(4) $(5)
  21. endef
  22. RESET_DIA = reset_code_flow.dia
  23. RESET_PNGS = \
  24. default_reset_code.png \
  25. reset_code_no_cpu_check.png \
  26. reset_code_no_boot_type_check.png \
  27. reset_code_no_checks.png \
  28. # The $(RESET_DIA) file is organized in several layers.
  29. # Each image is generated by combining and exporting the appropriate set of
  30. # layers.
  31. default_reset_code_layers = "Frontground,Background,cpu_type_check,boot_type_check"
  32. reset_code_no_cpu_check_layers = "Frontground,Background,no_cpu_type_check,boot_type_check"
  33. reset_code_no_boot_type_check_layers= "Frontground,Background,cpu_type_check,no_boot_type_check"
  34. reset_code_no_checks_layers = "Frontground,Background,no_cpu_type_check,no_boot_type_check"
  35. default_reset_code_opts =
  36. reset_code_no_cpu_check_opts =
  37. reset_code_no_boot_type_check_opts =
  38. reset_code_no_checks_opts =
  39. INT_DIA = int_handling.dia
  40. INT_PNGS = \
  41. sec-int-handling.png \
  42. non-sec-int-handling.png
  43. # The $(INT_DIA) file is organized in several layers.
  44. # Each image is generated by combining and exporting the appropriate set of
  45. # layers.
  46. non-sec-int-handling_layers = "non_sec_int_bg,legend,non_sec_int_note,non_sec_int_handling"
  47. sec-int-handling_layers = "sec_int_bg,legend,sec_int_note,sec_int_handling"
  48. non-sec-int-handling_opts = --size=1692x
  49. sec-int-handling_opts = --size=1570x
  50. XLAT_DIA = xlat_align.dia
  51. XLAT_PNG = xlat_align.png
  52. xlat_align_layers = "bg,translations"
  53. xlat_align_opts =
  54. RMM_DIA = rmm_cold_boot_generic.dia
  55. RMM_PNG = rmm_cold_boot_generic.png
  56. rmm_cold_boot_generic_layers = "background"
  57. rmm_cold_boot_generic_opts =
  58. RMM_EL3_MANIFEST_DIA = rmm_el3_manifest_struct.dia
  59. RMM_EL3_MANIFEST_PNG = rmm_el3_manifest_struct.png
  60. rmm_el3_manifest_struct_layers = "Background"
  61. rmm_el3_manifest_struct_opts =
  62. PSA_FWU_DIA = PSA-FWU.dia
  63. PSA_FWU_PNG = PSA-FWU.png
  64. FWU-update_struct_layers = "background"
  65. FWU-update_struct_opts =
  66. MB_DESIGN_DIA = measured_boot_design.dia
  67. MB_DESIGN_PNG = measured_boot_design.png
  68. measured_boot_design_layers = "background"
  69. measured_boot_design_opts =
  70. all:$(RESET_PNGS) $(INT_PNGS) $(XLAT_PNG) $(RMM_PNG) $(RMM_EL3_MANIFEST_PNG) $(PSA_FWU_PNG) $(MB_DESIGN_PNG)
  71. $(RESET_PNGS):$(RESET_DIA)
  72. $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<)
  73. $(INT_PNGS):$(INT_DIA)
  74. $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<)
  75. $(XLAT_PNG):$(XLAT_DIA)
  76. $(call generate_image,$($(patsubst %.png,%_layers,$@)),$(patsubst %.png,%.svg,$@),svg,$($(patsubst %.png,%_opts,$@)),$<)
  77. inkscape -z $(patsubst %.png,%.svg,$@) -e $@ -d 45
  78. $(RMM_PNG):$(RMM_DIA)
  79. $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<)
  80. $(RMM_EL3_MANIFEST_PNG):$(RMM_EL3_MANIFEST_DIA)
  81. $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<)
  82. $(PSA_FWU_PNG):$(PSA_FWU_DIA)
  83. $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<)
  84. $(MB_DESIGN_PNG):$(MB_DESIGN_DIA)
  85. $(call generate_image,$($(patsubst %.png,%_layers,$@)),$@,png,$($(patsubst %.png,%_opts,$@)),$<)