I wanted to disable or modularize the kernel driver to reduce the size of the kernel and improve boot time, but when I set “CONFIG_TEGRA_GRHOST=m”, make failed.
CC [M] drivers/extcon/extcon-disp-state.o
/home/ubuntu/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/source/kernel/nvidia/drivers/extcon/extcon-disp-state.c:55:6: error: redefinition of ‘disp_state_extcon_switch_report’
void disp_state_extcon_switch_report(const unsigned int cable, bool state)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/source/kernel/nvidia/drivers/extcon/extcon-disp-state.c:22:0:
../include/linux/extcon/extcon-disp.h:47:20: note: previous definition of ‘disp_state_extcon_switch_report’ was here
static inline void disp_state_extcon_switch_report(const unsigned int cable,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/source/kernel/nvidia/drivers/extcon/extcon-disp-state.c:79:6: error: redefinition of ‘disp_state_extcon_aux_report’
void disp_state_extcon_aux_report(const unsigned int aux_idx, bool state)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/source/kernel/nvidia/drivers/extcon/extcon-disp-state.c:22:0:
../include/linux/extcon/extcon-disp.h:49:20: note: previous definition of ‘disp_state_extcon_aux_report’ was here
static inline void disp_state_extcon_aux_report(const unsigned int aux_idx,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../scripts/Makefile.build:341: recipe for target 'drivers/extcon/extcon-disp-state.o' failed
make[3]: *** [drivers/extcon/extcon-disp-state.o] Error 1
../scripts/Makefile.build:649: recipe for target 'drivers/extcon' failed
make[2]: *** [drivers/extcon] Error 2
make[2]: *** Waiting for unfinished jobs....
/home/ubuntu/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/source/kernel/kernel-4.9/Makefile:1122: recipe for target 'drivers' failed
make[1]: *** [drivers] Error 2
make[1]: Leaving directory '/home/ubuntu/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/source/kernel/kernel-4.9/build'
Makefile:171: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2