Mainline Kernel Stable Kernel Long-Term Support LTS Kernel Distribution-Specific Kernel Custom Kernel Real-Time Kernel
Mainline Kernel Stable Kernel Long-Term Support LTS Kernel Distribution-Specific Kernel Custom Kernel Real-Time Kernel
deployed on both
Mainline Kernel: Latest development kernel with the newest features and
experimental changes.
PPT 1
Embedded Kernel: Custom kernel optimized and stripped down for
embedded systems with limited resources.
1. Obtain the Kernel Source Code: Download the kernel source code from
the official Linux kernel repository or your distribution's specific source
code repository.
specifies the features and options you want to enable or disable in your
recompiled kernel.
3. Build the Kernel: Execute the make command in the kernel source
directory. This will compile the kernel based on the configuration file you
created.
4. Install the Kernel: Copy the compiled kernel image to the /boot directory,
where it can be selected by the bootloader.
PPT 2
make -j$(nproc)
j$(nproc) uses all available CPU cores to speed up the build process.
make modules
This installs the kernel image to /boot and updates the initial RAM disk
( initramfs ).
3. Update GRUB
1. Update GRUB Configuration:
This command regenerates the GRUB configuration file, detecting the new
kernel and adding it to the GRUB boot menu.
sudo update-grub
4. Reboot
1. Reboot the System:
During the boot process, GRUB should present the new kernel as an
option. If everything is set up correctly, it will boot using the newly
installed kernel.
PPT 3
sudo reboot
uname -r
Feel free to adjust any steps based on your specific setup or requirements!
Buildroot
Different methods to create custom kernels for your embedded devices
PPT 4
go to buildroot user manual
check for the mandatory packages list and verify if these are installed on
your system
Also look into the Optional Packages section to enable the required
packages (for example - ncursers5 for menuconfig interface)
do apt-upadate and upgrade to make sure you are working with the latest
packages
do make <config name> to write the config into the .config file
PPT 5
💡 The make process usually takes about 1 to 3 hours depending on your
system specifications
once the build is completed you can do ls -la output/image to look for the
.img file for your specifig configuration
Buildroot slides
PPT 6
Types of kernels (detailed)
Context: Used by developers and those needing the latest features for
testing or bleeding-edge development. It's the kernel that eventually
forms the basis for stable and LTS releases.
Stable Kernel
Distribution-Specific Kernel
PPT 7
users to create custom distributions with tailored kernels for
embedded systems.
Real-Time Kernel
Embedded Kernel
Custom Kernel
Developed by
Receives the latest features, updates, and
the Linux
Mainline experimental changes. Ideal for developers or
community and
Kernel those needing the newest kernel
led by Linus
advancements.
Torvalds.
A version of the
mainline kernel Focuses on stability. Recommended for
that has general users. Receives updates primarily
Stable Kernel
undergone focused on bug fixes and minor
more extensive improvements.
testing.
PPT 8
Maintained for
Long-Term several years Used in environments where reliability is
Support (LTS) with a focus on critical. Regular security updates and bug
Kernel stability and fixes but no new features.
security.
Designed for
real-time Ensures predictable and low-latency response
Real-Time
applications times. Often used in specialized systems
Kernel
where timing is requiring precise timing and performance.
critical.
Optimized for
Stripped-down version of the kernel, removing
embedded
Embedded unnecessary features. Used in devices like
devices with
Kernel routers, IoT gadgets, and other dedicated
limited
hardware.
resources.
Built from
Allows for the inclusion of specific features or
source to meet
the exclusion of unnecessary components.
Custom Kernel specific needs
Can be used in specialized hardware or for
or optimize
performance tuning in specific environments.
performance.
what is kconfig
PPT 9
Automated Tools: Tools like make menuconfig or make xconfig use Kconfig
files to generate user-friendly configuration interfaces.
module installation
PPT 10