Disable or modularize kernel drivers

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

Hi,

You can reduce the boot time by following below. Not sure why you want to change CONFIG_TEGRA_GRHOST?

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/kernel_boot_time.html

Thanks for your reply, I have carried out relevant operations according to the manual.

Hardware version: Jetson nano emmc p3448-0002-p3449-0000-b00
Software version: JetPack_4.6.

it takes 10~15 seconds from cold power-on to begin showing the login prompt. Did I miss something? I want to keep the boot time to 5s, so I wanted to compress the kernel size as much as possible.

Can you give me a direction to further optimize the startup time

It is unlikely. You can measure the boot time by reading the bootloader log first.

I think even bootloader side already > 5 sec.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.