mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
Update GEM5 to master to fix x86 boot via 3feeb994ae613fd6b3734c1a991285b2ecbd1946
See also: http://gem5-users.gem5.narkive.com/CQh9J6fU/fail-to-run-fs-mode-with-linux-kernel-v4-8-13-and-ubuntu-image-16-04-1 Start sketching how to tweak system parameters, number of CPUs works, caches don't.
This commit is contained in:
14
run
14
run
@@ -4,6 +4,7 @@ set -e
|
||||
|
||||
# CLI handling.
|
||||
arch=x86_64
|
||||
cpus=1
|
||||
debug_vm=''
|
||||
kgdb=false
|
||||
nographic=false
|
||||
@@ -17,11 +18,14 @@ gem5=false
|
||||
gem5opts=''
|
||||
initrd=false
|
||||
root=''
|
||||
while getopts a:Dde:G:giknt:x OPT; do
|
||||
while getopts a:c:Dde:G:giknt:x OPT; do
|
||||
case "$OPT" in
|
||||
a)
|
||||
arch="$OPTARG"
|
||||
;;
|
||||
c)
|
||||
cpus="$OPTARG"
|
||||
;;
|
||||
d)
|
||||
extra_flags="$extra_flags -S -s"
|
||||
;;
|
||||
@@ -66,9 +70,10 @@ M5_PATH='$(pwd)/gem5/gem5-system' \
|
||||
'${gem5_dir}/build/X86/gem5.opt' \
|
||||
${gem5opts} \
|
||||
'${gem5_dir}/configs/example/fs.py' \
|
||||
--command-line='earlyprintk=ttyS0 console=ttyS0 lpj=7999923 root=/dev/hda $extra_append' \
|
||||
--disk-image='${outdir}/images/rootfs.ext2' \
|
||||
--kernel='${outdir}/build/linux-custom/vmlinux' \
|
||||
--root-device=/dev/sda \
|
||||
--num-cpus=${cpus} \
|
||||
$extra_flags \
|
||||
"
|
||||
elif [ "$arch" = arm ] || [ "$arch" = aarch64 ]; then
|
||||
@@ -80,9 +85,10 @@ ${gem5opts} \
|
||||
'${gem5_dir}/configs/example/fs.py' \
|
||||
--command-line='earlyprintk=pl011,0x1c090000 console=ttyAMA0 lpj=19988480 rw loglevel=8 mem=512MB root=/dev/sda $extra_append' \
|
||||
--disk-image='${outdir}/images/rootfs.ext2' \
|
||||
--dtb-file='${gem5_dir}/system/arm/dt/$([ "$arch" = arm ] && echo armv7_gem5_v1_1cpu || echo armv8_gem5_v1_1cpu).dtb' \
|
||||
--dtb-file='${gem5_dir}/system/arm/dt/$([ "$arch" = arm ] && echo "armv7_gem5_v1_${cpus}cpu" || echo "armv8_gem5_v1_${cpus}cpu").dtb' \
|
||||
--kernel='${outdir}/build/linux-custom/vmlinux' \
|
||||
--machine-type=VExpress_GEM5_V1 \
|
||||
--num-cpus=${cpus} \
|
||||
$extra_flags \
|
||||
"
|
||||
fi
|
||||
@@ -95,7 +101,7 @@ $buildroot_out_dir/host/usr/bin/qemu-system-${arch} \
|
||||
-m 128M \
|
||||
-monitor telnet::45454,server,nowait \
|
||||
-netdev user,hostfwd=tcp::45455-:45455,id=net0 \
|
||||
-smp 1 \
|
||||
-smp $cpus \
|
||||
"
|
||||
if $initrd; then
|
||||
extra_flags="$extra_flags -initrd '${images_dir}/rootfs.cpio'"
|
||||
|
||||
Reference in New Issue
Block a user