gem5: also pass our custom kernel cli parameters to fs_bitLITTLE

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2021-01-08 00:00:01 +00:00
parent da06e67671
commit f767ba97de

8
run
View File

@@ -591,6 +591,8 @@ Extra options to append at the end of the emulator command line.
]) ])
cmd.extend(['--interp-dir', self.env['userland_library_dir'], LF]) cmd.extend(['--interp-dir', self.env['userland_library_dir'], LF])
else: else:
if self.env['is_arm']:
arm_kernel_cli = 'earlycon=pl011,0x1c090000 earlyprintk=pl011,0x1c090000 lpj=19988480 rw loglevel=8 mem={}'.format(memory)
if self.env['gem5_script'] == 'fs': if self.env['gem5_script'] == 'fs':
cmd.extend([ cmd.extend([
self.env['gem5_fs_file'], LF, self.env['gem5_fs_file'], LF,
@@ -611,7 +613,7 @@ Extra options to append at the end of the emulator command line.
if self.env['kvm']: if self.env['kvm']:
cmd.extend(['--cpu-type', 'X86KvmCPU', LF]) cmd.extend(['--cpu-type', 'X86KvmCPU', LF])
if not self.env['baremetal']: if not self.env['baremetal']:
cmd.extend(['--command-line', 'earlycon={} earlyprintk={} lpj=7999923 root=/dev/sda {}'.format(console, console, kernel_cli), LF]) cmd.extend(['--command-line', 'earlycon={} earlyprintk={} lpj=7999923 root=/dev/sda {}'.format(arm_kernel_cli, console, console, kernel_cli), LF])
elif self.env['is_arm']: elif self.env['is_arm']:
if self.env['kvm']: if self.env['kvm']:
cmd.extend(['--cpu-type', 'ArmV8KvmCPU', LF]) cmd.extend(['--cpu-type', 'ArmV8KvmCPU', LF])
@@ -627,7 +629,7 @@ Extra options to append at the end of the emulator command line.
'--command-line', '--command-line',
# TODO why is it mandatory to pass mem= here? Not true for QEMU. # TODO why is it mandatory to pass mem= here? Not true for QEMU.
# Anything smaller than physical blows up as expected, but why can't it auto-detect the right value? # Anything smaller than physical blows up as expected, but why can't it auto-detect the right value?
'earlycon=pl011,0x1c090000 earlyprintk=pl011,0x1c090000 lpj=19988480 rw loglevel=8 mem={} root=/dev/sda {}'.format(memory, kernel_cli), LF 'root=/dev/sda {} {}'.format(arm_kernel_cli, kernel_cli), LF
]) ])
cmd.extend(['--param', 'system.workload.panic_on_panic = True', LF]) cmd.extend(['--param', 'system.workload.panic_on_panic = True', LF])
dtb = None dtb = None
@@ -674,8 +676,8 @@ Extra options to append at the end of the emulator command line.
'--big-cpus', str((self.env['cpus'] + 1) // 2), LF, '--big-cpus', str((self.env['cpus'] + 1) // 2), LF,
'--cpu-type', cpu_type, LF, '--cpu-type', cpu_type, LF,
'--kernel', self.env['image'], LF, '--kernel', self.env['image'], LF,
'--kernel-cmd', 'root=/dev/vda {} {}'.format(arm_kernel_cli, kernel_cli), LF,
'--little-cpus', str(self.env['cpus'] // 2), LF, '--little-cpus', str(self.env['cpus'] // 2), LF,
'--root', '/dev/vda', LF,
]) ])
if use_disk_image: if use_disk_image:
cmd.extend(['--disk', self.env['disk_image'], LF]) cmd.extend(['--disk', self.env['disk_image'], LF])