[PATCH] have lb_chroot_hacks to build initrd only from chroot
Hello,
Please accept this patch which address the issue of lb_chroot_hacks
building an initrd image with kernel version from host system.
The rationale is that "update_initramfs -k all" builds an initrd with
the kernel version of the build host, which may be different from the
kernel versions in the chroot.
The patch does that by iterating on chroot/lib/modules and calling
update_initramfs several times specifying the kernel version.
Cheers,
Luigi Capriotti
--- a/lb_chroot_hacks 2011-11-30 11:20:39.148289000 +0100
+++ b/lb_chroot_hacks 2011-11-30 11:22:21.436289000 +0100
@@ -174,7 +174,10 @@
;;
esac
-Chroot chroot "${UPDATE_INITRAMFS_OPTIONS} update-initramfs -k all -t -u"
+for k in $(ls chroot/lib/modules) ; do
+ echo $k
+ Chroot chroot "${UPDATE_INITRAMFS_OPTIONS} update-initramfs -k $k -t -u"
+done
# We probably ought to use COMPRESS= in a temporary file in
# /etc/initramfs-tools/conf.d/ instead, but it's hard to pass options that
Reply to: