@@ -591,6 +591,8 @@ Extra options to append at the end of the emulator command line.
591
591
])
592
592
cmd .extend (['--interp-dir' , self .env ['userland_library_dir' ], LF ])
593
593
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 )
594
596
if self .env ['gem5_script' ] == 'fs' :
595
597
cmd .extend ([
596
598
self .env ['gem5_fs_file' ], LF ,
@@ -611,7 +613,7 @@ Extra options to append at the end of the emulator command line.
611
613
if self .env ['kvm' ]:
612
614
cmd .extend (['--cpu-type' , 'X86KvmCPU' , LF ])
613
615
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 ])
615
617
elif self .env ['is_arm' ]:
616
618
if self .env ['kvm' ]:
617
619
cmd .extend (['--cpu-type' , 'ArmV8KvmCPU' , LF ])
@@ -627,7 +629,7 @@ Extra options to append at the end of the emulator command line.
627
629
'--command-line' ,
628
630
# TODO why is it mandatory to pass mem= here? Not true for QEMU.
629
631
# 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
631
633
])
632
634
cmd .extend (['--param' , 'system.workload.panic_on_panic = True' , LF ])
633
635
dtb = None
@@ -674,8 +676,8 @@ Extra options to append at the end of the emulator command line.
674
676
'--big-cpus' , str ((self .env ['cpus' ] + 1 ) // 2 ), LF ,
675
677
'--cpu-type' , cpu_type , LF ,
676
678
'--kernel' , self .env ['image' ], LF ,
679
+ '--kernel-cmd' , 'root=/dev/vda {} {}' .format (arm_kernel_cli , kernel_cli ), LF ,
677
680
'--little-cpus' , str (self .env ['cpus' ] // 2 ), LF ,
678
- '--root' , '/dev/vda' , LF ,
679
681
])
680
682
if use_disk_image :
681
683
cmd .extend (['--disk' , self .env ['disk_image' ], LF ])
0 commit comments