mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 19:51:35 +01:00
build-linux and build-gem5 seem to work
This commit is contained in:
12
build-m5
12
build-m5
@@ -19,25 +19,25 @@ class M5Component(common.Component):
|
||||
'-f', 'Makefile.{}'.format(arch), LF,
|
||||
'CC={}'.format(cc), LF,
|
||||
'LD={}'.format(ld), LF,
|
||||
'PWD={}'.format(common.gem5_m5_source_dir), LF,
|
||||
'PWD={}'.format(kwargs['gem5_m5_source_dir']), LF,
|
||||
]
|
||||
|
||||
def do_build(self, args):
|
||||
os.makedirs(common.gem5_m5_build_dir, exist_ok=True)
|
||||
os.makedirs(kwargs['gem5_m5_build_dir'], exist_ok=True)
|
||||
# We must clean first or else the build outputs of one arch can conflict with the other.
|
||||
# I should stop being lazy and go actually patch gem5 to support out of tree m5 build...
|
||||
self.clean(args)
|
||||
self.sh.run_cmd(
|
||||
self.get_make_cmd(args),
|
||||
cwd=common.gem5_m5_source_dir,
|
||||
cwd=kwargs['gem5_m5_source_dir'],
|
||||
)
|
||||
os.makedirs(common.out_rootfs_overlay_bin_dir, exist_ok=True)
|
||||
self.sh.cp(os.path.join(common.gem5_m5_source_dir, 'm5'), common.out_rootfs_overlay_bin_dir)
|
||||
os.makedirs(kwargs['out_rootfs_overlay_bin_dir'], exist_ok=True)
|
||||
self.sh.cp(os.path.join(kwargs['gem5_m5_source_dir'], 'm5'), kwargs['out_rootfs_overlay_bin_dir'])
|
||||
|
||||
def clean(self, args):
|
||||
self.sh.run_cmd(
|
||||
self.get_make_cmd(args) + ['clean', LF],
|
||||
cwd=common.gem5_m5_source_dir,
|
||||
cwd=kwargs['gem5_m5_source_dir'],
|
||||
)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user