summaryrefslogtreecommitdiff
path: root/eclass/kogaion-kernel.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@rogentos.ro>2016-08-27 15:50:21 +0100
committerV3n3RiX <venerix@rogentos.ro>2016-08-27 15:50:21 +0100
commit16efca00ee59b17f9c160ca4df147d566fc37d91 (patch)
treec056e58e51941b7eb18af4c349dc8ec6dbc1f318 /eclass/kogaion-kernel.eclass
parent761597515f7f65f7741d2852d4e9d8769b325fec (diff)
no wonder it's not working, dracut call is in kogaion_kernel_src_install function, so the kernel is not even installed and we attempt to create initramfs...move dracut call to kogaion_kernel_pkg_postinst
Diffstat (limited to 'eclass/kogaion-kernel.eclass')
-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)