Build the Linux kernel using BANDIT¶
Update the phyglos catalog¶
The BANDIT uses the phyglos-kernel bundle to raise the Linux kernel. In order to use the phyglos-kernel, update the phyglos catalog from the phyglos.org repository:
# bandit -r phyglos.org update --all
Configure the phyglos-kernel bundle¶
The phyglos-kernel makes use of the linux-configs package, which provides links to several releases of the Linux kernel. In order to select what version of the kernel work with and other configuration options, edit the bundle:
# bandit phyglos-kernel edit
In this file change the variables PHY_KERNEL_VER, PHY_KERNEL_ARCH and PHY_KERNEL_HW to select the specific KConfig file to use. For exemple, to select the release 4.20.13 for the x86_64 architecture to use in a physical PC
## Kernel configuration
# Linux release, e.g:
# 4.4.176 - older LTS release
# 4.19.26 - newer LTS release
# 4.20.13 - newer stable release
PHY_KERNEL_VER="4.20.13"
# Processor target architecture
PHY_KERNEL_ARCH="x86_64"
## Use a preconfigured .config file, e.g.:
# pc_generic - PC compatible machine with generic hardware
# kvm_generic - KVM virtual machine with generic hardware
# virtualbox_generic - VirtualBox virtual machine with generic hardware
# vmware_generic - VMware virtual machine with generic hardware
PHY_KERNEL_HW="pc_generic"
Hint
See the phyglos Catalog Reference entry for more details about the phyglos-kernel bundle.
Configure the Linux kernel using the BANDIT¶
The linux-configs collection provides default sets of kernel options for some variants. You may want to modify or just to check the actual options in the KConfig file. To do so using the BANDIT, run the command:
# bandit phyglos-kernel config
Warning
Any modifications you make in the kernel configuration will be saved and used in the following compilation process. Do not change the provided options unless you know exactly what you are doing or the kernel may become unusable.
Raise the phyglos-kernel bundle¶
Build the phyglos-kernel bundle¶
Once the desired .config
file is ready in the build directory, the Linux kernel
can be compiled:
# bandit phyglos-kernel build
The compilation time can be quite long, even hours on some old machines. You can tune compilation process in the BANDIT toolkit setting the variable MAKEFLAGS:
# bandit edit
Install the phyglos-kernel bundle¶
If any of the options set in the .config
file were marked as modules, the
kernel compilation process has also created several additional binary files, the
kernel modules, that need to be properly installed along with the kernel
image.
Note
The following commands install binaries in the system and need to be run as a privileged user. Use the su or sudo command to get these privileges.
# bandit phyglos-kernel install