summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-02-11 17:34:53 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-02-11 17:34:53 +0000
commit20ba650e8d3869757f6c89b23f8b41500cd64657 (patch)
tree81a698b712c41d64edae44805f36255228d681dc /eclass
parent70fb964b97d74b88cbbdd3fcbf5871d57323dfd3 (diff)
gentoo auto-resync : 11:02:2024 - 17:34:53
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin39762 -> 39761 bytes
-rw-r--r--eclass/kernel-build.eclass5
-rw-r--r--eclass/kernel-install.eclass29
3 files changed, 27 insertions, 7 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index c2c0fa93e80c..a2d9b9e51349 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 14a6002ea5b5..7922638be6e1 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -385,6 +385,11 @@ kernel-build_src_install() {
# fix source tree and build dir symlinks
dosym "../../../${kernel_dir}" "/lib/modules/${module_ver}/build"
dosym "../../../${kernel_dir}" "/lib/modules/${module_ver}/source"
+ if [[ "${image_path}" == *vmlinux* ]]; then
+ dosym "../../../${kernel_dir}/${image_path}" "/lib/modules/${module_ver}/vmlinux"
+ else
+ dosym "../../../${kernel_dir}/${image_path}" "/lib/modules/${module_ver}/vmlinuz"
+ fi
if [[ ${KERNEL_IUSE_MODULES_SIGN} ]]; then
secureboot_sign_efi_file "${image}"
diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index 78a498000790..f512d815fe09 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -572,6 +572,7 @@ kernel-install_pkg_preinst() {
local dir_ver=${PV}${KV_LOCALVERSION}
local kernel_dir=${ED}/usr/src/linux-${dir_ver}
local relfile=${kernel_dir}/include/config/kernel.release
+ local image_path=$(dist-kernel_get_image_path)
[[ ! -d ${kernel_dir} ]] &&
die "Kernel directory ${kernel_dir} not installed!"
[[ ! -f ${relfile} ]] &&
@@ -598,6 +599,12 @@ kernel-install_pkg_preinst() {
rm "${ED}/lib/modules/${release}"/{build,source} || die
dosym "../../../src/linux-${dir_ver}" "/usr/lib/modules/${release}/build"
dosym "../../../src/linux-${dir_ver}" "/usr/lib/modules/${release}/source"
+ for file in vmlinux vmlinuz; do
+ if [[ -L "${ED}/lib/modules/${release}/${file}" ]]; then
+ rm "${ED}/lib/modules/${release}/${file}" || die
+ dosym "../../../src/linux-${dir_ver}/${image_path}" "/usr/lib/modules/${release}/${file}"
+ fi
+ done
fi
}
@@ -614,6 +621,7 @@ kernel-install_extract_from_uki() {
$(tc-getOBJCOPY) -O binary "-j.${extract_type}" "${uki}" "${out}" ||
die "Failed to extract ${extract_type}"
+ chmod 644 "${out}" || die
}
# @FUNCTION: kernel-install_install_all
@@ -629,7 +637,7 @@ kernel-install_install_all() {
local dir_ver=${1}
local kernel_dir=${EROOT}/usr/src/linux-${dir_ver}
local relfile=${kernel_dir}/include/config/kernel.release
- local image_path=${kernel_dir}/$(dist-kernel_get_image_path)
+ local image_path=$(dist-kernel_get_image_path)
local image_dir=${image_path%/*}
local module_ver
module_ver=$(<"${relfile}") || die
@@ -638,15 +646,22 @@ kernel-install_install_all() {
if use generic-uki; then
# Populate placeholders
kernel-install_extract_from_uki linux \
- "${image_dir}"/uki.efi \
- "${image_path}"
+ "${kernel_dir}/${image_dir}"/uki.efi \
+ "${kernel_dir}/${image_path}"
kernel-install_extract_from_uki initrd \
- "${image_dir}"/uki.efi \
- "${image_dir}"/initrd
+ "${kernel_dir}/${image_dir}"/uki.efi \
+ "${kernel_dir}/${image_dir}"/initrd
+ if [[ -L ${EROOT}/lib && ${EROOT}/lib -ef ${EROOT}/usr/lib ]]; then
+ ln -sf "../../../src/linux-${dir_ver}/${image_dir}/initrd" "${EROOT}/usr/lib/modules/${module_ver}/initrd" || die
+ ln -sf "../../../src/linux-${dir_ver}/${image_dir}/uki.efi" "${EROOT}/usr/lib/modules/${module_ver}/uki.efi" || die
+ else
+ ln -sf "../../../usr/src/linux-${dir_ver}/${image_dir}/initrd" "${EROOT}/lib/modules/${module_ver}/initrd" || die
+ ln -sf "../../../usr/src/linux-${dir_ver}/${image_dir}/uki.efi" "${EROOT}/lib/modules/${module_ver}/uki.efi" || die
+ fi
else
# Remove placeholders, -f because these have already been removed
# when doing emerge --config.
- rm -f "${image_dir}"/{initrd,uki.efi} || die
+ rm -f "${kernel_dir}/${image_dir}"/{initrd,uki.efi} || die
fi
fi
@@ -656,7 +671,7 @@ kernel-install_install_all() {
nonfatal mount-boot_check_status || break
nonfatal dist-kernel_install_kernel "${module_ver}" \
- "${image_path}" "${kernel_dir}/System.map" || break
+ "${kernel_dir}/${image_path}" "${kernel_dir}/System.map" || break
success=1
break