actionsapi/kerneltools: Don't install kernel sources, it's useless
This commit is contained in:
@@ -169,21 +169,23 @@ def install():
|
|||||||
# Install kernel image
|
# Install kernel image
|
||||||
pisitools.insinto("/boot/", "arch/x86/boot/bzImage", "kernel-%s" % suffix)
|
pisitools.insinto("/boot/", "arch/x86/boot/bzImage", "kernel-%s" % suffix)
|
||||||
|
|
||||||
# Check if loadable module support is available or not before doing module specific tasks
|
# Install the modules
|
||||||
if re.search("CONFIG_MODULES=y", open(".config", "r").read().strip()):
|
# mod-fw= avoids firmwares from installing
|
||||||
|
autotools.rawInstall("INSTALL_MOD_PATH=%s/" % get.installDIR(),
|
||||||
|
"modules_install mod-fw=")
|
||||||
|
|
||||||
# Install the modules
|
# Remove symlinks first
|
||||||
# mod-fw= avoids firmwares from installing
|
pisitools.remove("/lib/modules/%s/source" % suffix)
|
||||||
autotools.rawInstall("INSTALL_MOD_PATH=%s/" % get.installDIR(),
|
pisitools.remove("/lib/modules/%s/build" % suffix)
|
||||||
"modules_install mod-fw=")
|
|
||||||
|
|
||||||
# Install Module.symvers and System.map
|
# Create correct ones
|
||||||
pisitools.insinto("/lib/modules/%s/" % suffix, "System.map")
|
pisitools.dodir("/lib/modules/%s/build" % suffix)
|
||||||
pisitools.insinto("/lib/modules/%s/" % suffix, "Module.symvers")
|
pisitools.dosym("/lib/modules/%s/build" % suffix,
|
||||||
|
"/lib/modules/%s/source" % suffix)
|
||||||
|
|
||||||
# Remove wrong symlinks
|
# Create extra/ and updates/ subdirectories
|
||||||
pisitools.remove("/lib/modules/%s/source" % suffix)
|
for _dir in ("extra", "updates"):
|
||||||
pisitools.remove("/lib/modules/%s/build" % suffix)
|
pisitools.dodir("/lib/modules/%s/%s" % (suffix, _dir))
|
||||||
|
|
||||||
|
|
||||||
def installHeaders(extra=[]):
|
def installHeaders(extra=[]):
|
||||||
@@ -220,14 +222,15 @@ def installHeaders(extra=[]):
|
|||||||
xargs -n1 -i: find : -type f) | \
|
xargs -n1 -i: find : -type f) | \
|
||||||
cpio -pd --preserve-modification-time %s" % destination)
|
cpio -pd --preserve-modification-time %s" % destination)
|
||||||
|
|
||||||
# Copy Modules.symvers
|
# Copy Modules.symvers and System.map
|
||||||
shutil.copy("Module.symvers", "%s/" % destination)
|
shutil.copy("Module.symvers", "%s/" % destination)
|
||||||
|
shutil.copy("System.map", "%s/" % destination)
|
||||||
|
|
||||||
# Copy .config file which will be needed by some external modules
|
# Copy .config file which will be needed by some external modules
|
||||||
shutil.copy(".config", "%s/" % destination)
|
shutil.copy(".config", "%s/" % destination)
|
||||||
|
|
||||||
# Unset CONFIG_DEBUG_INFO if it's set in the kernel configuration
|
# Unset CONFIG_DEBUG_INFO if it's set in the kernel configuration
|
||||||
pisitools.dosed(".config", ".*CONFIG_DEBUG_INFO=.*", "# CONFIG_DEBUG_INFO is not set")
|
# pisitools.dosed(".config", ".*CONFIG_DEBUG_INFO=.*", "# CONFIG_DEBUG_INFO is not set")
|
||||||
|
|
||||||
# Settle the correct build symlink to this headers
|
# Settle the correct build symlink to this headers
|
||||||
pisitools.dosym("/%s" % headersDirectoryName, "/lib/modules/%s/build" % suffix)
|
pisitools.dosym("/%s" % headersDirectoryName, "/lib/modules/%s/build" % suffix)
|
||||||
@@ -269,24 +272,6 @@ def installLibcHeaders(excludes=[]):
|
|||||||
shelltools.system("rm -rf %s" % headers_tmp)
|
shelltools.system("rm -rf %s" % headers_tmp)
|
||||||
|
|
||||||
|
|
||||||
def installSource(onlySymlink=False):
|
|
||||||
destination = "usr/src/linux-source-%s" % __getSuffix()
|
|
||||||
|
|
||||||
# Create the symlink
|
|
||||||
pisitools.dosym("/%s" % destination, "/lib/modules/%s/source" % __getSuffix())
|
|
||||||
|
|
||||||
if not onlySymlink:
|
|
||||||
# Copy the whole source directory
|
|
||||||
pisitools.dodir("/usr/src")
|
|
||||||
shelltools.copytree("../%s/" % os.path.basename(get.curDIR()), os.path.join(get.installDIR(), destination))
|
|
||||||
|
|
||||||
# Cleanup the installed source
|
|
||||||
shelltools.cd(os.path.join(get.installDIR(), destination))
|
|
||||||
autotools.make("clean")
|
|
||||||
autotools.make("modules_prepare")
|
|
||||||
shelltools.system("find . -path './.*' | xargs rm -rf")
|
|
||||||
|
|
||||||
|
|
||||||
def cleanModuleFiles():
|
def cleanModuleFiles():
|
||||||
""" Cleans module.* files generated by depmod """
|
""" Cleans module.* files generated by depmod """
|
||||||
# Remove modules.* files, they will be autogenerated during pakhandler.
|
# Remove modules.* files, they will be autogenerated during pakhandler.
|
||||||
|
|||||||
Reference in New Issue
Block a user