qemu and mips64 - init died (signal 6, exit 0)

From: Eugene M. Zheganin <emz_at_zhegan.in>
Date: Tue, 31 Jan 2023 10:48:49 UTC
Hello,


Wanted to play locally with mips64 VM to reorganise Juniper SRX300 
filesystem for smaller device (which runs Cavium CPU, fs is big-endian, 
so I just cannot mount it from amd64).

I constructed an image using instructions here: 
https://wiki.freebsd.org/QemuRecipes#mips . I also added ada0 for 
mounting (/dev/ada0 / ufs rw 1 1) and I'm starting it using recent 
emulators/qemu port (everything happens on an 13.1 amd64 system).

But unfortunately after booting it I have init failing (below). Is there 
something I missed that can be assumed watching failing init ?


===Cut===

[...]

lo0: bpf attached
tcp_init: net.inet.tcp.tcbhashsize auto tuned to 16384
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 []...
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)
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)
GEOM: new disk cd0
GEOM: new disk ada0
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
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 = 1675089140
KDB: enter: panic
[ thread pid 1 tid 100001 ]
Stopped at      0x4
db>


===Cut===


Thanks.

Eugene.