On Tue, Apr 14, 2020 at 06:15:20PM +0200, Peter J. Philipp wrote: > Hi again, > > well I got it to boot multiuser in QEMU... > > foo# uname -a > OpenBSD foo.my.domain 6.7 QEMU#0 macppc > > It doesn't have network, but I made a second drive of type msdos that can > be used to transfer files in and out of the host system. > > Here is my setup again: > > qemu-system-ppc -M mac99,via=pmu,graphics=off \ > -cpu g4 -nographic -m 2048M -vga none \ > -drive format=raw,file=macppc.raw \ > -drive format=raw,file=shuttle.raw \ > -nic none \ > -serial mon:stdio \ > -prom-env 'boot-device=cd:,ofwboot' \ > -prom-env 'auto-boot?=false' \ > -cdrom boot.iso -boot d > > boot in openwirmware with 'boot' or set auto-boot?=true. > > Here is how I made the boot.iso: > > mkhybrid -part -r -hfs -hfs-bless tmp/ofwboot \ > -path-list path-list -o boot.iso tmp/ > > path-list contains bsd and ofwboot.
or you can modify /usr/src/distrib/macppc/iso/Makefile, and create a custom Makefile.qemu. that is how i create my ISO for testing/booting OpenBSD on qemu > > And I had to make a custom kernel. I'll make this one available (if you > want to trust me) https://centroid.eu/private/bsd.qemu > > It's almost a -current kernel, it contains a patch from mpi@ from a few > days ago that did WITNESS things (but witness is turned off), it shouldn't > make a difference. It has "option NO_PROPOLICE" and ohci disabled. disabling scca probably will not work ... console uses this device for the zs.c crash i usually edit zscninit --- dev/zs.c 3 Sep 2019 04:48:00 -0000 1.30 +++ dev/zs.c 15 Apr 2020 09:50:22 -0000 @@ -1019,7 +1019,7 @@ zscninit(struct consdev *cp) int escc, escc_ch, obio; unsigned int zs_offset, zs_size; int ch = 0; - u_int32_t reg[5]; + u_int32_t reg[10]; char name[16]; if ((escc_ch = OF_instance_to_package(stdin)) == -1) i am probably masking a bug somewhere ... since the qemu firmware and the eeprom dump of my PowerBook G4 matches so i don"t know why zs.c crashes on qemu. with that hack you can compile with PROPOLICE (default GENERIC) conf/GENERIC with zs.c hack and "-M mac99,via=pmu-adb" and "-nodefaults" on ports qemu (4.2) 0 > ok 0 > boot Trying cd:,\\:tbxi... >> switching to new context: >> OpenBSD/macppc BOOT 1.8 boot> cannot open /pci@f2000000/mac-io@c/ata-3@21000/cdrom@0:/etc/random.seed: No such file or directory booting /pci@f2000000/mac-io@c/ata-3@21000/cdrom@0:/6.7/macppc/bsd.rd: 9250252+483640 [394462+108+363984+376265]=0x100114 string [/cdrom@0:/6.7/macppc/bsd.rd] not found Warning: boot device unrecognized: /pci@f2000000/mac-io@c/ata-3@21000/cdrom@0:/6.7/macppc/bsd.rd [ using 1135396 bytes of bsd ELF symbol table ] Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2020 OpenBSD. All rights reserved. https://www.OpenBSD.org OpenBSD 6.7-beta (GENERIC) #4: Wed Apr 15 18:50:40 JST 2020 r...@apbg4.my.domain:/usr/src/sys/arch/macppc/compile/GENERIC real mem = 134217728 (128MB) avail mem = 104701952 (99MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root: model PowerMac3,1 cpu0 at mainbus0: 7400 (Revision 0x209): 900 MHz: L2 cache not enabled mem0 at mainbus0 mpcpcibr0 at mainbus0 pci: uni-north pci0 at mpcpcibr0 bus 0 macobio0 at pci0 dev 12 function 0 "Apple Keylargo" rev 0x00 macgpio0 at macobio0 offset 0x50 macgpio1 at macgpio0 offset 0x9: irq 47 pgs0 at macgpio0: irq 55 adb0 at macobio0 offset 0x16000: irq 25, via-pmu, 2 targets apm0 at adb0: battery flags 0x91, 0% charged akbd0 at adb0 addr 2: extended keyboard wskbd0 at akbd0 mux 1 ams0 at adb0 addr 3: Mouse Systems A3 mouse, 1-button, 100 dpi wsmouse0 at ams0 mux 0 zs0 at macobio0 offset 0x13000: irq 37,36 zstty0 at zs0 channel 0: console zstty1 at zs0 channel 1 "escc-legacy" at macobio0 offset 0x12000 not configured wdc0 at macobio0 offset 0x20000 irq 13: DMA wd0 at wdc0 channel 0 drive 0: <QEMU HARDDISK> wd0: 16-sector PIO, LBA48, 8192MB, 16777216 sectors wd0(wdc0:0:0): using BIOS timings, DMA mode 2 wdc1 at macobio0 offset 0x21000 irq 14: DMA atapiscsi0 at wdc1 channel 0 drive 0 scsibus1 at atapiscsi0: 2 targets cd0 at scsibus1 targ 0 lun 0: <QEMU, QEMU DVD-ROM, 2.5+> removable cd0(wdc1:0:0): using BIOS timings, DMA mode 2 openpic0 at macobio0 offset 0x40000: version 0x0 feature 3f0002 LE memc0 at mainbus0: uni-n rev 0x7 vscsi0 at root scsibus2 at vscsi0: 256 targets softraid0 at root scsibus3 at softraid0: 256 targets bootpath: /pci@f2000000/mac-io@c/ata-3@21000/cdrom@0:/6.7/macppc/bsd.rd root device: wd0 swap device (default wd0b): root on wd0a swap on wd0b dump on wd0b WARNING: / was not properly unmounted Automatic boot in progress: starting file system checks. /dev/wd0a (29c62cbdfdfa90c9.a): 1734 files, 25569 used, 521478 free (174 frags, 65163 blocks, 0.0% fragmentation) /dev/wd0a (29c62cbdfdfa90c9.a): MARKING FILE SYSTEM CLEAN /dev/wd0e (29c62cbdfdfa90c9.e): 1 files, 1 used, 1030526 free (14 frags, 128814 blocks, 0.0% fragmentation) /dev/wd0e (29c62cbdfdfa90c9.e): MARKING FILE SYSTEM CLEAN /dev/wd0d (29c62cbdfdfa90c9.d): FREE BLK COUNT(S) WRONG IN SUPERBLK (SALVAGED) /dev/wd0d (29c62cbdfdfa90c9.d): SUMMARY INFORMATION BAD (SALVAGED) /dev/wd0d (29c62cbdfdfa90c9.d): BLK(S) MISSING IN BIT MAPS (SALVAGED) /dev/wd0d (29c62cbdfdfa90c9.d): 25379 files, 421954 used, 1124661 free (6013 frags, 139831 blocks, 0.4% fragmentation) /dev/wd0d (29c62cbdfdfa90c9.d): MARKING FILE SYSTEM CLEAN pf enabled starting network reordering libraries: done. openssl: generating isakmpd/iked RSA keys... done. ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519 starting early daemons: syslogd pflogd ntpd. starting RPC daemons:. savecore: no core dump checking quotas: done. clearing /tmp kern.securelevel: 0 -> 1 creating runtime link editor directory cache. preserving editor files. running rc.sysmerge starting network daemons: smtpd sndiod. running rc.firsttime Path to firmware: http://firmware.openbsd.org/firmware/snapshots/ No devices found which need firmware files to be downloaded. Path to firmware: http://firmware.openbsd.org/firmware/snapshots/ No devices found which need firmware files to be downloaded. starting local daemons: cron. Wed Apr 15 19:56:53 JST 2020 OpenBSD/macppc (emu.my.domain) (ttya) login: root Password: OpenBSD 6.7-beta (GENERIC) #4: Wed Apr 15 18:50:40 JST 2020 Welcome to OpenBSD: The proactively secure Unix-like operating system. Please use the sendbug(1) utility to report bugs in the system. Before reporting a bug, please try to reproduce it with the latest version of the code. With bug reports, please try to ensure that enough information to reproduce the problem is enclosed, and if a known fix for it exists, include that as well. You have mail. emu# ifconfig -a lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 32768 index 2 priority 0 llprio 3 groups: lo inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 inet 127.0.0.1 netmask 0xff000000 enc0: flags=0<> index 1 priority 0 llprio 3 groups: enc status: active pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33168 index 3 priority 0 llprio 3 groups: pflog emu#