-# Unfortunately in do_extra_ipl_opt() it use d.setVar() instead of d.appendVar()
-# to setup EXTRA_ATFW_OPT variable which makes it impossible to customize it properly
-# by others... Override it.
-#
+
+# Build options for building as extra firmware when MACHINE=h3ulcb, based on H3[4x2g]
+H3ULCB[agl-refhw-4x2g] = "LSI=H3 RCAR_DRAM_SPLIT=1 ${EMMC_BOOT_OPTION} ${DDR_8G_OPTION}"
+H3ULCB[agl-refhw-4x2g-1rank] = "LSI=H3 RCAR_DRAM_SPLIT=1 ${EMMC_BOOT_OPTION} ${DDR_8G_1RANK_OPTION}"
+
+python __anonymous() {
+ # If building for MACHINE=agl-refhw-h3, the predefined default
+ # extra configurations in the base recipe are not interesting
+ # to us, as there is no compatible hardware.
+ if d.getVar("MACHINE") == "agl-refhw-h3":
+ d.delVarFlag("H3", "2x2g")
+ d.delVarFlag("H3", "4x2g")
+}
+
+# Also build the extra 1rank firmware when MACHINE=agl-refhw-h3
+H3[4x2g-1rank] = "LSI=H3 RCAR_DRAM_SPLIT=1 ${EMMC_BOOT_OPTION} ${DDR_8G_1RANK_OPTION}"
+