Fine-tuning the kernel configuration file for the "La Frite"

The following assumes you have read the Linux kernel cross or native compilation instructions for the "La Frite". These include the basic steps for generating a default Aarch64 Linux kernel .config file.
However, the default Aarch64 Linux kernel configuration file is sub-optimal for generating a kernel for the "La Frite". This is a quick guide on how to edit/fine-tune/customize the Linux kernel configuration file.

Editing the configuration file

IMPORTANT: the .config file should not be edited directly.
The following note can be found at the top of the kernel configuration file:

# Automatically generated file; DO NOT EDIT.
# Linux/arm64 4.19.0 Kernel Configuration

The Linux kernel includes various tools to generate a valid configuration file, one of the most used ones is the "menuconfig" tool, so that's what we are going to use in the following example (note that the following assumes we are cross-compiling the kernel, if you are natively compiling you don't need to specify the architecture or the cross-compiler in the commands below). First step, let's re-generate a clean, basic default configuration file, and then we'll edit that using menuconfig. In a terminal:

cd <correct_path_here>/Amlogic/kernel_dev/linux
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- distclean
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- menuconfig

The "make menuconfig" command will launch the menu-driven tool to configure the kernel:


Now, the secret to making proper changes to the kernel configuration file is to make them one at a time, so that's exactly what we are going to do. Scroll down to the File Systems submenu, then press Enter, then scroll down again until you see the btrfs filesystem support which is compiled as a module by default.


We are going to change that so that the btrfs support is compiled in the kernel itself. Pressing the space bar while the "Btrfs filesystem support" option is highlighted/selected will cycle through Module/Built-in/Not compiled options.


We can now save the changes (press S), exit the menuconfig tool (press the Escape key) and proceed to compile the kernel. By default our changes have been saved to the .config file which is used by the make tool to build the kernel. However it's a good idea to backup this modified .config file and document the changes in an accompanying README file.

Example optimized configuration files

The following are example optimized configuration files. Please upload any that you find interesting/useful and add a link to this table.

Architecture / SoC Linux Kernel Version Notes Link
Aarch64 / Amlogic S9XX SoC's 4.19 Optimized for Amlogic S905 series but also runs in QEMU ARM 64-bit emulator config-opt-1
cell-content cell-content cell-content link