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)