mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-22 17:55:57 +01:00
common.run_cmd: assert result == 0 by default
This commit is contained in:
@@ -133,7 +133,7 @@ usually extra Buildroot targets.
|
||||
if os.path.isdir(package_dir_abs):
|
||||
br2_external_dirs.append(self._path_relative_to_buildroot(package_dir_abs))
|
||||
br2_external_str = ':'.join(br2_external_dirs)
|
||||
assert common.run_cmd(
|
||||
common.run_cmd(
|
||||
[
|
||||
'make',
|
||||
'O={}'.format(common.buildroot_build_dir),
|
||||
@@ -141,7 +141,7 @@ usually extra Buildroot targets.
|
||||
defconfig,
|
||||
],
|
||||
cwd=common.buildroot_src_dir,
|
||||
) == 0
|
||||
)
|
||||
buildroot_configs = args.buildroot_config
|
||||
buildroot_configs.extend([
|
||||
'BR2_JLEVEL={}'.format(nproc),
|
||||
@@ -241,20 +241,20 @@ usually extra Buildroot targets.
|
||||
buildroot_kernel_config_fragment_str = 'BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{}"'.format(' '.join(kernel_config_fragments))
|
||||
buildroot_configs.append(buildroot_kernel_config_fragment_str)
|
||||
common.write_configs(common.buildroot_config_file, buildroot_configs, buildroot_config_fragments)
|
||||
assert common.run_cmd(
|
||||
common.run_cmd(
|
||||
[
|
||||
'make',
|
||||
'O={}'.format(common.buildroot_build_dir),
|
||||
'olddefconfig',
|
||||
],
|
||||
cwd=common.buildroot_src_dir,
|
||||
) == 0
|
||||
)
|
||||
|
||||
# Do the actual build.
|
||||
common.make_build_dirs()
|
||||
if not args.no_all:
|
||||
extra_make_args.append('all')
|
||||
assert common.run_cmd(
|
||||
common.run_cmd(
|
||||
[
|
||||
'make',
|
||||
'LKMC_GEM5_SRCDIR="{}"'.format(common.gem5_src_dir),
|
||||
@@ -267,7 +267,7 @@ usually extra Buildroot targets.
|
||||
out_file=os.path.join(common.buildroot_build_dir, 'lkmc.log'),
|
||||
delete_env=['LD_LIBRARY_PATH'],
|
||||
cwd=common.buildroot_src_dir,
|
||||
) == 0
|
||||
)
|
||||
|
||||
# Create the qcow2 from ext2.
|
||||
# Skip if qemu is not present, because gem5 does not need the qcow2.
|
||||
|
||||
Reference in New Issue
Block a user