blob: 2a52fe3837b97f215db8e8e2dc3ce8f6814f37e1 [file] [log] [blame]
Serge Bazanski731d00a2020-02-03 19:08:07 +01001genrule(
2 name = "bzImage",
3 srcs = [
4 "@linux//:all",
Serge Bazanski662b5b32020-12-21 13:49:00 +01005 "linux-metropolis.config",
Serge Bazanski731d00a2020-02-03 19:08:07 +01006 ],
7 outs = [
8 "bzImage",
9 ],
10 cmd = """
11 DIR=external/linux
12
13 mkdir $$DIR/.bin
14
Serge Bazanski662b5b32020-12-21 13:49:00 +010015 cp $(location linux-metropolis.config) $$DIR/.config
Serge Bazanski731d00a2020-02-03 19:08:07 +010016
17 (cd $$DIR && make -j $$(nproc) >/dev/null)
18
19 cp $$DIR/arch/x86/boot/bzImage $(RULEDIR)
20 """,
21 visibility = ["//visibility:public"],
22)
Lorenz Brun547b33f2020-04-23 15:27:06 +020023
24filegroup(
25 name = "kernel-config",
Serge Bazanski662b5b32020-12-21 13:49:00 +010026 srcs = ["linux-metropolis.config"],
Lorenz Brun547b33f2020-04-23 15:27:06 +020027 visibility = ["//visibility:public"],
28)