mirror of
https://github.com/truenas/scale-build.git
synced 2026-02-15 07:29:12 +00:00
This adds linux kernel to the build. Due to size of repo and temporary files, logic for building kernel is slightly different than other packages. A non-tmpfs filesystem is overlaid as dpkg-src in this case and build on it rather than tmpfs. Kernel config is generated in two or three steps during the build process. make defconfig is run to generate a default config based on architecture, then the TrueNAS-specific configuration is merged with it, and if a debug kernel is requested (by uncommenting relevant line in build.sh), additional debugging parameters are applied. A customized copy of current kernel source is also mounted as /kernel inside the package build chroot. A new key has also been added to the build_manifest "kernel_module", which if set to true will cause the kernel image and headers to be installed in the package building chroot prior to fulfilling the packages dependencies. Packages marked such will also be rebuilt when the kernel package is updated. A minor change to behavior in low ram situations (i.e. less than recommended amount) was added to the effect that update files will not be generated on tmpfs. In testing this stage of the overall build process was observed to be most likely to fail due to running out of space on the tmpfs filesystems. Correspondingly, our tmpfs volume size was increased to 12 GiB.