HACK: mt8183: config: use aprop to control bootflow

Add extra logic in the mmcboot command do decide whether we should boot:
- Main Android (default)
- RecoveryOS

Note: this is a HACK, as we should not be modifying the userdata
partition from within the bootloader.

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
diff --git a/include/configs/mt8183.h b/include/configs/mt8183.h
index 4e2af3c..71d754e 100644
--- a/include/configs/mt8183.h
+++ b/include/configs/mt8183.h
@@ -66,6 +66,14 @@
 				"bootm ${loadaddr};" \
 			 "fi;" \
 		"fi;" \
+		"if aprop load ${mmcdev} userdata; then " \
+			"if aprop test persist.sys.boot.reason = recovery; then " \
+				"aprop set persist.sys.boot.reason none; aprop store;" \
+				"run load_dtb;" \
+				"run load_recoveryimg;" \
+				"bootm ${loadaddr};" \
+			"fi;" \
+		"fi;" \
 		"run load_dtb;" \
 		"run load_bootimg;" \
 		"bootm ${loadaddr}; \0"