image_types_gbmc_dynamic: Fix add_partition_info_fitimage on multi DTB
Fix the issue when using multiple DTB, the do_generated_static will
failed to different FIT size because the sed changed to wrong dtb.
Tested: Build on two different platforms, Both clean and append build
Passed.
Fusion-Link:
https://fusion2.corp.google.com/6856b3c3-78a8-3435-902d-48352cbfaf31
https://fusion2.corp.google.com/c3ce8373-14f2-3023-aeeb-cc28062149b3
https://fusion2.corp.google.com/c83f7060-620e-3a74-bc10-e5a917b0e179
https://fusion2.corp.google.com/f12b3a24-985a-3db2-9f5e-a64c10202bfd
Google-Bug-Id: 435560558
Change-Id: Ic2b0b456aef3e52a022a9858510284f8cf2da1d0
Signed-off-by: Steven Cho <cho.steven@inventec.corp-partner.google.com>
diff --git a/classes/image_types_gbmc_dynamic.bbclass b/classes/image_types_gbmc_dynamic.bbclass
index 2d00f77..129a9cf 100644
--- a/classes/image_types_gbmc_dynamic.bbclass
+++ b/classes/image_types_gbmc_dynamic.bbclass
@@ -2,11 +2,12 @@
add_partition_info_fitimage() {
cd ${DEPLOY_DIR_IMAGE}
+ sed -e 's,"linux.bin","fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}",' \
+ -i fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}
for dtb in ${KERNEL_DEVICETREE}; do
dtb=$(basename $dtb)
dts=${dtb%.*}.dts
- sed -e 's,"linux.bin","fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}",' \
- -e "s,\"arch/.*.dtb\",\"$dtb\"," \
+ sed -e "s,\"arch/.*${dtb}\",\"$dtb\"," \
-i fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}
dtc $dtb > $dts
rexpr() {