qemu FreeBSD MIPS Big Endian not booting in qemu

Hi Forum,

i tried the last days to bring up a mips installation of freebsd in qemu. I went with different receipes, but none of them worked. I followed the steps here:
https://wiki.freebsd.org/QemuRecipes#mips

I also tried different archs like mips64, setting up an image with qemu-image and truncate, using MBR or GPT. I always fail at the stage mounting the rootfs and start init.

I setup a simple script building me an image:
Code:
#!/bin/sh
newroot="/mnt/ext_mips"
cd /usr/src
make TARGET_ARCH=mips buildworld
make TARGET_ARCH=mips buildkernel KERNCONF=MALTA
mkdir $newroot
make TARGET_ARCH=mips installworld DESTDIR=$newroot
make TARGET_ARCH=mips installkernel KERNCONF=MALTA DESTDIR=$newroot
make TARGET_ARCH=mips distribution DESTDIR=$newroot
etcupdate extract -B -D $newroot -s /usr/src -M "TARGET_ARCH=mips"

# creating things
makefs -M 4g -B be /root/newmips.img $newroot

I tried to start it with this and other commandlines:
qemu-system-mips -kernel malta_be.kernel -nographic -hda newmips.img -m 2048 -M malta -append "root=/dev/ada0" -boot c

Always ending up the same message, that the systems seem to have issues finding the root fs and drops into the debugger :(
Code:
ata0: reset tp1 mask=03 ostat0=50 ostat1=00
ata0: stat0=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: stat1=0x00 err=0x00 lsb=0xff msb=0xff
ata0: reset tp2 stat0=50 stat1=00 devices=0x1
ata1: reset tp1 mask=03 ostat0=50 ostat1=00
ata1: stat0=0x00 err=0x01 lsb=0x14 msb=0xeb
ata1: stat1=0x00 err=0x00 lsb=0xff msb=0xff
ata1: reset tp2 stat0=00 stat1=00 devices=0x10000
Trying to mount root from ufs:ada0 []...
pass0 at ata0 bus 0 scbus0 target 0 lun 0
pass0: <QEMU HARDDISK 2.5+> ATA-7 device
pass0: Serial Number QM00001
pass0: 33.300MB/s transfers (UDMA2, PIO 8192bytes)
pass1 at ata1 bus 0 scbus1 target 0 lun 0
pass1: <QEMU QEMU DVD-ROM 2.5+> Removable CD-ROM SCSI device
pass1: Serial Number QM00003
pass1: 33.300MB/s transfers (UDMA2, ATAPI 12bytes, PIO 65534bytes)
ada0 at ata0 bus 0 scbus0 target 0 lun 0
ada0: <QEMU HARDDISK 2.5+> ATA-7 device
ada0: Serial Number QM00001
ada0: 33.300MB/s transfers (UDMA2, PIO 8192bytes)
ada0: 4096MB (8388608 512 byte sectors)
cd0 at ata1 bus 0 scbus1 target 0 lun 0
cd0: <QEMU QEMU DVD-ROM 2.5+> Removable CD-ROM SCSI device
cd0: Serial Number QM00003
cd0: 33.300MB/s transfers (UDMA2, ATAPI 12bytes, PIO 65534bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present
GEOM: new disk cd0
GEOM: new disk ada0
Warning: no time-of-day clock registered, system time will not be set accurately
start_init: trying /sbin/init
init died (signal 6, exit 0)
panic: Going nowhere without my init!
time = 1685465590
KDB: enter: panic
[ thread pid 1 tid 100001 ]
Stopped at      0x4
db>

Filesystem information:
Code:
file newmips.img 
newmips.img: Unix Fast File system [v1] (big-endian), last mounted on , last written at Tue May 30 16:53:10 2023, clean flag 1, number of blocks 1048576, number of data blocks 1030927, number of cylinder groups 7, block size 32768, fragment size 4096, minimum percentage of free blocks 8, rotational delay 0ms, disk rotational speed 60rps, TIME optimization

Qemu Version:
Code:
QEMU emulator version 8.0.0
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers

FreeBSD Version used to built is 13.2.

1. Is someone aware of crucial mistakes i made?
2. Is MIPS support not available anymore?
3. Are there better tutorials i can follow to setup a freebsd mips instance?
4. Is there even a MIPS Installation setup?

Thank you
bulky
 
Back
Top