metropolis: implement and use A/B preloader
This switches over from using the EFI built-in bootloader for A/B
updates to using our own EFI preloader due to significant issues with
in-the-wild EFI implementations. It is a very minimal design relying
on a single Protobuf state file instead of EFI variables.
Change-Id: Ieebd0a8172ebe3f44c69b3e8c278c53d3fe2eeb4
Reviewed-on: https://review.monogon.dev/c/monogon/+/2203
Tested-by: Jenkins CI
Reviewed-by: Serge Bazanski <serge@monogon.tech>
diff --git a/metropolis/node/core/update/BUILD.bazel b/metropolis/node/core/update/BUILD.bazel
index e506984..3be122e 100644
--- a/metropolis/node/core/update/BUILD.bazel
+++ b/metropolis/node/core/update/BUILD.bazel
@@ -1,4 +1,4 @@
-load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "update",
@@ -7,6 +7,7 @@
visibility = ["//visibility:public"],
deps = [
"//metropolis/node/build/mkimage/osimage",
+ "//metropolis/node/core/abloader/spec",
"//metropolis/pkg/blockdev",
"//metropolis/pkg/efivarfs",
"//metropolis/pkg/gpt",
@@ -15,17 +16,7 @@
"@com_github_cenkalti_backoff_v4//:backoff",
"@org_golang_google_grpc//codes",
"@org_golang_google_grpc//status",
+ "@org_golang_google_protobuf//proto",
"@org_golang_x_sys//unix",
],
)
-
-go_test(
- name = "update_test",
- srcs = ["update_test.go"],
- embed = [":update"],
- deps = [
- "//metropolis/pkg/efivarfs",
- "//metropolis/pkg/gpt",
- "@com_github_google_uuid//:uuid",
- ],
-)