Exemple #1
0
def build(debugSymbols=False):
    extra_config = []
    if debugSymbols:
        # Enable debugging symbols (-g -gdwarf2)
        extra_config.append("CONFIG_DEBUG_INFO=y")

    autotools.make("ARCH=%s %s" % (__getKernelARCH(), " ".join(extra_config)))
Exemple #2
0
def configure():
    # Copy the relevant configuration file
    shutil.copy("configs/kernel-%s-config" % get.ARCH(), ".config")

    # Set EXTRAVERSION
    pisilinuxtools.dosed("Makefile", "EXTRAVERSION =.*", "EXTRAVERSION = %s" % __getExtraVersion())

    # Configure the kernel interactively if
    # configuration contains new options
    autotools.make("ARCH=%s oldconfig" % __getKernelARCH())

    # Check configuration with listnewconfig
    try:
        autotools.make("ARCH=%s listnewconfig" % __getKernelARCH())
    except:
        pass
Exemple #3
0
def installLibcHeaders(excludes=None):
    headers_tmp = os.path.join(get.installDIR(), 'tmp-headers')
    headers_dir = os.path.join(get.installDIR(), 'usr/include')

    make_cmd = "O=%s INSTALL_HDR_PATH=%s/install" % (headers_tmp, headers_tmp)

    # Cleanup temporary header directory
    shelltools.system("rm -rf %s" % headers_tmp)

    # Create directories
    shelltools.makedirs(headers_tmp)
    shelltools.makedirs(headers_dir)
    
    ###################Workaround begins here ...
    #Workaround information -- http://patches.openembedded.org/patch/33433/
    cpy_src="%s/linux-*/arch/x86/include/generated" % (get.workDIR())
    cpy_tgt="%s/arch/x86/include" % (headers_tmp)
    shelltools.makedirs(cpy_tgt)
    
    copy_cmd ="cp -Rv %s %s " % (cpy_src, cpy_tgt)
    
    shelltools.system(copy_cmd)
    #######################Workaround ends here ...
    
    # make defconfig and install the headers
    autotools.make("%s defconfig" % make_cmd)
    autotools.rawInstall(make_cmd, "headers_install")

    oldwd = os.getcwd()

    shelltools.cd(os.path.join(headers_tmp, "install", "include"))
    shelltools.system("find . -name '.' -o -name '.*' -prune -o -print | \
                       cpio -pVd --preserve-modification-time %s" % headers_dir)

    # Remove sound/ directory which is installed by alsa-headers
    shelltools.system("rm -rf %s/sound" % headers_dir)

    # Remove possible excludes given by actions.py
    if excludes:
        shelltools.system("rm -rf %s" % " ".join(["%s/%s" % (headers_dir, exc.strip("/")) for exc in excludes]))

    shelltools.cd(oldwd)

    # Remove tmp directory
    shelltools.system("rm -rf %s" % headers_tmp)