diff --git a/Dockerfile b/Dockerfile index b26f62d..9a76982 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,6 +32,7 @@ RUN (zcat /usr/src/unionfs-2.2.3_for_2.6.24.diff.gz | patch -p1) && \ FROM lpenz/debian-lenny-i386-minbase WORKDIR /root COPY --from=kernel-builder /usr/src/*.deb . +COPY update-initramfs.sh . RUN apt-get update && \ apt-get -y --force-yes install live-helper genisoimage syslinux squashfs-tools aptitude && \ apt-get clean diff --git a/Jenkinsfile b/Jenkinsfile index a95c5d5..d81f374 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -40,8 +40,12 @@ pipeline { --union-filesystem unionfs \ --linux-packages "squashfs-modules-2.6.24 linux-image-2.6.24" \ -k retrodebian1 - cp /usr/share/live-helper/examples/hooks/update-initramfs.sh config/chroot_local-hooks - cp /root/*.deb config/chroot_local-packages/ + + chmod +x /root/update-initramfs.sh + cp /root/update-initramfs.sh config/chroot_local-hooks + + cp /root/linux-image-*.deb config/chroot_local-packages/ + cp /root/squashfs-modules-*.deb config/chroot_local-packages/ lh_build diff --git a/update-initramfs.sh b/update-initramfs.sh new file mode 100644 index 0000000..294ccd1 --- /dev/null +++ b/update-initramfs.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to rebuild the initramfs image. +# To enable it, copy or symlink this hook into your config/chroot_local-hooks +# directory. +# +# Note: You only want to use this hook if you have modified any initramfs-script +# during the build and need to refresh the initrd.img for that purpose. + +grep -q '^squashfs$' /etc/initramfs-tools/modules 2>/dev/null || \ + echo squashfs >> /etc/initramfs-tools/modules + +for KERNEL in /boot/vmlinuz-* +do + VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')" + + update-initramfs -k ${VERSION} -t -u +done \ No newline at end of file