Configure, Build, Install,
Customize, and Test a Linux
Kernel
Building kernel Steps taken :
1. first cloned the latest stable linux source tree to the system.
Using command : git clone --depth=1
[Link]
2. after cloning the linux source tree used command : make mrproper which will clean the source
tree from any unknown .config files.
3. Post cleaning using “make defconfig” made default config for make file.
4. then have used “make menuconfig” to customize configuration for kernel build using make.
Here I have removed support for xHCI_HCD USB 3.0 support/module.
then copied the new config file to .config.
5. used “make -j4” as I am having quad core processor.
Here Kernel : arch/x86/boot/bzImage is ready (#1)
here #1 is first time build the kernel image from source file using make command.
6. Now will build the image using : sudo make modules_install install
7. now will update the grub using “sudo update-grub”
8. Booting into the new kernel
9. where network were not able to connect via USB tether.
10. custom boot message :
11. post that ran the kernel test for all the modules : in directory : cd tools/testings/selftests/
using : make run_tests
12. It will include and install necessary header files for the particular tests to run , we can also run
tests as :
make –silent kselftest-all TARGETS=timer
Here it will only run tests on timer modules/ timer files. Each tests will have summary also each
tests will have dependencies which can get installed during the testing. Here we can run test on
different features : breakpoints, size , cpufreq, etc…
conclusion : Build Image and ran tests successfully, also this tests
has some errors as no file found regarding the individual tests, but
overall we can configure the boot message as per the guidance,
which requires PXELINUX dependencies to run and required
services to enabled it.
Also alternatively we can use grub menu as well, we need to
updated the GRUB_CMDLINE_LINUX="custom_msg='Welcome to
your custom Linux kernel! Built by Rujra Bhatt on $(Date)".
Hence successfully executed the Task which have been given as
challenge.