mostly merge latest MirBSD code