| load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") | 
 | load("//metropolis/node/build/mkucode:def.bzl", "cpio_ucode") | 
 | load("//build/static_binary_tarball:def.bzl", "static_binary_tarball") | 
 |  | 
 | go_library( | 
 |     name = "takeover_lib", | 
 |     srcs = ["takeover.go"], | 
 |     embedsrcs = [ | 
 |         "//third_party/linux",  #keep | 
 |         ":ucode",  #keep | 
 |         "//cloud/agent:initramfs",  #keep | 
 |     ], | 
 |     importpath = "source.monogon.dev/cloud/takeover", | 
 |     visibility = ["//visibility:private"], | 
 |     deps = [ | 
 |         "//cloud/agent/api", | 
 |         "//metropolis/pkg/bootparam", | 
 |         "//metropolis/pkg/kexec", | 
 |         "//net/dump", | 
 |         "//net/proto", | 
 |         "@com_github_cavaliergopher_cpio//:cpio", | 
 |         "@com_github_pierrec_lz4_v4//:lz4", | 
 |         "@org_golang_google_protobuf//proto", | 
 |         "@org_golang_x_sys//unix", | 
 |     ], | 
 | ) | 
 |  | 
 | go_binary( | 
 |     name = "takeover", | 
 |     embed = [":takeover_lib"], | 
 |     visibility = ["//visibility:public"], | 
 | ) | 
 |  | 
 | cpio_ucode( | 
 |     name = "ucode", | 
 |     ucode = { | 
 |         "@linux-firmware//:amd_ucode": "AuthenticAMD", | 
 |         "@intel_ucode//:fam6h": "GenuineIntel", | 
 |     }, | 
 | ) | 
 |  | 
 | # Used by container_images, forces a static build of the test_agent. | 
 | static_binary_tarball( | 
 |     name = "takeover_layer", | 
 |     executable = ":takeover", | 
 |     visibility = ["//visibility:public"], | 
 | ) |