Port-macppc archive

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

Re: Can qemu load Netbsd/macppc kernel directly?



On Tue, Mar 4, 2025 at 5:28 AM Andrew Randrianasulu
<randrianasulu%gmail.com@localhost> wrote:
>
> I found this post on reddit for x86_64
>
> https://www.reddit.com/r/BSD/comments/197vfmq/a_netbsdamd64_guest_can_now_boot_in_40ms_details/
>
> it uses this command line:
>
> qemu-system-x86_64 -M microvm,x-option-roms=off,rtc=on,acpi=off,pic=off -enable-kvm -m 128 -cpu host,+invtsc -kernel ${KERNEL} -append "root=ld0a console=com rw -z" -display none -device virtio-blk-device,drive=hd0 -drive file=${IMG},format=raw,id=hd0 -global virtio-mmio.force-legacy=false -serial stdio
>
>
> But when I tried same trick with generic.MP kernel for ppc
>
> it just sits here not printing anything apart from two lines
>
> prefixed with [ppc]
>
>
> We again trying to debug SMP (2 cpu)
>
>  support in qemu-system-ppc with new patch,
>
>  so it was interesting to try netbsd, but default
>
> install kernel does not have MP support compiled in.
>
>
> https://lists.gnu.org/archive/html/qemu-ppc/2025-03/msg00067.html
>
>

I tried to cross-commpile recent NetBSD by using build.sh from git
copy of NetBSD/src

$ ./build.sh -U -j8 -O ~/obj -m macppc -a powerpc kernel=INSTALL iso-image

But sadly it fails like this:

netbsd10$ ./qemu-system-ppc -M mac99,via=pmu -cpu g4 -cdrom
~/obj/releasedir/images/NetBSD-10.99.12-macppc.iso   -boot d -g
1024x768x8 -smp 2  -bios ~/K38_sdcard1/Documents/openbios-qemu-smp.elf
-display sdl -accel tcg,thread=multi -m 256  -prom-env
'boot-device=cd:,ofwboot.xcf /netbsd.macppc' -nographic
qemu-system-ppc: -accel tcg,thread=multi: warning: Guest not yet
converted to MTTCG - you may get unexpected results
cpus[0] = 0x797f104792c0 0x797f1047be40
cpus[1] = 0x797f101cae80 0x797f101cda00
s>> et_property: NULL phandle

>> =============================================================
>> OpenBIOS 1.1 [Mar 1 2025 05:50]
>> Configuration device id QEMU version 1 machine id 1
>> CPUs: 2
>> Memory: 256M
>> UUID: 00000000-0000-0000-0000-000000000000
>> CPU type PowerPC,G4
>> CPU type PowerPC,G4
milliseconds isn't unique.
Welcome to OpenBIOS v1.1 built on Mar 1 2025 05:50
Trying cd:,ofwboot.xcf...
>> switching to new context:

>> NetBSD/macppc OpenFirmware Boot, Revision 1.15 (Tue Mar  4 04:00:38 UTC 2025)
>> Open Firmware version 3.x
>> Open Firmware running in virtual-mode.
6898796+117860=0x6b14d4
 start=0x100000
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[   1.0000000]     2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
[   1.0000000]     2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023,
[   1.0000000]     2024, 2025
[   1.0000000]     The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All
rights reserved.

[   1.0000000] NetBSD 10.99.12 (INSTALL) #0: Tue Mar  4 07:48:47 MSK 2025
[   1.0000000]  guest@netbsd10:/home/guest/obj/sys/arch/macppc/compile/INSTALL
[   1.0000000] total memory = 256 MB
[   1.0000000] avail memory = 231 MB
[   1.0000000] found openpic PIC at 80040000
[   1.0000000] OpenPIC Version 1.2: Supports 2 CPUs and 64 interrupt sources.
[   1.0000000] trap: kernel read DSI trap @ 0x4bfff609 by 0xfff10568
(DSISR 0x40000000, err=14), lr 0xfff104c8
[   1.0000000] panic: trap
[   1.0000240] rebooting

git commit:

commit 83adb4e9fbc386943d553805ac8403e5b682449d (HEAD -> trunk,
origin/trunk, origin/HEAD)
Author: andvar <andvar%NetBSD.org@localhost>
Date:   Mon Mar 3 22:31:37 2025 +0000

    regen.

Release 10.1 iso boots fine just with one CPU



>


Home | Main Index | Thread Index | Old Index