def install(): suffix = __getSuffix() # Dump kernel version under /etc/kernel dumpVersion() # Install kernel image pisilinuxtools.insinto("/boot/", "arch/x86/boot/bzImage", "kernel-%s" % suffix) # Install the modules # mod-fw= avoids firmwares from installing # Override DEPMOD= to not call depmod as it will be called # during module-init-tools' package handler autotools.rawInstall("INSTALL_MOD_PATH=%s/" % get.installDIR(), "DEPMOD=/bin/true modules_install mod-fw=") # Remove symlinks first pisilinuxtools.remove("/lib/modules/%s/source" % suffix) pisilinuxtools.remove("/lib/modules/%s/build" % suffix) # Install Module.symvers and System.map here too shutil.copy("Module.symvers", "%s/lib/modules/%s/" % (get.installDIR(), suffix)) shutil.copy("System.map", "%s/lib/modules/%s/" % (get.installDIR(), suffix)) # Create extra/ and updates/ subdirectories for _dir in ("extra", "updates"): pisilinuxtools.dodir("/lib/modules/%s/%s" % (suffix, _dir))
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)