Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Oct 2014 01:01:43 +0100
From:      Ben Morrow <ben@morrow.me.uk>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
Subject:   Re: Trying to get MALTA64 running under qemu
Message-ID:  <20141021000143.GC12023@anubis.morrow.me.uk>
In-Reply-To: <CAJ-Vmok1kK7vUvv4HFg3vk6g3inaJgj_aBPyzptbz5Pe9gvsqA@mail.gmail.com>
References:  <20141018225950.GA12023@anubis.morrow.me.uk> <CAJ-Vmon5yFb7z5gDAZ4StAOY%2B05dBjd8w9u1PWZHR_ihynk9Ow@mail.gmail.com> <20141019223447.GB12023@anubis.morrow.me.uk> <CAJ-Vmok1kK7vUvv4HFg3vk6g3inaJgj_aBPyzptbz5Pe9gvsqA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Adrian Chadd <adrian@freebsd.org> wrote:
> Would you please post an updated recipe for what you've done to get
> freebsd-mips64 up on qemu-devel?

The mkimg step is missing from the instructions on the wiki, as are the
arguments to makefs to get it to include some spare inodes in the image.
I haven't yet found any way to pass boot-time arguments to the kernel
(qemu's -append option doesn't seem to work, or I'm passing the
arguments wrong) so the root fs has to be on ada0s1a.

This comes up successfully with qemu-devel-2.0.2_3. The 'malta' machine
seems to be rather limited (one CPU, no more than 256M memory); I might
see if I can get a kernel config that works with one of the other qemu
machines.

Ben

#!/bin/sh

set -ex

export TARGET=mips
export TARGET_ARCH=mips64
export KERNCONF=MALTA64
export DESTDIR=/tmp/mipsworld

make -C /usr/src -j6 buildworld
make -C /usr/src -j6 buildkernel
make -C /usr/src installworld

cp /usr/obj/mips.mips64/usr/src/sys/$KERNCONF/kernel mips64.kernel

echo '/dev/ada0s1a / ufs rw 1 1' >$DESTDIR/etc/fstab
echo '/dev/ada0s1b none swap sw 0 0' >>$DESTDIR/etc/fstab

# don't build a be UFS2 image; there is a bug in makefs
makefs -Z -B be -f 60% -b 60% -t ffs mips64.ufs $DESTDIR
mkimg -s mbr -o mips64.img \
    -p freebsd:-'mkimg -s bsd -p freebsd-ufs:=mips64.ufs -p freebsd-swap::1G'

# not as root...
#qemu-system-mips64 -M malta \
#    -nographic -m 256M -kernel mips64.kernel -hda mips64.img




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141021000143.GC12023>