Introduction
We are actively iterating on adding NVDIMM support to FreeBSD. To test the program without actual NVDIMM hardware, we use the newest version of QEMU which has support of virtual NVDIMM and is not yet available in ports.
Steps
-
- Install build dependencies
pkg install git python pkgconf bison gmake
- Clone source code and update dtc module
git clone https://github.com/qemu/qemu cd qemu git submodule update --init dtc
- Build and install
mkdir build cd build ../configure gmake gmake check gmake install
The source code (including build) folder can then be deleted after the installation. - Prepare an image
You can get a FreeBSD snapshot build of 12-CURRENT here, or build your own ones. - Start QEMU and test the functionality
qemu-system-x86_64 -hda freebsd.img -boot d -machine pc,nvdimm -m 32G,maxmem=100G,slots=10 -object memory-backend-ram,id=mem2,size=10G -device nvdimm,memdev=mem2,id=nv2,label-size=128k
(In QEMU:)
acpidump -t | less
- Install build dependencies
– Contributed by Guangyuan (Charlie) Yang