From: Kenneth Adam Miller <kennethadammiller@gmail.com>
To: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: How to run qemu
Date: Sat, 7 Sep 2024 15:20:12 -0600 [thread overview]
Message-ID: <CAK7rcp-jQAx3Qr_OntcTeNhfM_nzyoOiLDvSpPj=__FfxhSrcw@mail.gmail.com> (raw)
In-Reply-To: <CAK7rcp_qUmp7k6dqo62KqNpAuNgVznWiCxgBrhf4V7PT5=YDhQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2141 bytes --]
I found this:
https://qemu-project.gitlab.io/qemu/system/linuxboot.html
and this:
https://nickdesaulniers.github.io/blog/2018/10/24/booting-a-custom-linux-kernel-in-qemu-and-debugging-it-with-gdb/
So I now have serial output. But I still need to know how to put a binary
in the image so I can run it.
I made it a few steps further:
./qemu//bin/debug/native/qemu-system-x86_64 -enable-kvm -m 2048 -display
vnc=:89 \
-netdev user,id=t0, -device rtl8139,netdev=t0,id=nic0 \
-netdev user,id=t1, -device pcnet,netdev=t1,id=nic1 \
-L ./qemu/pc-bios \
-nographic \
-append "console=ttyS0 nokaslr" \
-initrd ramdisk.img \
-boot c -kernel $HOME/workspace/kvmctf-6.1.74/bzImage/bzImage
On Sat, Sep 7, 2024 at 2:58 PM Kenneth Adam Miller <
kennethadammiller@gmail.com> wrote:
> Hello,
>
> I've got qemu built and now I need to figure out how to run it with what
> I've got. I have a vmlinux and a bzImage that I want to serve as the kernel
> that QEMU runs with, and a single binary, let's just call it
> literally `program`, that I want to issue a command to run once QEMU boots
> with the kernel.
>
> I tried to figure out how to run the QEMU on my own, and made it as far as
> this:
>
> ./qemu//bin/debug/native/qemu-system-x86_64 -enable-kvm -m 2048 -display
> vnc=:89 \
> -netdev user,id=t0, -device rtl8139,netdev=t0,id=nic0 \
> -netdev user,id=t1, -device pcnet,netdev=t1,id=nic1 \
> -L ./qemu/pc-bios \
> -boot c -kernel $HOME/workspace/kvmctf-6.1.74/bzImage/bzImage
>
> It runs, but there isn't any output to the screen to show it booting, and
> QEMU runs the processor hard indefinitely. I need to be able to see
> standard output and to be able to type into the console to enter the
> command, and I don't know how to get it to or why it isn't showing that
> already. Also, once that is working, I need a way to put `program` into the
> QEMU session so that it can be run. Can someone help me? I think I need to
> make an img file that can boot but I don't really know how to do that
> either.
>
[-- Attachment #2: Type: text/html, Size: 2883 bytes --]
next prev parent reply other threads:[~2024-09-07 21:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-07 20:58 How to run qemu Kenneth Adam Miller
2024-09-07 21:20 ` Kenneth Adam Miller [this message]
2024-09-08 10:49 ` BALATON Zoltan
2024-09-08 3:09 ` Donald R Laster Jr
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='CAK7rcp-jQAx3Qr_OntcTeNhfM_nzyoOiLDvSpPj=__FfxhSrcw@mail.gmail.com' \
--to=kennethadammiller@gmail.com \
--cc=qemu-devel@nongnu.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).