Don't pass dummy disk images to gem5

After https://gem5.atlassian.net/browse/GEM5-337:

- gem5 baremetal can run without any disk images, just like QEMU
- gem5 X86 can run with a single disk image and no horrendous dummy vmlinux
  and second disk image
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2020-02-14 00:00:00 +00:00
parent 17fba4a968
commit f2713e69f6
3 changed files with 14 additions and 27 deletions

View File

@@ -61,18 +61,7 @@ https://github.com/cirosantilli/linux-kernel-module-cheat-regression#gem5-unit-t
verbose = ['--verbose', LF]
else:
verbose = []
if self.env['arch'] == 'x86_64':
dummy_img_path = os.path.join(disks_dir, 'linux-bigswap2.img')
with open(dummy_img_path, 'wb') as dummy_img_file:
zeroes = b'\x00' * (2 ** 16)
for i in range(2 ** 10):
dummy_img_file.write(zeroes)
self.sh.run_cmd(['mkswap', dummy_img_path, LF])
with open(os.path.join(binaries_dir, 'x86_64-vmlinux-2.6.22.9'), 'w'):
# This file must always be present, despite --kernel overriding that default and selecting the kernel.
# I'm not even joking. No one has ever built x86 gem5 without the magic dist dir present.
pass
elif self.env['arch'] == 'arm' or self.env['arch'] == 'aarch64':
if self.env['is_arm']:
gem5_system_source_dir = os.path.join(self.env['gem5_source_dir'], 'system')
# dtb