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.
This commit is contained in:
Devan Franchini 2014-10-06 13:41:41 -04:00
parent c2b28e8d1f
commit e35587b117
4 changed files with 10 additions and 0 deletions

View file

@ -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/*