Fully automated kernel compile for EasyOS


This directory contains scripts and source to fully automate patching and compiling of the kernel and modules. The result is also packaged into a kernel source SFS and to kernel binary and headers PET packages (hosted at distro.ibiblio.org/easyos/).

Instructions

Download build-kernel.tar.gz and expand it. It will expand as folder build-kernel. Copy the contents to /usr/src, or create /usr/src as a symlink to build-kernel.

Copy the file DOTconfig-<ver> as just DOTconfig.

You also need the base linux source, for example linux-5.4.tar.bz2 for all 5.2.x. Download the source to /usr/src. Don't expand it, the 1kernel.sh script will do that, and will apply the sub-version patch (for example 5.4.3 patch). If not in the online folder that you downloaded from, it will be in an earlier folder.

That's it, you are ready to go. Run the three scripts in sequence, starting with:
# ./1kernel.sh
The three scripts that are to be run are '1kernel.sh', '2modules.sh' and '3package.sh'. Another, '1recompile.sh', is for a special purpose, do not run it.

Notes

It is recommended that you compile the kernel in the same version/family of Linux for which you intend to use the kernel. The kernel is sensitive to the version of 'gcc' (the Gnu C compiler) used to compile it, and later on if a user wants to compile any 3rd-party kernel driver, it is necessary that they should be using the same version of gcc.

After running '1kernel.sh', the Linux kernel, named 'vmlinuz', will be in /boot. You are then required to reboot, running the new kernel, before executing the next script, '2modules.sh'.
If running Easy, you will need to copy this new kernel into the boot partition -- if running from a USB stick, the working partition is the first one.

Regards,
Barry Kauler
Dec 2019
https://bkhome.org/news/