> Is there any tool like 'lsmod/insmod/rmmod' in Linux in Openbsd? Some one
> pointed me to 'lkm', however, it seems it is only a API. I need write my
> own tool to list all modules loaded?
You should look at the SEE ALSO section of man lkm, such as the
reference to modstat. But since there aren't any modules by default,
the answer is pretty easy: there are no modules loaded.
> 2. How can I build a package from source code tree?
> I want to build and install 'pthread' from source code tree. However, there
> are only three folders in the /usr/src/lib/libpthread/, and no souce code.
The libpthread code now lives in src/lib/librthread.