Skip to content

Commit f767ba9

Browse files
committed
gem5: also pass our custom kernel cli parameters to fs_bitLITTLE
1 parent da06e67 commit f767ba9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

run

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,8 @@ Extra options to append at the end of the emulator command line.
591591
])
592592
cmd.extend(['--interp-dir', self.env['userland_library_dir'], LF])
593593
else:
594+
if self.env['is_arm']:
595+
arm_kernel_cli = 'earlycon=pl011,0x1c090000 earlyprintk=pl011,0x1c090000 lpj=19988480 rw loglevel=8 mem={}'.format(memory)
594596
if self.env['gem5_script'] == 'fs':
595597
cmd.extend([
596598
self.env['gem5_fs_file'], LF,
@@ -611,7 +613,7 @@ Extra options to append at the end of the emulator command line.
611613
if self.env['kvm']:
612614
cmd.extend(['--cpu-type', 'X86KvmCPU', LF])
613615
if not self.env['baremetal']:
614-
cmd.extend(['--command-line', 'earlycon={} earlyprintk={} lpj=7999923 root=/dev/sda {}'.format(console, console, kernel_cli), LF])
616+
cmd.extend(['--command-line', 'earlycon={} earlyprintk={} lpj=7999923 root=/dev/sda {}'.format(arm_kernel_cli, console, console, kernel_cli), LF])
615617
elif self.env['is_arm']:
616618
if self.env['kvm']:
617619
cmd.extend(['--cpu-type', 'ArmV8KvmCPU', LF])
@@ -627,7 +629,7 @@ Extra options to append at the end of the emulator command line.
627629
'--command-line',
628630
# TODO why is it mandatory to pass mem= here? Not true for QEMU.
629631
# Anything smaller than physical blows up as expected, but why can't it auto-detect the right value?
630-
'earlycon=pl011,0x1c090000 earlyprintk=pl011,0x1c090000 lpj=19988480 rw loglevel=8 mem={} root=/dev/sda {}'.format(memory, kernel_cli), LF
632+
'root=/dev/sda {} {}'.format(arm_kernel_cli, kernel_cli), LF
631633
])
632634
cmd.extend(['--param', 'system.workload.panic_on_panic = True', LF])
633635
dtb = None
@@ -674,8 +676,8 @@ Extra options to append at the end of the emulator command line.
674676
'--big-cpus', str((self.env['cpus'] + 1) // 2), LF,
675677
'--cpu-type', cpu_type, LF,
676678
'--kernel', self.env['image'], LF,
679+
'--kernel-cmd', 'root=/dev/vda {} {}'.format(arm_kernel_cli, kernel_cli), LF,
677680
'--little-cpus', str(self.env['cpus'] // 2), LF,
678-
'--root', '/dev/vda', LF,
679681
])
680682
if use_disk_image:
681683
cmd.extend(['--disk', self.env['disk_image'], LF])

0 commit comments

Comments
 (0)