1
votes

I'm running u-boot for powerpc in Qemu.

qemu-system-ppc -M ppce500 -m 512 -kernel u-boot -cpu mpc8572  -nographic -device pcnet,netdev=mynet1 -netdev user,id=mynet1

U-Boot 2020.07-rc4 (Jun 25 2020 - 11:09:31 +0300)

CPU: 8572, Version: 1.0, (0x80e00010)
Core: e500, Version: 3.0, (0x80210030)
Clock Configuration:
CPU0: 400 MHz,
CCB : 400 MHz,
DDR:200 MHz (400 MT/s data rate), LBC: unknown (LCRR[CLKDIV] = 0x00 )
L1: D-cache 32 KiB enabled
I-cache 32 KiB enabled
DRAM: 512 MiB
L2: disabled

PCI: base address e0008000

00:01.0 - 1022:2000 - Network controller
PCI1: Bus 00 - 00

In: serial
Out: serial
Err: serial
Net: No ethernet found.
Hit any key to stop autoboot: 0

How can I activate the network? or Is it possible to boot the kernel in the hard disk using u-boot?

2

2 Answers

0
votes

qemu-ppce500_defconfig has CONFIG_E1000=y.

So something like

-device e1000,netdev=eth0 -netdev user,id=eth0

gives you the right device on Linux.

But QEMU's hw/ppc/mpc8544_guts.c does not support the registers used.

qemu-ppce500_defconfig has not yet been converted to using CONFIG_DM. I think the way forward would be to convert the board to use the driver model in U-Boot and the virtio network adapter.

0
votes

As of today the PCI functionality in U-Boot for QEMU ppce500 machine is seriously broken.

The fixes, along with CONFIG_DM conversion, is now in the following series: http://patchwork.ozlabs.org/project/uboot/list/?series=230004

We can expect this series to be merged in U-Boot v2021.04 release.