-do_ipl_opt_compile_agl-refhw-h3 () {
- oe_runmake distclean
- oe_runmake bl2 bl31 dummytool PLAT=${PLATFORM} ${EXTRA_ATFW_OPT} ${ATFW_OPT_LOSSY} ${EMMC_BOOT_OPTION} ${DDR_8G_OPTION}
+# Need to prepend the compile tasks with a distclean that actually cleans
+# out all the platform specific files like the new rcar_layout_tool output,
+# otherwise they do not get rebuilt and board builds can get the wrong
+# version of e.g. cert_headers_sa6. This needs to be addressed with
+# upstream.
+#
+
+do_compile_prepend() {
+ oe_runmake distclean PLAT=${PLATFORM} MBEDTLS_COMMON_MK=1 ${ATFW_OPT}
+}
+
+do_ipl_opt_compile_prepend() {
+ oe_runmake distclean PLAT=${PLATFORM} MBEDTLS_COMMON_MK=1 ${ATFW_OPT}
+}
+
+do_extra_ipl_opt_refhw_fixup() {
+ # Rename agl-refhw-h3 firmware files to drop h3ulcb-
+ for f in ${DEPLOYDIR}/*-h3ulcb-agl-refhw-4x2g*; do
+ n=`basename $f | sed 's/h3ulcb-//'`
+ mv -f $f ${DEPLOYDIR}/$n
+ done