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

@ -80,6 +80,7 @@ setup_confs() {
main() {
unpack_stage3
mount_dirs
populate_kernel_src
populate_etc
rebuild_toolchain
rebuild_world

View file

@ -71,6 +71,7 @@ setup_confs() {
main() {
unpack_stage3
mount_dirs
populate_kernel_src
populate_etc
rebuild_toolchain
rebuild_world

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

View file

@ -74,6 +74,7 @@ setup_confs() {
main() {
unpack_stage3
mount_dirs
populate_kernel_src
populate_etc
rebuild_toolchain
rebuild_world