meta-nuvoton: npcm8xx-igps: use sed instead of patch

This method is less likely to break and require fixes when Nuvoton
adjusts the XML files.

Tested: Still able to build successfully
Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Change-Id: Ib8e67b67cd837d1d5510ab326012d0644b3a2780
diff --git a/meta-nuvoton/recipes-bsp/images/npcm8xx-igps.inc b/meta-nuvoton/recipes-bsp/images/npcm8xx-igps.inc
index c4202e4..5d64d17 100644
--- a/meta-nuvoton/recipes-bsp/images/npcm8xx-igps.inc
+++ b/meta-nuvoton/recipes-bsp/images/npcm8xx-igps.inc
@@ -7,13 +7,17 @@
 IGPS_BRANCH ?= "main"
 SRC_URI = " \
     git://github.com/Nuvoton-Israel/igps-npcm8xx;branch=${IGPS_BRANCH};protocol=https \
-    file://0001-Adjust-paths-for-use-with-Bitbake.patch \
 "
 
 S = "${WORKDIR}/git"
 
 DEST = "${D}${datadir}/${BPN}"
 
+# Adjust paths for use with bitbake
+do_patch() {
+	sed -i -e 's,inputs/,,g' ${S}/py_scripts/ImageGeneration/{references,inputs}/*.xml
+}
+
 do_install() {
 	install -d ${DEST}
 	install py_scripts/ImageGeneration/references/BootBlockAndHeader_${DEVICE_GEN}_${IGPS_MACHINE}.xml ${DEST}
diff --git a/meta-nuvoton/recipes-bsp/images/npcm8xx-igps/0001-Adjust-paths-for-use-with-Bitbake.patch b/meta-nuvoton/recipes-bsp/images/npcm8xx-igps/0001-Adjust-paths-for-use-with-Bitbake.patch
deleted file mode 100644
index 1a50151..0000000
--- a/meta-nuvoton/recipes-bsp/images/npcm8xx-igps/0001-Adjust-paths-for-use-with-Bitbake.patch
+++ /dev/null
@@ -1,221 +0,0 @@
-From 0df2a196a65d796211cf32db49adfd1f62e997e3 Mon Sep 17 00:00:00 2001
-From: Anthony <anthonyhkf@google.com>
-Date: Fri, 7 Oct 2022 15:24:00 +0800
-Subject: [PATCH] Adjust paths for use with Bitbake
-
-Signed-off-by: Tim Lee <timlee660101@gmail.com>
-Signed-off-by: Anthony <anthonyhkf@google.com>
----
- py_scripts/ImageGeneration/inputs/BL31_AndHeader.xml        | 6 +++---
- py_scripts/ImageGeneration/inputs/OpTeeAndHeader.xml        | 6 +++---
- .../ImageGeneration/references/BootBlockAndHeader_A1_EB.xml | 6 +++---
- .../references/BootBlockAndHeader_A1_SVB.xml                | 6 +++---
- .../ImageGeneration/references/BootBlockAndHeader_Z1_EB.xml | 6 +++---
- .../references/BootBlockAndHeader_Z1_SVB.xml                | 6 +++---
- py_scripts/ImageGeneration/references/UbootHeader_A1.xml    | 6 +++---
- py_scripts/ImageGeneration/references/UbootHeader_Z1.xml    | 6 +++---
- 8 files changed, 24 insertions(+), 24 deletions(-)
-
-diff --git a/py_scripts/ImageGeneration/inputs/BL31_AndHeader.xml b/py_scripts/ImageGeneration/inputs/BL31_AndHeader.xml
-index 4ab84c9..d9d277e 100644
---- a/py_scripts/ImageGeneration/inputs/BL31_AndHeader.xml
-+++ b/py_scripts/ImageGeneration/inputs/BL31_AndHeader.xml
-@@ -52,7 +52,7 @@
- 			<offset>0x1FC</offset>
- 			<size>0x4</size>
- 		</config>
--		<content format='FileSize'>inputs/bl31.bin</content>	<!-- content the user should fill -->
-+		<content format='FileSize'>bl31.bin</content>	<!-- content the user should fill -->
- 	</BinField>
- 
- 	<BinField>
-@@ -60,9 +60,9 @@
- 		<name>Code</name>
- 		<config>
- 			<offset>0x200</offset>
--			<size format='FileSize'>inputs/bl31.bin</size>                 <!-- size in the header calculated by tool-->
-+			<size format='FileSize'>bl31.bin</size>                 <!-- size in the header calculated by tool-->
- 		</config>
--		<content format='FileContent'>inputs/bl31.bin</content>  <!-- content the user should fill -->
-+		<content format='FileContent'>bl31.bin</content>  <!-- content the user should fill -->
- 	</BinField>
- 
- </Bin_Ecc_Map>
-diff --git a/py_scripts/ImageGeneration/inputs/OpTeeAndHeader.xml b/py_scripts/ImageGeneration/inputs/OpTeeAndHeader.xml
-index 683d647..6ac9535 100644
---- a/py_scripts/ImageGeneration/inputs/OpTeeAndHeader.xml
-+++ b/py_scripts/ImageGeneration/inputs/OpTeeAndHeader.xml
-@@ -53,7 +53,7 @@
- 			<offset>0x1FC</offset>       
- 			<size>0x4</size> 
- 		</config>
--		<content format='FileSize'>inputs/tee.bin</content>	<!-- content the user should fill -->
-+		<content format='FileSize'>tee.bin</content>	<!-- content the user should fill -->
- 	</BinField>
- 	
- 	<BinField>
-@@ -61,9 +61,9 @@
- 		<name>Code</name>             
- 		<config>
- 			<offset>0x200</offset>       
--			<size format='FileSize'>inputs/tee.bin</size>                 <!-- size in the header calculated by tool-->
-+			<size format='FileSize'>tee.bin</size>                 <!-- size in the header calculated by tool-->
- 		</config>
--		<content format='FileContent'>inputs/tee.bin</content>  <!-- content the user should fill -->
-+		<content format='FileContent'>tee.bin</content>  <!-- content the user should fill -->
- 	</BinField>
- 	
- </Bin_Ecc_Map>
-diff --git a/py_scripts/ImageGeneration/references/BootBlockAndHeader_A1_EB.xml b/py_scripts/ImageGeneration/references/BootBlockAndHeader_A1_EB.xml
-index 6bddc9d..036980b 100644
---- a/py_scripts/ImageGeneration/references/BootBlockAndHeader_A1_EB.xml
-+++ b/py_scripts/ImageGeneration/references/BootBlockAndHeader_A1_EB.xml
-@@ -548,7 +548,7 @@
- 			<offset>0x1FC</offset>       
- 			<size>0x4</size> 
- 		</config>
--		<content format='FileSize'>inputs/arbel_a35_bootblock.bin</content>	<!-- content the user should fill -->
-+		<content format='FileSize'>arbel_a35_bootblock.bin</content>	<!-- content the user should fill -->
- 	</BinField>
- 	
- 	<BinField>
-@@ -556,9 +556,9 @@
- 		<name>Code</name>             
- 		<config>
- 			<offset>0x200</offset>       
--			<size format='FileSize'>inputs/arbel_a35_bootblock.bin</size>                 <!-- size in the header calculated by tool-->
-+			<size format='FileSize'>arbel_a35_bootblock.bin</size>                 <!-- size in the header calculated by tool-->
- 		</config>
--		<content format='FileContent'>inputs/arbel_a35_bootblock.bin</content>  <!-- content the user should fill -->
-+		<content format='FileContent'>arbel_a35_bootblock.bin</content>  <!-- content the user should fill -->
- 	</BinField>
- 	
- </Bin_Ecc_Map>
-diff --git a/py_scripts/ImageGeneration/references/BootBlockAndHeader_A1_SVB.xml b/py_scripts/ImageGeneration/references/BootBlockAndHeader_A1_SVB.xml
-index e22a1f8..02968f2 100644
---- a/py_scripts/ImageGeneration/references/BootBlockAndHeader_A1_SVB.xml
-+++ b/py_scripts/ImageGeneration/references/BootBlockAndHeader_A1_SVB.xml
-@@ -548,7 +548,7 @@
- 			<offset>0x1FC</offset>       
- 			<size>0x4</size> 
- 		</config>
--		<content format='FileSize'>inputs/arbel_a35_bootblock.bin</content>	<!-- content the user should fill -->
-+		<content format='FileSize'>arbel_a35_bootblock.bin</content>	<!-- content the user should fill -->
- 	</BinField>
- 	
- 	<BinField>
-@@ -556,9 +556,9 @@
- 		<name>Code</name>             
- 		<config>
- 			<offset>0x200</offset>       
--			<size format='FileSize'>inputs/arbel_a35_bootblock.bin</size>                 <!-- size in the header calculated by tool-->
-+			<size format='FileSize'>arbel_a35_bootblock.bin</size>                 <!-- size in the header calculated by tool-->
- 		</config>
--		<content format='FileContent'>inputs/arbel_a35_bootblock.bin</content>  <!-- content the user should fill -->
-+		<content format='FileContent'>arbel_a35_bootblock.bin</content>  <!-- content the user should fill -->
- 	</BinField>
- 	
- </Bin_Ecc_Map>
-diff --git a/py_scripts/ImageGeneration/references/BootBlockAndHeader_Z1_EB.xml b/py_scripts/ImageGeneration/references/BootBlockAndHeader_Z1_EB.xml
-index c751b76..621d456 100644
---- a/py_scripts/ImageGeneration/references/BootBlockAndHeader_Z1_EB.xml
-+++ b/py_scripts/ImageGeneration/references/BootBlockAndHeader_Z1_EB.xml
-@@ -548,7 +548,7 @@
- 			<offset>0x1FC</offset>       
- 			<size>0x4</size> 
- 		</config>
--		<content format='FileSize'>inputs/arbel_a35_bootblock.bin</content>	<!-- content the user should fill -->
-+		<content format='FileSize'>arbel_a35_bootblock.bin</content>	<!-- content the user should fill -->
- 	</BinField>
- 	
- 	<BinField>
-@@ -556,9 +556,9 @@
- 		<name>Code</name>             
- 		<config>
- 			<offset>0x200</offset>       
--			<size format='FileSize'>inputs/arbel_a35_bootblock.bin</size>                 <!-- size in the header calculated by tool-->
-+			<size format='FileSize'>arbel_a35_bootblock.bin</size>                 <!-- size in the header calculated by tool-->
- 		</config>
--		<content format='FileContent'>inputs/arbel_a35_bootblock.bin</content>  <!-- content the user should fill -->
-+		<content format='FileContent'>arbel_a35_bootblock.bin</content>  <!-- content the user should fill -->
- 	</BinField>
- 	
- </Bin_Ecc_Map>
-diff --git a/py_scripts/ImageGeneration/references/BootBlockAndHeader_Z1_SVB.xml b/py_scripts/ImageGeneration/references/BootBlockAndHeader_Z1_SVB.xml
-index 0b77249..6086e66 100644
---- a/py_scripts/ImageGeneration/references/BootBlockAndHeader_Z1_SVB.xml
-+++ b/py_scripts/ImageGeneration/references/BootBlockAndHeader_Z1_SVB.xml
-@@ -547,7 +547,7 @@
- 			<offset>0x1FC</offset>       
- 			<size>0x4</size> 
- 		</config>
--		<content format='FileSize'>inputs/arbel_a35_bootblock.bin</content>	<!-- content the user should fill -->
-+		<content format='FileSize'>arbel_a35_bootblock.bin</content>	<!-- content the user should fill -->
- 	</BinField>
- 	
- 	<BinField>
-@@ -555,9 +555,9 @@
- 		<name>Code</name>             
- 		<config>
- 			<offset>0x200</offset>       
--			<size format='FileSize'>inputs/arbel_a35_bootblock.bin</size>                 <!-- size in the header calculated by tool-->
-+			<size format='FileSize'>arbel_a35_bootblock.bin</size>                 <!-- size in the header calculated by tool-->
- 		</config>
--		<content format='FileContent'>inputs/arbel_a35_bootblock.bin</content>  <!-- content the user should fill -->
-+		<content format='FileContent'>arbel_a35_bootblock.bin</content>  <!-- content the user should fill -->
- 	</BinField>
- 	
- </Bin_Ecc_Map>
-diff --git a/py_scripts/ImageGeneration/references/UbootHeader_A1.xml b/py_scripts/ImageGeneration/references/UbootHeader_A1.xml
-index 685365a..96a5de9 100644
---- a/py_scripts/ImageGeneration/references/UbootHeader_A1.xml
-+++ b/py_scripts/ImageGeneration/references/UbootHeader_A1.xml
-@@ -53,7 +53,7 @@
- 			<offset>0x1FC</offset>        <!-- offset in the header -->
- 			<size>0x4</size>              <!-- size in the header -->
- 		</config>
--		<content format='FileSize'>inputs/u-boot.bin</content>	<!-- content the user should fill -->
-+		<content format='FileSize'>u-boot.bin</content>	<!-- content the user should fill -->
- 	</BinField>
- 	
- 	<BinField>
-@@ -61,9 +61,9 @@
- 		<name>Code</name>             
- 		<config>
- 			<offset>0x200</offset>        <!-- offset in the header -->
--			<size format='FileSize'>inputs/u-boot.bin</size>                 <!-- size in the header calculated by tool-->
-+			<size format='FileSize'>u-boot.bin</size>                 <!-- size in the header calculated by tool-->
- 		</config>
--		<content format='FileContent'>inputs/u-boot.bin</content>  <!-- content the user should fill -->
-+		<content format='FileContent'>u-boot.bin</content>  <!-- content the user should fill -->
- 	</BinField>	
- 	
- 	
-diff --git a/py_scripts/ImageGeneration/references/UbootHeader_Z1.xml b/py_scripts/ImageGeneration/references/UbootHeader_Z1.xml
-index 685365a..96a5de9 100644
---- a/py_scripts/ImageGeneration/references/UbootHeader_Z1.xml
-+++ b/py_scripts/ImageGeneration/references/UbootHeader_Z1.xml
-@@ -53,7 +53,7 @@
- 			<offset>0x1FC</offset>        <!-- offset in the header -->
- 			<size>0x4</size>              <!-- size in the header -->
- 		</config>
--		<content format='FileSize'>inputs/u-boot.bin</content>	<!-- content the user should fill -->
-+		<content format='FileSize'>u-boot.bin</content>	<!-- content the user should fill -->
- 	</BinField>
- 	
- 	<BinField>
-@@ -61,9 +61,9 @@
- 		<name>Code</name>             
- 		<config>
- 			<offset>0x200</offset>        <!-- offset in the header -->
--			<size format='FileSize'>inputs/u-boot.bin</size>                 <!-- size in the header calculated by tool-->
-+			<size format='FileSize'>u-boot.bin</size>                 <!-- size in the header calculated by tool-->
- 		</config>
--		<content format='FileContent'>inputs/u-boot.bin</content>  <!-- content the user should fill -->
-+		<content format='FileContent'>u-boot.bin</content>  <!-- content the user should fill -->
- 	</BinField>	
- 	
- 	
--- 
-2.38.0.rc1.362.ged0d419d3c-goog
-