third_party/linux: use toolchain-bundle for linux kernel build

This contains lots of workarounds and should be migrated to a native
bazel integration.

Change-Id: Ib0a52daf3879df4d5369541475c42fa506a54328
Reviewed-on: https://review.monogon.dev/c/monogon/+/4101
Tested-by: Jenkins CI
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/third_party/linux/BUILD.bazel b/third_party/linux/BUILD.bazel
index cccc300..500a1a1 100644
--- a/third_party/linux/BUILD.bazel
+++ b/third_party/linux/BUILD.bazel
@@ -1,3 +1,4 @@
+load("//build/utils:target_info.bzl", "target_info")
 load("//third_party/linux:def.bzl", "linux_image")
 
 alias(
@@ -12,5 +13,26 @@
 linux_image(
     name = "linux",
     kernel_config = ":kconfig",
+    kernel_src = "@linux//:all",
+    visibility = ["//visibility:public"],
+)
+
+target_info(
+    name = "image_name",
+    value = select({
+        "@platforms//cpu:x86_64": "bzImage",
+        "@platforms//cpu:aarch64": "Image",
+        "@platforms//cpu:riscv64": "Image",
+    }),
+    visibility = ["//visibility:private"],
+)
+
+target_info(
+    name = "target_arch",
+    value = select({
+        "@platforms//cpu:x86_64": "x86",
+        "@platforms//cpu:aarch64": "arm64",
+        "@platforms//cpu:riscv64": "riscv64",
+    }),
     visibility = ["//visibility:public"],
 )