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:
parent
c2b28e8d1f
commit
e35587b117
|
@ -80,6 +80,7 @@ setup_confs() {
|
||||||
main() {
|
main() {
|
||||||
unpack_stage3
|
unpack_stage3
|
||||||
mount_dirs
|
mount_dirs
|
||||||
|
populate_kernel_src
|
||||||
populate_etc
|
populate_etc
|
||||||
rebuild_toolchain
|
rebuild_toolchain
|
||||||
rebuild_world
|
rebuild_world
|
||||||
|
|
|
@ -71,6 +71,7 @@ setup_confs() {
|
||||||
main() {
|
main() {
|
||||||
unpack_stage3
|
unpack_stage3
|
||||||
mount_dirs
|
mount_dirs
|
||||||
|
populate_kernel_src
|
||||||
populate_etc
|
populate_etc
|
||||||
rebuild_toolchain
|
rebuild_toolchain
|
||||||
rebuild_world
|
rebuild_world
|
||||||
|
|
|
@ -15,6 +15,12 @@ mount_dirs() {
|
||||||
mount --bind /sys/ "${ROOTFS}"/sys/
|
mount --bind /sys/ "${ROOTFS}"/sys/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
populate_kernel_src()
|
||||||
|
{
|
||||||
|
cp -f files/kernel-config "${KERNEL_SOURCE}"
|
||||||
|
cp -Rf "${KERNEL_SOURCE}"/ "${ROOTFS}"/usr/src/
|
||||||
|
}
|
||||||
|
|
||||||
populate_etc() {
|
populate_etc() {
|
||||||
cp -f files/fstab "${ROOTFS}"/etc/fstab
|
cp -f files/fstab "${ROOTFS}"/etc/fstab
|
||||||
cp -f files/resolv.conf "${ROOTFS}"/etc/resolv.conf
|
cp -f files/resolv.conf "${ROOTFS}"/etc/resolv.conf
|
||||||
|
@ -117,6 +123,7 @@ setup_systemd() {
|
||||||
|
|
||||||
cleanup_dirs() {
|
cleanup_dirs() {
|
||||||
rm -rf "${ROOTFS}"/tmp/*
|
rm -rf "${ROOTFS}"/tmp/*
|
||||||
|
rm -rf "${ROOTFS}"/usr/src/*
|
||||||
rm -rf "${ROOTFS}"/var/cache/*
|
rm -rf "${ROOTFS}"/var/cache/*
|
||||||
rm -rf "${ROOTFS}"/var/log/*
|
rm -rf "${ROOTFS}"/var/log/*
|
||||||
rm -rf "${ROOTFS}"/var/tmp/*
|
rm -rf "${ROOTFS}"/var/tmp/*
|
||||||
|
|
|
@ -74,6 +74,7 @@ setup_confs() {
|
||||||
main() {
|
main() {
|
||||||
unpack_stage3
|
unpack_stage3
|
||||||
mount_dirs
|
mount_dirs
|
||||||
|
populate_kernel_src
|
||||||
populate_etc
|
populate_etc
|
||||||
rebuild_toolchain
|
rebuild_toolchain
|
||||||
rebuild_world
|
rebuild_world
|
||||||
|
|
Loading…
Reference in a new issue