Build core with separate initramfs
Build the initramfs separately and include it via mkimage. Also includes
a patch to the kernel which adds support for hardcoded cmdline
to the Linux efistub.
This lowers build times by a lot, for normal changes they are now
below 5s
Test Plan: Ran `bazel run //core/scripts:launch`
X-Origin-Diff: phab/D245
GitOrigin-RevId: 206c7c5c979c10ffd25c36dfefd8b9290a6a3f43
diff --git a/core/BUILD b/core/BUILD
index d9ed017..edced0a 100644
--- a/core/BUILD
+++ b/core/BUILD
@@ -1,15 +1,18 @@
genrule(
name = "image",
srcs = [
- "@//core/cmd/mkimage",
- "@//core/build/linux_kernel:image",
+ "@//core/build/linux_kernel:bzImage",
+ "@//core/build/linux_kernel:initramfs",
],
outs = [
"smalltown.img",
],
cmd = """
- $(location @//core/cmd/mkimage) $(location @//core/build/linux_kernel:image) $@
+ $(location @//core/cmd/mkimage) $(location @//core/build/linux_kernel:bzImage) $@ $(location @//core/build/linux_kernel:initramfs)
""",
+ tools = [
+ "@//core/cmd/mkimage",
+ ],
visibility = ["//visibility:public"],
)