OpenBSD hangs at "setting tty flags" when I use a custom kernel

If you're running OpenBSD 4.5 and above, and you compiled your own kernel, you may find that it hangs upon boot after "setting tty flags".

The solution to this is to disable "mpbios" in the kernel.

A detailed writeup is here: