From e35587b117197615902a50077af628fb746d3b15 Mon Sep 17 00:00:00 2001 From: Devan Franchini Date: Mon, 6 Oct 2014 13:41:41 -0400 Subject: [PATCH] tools-hardened/desktop: Adds kernel source population in chroot In order to make the building of the ISO non-reliant on any sort of external settings from the build system, the kernel source for needs to be populated into the chroot, along with the pre-made kernel config. --- tools-hardened/desktop/fluxbox-run.sh | 1 + tools-hardened/desktop/gnome3-run.sh | 1 + tools-hardened/desktop/run-base.sh | 7 +++++++ tools-hardened/desktop/xfce4-run.sh | 1 + 4 files changed, 10 insertions(+) diff --git a/tools-hardened/desktop/fluxbox-run.sh b/tools-hardened/desktop/fluxbox-run.sh index a429aad2..28bbe501 100755 --- a/tools-hardened/desktop/fluxbox-run.sh +++ b/tools-hardened/desktop/fluxbox-run.sh @@ -80,6 +80,7 @@ setup_confs() { main() { unpack_stage3 mount_dirs + populate_kernel_src populate_etc rebuild_toolchain rebuild_world diff --git a/tools-hardened/desktop/gnome3-run.sh b/tools-hardened/desktop/gnome3-run.sh index 1280520b..8b6bc734 100755 --- a/tools-hardened/desktop/gnome3-run.sh +++ b/tools-hardened/desktop/gnome3-run.sh @@ -71,6 +71,7 @@ setup_confs() { main() { unpack_stage3 mount_dirs + populate_kernel_src populate_etc rebuild_toolchain rebuild_world diff --git a/tools-hardened/desktop/run-base.sh b/tools-hardened/desktop/run-base.sh index 12a0ee5d..24326b35 100755 --- a/tools-hardened/desktop/run-base.sh +++ b/tools-hardened/desktop/run-base.sh @@ -15,6 +15,12 @@ mount_dirs() { mount --bind /sys/ "${ROOTFS}"/sys/ } +populate_kernel_src() +{ + cp -f files/kernel-config "${KERNEL_SOURCE}" + cp -Rf "${KERNEL_SOURCE}"/ "${ROOTFS}"/usr/src/ +} + populate_etc() { cp -f files/fstab "${ROOTFS}"/etc/fstab cp -f files/resolv.conf "${ROOTFS}"/etc/resolv.conf @@ -117,6 +123,7 @@ setup_systemd() { cleanup_dirs() { rm -rf "${ROOTFS}"/tmp/* + rm -rf "${ROOTFS}"/usr/src/* rm -rf "${ROOTFS}"/var/cache/* rm -rf "${ROOTFS}"/var/log/* rm -rf "${ROOTFS}"/var/tmp/* diff --git a/tools-hardened/desktop/xfce4-run.sh b/tools-hardened/desktop/xfce4-run.sh index 0d5bafc6..951dab03 100755 --- a/tools-hardened/desktop/xfce4-run.sh +++ b/tools-hardened/desktop/xfce4-run.sh @@ -74,6 +74,7 @@ setup_confs() { main() { unpack_stage3 mount_dirs + populate_kernel_src populate_etc rebuild_toolchain rebuild_world