I'm trying to enable encryption config in the kernel for Nvidia Jetson Nano(Tegra), by using menuconfig and rebuilding the kernel. But the specific change is not persisting and is overridden each time while the kernel is build. Other changes to config (like USB firmware, zswap) works.
This is what I am doing inside the downloaded kernel sources(32.2) directory,
copying the running .config,
zcat /proc/config.gz > .config
Editing it with make menuconfig to enable,
File systems -> Ext4 Encryption
After saving, I verify the modified .config file and see the following encryption related flags enabled.
CONFIG_EXT4_ENCRYPTION=y CONFIG_EXT4_FS_ENCRYPTION=y CONFIG_FS_ENCRYPTION=y
Building the kernel,
make -j5 sudo make modules_install
copy the new kernel image,
sudo cp arch/arm64/boot/Image /boot
Reboot successfully and verify that the kernel has changed
uname -r 4.9.140
But the running config doesn't reflect the changes specific to Ext4 Encryption, all other changes made to the .config exists and working as expected.
cat running.config | grep ENCRYPTION # CONFIG_EXT4_ENCRYPTION is not set # CONFIG_FS_ENCRYPTION is not set