Merge changes from topic "storage-manager"

* changes:
  build: track MailboxDriver unit tests moved to SecurityCoordinator
  build/nexus: expand builtins into ext_flash.tar
diff --git a/platforms/nexus/matcha_hw.mk b/platforms/nexus/matcha_hw.mk
index 3338b49..8b5cd09 100644
--- a/platforms/nexus/matcha_hw.mk
+++ b/platforms/nexus/matcha_hw.mk
@@ -89,13 +89,13 @@
 matcha_kelvin_fpga_tarballs: kelvin_sw | $(MATCHA_FPGA_KELVIN_BINARY_DIR)
 	cd $(MATCHA_SRC_DIR) && \
 	  bazel build --define DISABLE_VERILATOR_BUILD=true \
-			//sw/device/tests/kelvin/fpga_tests/...
+			@kelvin-binary//...
 # Copy the tarballs and sc binary to out/.
 	cd $(MATCHA_SRC_DIR) && \
-		find "bazel-out/" -type f -wholename "*fastbuild-*/sw/device/tests/kelvin/fpga_tests/*.bin" |\
+		find "bazel-out/" -type f -wholename "*fastbuild-*/sw/device/tests/kelvin/fpga_tests/kelvin_test_sc_extflash_fpga_nexus.bin" |\
 			xargs -I {} cp -f {} "$(MATCHA_FPGA_KELVIN_BINARY_DIR)"
 	cd $(MATCHA_SRC_DIR) && \
-		find "bazel-bin/sw/device/tests/kelvin/fpga_tests" -name "*.tar" |\
+		find "bazel-bin/external/kelvin-binary" -name "*.tar" |\
 			xargs -I {} cp -f {} "$(MATCHA_FPGA_KELVIN_BINARY_DIR)"
 
 
diff --git a/platforms/nexus/setup.sh b/platforms/nexus/setup.sh
index 16ed12c..3d03417 100644
--- a/platforms/nexus/setup.sh
+++ b/platforms/nexus/setup.sh
@@ -64,22 +64,38 @@
 
 function sim_kelvin
 {
-    # check input file to use kelvin_sim or renode wrapper
+    # Run the ELF/Bin program with kelvin_sim
     local bin_file=$(realpath $1)
     local magic_bytes=$(xxd -p -l 4 "${bin_file}")
+    local -a flags=()
+    local is_elf=false
     if [[ ${magic_bytes} == "7f454c46" ]]; then
-        local flag=""
-        if [[ "$2" == "debug" ]]; then
-            flag="-i"
-        fi
-        ("${OUT}/kelvin/sim/kelvin_sim" "${bin_file}" ${flag})
+      is_elf=true
     else
-        local command="start;"
-        if [[ "$2" == "debug" ]]; then
-            command="machine StartGdbServer 3333;"
-        fi
-        (cd "${ROOTDIR}" && renode -e "\$bin=@${bin_file}; i @sim/config/kelvin.resc; \
-        ${command} sysbus.vec_controlblock WriteDoubleWord 0xc 0" \
-            --disable-xwt --console)
+      flags+=("--entry_point 0 ")
     fi
+
+    if [[ "$2" == "debug" ]]; then
+        flags+=("-i")
+        if [[ "${is_elf}" == false ]]; then
+            echo "debug mode only works on ELF files"
+            return 1
+        fi
+    fi
+
+    ("${OUT}/kelvin/sim/kelvin_sim" "${bin_file}" ${flags[@]})
+}
+
+function sim_kelvin_renode
+{
+    # Run the Bin program with renode
+    local bin_file=$(realpath $1)
+    local command="start;"
+    if [[ "$2" == "debug" ]]; then
+        command="machine StartGdbServer 3333;"
+    fi
+    (cd "${ROOTDIR}" && renode -e "\$bin=@${bin_file}; i @sim/config/kelvin.resc; \
+        ${command} sysbus.vec_controlblock WriteDoubleWord 0xc 0" \
+        --disable-xwt --console)
+
 }
diff --git a/platforms/shodan/matcha_hw.mk b/platforms/shodan/matcha_hw.mk
index 8031092..8b5cd09 100644
--- a/platforms/shodan/matcha_hw.mk
+++ b/platforms/shodan/matcha_hw.mk
@@ -89,13 +89,13 @@
 matcha_kelvin_fpga_tarballs: kelvin_sw | $(MATCHA_FPGA_KELVIN_BINARY_DIR)
 	cd $(MATCHA_SRC_DIR) && \
 	  bazel build --define DISABLE_VERILATOR_BUILD=true \
-			//sw/device/tests/kelvin/fpga_tests/...
+			@kelvin-binary//...
 # Copy the tarballs and sc binary to out/.
 	cd $(MATCHA_SRC_DIR) && \
 		find "bazel-out/" -type f -wholename "*fastbuild-*/sw/device/tests/kelvin/fpga_tests/kelvin_test_sc_extflash_fpga_nexus.bin" |\
 			xargs -I {} cp -f {} "$(MATCHA_FPGA_KELVIN_BINARY_DIR)"
 	cd $(MATCHA_SRC_DIR) && \
-		find "bazel-bin/sw/device/tests/kelvin/fpga_tests" -name "*.tar" |\
+		find "bazel-bin/external/kelvin-binary" -name "*.tar" |\
 			xargs -I {} cp -f {} "$(MATCHA_FPGA_KELVIN_BINARY_DIR)"
 
 
diff --git a/platforms/shodan/setup.sh b/platforms/shodan/setup.sh
index ff75fac..02cb66b 100644
--- a/platforms/shodan/setup.sh
+++ b/platforms/shodan/setup.sh
@@ -83,22 +83,38 @@
 
 function sim_kelvin
 {
-    # check input file to use kelvin_sim or renode wrapper
+    # Run the ELF/Bin program with kelvin_sim
     local bin_file=$(realpath $1)
     local magic_bytes=$(xxd -p -l 4 "${bin_file}")
+    local -a flags=()
+    local is_elf=false
     if [[ ${magic_bytes} == "7f454c46" ]]; then
-        local flag=""
-        if [[ "$2" == "debug" ]]; then
-            flag="-i"
-        fi
-        ("${OUT}/kelvin/sim/kelvin_sim" "${bin_file}" ${flag})
+      is_elf=true
     else
-        local command="start;"
-        if [[ "$2" == "debug" ]]; then
-            command="machine StartGdbServer 3333;"
-        fi
-        (cd "${ROOTDIR}" && renode -e "\$bin=@${bin_file}; i @sim/config/kelvin.resc; \
-        ${command} sysbus.vec_controlblock WriteDoubleWord 0xc 0" \
-            --disable-xwt --console)
+      flags+=("--entry_point 0 ")
     fi
+
+    if [[ "$2" == "debug" ]]; then
+        flags+=("-i")
+        if [[ "${is_elf}" == false ]]; then
+            echo "debug mode only works on ELF files"
+            return 1
+        fi
+    fi
+
+    ("${OUT}/kelvin/sim/kelvin_sim" "${bin_file}" ${flags[@]})
+}
+
+function sim_kelvin_renode
+{
+    # Run the Bin program with renode
+    local bin_file=$(realpath $1)
+    local command="start;"
+    if [[ "$2" == "debug" ]]; then
+        command="machine StartGdbServer 3333;"
+    fi
+    (cd "${ROOTDIR}" && renode -e "\$bin=@${bin_file}; i @sim/config/kelvin.resc; \
+        ${command} sysbus.vec_controlblock WriteDoubleWord 0xc 0" \
+        --disable-xwt --console)
+
 }