Gentoo Linux에서 F-Stack 빌드시 igb_uio.ko 모듈이 없다고 나오는 경우는
Linux Kernel에서 Userspace I/O drivers를 활성화하고 재빌드하면 해결 됨.
– 관련 로그
[2902/2906] Generating kernel/linux/igb_uio/igb_uio with a custom command
FAILED: kernel/linux/igb_uio/igb_uio.ko
/usr/bin/make -C /lib/modules/6.7.0-gentoo/build M=/data/f-stack/dpdk/build/kernel/linux/igb_uio src=/data/f-stack/dpdk/kernel/linux/igb_uio EXTRA_CFLAGS=-I/data/f-stack/dpdk/kernel/linux/igb_uio/../../../lib/librte_eal/include modules
make: Entering directory '/usr/src/linux-6.7.0-gentoo'
MODPOST /data/f-stack/dpdk/build/kernel/linux/igb_uio/Module.symvers
ERROR: modpost: "__uio_register_device" [/data/f-stack/dpdk/build/kernel/linux/igb_uio/igb_uio.ko] undefined!
ERROR: modpost: "uio_unregister_device" [/data/f-stack/dpdk/build/kernel/linux/igb_uio/igb_uio.ko] undefined!
ERROR: modpost: "uio_event_notify" [/data/f-stack/dpdk/build/kernel/linux/igb_uio/igb_uio.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:145: /data/f-stack/dpdk/build/kernel/linux/igb_uio/Module.symvers] Error 1
make[1]: *** [/usr/src/linux-6.7.0-gentoo/Makefile:1863: modpost] Error 2
make: *** [Makefile:234: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-6.7.0-gentoo'
[2905/2906] Compiling C object app/test/dpdk-test.p/test_ring.c.o
ninja: build stopped: subcommand failed.
– 해결 방법
1. 커널 컴파일
1.1. Userspace I/O drivers 활성화
Linux Kernel 6.7+ 버전에서 진행 하였음.
$ cd /usr/src/linux
$ make menuconfig
[*] Enable loadable module support
[*] Enable the block layer
Device Drivers --->
<*> Userspace I/O drivers (UIO)
1.2. 커널 빌드
$ rm -f .version
$ make -j$(nproc)
$ make -j$(nproc) modules_install
$ make install
$ genkernel --install initramfs
1.3. 커널 이미지 복사
$ cp /usr/src/linux/.config /boot/config-$(uname -r)
$ cp /usr/src/linux/System.map /boot/System.map-$(uname -r)
$ cp /usr/src/linux/arch/x86/boot/bzImage /boot/vmlinuz-$(uname -r)
1.4. Grub EFI 설정 및 재부팅
$ grub-mkconfig -o /efi/grub/grub.cfg
$ reboot
1.5. Userspace I/O drivers 확인
$ grep CONFIG_UIO /boot/config-$(uname -r)
CONFIG_UIO=y