Move linux to //third_party.
Test Plan: refactor of build system, should be covered by existing tests
X-Origin-Diff: phab/D367
GitOrigin-RevId: 603c61bfadadfbd66c0ce31f05f6748251bea9f3
diff --git a/third_party/linux/BUILD.bazel b/third_party/linux/BUILD.bazel
new file mode 100644
index 0000000..3829f96
--- /dev/null
+++ b/third_party/linux/BUILD.bazel
@@ -0,0 +1,22 @@
+genrule(
+ name = "bzImage",
+ srcs = [
+ "@linux//:all",
+ "linux-smalltown.config",
+ ],
+ outs = [
+ "bzImage",
+ ],
+ cmd = """
+ DIR=external/linux
+
+ mkdir $$DIR/.bin
+
+ cp $(location linux-smalltown.config) $$DIR/.config
+
+ (cd $$DIR && make -j $$(nproc) >/dev/null)
+
+ cp $$DIR/arch/x86/boot/bzImage $(RULEDIR)
+ """,
+ visibility = ["//visibility:public"],
+)