|  | load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") | 
|  | load("//metropolis/node/build:def.bzl", "node_initramfs") | 
|  | load("//metropolis/node/build/genosrelease:defs.bzl", "os_release") | 
|  | load("//metropolis/node/build:efi.bzl", "efi_unified_kernel_image") | 
|  |  | 
|  | go_library( | 
|  | name = "installer_lib", | 
|  | srcs = ["main.go"], | 
|  | importpath = "source.monogon.dev/metropolis/installer", | 
|  | visibility = ["//visibility:private"], | 
|  | deps = [ | 
|  | "//metropolis/node/build/mkimage/osimage", | 
|  | "//metropolis/pkg/efivarfs", | 
|  | "//metropolis/pkg/sysfs", | 
|  | "@org_golang_x_sys//unix", | 
|  | ], | 
|  | ) | 
|  |  | 
|  | go_binary( | 
|  | name = "installer", | 
|  | embed = [":installer_lib"], | 
|  | visibility = ["//visibility:private"], | 
|  | ) | 
|  |  | 
|  | node_initramfs( | 
|  | name = "initramfs", | 
|  | files = { | 
|  | "//metropolis/installer": "/init", | 
|  | }, | 
|  | fsspecs = [ | 
|  | "//metropolis/node/build:earlydev.fsspec", | 
|  | ], | 
|  | visibility = ["//metropolis/installer/test:__pkg__"], | 
|  | ) | 
|  |  | 
|  | os_release( | 
|  | name = "installer-release-info", | 
|  | os_id = "metropolis-installer", | 
|  | os_name = "Metropolis Installer", | 
|  | stamp_var = "STABLE_METROPOLIS_version", | 
|  | ) | 
|  |  | 
|  | efi_unified_kernel_image( | 
|  | name = "kernel", | 
|  | cmdline = "console=ttyS0,115200 console=tty0 quiet", | 
|  | initrd = [ | 
|  | "//metropolis/node:ucode", | 
|  | ":initramfs", | 
|  | ], | 
|  | kernel = "//third_party/linux", | 
|  | os_release = ":installer-release-info", | 
|  | visibility = ["//visibility:public"], | 
|  | ) |