qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: or1k -M virt -hda and net.


From: Rob Landley
Subject: Re: or1k -M virt -hda and net.
Date: Wed, 8 Jan 2025 10:23:23 -0600
User-agent: Mozilla Thunderbird

On 1/8/25 02:24, Geert Uytterhoeven wrote:
Hi Rob,

On Tue, Jan 7, 2025 at 11:53 PM Rob Landley <rob@landley.net> wrote:
Microblaze has no /dev/?da (as in there's no device I could attach it to
even with the long option, I'd have to use NBD), sh4eb has -hda is
working but it's having some endianness hiccup with the network card
(works in sh4 but not sh4eb, I'm trying to track it down, I thought this
worked at one point), and the two "No kernel" ones legitimately have no

That's using sh_eth, right?

8139cp: 8139cp: 10/100 PCI Ethernet driver v1.3 (Mar 22, 2004)
8139cp 0000:00:02.0: enabling device (0000 -> 0003)
8139cp 0000:00:02.0 eth0: RTL-8139C+ at 0x(ptrval), 52:54:00:12:34:56, IRQ 128

Is there a different driver I should use? That one works on sh4 little endian with almost the same config.

Last time I tried booting a big endian ARM kernel on Koelsch (R-Car
M2-W), it booted fine until "unable to mount root" (I have no suitable
userspace), except for broken Ethernet, so it failed to obtain a
DHCP lease.

Miniconfig I'm using for 6.19 attached.

If you don't want to build mkroot's toybox+musl userspace yourself, the initramfs.cpio.gz in the last release from https://landley.net/bin/mkroot/0.8.11/sh4eb.tgz presumably still works, using the instructions in run-qemu.sh. (I'm trying to get a new release out, hence poking at targets that don't quite pass muster.)

You can also use the sh2eb fdpic userspace from the same directory, but you'll need the "fdpic with mmu for sh" patch from https://landley.net/bin/mkroot/0.8.11/linux-patches/0002-sh4-fdpic.patch to enable the fdpic loader in your kernel config. (That's the current sh big endian board I know people deploying today, but qemu doesn't emulate it directly, so I run its userspace under qemu-system-sh4eb...)

I think I've built a working static busybox defconfig with https://landley.net/bin/toolchains/25-03-2024/sh4eb-linux-musl-cross.tar.xz too, although not recently. Might need to switch a command or two off?

The boot says "8139cp 0000:00:02.0 eth0: link down" and then pauses for 3 seconds while ntp fails to talk to time.google.com to set the clock newer than 1970 (sadly no battery backed up clock in the board qemu's emulating, there's config entries for one in the relevant kernel defconfig but nothing in qemu last I checked), and then I get a shell prompt that thinks it's 1970 and can't wget or scp with dropbear.

Rob

P.S: If you "./run-emulator.sh -hda file.img" the init script will try to mount /dev/?da on /mnt for you, and then run /mnt/init if it exists instead of a shell prompt. Easy automated testing.

Attachment: linux-miniconfig
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]