I compiled XFS and F2FS as kernel modules on my Jetson Nano. F2FS works like a charm, XFS doesn’t load and I am at a loss why that is the case.
Here is exactly what I did:
cd /media/data
uname -a
# 4.9.140
cat /etc/nv_tegra_release
# R32.4.3 210
wget https://developer.nvidia.com/embedded/L4T/r32_Release_v4.3/Sources/T210/public_sources.tbz2
tar jxvf public_sources.tbz2
cd Linux_for_tegra/source/public
tar jxvf kernel_src.tbz2
mv kernel /media/data
cd /media/data
rm -rf Linux_for_Tegra
cp /proc/config.gz .
zcat config.gz > kernel/kernel-4.9/.config
cd kernel/kernel-4.9
vim .config
# CONFIG_LOCALVERSION="-tegra"
# CONFIG_XFS_FS=m
# CONFIG_F2FS_FS=m
make prepare
# Accepted all defaults
make modules
sudo cp fs/xfs/xfs.ko /lib/modules/4.9.140-tegra/kernel/fs/xfs/
sudo cp fs/f2fs/f2fs.ko /lib/modules/4.9.140-tegra/kernel/fs/f2fs/
sudo depmod
sudo modprobe xfs
sudo modprobe f2fs
f2fs loads without error, xfs on the other hand gives this error message:
sudo modprobe -v xfs
# insmod /lib/modules/4.9.140-tegra/kernel/fs/xfs/xfs.ko
# modprobe: ERROR: could not insert 'xfs': Unknown symbol in module, or unknown parameter (see dmesg)
dmesg
# Relevant lines from dmesg
#[..] xfs: Unknown symbol iomap_file_buffered_write (err 0)
#[..] xfs: Unknown symbol iomap_truncate_page (err 0)
#[..] xfs: Unknown symbol iomap_file_dirty (err 0)
#[..] xfs: Unknown symbol iomap_page_mkwrite (err 0)
#[..] xfs: Unknown symbol iomap_fiemap (err 0)
#[..] xfs: Unknown symbol iomap_zero_range (err 0)
For completeness sake I’d like to mention two additional things:
-
I wasn’t quite sure what the outlier is: The fact that F2FS does work or the fact that XFS doesn’t. I chose another random module to try out. I decided for MINIX FS, compiled it as above and it loads without error.
-
I already did this whole dance a couple of weeks ago when I still was running R32.4.2 210. I used wget https://developer.nvidia.com/embedded/L4T/r32_Release_v4.2/Sources/T210/public_sources.tbz2 to download the kernel sources. The outcome was exactly the same.