mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
gem5: put m5 back in path, was in lkmc/bin/m5
It is a dilemma to do this or not, since all other test execs are not in /bin, but I'll go with "this is not just a random test program" for now. Let's see. Checkpointing: correctly sort fs.py checkpoints numerically, was only working previously due to coincidence.
This commit is contained in:
@@ -918,7 +918,7 @@ Incompatible archs are skipped.
|
|||||||
# Overlay.
|
# Overlay.
|
||||||
env['out_rootfs_overlay_dir'] = join(env['out_dir'], 'rootfs_overlay', env['arch'])
|
env['out_rootfs_overlay_dir'] = join(env['out_dir'], 'rootfs_overlay', env['arch'])
|
||||||
env['out_rootfs_overlay_lkmc_dir'] = join(env['out_rootfs_overlay_dir'], env['repo_short_id'])
|
env['out_rootfs_overlay_lkmc_dir'] = join(env['out_rootfs_overlay_dir'], env['repo_short_id'])
|
||||||
env['out_rootfs_overlay_bin_dir'] = join(env['out_rootfs_overlay_lkmc_dir'], 'bin')
|
env['out_rootfs_overlay_bin_dir'] = join(env['out_rootfs_overlay_dir'], 'bin')
|
||||||
|
|
||||||
# Baremetal.
|
# Baremetal.
|
||||||
env['baremetal_source_dir'] = join(env['root_dir'], 'baremetal')
|
env['baremetal_source_dir'] = join(env['root_dir'], 'baremetal')
|
||||||
|
|||||||
5
run
5
run
@@ -464,11 +464,12 @@ Extra options to append at the end of the emulator command line.
|
|||||||
cmd.extend(['--options', self.env['userland_args'], LF])
|
cmd.extend(['--options', self.env['userland_args'], LF])
|
||||||
else:
|
else:
|
||||||
if self.env['gem5_script'] == 'fs':
|
if self.env['gem5_script'] == 'fs':
|
||||||
# TODO port
|
|
||||||
if self.env['gem5_restore'] is not None:
|
if self.env['gem5_restore'] is not None:
|
||||||
|
# https://github.com/cirosantilli/linux-kernel-module-cheat#gem5-checkpoint-internals
|
||||||
cpt_dirs = self.gem5_list_checkpoint_dirs()
|
cpt_dirs = self.gem5_list_checkpoint_dirs()
|
||||||
cpt_dir = cpt_dirs[-self.env['gem5_restore']]
|
cpt_dir = cpt_dirs[-self.env['gem5_restore']]
|
||||||
extra_emulator_args.extend(['-r', str(sorted(cpt_dirs).index(cpt_dir) + 1)])
|
cpt_dirs_sorted_by_tick = sorted(cpt_dirs, key=lambda x: int(x.split('.')[1]))
|
||||||
|
extra_emulator_args.extend(['-r', str(cpt_dirs_sorted_by_tick.index(cpt_dir) + 1)])
|
||||||
cmd.extend([
|
cmd.extend([
|
||||||
self.env['gem5_fs_file'], LF,
|
self.env['gem5_fs_file'], LF,
|
||||||
'--disk-image', self.env['disk_image'], LF,
|
'--disk-image', self.env['disk_image'], LF,
|
||||||
|
|||||||
Reference in New Issue
Block a user