mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
manually encode newlines on all printed commands
This way we group key value arguments: e.g.:
make \
-j 8 \
all
instead of:
make \
-j \
8 \
all
and reach CLI nirvana, while also subtly breaking several commands due to
lack of testing.
This commit is contained in:
24
build-linux
24
build-linux
@@ -66,12 +66,12 @@ Configure the kernel, but don't build it.
|
||||
else:
|
||||
cc = gcc
|
||||
common_make_args = [
|
||||
'make',
|
||||
'-j', str(args.nproc),
|
||||
'ARCH={}'.format(common.linux_arch),
|
||||
'CROSS_COMPILE={}'.format(prefix),
|
||||
'CC={}'.format(cc),
|
||||
'O={}'.format(build_dir),
|
||||
'make', common.Newline,
|
||||
'-j', str(args.nproc), common.Newline,
|
||||
'ARCH={}'.format(common.linux_arch), common.Newline,
|
||||
'CROSS_COMPILE={}'.format(prefix), common.Newline,
|
||||
'CC={}'.format(cc), common.Newline,
|
||||
'O={}'.format(build_dir), common.Newline,
|
||||
]
|
||||
if args.verbose:
|
||||
verbose = ['V=1']
|
||||
@@ -99,17 +99,17 @@ Configure the kernel, but don't build it.
|
||||
)
|
||||
common.run_cmd(
|
||||
[
|
||||
os.path.join(common.linux_src_dir, 'scripts', 'kconfig', 'merge_config.sh'),
|
||||
'-m',
|
||||
'-O', build_dir,
|
||||
os.path.join(build_dir, '.config'),
|
||||
os.path.join(common.linux_src_dir, 'scripts', 'kconfig', 'merge_config.sh'), common.Newline,
|
||||
'-m', common.Newline,
|
||||
'-O', build_dir, common.Newline,
|
||||
os.path.join(build_dir, '.config'), common.Newline,
|
||||
] +
|
||||
config_fragments
|
||||
)
|
||||
common.run_cmd(
|
||||
(
|
||||
common_make_args +
|
||||
['olddefconfig']
|
||||
['olddefconfig', common.Newline]
|
||||
),
|
||||
**common_args
|
||||
)
|
||||
@@ -117,7 +117,7 @@ Configure the kernel, but don't build it.
|
||||
common.run_cmd(
|
||||
(
|
||||
common_make_args +
|
||||
args.extra_make_args
|
||||
common.add_newlines(args.extra_make_args)
|
||||
),
|
||||
**common_args
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user