constellation/image/system/BUILD.bazel
3u13r 1f887c7868
image: re-enable autologin for debug and console images (#3355)
* image: remove autologin via mkosi

In mkosi v24 --autologin no longer works for ttyS consoles. Since the CSPs use those exclusively for their serial consoles, we need to replace this with another solution (see next commit)

* image: add getty systemd unit for debug images

This replaces the mkosi --autologin solution with a getty systemd unit for ttyS0.
Note that both console and debug images hace their consoles enabled.
2024-09-17 14:07:28 +02:00

109 lines
2.7 KiB
Python

load("//bazel/mkosi:mkosi_image.bzl", "mkosi_image")
load("//bazel/osimage:upload_os_images.bzl", "upload_os_images")
load(":variants.bzl", "CSPS", "STREAMS", "VARIANTS", "base_image", "constellation_packages", "images_for_csp", "images_for_csp_and_stream", "images_for_stream", "kernel_command_line", "kernel_command_line_dict")
[
mkosi_image(
name = variant["csp"] + "_" + variant["attestation_variant"] + "_" + stream,
srcs = [
"mkosi.postinst",
] + glob([
"mkosi.repart/**",
]),
base_trees = [
base_image(
variant["csp"],
variant["attestation_variant"],
stream,
),
],
extra_trees = constellation_packages(stream),
initrds = [
"//image/initrd",
],
kernel_command_line = kernel_command_line(
variant["csp"],
variant["attestation_variant"],
stream,
),
kernel_command_line_dict = kernel_command_line_dict(
variant["csp"],
variant["attestation_variant"],
stream,
),
mkosi_conf = "mkosi.conf",
out_dir = variant["csp"] + "_" + variant["attestation_variant"] + "_" + stream,
tags = [
"manual",
"no-cache",
],
version_file = "//bazel/settings:tag",
visibility = ["//visibility:public"],
)
for variant in VARIANTS
for stream in STREAMS
]
[
upload_os_images(
name = "upload_" + variant["csp"] + "_" + variant["attestation_variant"] + "_" + stream,
image_dirs = [":" + variant["csp"] + "_" + variant["attestation_variant"] + "_" + stream],
tags = [
"manual",
],
)
for variant in VARIANTS
for stream in STREAMS
]
[
filegroup(
name = stream,
srcs = images_for_stream(stream),
tags = [
"manual",
"no-cache",
],
visibility = ["//visibility:public"],
)
for stream in STREAMS
]
[
upload_os_images(
name = "upload_" + stream,
image_dirs = [":" + stream],
tags = [
"manual",
],
)
for stream in STREAMS
]
[
filegroup(
name = csp,
srcs = images_for_csp(csp),
tags = [
"manual",
"no-cache",
],
visibility = ["//visibility:public"],
)
for csp in CSPS
]
[
filegroup(
name = csp + "_" + stream,
srcs = images_for_csp_and_stream(csp, stream),
tags = [
"manual",
"no-cache",
],
visibility = ["//visibility:public"],
)
for csp in CSPS
for stream in STREAMS
]