Skip to content

MipsQemuEmulatorImages

erikarn edited this page Nov 20, 2014 · 2 revisions

Creating images for MIPS QEMU

Overview

It's quite simple to create images to boot FreeBSD/MIPS on QEMU.

Firstly - the FreeBSD wiki page on MIPS emulation: https://wiki.freebsd.org/FreeBSD/MipsEmulation

Next - the targets: we're building MALTA / MALTA64 kernels and appropriate worlds. There are targets available:

  • malta - mips32 big endian
  • maltael - mips32 little endian
  • malta64 - mips64 big endian
  • malta64el - mips64 little endian

Making it work

A few things before you get started:

  • [target] is the target above - malta, maltael, malta64, malta64el
  • [kernel] is the kernel names - MALTA, MALTAEL, MALTA64, MALTA64EL
  • -m 256 specifies the VM to have 256MB of RAM. For 32 bit MIPS platforms this is the maximum that is supported.
  1. Check out FreeBSD-HEAD somewhere
  2. Check out the freebsd-wifi-build git repository somewhere
  3. Build the world and create the image: /path/to/build [target] buildworld buildkernel installworld installkernel fullroot fullfsimage
  4. Create a 1GB swap file: dd if=/dev/zero of=../[target]-swap.img bs=1k seek=1048576 count=1
  5. Run qemu: qemu-system-mips -M malta -kernel /tftpboot/kernel.[kernel] -hda ../fullroot-[target].img -hdb ../[target]-swap.img -nographic -m 256