FreeBSD Install
qemu setup and running
- Download the VM image here.
- Start with:
qemu-system-x86_64 -enable-kvm \
-name "freebsddev" \
-smp 12 -m 24G -cpu host \
-monitor stdio \
-netdev tap,id=tapnet0,ifname=tapNAME,script=no,downscript=no \
-device virtio-net-pci,netdev=tapnet0,mac=xx:xx:xx:xx:xx:xx \
-device qemu-xhci,id=xhci \
-device usb-tablet,bus=xhci.0,port=1 \
-device virtio-sound-pci,audiodev=snd0 \
-audiodev pipewire,id=snd0 \
-vga virtio -display sdl,gl=on \
-drive file=/path/to/FreeBSD-14.3-RELEASE-amd64-ufs.qcow2,if=virtio \
-boot order=dc
- Set root password with:
# passwd
- I ran out of room rather quickly. For UFS, I fixed that with:
- Shutting off vm and using:
$ qemu-img resize file.qcow2 80G
- Downloading a boot only image and then booting into the VM with that and:
-
# gpart resize -i 4 vtbd0
-
# growfs vtbd0p4
- Reboot into the VM
System setup
- Install your favorite utilities:
# pkg install tmux htop vim-tiny
- (Optional) Install your window manager:
# pkg install awesome lightdm
- ...
FreeBSD dev
Cross compile rootfs
Mostly taken from Cross Compiling FreeBSD for Fun and Profit.
-
$ git clone git clone https://git.FreeBSD.org/src.git
-
$ cd src
-
$ MAKEOBJDIRPREFIX=$HOME/aarch64-obj make -j `nproc` buildworld TARGET=arm64 TARGET_ARCH=aarch64
-
$ MAKEOBJDIRPREFIX=$HOME/aarch64-obj make -j `nproc` installworld DESTDIR=$HOME/aarch64 TARGET=arm64 TARGET_ARCH=aarch64
-
$ MAKEOBJDIRPREFIX=$HOME/aarch64-obj make -j `nproc` distribution DESTDIR=$HOME/aarch64 TARGET=arm64 TARGET_ARCH=aarch64
Cross compile kernel
From the src src from the rootfs step
-
$ MAKEOBJDIRPREFIX=$HOME/aarch64-obj make -j `nproc` TODO TARGET=arm64 TARGET_ARCH=aarch64
- TODO