-
Notifications
You must be signed in to change notification settings - Fork 1
/
build_misc
executable file
·51 lines (41 loc) · 1.69 KB
/
build_misc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#! /usr/bin/env python3
import argparse
import os
import pathlib
from build_kernel import Builder
def build_cfg(cfg):
cfg_path = os.path.join(str(pathlib.Path.home()), 's/build_kernel/config', cfg)
builder = Builder(cfg_path, generate_compile_db=True, generate_pkg=False,
fail_on_stderr=True)
builder.do_build()
def main():
parser = argparse.ArgumentParser(description='Build drm-misc configs')
parser.add_argument('--nodocs', default=False, action='store_true',
help='Skip sphinx build')
parser.add_argument('--noarm', default=False, action='store_true',
help='Skip arm builds')
parser.add_argument('--nox86', default=False, action='store_true',
help='Skip x86 builds')
parser.add_argument('--noall', default=False, action='store_true',
help='Skip all*config builds')
parser.add_argument('--compile_commands', default=False, action='store_true',
help='Generate compile_commands (x86 allyesconfig)')
parser.add_argument('--compile-commands', default=False, action='store_true',
help='Generate compile_commands (x86 allyesconfig)')
args = parser.parse_args()
if args.compile_commands == True:
build_cfg('allyesconfig_x86.ini')
return
if args.noarm == False:
build_cfg('drm-misc-arm.ini')
build_cfg('drm-misc-arm64.ini')
if args.nox86 == False:
build_cfg('drm-misc-x86.ini')
#build_cfg('drm-misc-x86-nofbdev.ini')
if args.nodocs == False:
build_cfg('drm-misc-htmldocs.ini')
if args.noall == False:
build_cfg('allmodconfig_arm64.ini')
build_cfg('allyesconfig_arm64.ini')
if __name__ == '__main__':
main()