mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 11:41:35 +01:00
Get rid of out/common, make buildroot, qemu, gem5 in out/
Rationale: previously we had archs on toplevel, e.g. out/x86_64 However, host tools like QEMU and gem5 can reuse a lot of the common build files across archs. Therefore, we save space and time by putting them into a single directory. Therefore, the toplevel out/x86_64 was inconsistent, better put arch inside guest tools that need separate build trees instead, e.g. out/buildroot/x86_64/ Also common was pretty obscure as a name to say the best.
This commit is contained in:
11
build
11
build
@@ -69,7 +69,7 @@ def main(args, extra_args=None):
|
||||
subprocess.check_call(
|
||||
[
|
||||
'make',
|
||||
'O={}'.format(common.buildroot_out_dir),
|
||||
'O={}'.format(common.buildroot_build_dir),
|
||||
'BR2_EXTERNAL={}'.format(br2_external_str),
|
||||
defconfig,
|
||||
],
|
||||
@@ -172,7 +172,7 @@ def main(args, extra_args=None):
|
||||
subprocess.check_call(
|
||||
[
|
||||
'make',
|
||||
'O={}'.format(common.buildroot_out_dir),
|
||||
'O={}'.format(common.buildroot_build_dir),
|
||||
'olddefconfig',
|
||||
],
|
||||
cwd=common.buildroot_src_dir,
|
||||
@@ -195,18 +195,19 @@ def main(args, extra_args=None):
|
||||
[
|
||||
'make',
|
||||
'GEM5_LKMC_SRCDIR="{}"'.format(common.gem5_src_dir),
|
||||
'O={}'.format(common.buildroot_out_dir),
|
||||
'O={}'.format(common.buildroot_build_dir),
|
||||
'V={}'.format(int(args.verbose)),
|
||||
] +
|
||||
extra_make_args +
|
||||
['all']
|
||||
,
|
||||
out_file=os.path.join(common.out_arch_dir, 'buildroot.log'),
|
||||
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.
|
||||
# Create the qcow2 from ext2. This is optional, because gem5
|
||||
# does not need the qcow2.
|
||||
if os.path.exists(common.qemu_img_executable):
|
||||
assert common.run_cmd([
|
||||
common.qemu_img_executable,
|
||||
|
||||
Reference in New Issue
Block a user