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:

make_menuconfig_1.png

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.

make_menuconfig_2.pngmake_menuconfig_3.png

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.

make_menuconfig_4.png

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.