F2fs enablement

Hi all,
I’m trying to enable the f2fs feature on AlmaLinux 8.4 (Electric Cheetah).
I’m rebuilding the kernel using the following (working on Centos 7.5) instructions

1 - HowTos/I_need_the_Kernel_Source
2 - HowTos/Custom_Kernel

Basically on my linux machine I did the following :

echo ‘%_topdir %(echo $HOME)/rpmbuild’ > ~/.rpmmacros
rpm -i ~/kernel/kernel-4.18.0-305.25.1.el8_4.src.rpm 2>&1 | grep -v ‘exist’
cd ~/rpmbuild/SPECS
rpmbuild -bp --target=$(uname -m) kernel.spec
cd ~/rpmbuild/BUILD/kernel-/linux-/
cp configs/kernel-4.18.0-x86_64.config .config
make oldconfig
make menuconfig → point2 of link 2, added F2FS using both Y and M (two different trials).
vi .config → added # x86_64 on line 0
cp .config configs/kernel-4.18.0-x86_64.config
cp configs/* ~/rpmbuild/SOURCES/
cd ~/rpmbuild/SPECS/
cp kernel.spec kernel.spec.distro
vi kernel.spec → point4 of link 2 (except the Patch40000 I didn’t add it because it made the build fail)
rpmbuild -bb --target=uname -m kernel.spec --with baseonly --without debug --without debuginfo 2> build-err.log | tee build-out.log

The result is pass. The folder RPMS has the rpm, but looking the build-err.log/build-out.log the CONFIG_F2FS is missing. It seems the process is not reading the updated config
file (~/rpmbuild/SOURCES/kernel-4.18.0-x86_64.config)

The same steps worked on Centos 7.5 OS machine.
Thoughts ?
Thanks in advance

I can’t comment on the actual meat of the matter, but I have to point out that:

  • The current (and only) supported version of CentOS Linux is 7.9
  • The current (and only) supported version of AlmaLinux is 8.5 and has kernel version 4.18.0-348.20.1.el8_5

Even if you succeed in rebuilding the 4.18.0-305.25.1.el8_4, you will have several known security flaws in your systems.

I don’t care security flaws for now.
I’m intersted to understand why I’m not able to add the f2fs filesystem to the kernel.
Could you help me ?
Many thanks.

One thing that I instantly noticed is that, in EL8, the config name is:


Not kernel-4.18.0-x86_64.config.