Build sm kernel