'build the kernel
make_opts
additional options to make, if any'

@log.record
@tee_output_logdir_mark
def build(self, make_opts='', logfile='', extraversion='autotest'):

    os_dep.commands('gcc', 'make')
    if (logfile == ''):
        logfile = os.path.join(self.log_dir, 'kernel_build')
    os.chdir(self.build_dir)
    if extraversion:
        self.extraversion(extraversion)
    self.set_cross_cc()
    utils.system('make    dep', ignore_status=True)
    threads = (2 * utils.count_cpus())
    build_string = ('make    -j    %d    %s    %s' % (threads, make_opts, self.build_target))
    print build_string
    utils.system(build_string)
    if kernel_config.modules_needed('.config'):
        utils.system(('make    -j    %d    %s    modules' % (threads, make_opts)))
    kernel_version = self.get_kernel_build_ver()
    kernel_version = re.sub('-autotest', '', kernel_version)
    self.logfile.write(('BUILD    VERSION:    %s\n' % kernel_version))
    utils.force_copy((self.build_dir + '/System.map'), self.results_dir)
