From: labbott@redhat.com (Laura Abbott)
To: linux-arm-kernel@lists.infradead.org
Subject: qemu machine settings and root fs for armv8?
Date: Thu, 9 Aug 2018 09:36:12 +0200 [thread overview]
Message-ID: <5d585df0-abbe-c95f-adff-c4c2e3962832@redhat.com> (raw)
In-Reply-To: <CAKwvOdnA5OTcBuRVbcBv8oYHR-mU3+Ee_iFjqbHx4UQxVnpxtQ@mail.gmail.com>
On 08/09/2018 01:10 AM, Nick Desaulniers wrote:
> On Wed, Aug 8, 2018 at 11:52 AM Nick Desaulniers
> <ndesaulniers@google.com> wrote:
>>
>> I was wondering if folks had recommendations for testing armv8 kernels
>> in qemu, such as what machine settings and if root fs images existed.
>> I've been playing around with buildroot, but was curious if people had
>> recipes they could share?
>
> Following up, I found:
> https://github.com/google/syzkaller/blob/master/docs/linux/setup_linux-host_qemu-vm_arm64-kernel.md
> helpful to build the rootfs using buildroot.
>
> Then:
>
> $ qemu-system-aarch64 -kernel arch/arm64/boot/Image -machine virt -cpu
> cortex-a57 -hda rootfs.ext2 -append "console=ttyAMA0 root=/dev/vda"
> -serial mon:stdio -m 512 -nographic
>
> worked for me.
>
I usually use a buildroot environment and just boot as an initramfs:
qemu-system-aarch64 \
-s \
-smp 8 \
-machine virt \
-cpu cortex-a57 \
-machine type=virt \
-nographic \
-m 1024 \
-kernel /path/to/kernel \
--append "nokaslr slub_debug=- console=ttyAMA0 debug_pagealloc=on
earlycon=pl011,0x9000000" \
-initrd /path/to/arm64_rootfs.cpio \
-fsdev local,security_model=passthrough,id=fsdev0,path=/tmp/share \
-device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare
I'll note that this setup makes using kernel modules a big pain but
it's useful for certain types of testing.
The virtio settings are from https://www.linux-kvm.org/page/9p_virtio
for sharing files.
Thanks,
Laura
next prev parent reply other threads:[~2018-08-09 7:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-08 18:52 qemu machine settings and root fs for armv8? Nick Desaulniers
2018-08-08 23:10 ` Nick Desaulniers
2018-08-09 7:36 ` Laura Abbott [this message]
2018-08-09 17:15 ` Nick Desaulniers
2018-08-10 6:00 ` Baruch Siach
2018-08-10 6:38 ` Laura Abbott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d585df0-abbe-c95f-adff-c4c2e3962832@redhat.com \
--to=labbott@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).