fix(romlib): make romlib file modification idempotent
The romlib run configs perform a find+replace on a file in TF-A.
However, that is written such that it is not idempotent - running the
configuration multiple times will stack changes on top of each other,
resulting in a file different to the one intended.
So convert this to a patch and use the regular apply_tf_patch
functionality. This has the benefit of not using the main tfa checkout
for parallel builds.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ic310c8b42d9f5a4cf8a1cf1c86198ea796202d94
diff --git a/patch/fvp_romlib_runtime/jmptbl_i_patch.patch b/patch/fvp_romlib_runtime/jmptbl_i_patch.patch
new file mode 100644
index 0000000..ba58e50
--- /dev/null
+++ b/patch/fvp_romlib_runtime/jmptbl_i_patch.patch
@@ -0,0 +1,58 @@
+diff --git i/plat/arm/board/fvp/jmptbl.i w/plat/arm/board/fvp/jmptbl.i
+index a23de733d..dfd1dda83 100644
+--- i/plat/arm/board/fvp/jmptbl.i
++++ w/plat/arm/board/fvp/jmptbl.i
+@@ -12,30 +12,30 @@
+ # lib function [patch]
+ # Example:
+ # rom rom_lib_init
+-# fdt fdt_getprop_namelen patch
++# fdt fdt_getprop_namelen patch patch
+
+ rom rom_lib_init
+-fdt fdt_getprop
+-fdt fdt_get_property
+-fdt fdt_getprop_namelen
+-fdt fdt_setprop_inplace
+-fdt fdt_check_header
+-fdt fdt_node_offset_by_compatible
+-fdt fdt_node_offset_by_prop_value
+-fdt fdt_setprop_inplace_namelen_partial
+-fdt fdt_first_subnode
+-fdt fdt_next_subnode
+-fdt fdt_path_offset
+-fdt fdt_path_offset_namelen
+-fdt fdt_subnode_offset
+-fdt fdt_address_cells
+-fdt fdt_size_cells
+-fdt fdt_parent_offset
+-fdt fdt_stringlist_search
+-fdt fdt_get_alias_namelen
+-fdt fdt_get_name
+-fdt fdt_get_alias
+-fdt fdt_node_offset_by_phandle
+-fdt fdt_add_subnode
++fdt fdt_getprop patch
++fdt fdt_get_property patch
++fdt fdt_getprop_namelen patch
++fdt fdt_setprop_inplace patch
++fdt fdt_check_header patch
++fdt fdt_node_offset_by_compatible patch
++fdt fdt_node_offset_by_prop_value patch
++fdt fdt_setprop_inplace_namelen_partial patch
++fdt fdt_first_subnode patch
++fdt fdt_next_subnode patch
++fdt fdt_path_offset patch
++fdt fdt_path_offset_namelen patch
++fdt fdt_subnode_offset patch
++fdt fdt_address_cells patch
++fdt fdt_size_cells patch
++fdt fdt_parent_offset patch
++fdt fdt_stringlist_search patch
++fdt fdt_get_alias_namelen patch
++fdt fdt_get_name patch
++fdt fdt_get_alias patch
++fdt fdt_node_offset_by_phandle patch
++fdt fdt_add_subnode patch
+ c exit
+ c atexit