diff options
author | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2024-07-23 11:49:10 +0200 |
---|---|---|
committer | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2024-07-24 19:17:41 +0200 |
commit | 11b5c48af37beba23c803f6fba78a85879b2c794 (patch) | |
tree | c979889f81ebef73a67a4beeb574f9091a601865 /eclass | |
parent | sys-fs/cryptsetup: Remove the restriction on gcrypt (diff) | |
download | gentoo-11b5c48af37beba23c803f6fba78a85879b2c794.tar.gz gentoo-11b5c48af37beba23c803f6fba78a85879b2c794.tar.bz2 gentoo-11b5c48af37beba23c803f6fba78a85879b2c794.zip |
eclass/kernel-{build,install}.eclass: link to config,Sys.map in moddir
The kernels 'make rpm-pkg' and 'make deb-pkg' install the config
and System.map into the modules directory for easy access. Let's
do the same here so our gpkg's are more symetric to rpm's and
deb's and tools that look for these files there can find it.
This also provides an easy location for the user to access the
config. Considering that /boot/config-x.y.z does not always
exist (the config instalation via /sbin/installkernel depends
on layout and +/-systemd configuration).
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/37684
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/kernel-build.eclass | 2 | ||||
-rw-r--r-- | eclass/kernel-install.eclass | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index be0256c21102..29719609b912 100644 --- a/eclass/kernel-build.eclass +++ b/eclass/kernel-build.eclass @@ -448,6 +448,8 @@ kernel-build_src_install() { # fix source tree and build dir symlinks dosym "../../../${kernel_dir}" "/lib/modules/${KV_FULL}/build" dosym "../../../${kernel_dir}" "/lib/modules/${KV_FULL}/source" + dosym "../../../${kernel_dir}/.config" "/lib/modules/${KV_FULL}/config" + dosym "../../../${kernel_dir}/System.map" "/lib/modules/${KV_FULL}/System.map" if [[ "${image_path}" == *vmlinux* ]]; then dosym "../../../${kernel_dir}/${image_path}" "/lib/modules/${KV_FULL}/vmlinux" else diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass index e6f0b404dcaa..0a85bfb8629d 100644 --- a/eclass/kernel-install.eclass +++ b/eclass/kernel-install.eclass @@ -623,6 +623,13 @@ kernel-install_pkg_preinst() { rm "${ED}/lib/modules/${KV_FULL}"/{build,source} || die dosym "../../../src/linux-${KV_FULL}" "/usr/lib/modules/${KV_FULL}/build" dosym "../../../src/linux-${KV_FULL}" "/usr/lib/modules/${KV_FULL}/source" + local file + for file in .config System.map; do + if [[ -L "${ED}/lib/modules/${KV_FULL}/${file#.}" ]]; then + rm "${ED}/lib/modules/${KV_FULL}/${file#.}" || die + dosym "../../../src/linux-${KV_FULL}/${file}" "/usr/lib/modules/${KV_FULL}/${file#.}" + fi + done for file in vmlinux vmlinuz; do if [[ -L "${ED}/lib/modules/${KV_FULL}/${file}" ]]; then rm "${ED}/lib/modules/${KV_FULL}/${file}" || die |