X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=run-supernested.sh.in;h=445f960a6d02485770134b125eb847d1be28880b;hb=c0735b93a270bb77afb50577f4319efd3f0b0459;hp=7b2752e1d9c61b34c4a01cf62b0d5849e710cb56;hpb=4c4d5d53ffd80c2f7f5b3812d0cbf4615854bcdc;p=supernested.git diff --git a/run-supernested.sh.in b/run-supernested.sh.in index 7b2752e..445f960 100644 --- a/run-supernested.sh.in +++ b/run-supernested.sh.in @@ -19,15 +19,25 @@ # # Written by Richard W.M. Jones +arch="@host_cpu@" qemu="@QEMU@" image="supernested-@VERSION@-@DISTRO@.qcow2" format=qcow2 kernel=kernel initrd=initrd -append="panic=1 console=ttyS0 udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 root=/dev/sda selinux=0" +append="panic=1 udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 root=/dev/sda selinux=0" smp= tcg= +case "$arch" in + aarch64) + append="$append earlyprintk=pl011,0x9000000 ignore_loglevel efi-rtc=noprobe" + ;; + *) + append="$append console=ttyS0" + ;; +esac + TEMP=`getopt \ -o '' \ --longoptions 'help,nested,smp:,tcg' \ @@ -105,6 +115,17 @@ if [ $memory -lt 2048 ]; then fi memory=$((memory - 1500)) +# ARM mach_virt (-M virt) model only supports 30GB of RAM. +if [ $memory -gt 30000 ]; then + case "$arch" in + arm*|aarch64) + echo "$0: limiting memory to 30000 MB for ARM mach_virt" + memory=30000 + ;; + *) + esac +fi + # Get current nesting level from /proc/cmdline, increment it, add it # to the command line. level="$(