Rmmod: ERROR: Module max9296 is builtin

How to fix this weired problem?

test@test-desktop:~/apCam$ uname -r
5.10.192-tegra
test@test-desktop:~/apCam$ sudo rmmod max9296
rmmod: ERROR: Module max9296 is builtin.
test@test-desktop:~$ zcat /proc/config.gz | grep -i 9296
CONFIG_I2C_IOEXPANDER_DESER_MAX9296=m
test@test-desktop:~$ cat /lib/modules/5.10.192-tegra/modules.builtin | grep 9296
test@test-desktop:~$ #Nothing
test@test-desktop:~$ modinfo max9296
name:           max9296
filename:       (builtin)
license:        GPL v2
file:           drivers/media/i2c/max9296
author:         Sudhir Vyas <svyas@nvidia.com
description:    Dual GMSL Deserializer driver max9296
test@test-desktop:~$ ls -l /boot/I*
-rw-r--r-- 1 root root 33704448  二   5 15:15 /boot/Image
test@test-desktop:~$ cat /boot/extlinux/extlinux.conf
TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      FDT /boot/dtb/kernel_tegra234-p3767-0003-p3768-0000-a0.dtb
      INITRD /boot/initrd
      APPEND ${cbootargs} root=PARTUUID=4f0ed1d0-6abf-485c-b352-83b4b9218c74 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 console=ttyAMA0,115200 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb 
test@test-desktop:~$ sudo dmesg |head
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd421]
[    0.000000] Linux version 5.10.192-tegra (wols@Wols) (aarch64-buildroot-linux-gnu-gcc.br_real (Buildroot 2020.08) 9.3.0, GNU ld (GNU Binutils) 2.33.1) #9 SMP PREEMPT Wed Feb 5 14:17:54 CST 2025
[    0.000000] OF: fdt: memory scan node memory@80000000, reg size 16,
test@test-desktop:~$ ls -l /boot/Image
-rw-r--r-- 1 root root 33704448  二   5 15:15 /boot/Image

I have no idea how to fix this in build($./nvbuild.sh -o $PWD/kernel_out).

But in user sapce temporary solution is sudo depmod -a

Hi,
Please check the section to remove the configs and rebuild kernel image:

Kernel Customization — NVIDIA Jetson Linux Developer Guide 1 documentation

My bad I didn’t clearly say that I already use custom kernel image.

If you see the post kernel config already change to m (CONFIG_I2C_IOEXPANDER_DESER_MAX9296=m)

I try remove Image rebuild, remove kernel_out and then rebuild , still same error.

Hi,
Not sure if it works but you may try to set these configs to module:

./tegra_android_defconfig:CONFIG_I2C_IOEXPANDER_SER_MAX9295=y
./tegra_android_defconfig:CONFIG_I2C_IOEXPANDER_DESER_MAX9296=y
./defconfig:CONFIG_I2C_IOEXPANDER_SER_MAX9295=y
./defconfig:CONFIG_I2C_IOEXPANDER_DESER_MAX9296=y
./defconfig:CONFIG_MAXIM_GMSL_DP_SERIALIZER=y

As you can see first post, in /proc/config.gz it already set to module.

Also avoid some mistake I go to check defconfig again, it’s set to module too.

wols@Wols:~$ cat /home/wols/Documents/Appropho/Linux_for_Tegra/source/public/kernel/kernel-5.10/arch/arm64/configs/tegra_android_defconfig | grep 9296
CONFIG_I2C_IOEXPANDER_DESER_MAX9296=m
wols@Wols:~$ cat /home/wols/Documents/Appropho/Linux_for_Tegra/source/public/kernel/kernel-5.10/arch/arm64/configs/tegra_defconfig | grep 9296
CONFIG_I2C_IOEXPANDER_DESER_MAX9296=m

Hi,
You may build CONFIG_MAXIM_GMSL_DP_SERIALIZER and CONFIG_I2C_IOEXPANDER_SER_MAX9295 as module for a try. Probably the driver code has dependency.