update cmake usage && add libpam for cross compiling