summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eclass/kogaion-kernel.eclass16
1 files changed, 12 insertions, 4 deletions
diff --git a/eclass/kogaion-kernel.eclass b/eclass/kogaion-kernel.eclass
index ab1870b1..f3120881 100644
--- a/eclass/kogaion-kernel.eclass
+++ b/eclass/kogaion-kernel.eclass
@@ -738,9 +738,6 @@ _kernel_src_install() {
echo "${KV_FULL}" > "RELEASE_LEVEL"
doins "RELEASE_LEVEL"
einfo "Installing ${base_dir}/RELEASE_LEVEL file: ${KV_FULL}"
-
- use dracut && \
- _dracut_initramfs_create "${KV_FULL}"
}
kogaion-kernel_pkg_preinst() {
@@ -867,11 +864,18 @@ kogaion-kernel_bzimage_config() {
}
_dracut_initramfs_create() {
+ if use amd64 || use x86; then
+ if use amd64; then
+ local kern_arch="x86_64"
+ else
+ local kern_arch="x86"
+ fi
+ fi
local kver="${1}"
elog "Creating dracut initramfs for ${kver}"
addpredict /etc/ld.so.cache~
- dracut -N -f -o systemd -o systemd-initrd -o systemd-networkd -o dracut-systemd --no-hostonly-cmdline --kver="${kver}" "${D}/boot/initramfs-genkernel-x86_64-${kver}"
+ dracut -N -f -o systemd -o systemd-initrd -o systemd-networkd -o dracut-systemd --no-hostonly-cmdline --kver="${kver}" "${D}/boot/initramfs-genkernel-${kern_arch}-${kver}"
}
kogaion-kernel_pkg_postinst() {
@@ -907,6 +911,10 @@ kogaion-kernel_pkg_postinst() {
if use arm; then
kogaion-kernel_uimage_config
fi
+ # generate ramfs with dracut
+ if use dracut ; then
+ _dracut_initramfs_create
+ fi
# Setup newly installed kernel on x86/amd64
# This is quite handy for static grub1/grub2
# configurations (like on Amazon EC2)