How do I build an image for testing?

Check out https://developer.puri.sm/Librem5/Development_Environment/Boards/qemu.html