osbase/build/mkimage: replace embedsrc abloader reference with argument
rules_rust things that our abloader target itself is an exec target
because it is included as embedsrc inside mkimage. To prevent this wrong
detection we provide it as runfile like the kernel and rootfs. This is
a preparation for updating rust to the current stable version, as it
requires specific overrides to work correctly with our efi toolchain.
Change-Id: I78de6a15570a81d9f673702ec4e50954d604117d
Reviewed-on: https://review.monogon.dev/c/monogon/+/3598
Tested-by: Jenkins CI
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/osbase/build/mkimage/def.bzl b/osbase/build/mkimage/def.bzl
index 1663e3d..3f9327b 100644
--- a/osbase/build/mkimage/def.bzl
+++ b/osbase/build/mkimage/def.bzl
@@ -8,12 +8,15 @@
ctx.file.kernel.path,
"-system",
ctx.file.system.path,
+ "-abloader",
+ ctx.file.abloader.path,
"-out",
img_file.path,
],
inputs = [
ctx.file.kernel,
ctx.file.system,
+ ctx.file.abloader,
],
outputs = [img_file],
)
@@ -23,7 +26,7 @@
node_image = rule(
implementation = _node_image_impl,
doc = """
- Build a disk image from an EFI kernel payload and system partition
+ Build a disk image from an EFI kernel payload, ABLoader and system partition
contents. See //osbase/build/mkimage for more information.
""",
attrs = {
@@ -37,6 +40,11 @@
mandatory = True,
allow_single_file = True,
),
+ "abloader": attr.label(
+ doc = "ABLoader binary",
+ mandatory = True,
+ allow_single_file = True,
+ ),
"_mkimage": attr.label(
doc = "The mkimage executable.",
default = "//osbase/build/mkimage",