blob: e1301424d30e6d7464312f424263f2020a83721d [file] [log] [blame]
Leopold Schabel5c80aca2019-10-22 15:48:58 +02001genrule(
2 name = "image",
3 srcs = [
4 "@linux_kernel//:all",
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +02005 "@//core/cmd/init",
6 "@//core/build/utils",
Leopold Schabel5c80aca2019-10-22 15:48:58 +02007 "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
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020019 cp $(location @//core/cmd/init) $$DIR/.bin/init
20 cp $(locations @//core/build/utils) $$DIR/.bin/
Leopold Schabel5c80aca2019-10-22 15:48:58 +020021 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)