Add RBC board configuration

This does largely the same thing as in product configuration,
it converts the board makefiles and evaluates them in place
of an $(include).

Bug: 201700692
Test: Temporarily replace the ifndef RBC_BOARD_CONFIG with RBC_PRODUCT_CONFIG,
      then ./build/bazel/ci/rbc_product_config.sh aosp_arm64-userdebug
Change-Id: I91c3dd6b91cf6bfeb18a5fff95d53b7a2c113c57
diff --git a/core/board_config.mk b/core/board_config.mk
index 281ab16..0ad49c8 100644
--- a/core/board_config.mk
+++ b/core/board_config.mk
@@ -184,7 +184,20 @@
   .KATI_READONLY := TARGET_DEVICE_DIR
 endif
 
+# TODO(colefaust) change this if to RBC_PRODUCT_CONFIG when
+# the board configuration is known to work on everything
+# the product config works on.
+ifndef RBC_BOARD_CONFIG
 include $(board_config_mk)
+else
+  rc := $(shell build/soong/scripts/rbc-run $(board_config_mk) \
+      BUILDING_GSI=$(BUILDING_GSI) >$(OUT_DIR)/rbcboardtemp.mk || echo $$?)
+  ifneq (,$(rc))
+    $(error board configuration converter failed: $(rc))
+  endif
+
+  include $(OUT_DIR)/rbcboardtemp.mk
+endif
 
 ifneq (,$(and $(TARGET_ARCH),$(TARGET_ARCH_SUITE)))
   $(error $(board_config_mk) erroneously sets both TARGET_ARCH and TARGET_ARCH_SUITE)