qemu run / boot freebsd arm 32bit image in qemu

covacat

Well-Known Member

Reaction score: 170
Messages: 365

anybody succedeed in running an arm6 or arm7 freebsd 13 image in qemu ?
i managed to run until the kernel boots (so loader works) but i get no output from the kernel

i can boot an aarch64 image but not a 32 bit one
i use qemu system arm/aarch64! and u-boot qemu / or qemu_efi
 
OP
covacat

covacat

Well-Known Member

Reaction score: 170
Messages: 365

managed to boot FreeBSD-13.0-RELEASE-arm-armv7-GENERICSD.img
Code:
Using DTB provided by EFI at 0x7feed000.
Kernel entry at 0x76000200...
Kernel args: (null)
WARNING: Cannot find freebsd,dts-version property, cannot check DTB compliance
---<<BOOT>>---
armv6 version stucks just after "Kernel args: (null)"
running as
Code:
#!/bin/sh
qemu-system-arm \
  -M virt \
  -m 1024 \
  -drive file=pflash0.img,format=raw,if=pflash,readonly=on \
  -drive file=pflash1.img,format=raw,if=pflash \
  -drive file=$1.img,if=virtio,cache=writethrough \
  -nographic \
  -serial mon:stdio
pflash images are made as
Code:
dd if=/dev/zero of=pflash0.img bs=1m count=64
dd if=/dev/zero of=pflash1.img bs=1m count=64
dd if=QEMU_EFI.fd of=pflash0.img conv=notrunc
dd if=QEMU_VARS.fd of=pflash1.img conv=notrunc
and qemu efi files are from https://retrage.github.io/edk2-nightly/ (arm version)
 
OP
covacat

covacat

Well-Known Member

Reaction score: 170
Messages: 365

gave up on building/trying an armv6 kernel
ended up with a patched generic (armv7) kernel with a patched machine_arch string to
report armv6 at sysctl hw.machine_arch
seems to work ok about 2x faster then the real thing (pi zero)
tests building archivers/zip (from make fetch config to make install)
Code:
armv6 on qemu on X5675  @ 3.07GHz
real    2m52.248s
user    2m18.280s
sys     0m22.967s

PI ZERO         
real    5m3.495s
user    4m26.679s
sys     0m24.696s

i5-4570R @ 2.70GHz virtual box guest
real    0m7.090s
user    0m5.652s
sys     0m0.569s

all on 13-RELEASE
 
Top