From: Rob Landley <rob@landley.net>
To: Stafford Horne <shorne@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
"Jason A. Donenfeld" <Jason@zx2c4.com>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: or1k -M virt -hda and net.
Date: Sun, 22 Dec 2024 11:29:19 -0600 [thread overview]
Message-ID: <57c5207c-3aca-47cd-bfd3-3d7eb7be3c0f@landley.net> (raw)
In-Reply-To: <Z0LMqEqcdjkAxnN-@antec>
On 11/24/24 00:50, Stafford Horne wrote:
>> Speaking of which, is there a way to get or1k to exit the emulator? I told
>> the kernel to reboot but it says "reboot failed, system halted" and hangs
>> instead of exiting qemu. (My testroot runs qemu under "timeout -i 10" to
>> kill it after 10 seconds of inactivity, I.E. nothing written to stdout, but
>> it still counts as a failure on one of the criteria.)
>
> With the or1k-sim board it is not possible. Traditionally on or1k we use
> special NOP instructions to reboot simulators i.e. 'l.nop 1'. The QEMU team was
> not happy to support this mechanism.
>
> https://lore.kernel.org/openrisc/fb69c137317a365dcb549dfef1ecd2fbff48e92c.1492384862.git.shorne@gmail.com/T/#mef76d30d294aed84548b1e0d3e23aae499deaeec
>
> As an alertnative we can use the 'virt' board which supports shutdown and
> restart via the generic syscon drivers.
>
> $ grep -C1 SYSCON arch/openrisc/configs/virt_defconfig
> CONFIG_POWER_RESET=y
> CONFIG_POWER_RESET_SYSCON=y
> CONFIG_POWER_RESET_SYSCON_POWEROFF=y
> CONFIG_SYSCON_REBOOT_MODE=y
> # CONFIG_HWMON is not set
I built the 6.12 ARCH=openrisc virt_defconfig and got it to boot my
initramfs, but while it does shut down, it hasn't got network or block
device support.
The kernel config looks like it should have virt block device support,
but nether -hda README nor "-drive file=README,format=raw,id=hd0 -device
virtio-blk-device,drive=hd0" seem to be wiring it up in qemu where the
kernel can find it?
Haven't tried to get fancy with the network yet. The buildroot config is
still or1ksim...
Rob
next prev parent reply other threads:[~2024-12-22 17:30 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-11 5:42 QEMU commit 0a923be2f642 broke my or1k image Rob Landley
2024-09-16 7:21 ` Stafford Horne
2024-11-21 22:32 ` Rob Landley
2024-11-22 16:35 ` Stafford Horne
2024-11-23 0:54 ` Rob Landley
2024-11-23 8:28 ` Stafford Horne
2024-11-24 5:18 ` Rob Landley
2024-11-24 6:50 ` Stafford Horne
2024-12-22 17:29 ` Rob Landley [this message]
[not found] ` <Z2lgL31ZeSkO59MZ@antec>
2025-01-01 1:19 ` or1k -M virt -hda and net Rob Landley
2025-01-07 11:56 ` Rob Landley
2025-01-07 17:31 ` Stafford Horne
2025-01-07 18:05 ` Alex Bennée
2025-01-07 23:20 ` Rob Landley
2025-01-08 13:01 ` BALATON Zoltan
2025-01-08 22:57 ` Rob Landley
2025-01-09 2:05 ` BALATON Zoltan
2025-01-08 14:59 ` Alex Bennée
2025-01-08 22:34 ` Rob Landley
2025-01-09 2:48 ` BALATON Zoltan
2025-01-07 22:44 ` Rob Landley
2025-01-08 8:24 ` Geert Uytterhoeven
2025-01-08 16:23 ` Rob Landley
2025-01-08 16:26 ` Geert Uytterhoeven
2025-01-08 22:40 ` Rob Landley
2025-01-09 8:49 ` Geert Uytterhoeven
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=57c5207c-3aca-47cd-bfd3-3d7eb7be3c0f@landley.net \
--to=rob@landley.net \
--cc=Jason@zx2c4.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=shorne@gmail.com \
/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).