blob: b5665e262f26b7332367fd7ac030a6ae607f8cf1 [file] [log] [blame]
Leopold Schabel5c80aca2019-10-22 15:48:58 +02001genrule(
2 name = "image",
3 srcs = [
4 "@linux_kernel//:all",
5 "@//cmd/init",
6 "@//build/utils",
7 "initramfs.list",
8 "linux-smalltown.config",
9 ],
10 outs = [
11 "bzImage",
12 ],
13 cmd = """
14 DIR=external/linux_kernel
15
16 mkdir $$DIR/.bin
17
18 cp $(location linux-smalltown.config) $$DIR/.config
19 cp $(location @//cmd/init) $$DIR/.bin/init
20 cp $(locations @//build/utils) $$DIR/.bin/
21 cp $(location initramfs.list) $$DIR/initramfs.list
22
23 (cd $$DIR && make -j 16) >/dev/null
24
25 cp $$DIR/arch/x86/boot/bzImage $(RULEDIR)
26 """,
27 visibility = ["//visibility:public"],
28)