# I. Fetch the sources git clone https://github.com/netbsd/src # II. Patch the kernel for fpudna cd src curl http://netbsd.org/~kamil/patch-00074-permit-fpudna-in-kernel.txt | patch -p0 # III. [deleted step] # IV. Build the iso # 1. build distribution ./build.sh -U -u -j8 -m amd64 -N0 distribution # 2. build release ./build.sh -U -u -j8 -m amd64 -N0 release # 3. build iso-image ./build.sh -U -u -j8 -m amd64 -N0 iso-image # V. Locate iso and install it (select all sets) NetBSD-8.99.*-amd64.iso # VI. Prepare pkgsrc ftp -o- ftp://ftp.netbsd.org/pub/pkgsrc/stable/pkgsrc.tar.gz | tar -zxpf- -C /usr cd /usr/pkgsrc/devel/git-base && make install cd /usr/pkgsrc/security/mozilla-rootcerts && make install # And follow the MESSAGE commands to finish the installation. # VII. Prepare pkgsrc-wip cd /usr/pkgsrc git clone --depth 1 git://wip.pkgsrc.org/pkgsrc-wip.git wip cd /usr/pkgsrc/wip/qemu-haxm make install # VIII. Fetch and build haxm git clone https://github.com/intel/haxm cd platforms/netbsd make # IX. Insert haxm into the kernel modload ./haxm.kmod # check kernel log with: dmesg|tail # X. Create HAXM devices mknod /dev/HAX c 220 0 mkdir /dev/hax_vm for i in `seq 0 7`; do mkdir /dev/hax_vm0$i; done for i in `seq 0 7`; do mknod /dev/hax_vm/vm0$i c 222 $i; done # Use the following script to create vcpu nodes #!/bin/sh i=0 while [ $i -lt 128 ]; do vm=$(echo "$i/16"|bc) vcpu=$(echo "$i%16"|bc) echo "i=$i vm=$vm vcpu=$vcpu" cmd=$(printf "mknod /dev/hax_vm%02d/vcpu%02d c 221 %d" $vm $vcpu $i) $cmd let "i+=1" done # XI. Run qemu Fetch: http://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/latest/images/NetBSD-8.99.26-amd64.iso (or newer OS version if available) qemu --enable-hax -cdrom ./NetBSD-8.99.26-amd64.iso -curses