what’s the difference between them?
and I can use any drivers selection of them?
for boot and kernel ?
There is some same showing at “make menuconfig”
because there is the same Kconfig at both position.
Which one is better to be erased?
The “kernel-4.9/” is where you compile the kernel from. In some cases there are references to kernel code not in the main kernel, and this will use a relative path naming code in the other subdirectory. Also, there is sometimes bootloader code in other subdirectories, and this can be compiled from that location…but this too might use a relative path to reference code in the kernel. Don’t erase any of it.
Before you start be sure to examine the output of the command “uname -r”. Then you copy the existing configuration (and if this is stock, then that is just the “make tegra_defconfig” command), and then make edits (such as via “make menuconfig”, although I prefer “make nconfig” since it has a symbol search function).
There are two same menuconfig items as the attached photo shows…
“NVIDIA overlay Encoders, deco…”
I have found that one is from the Kconfig …sources/kernel/nvidia/drivers/media/i2c and
other is from the Kconfig …sources/kernel/kernel-4.9/drivers/media/i2c
Which one should I choose?
does it matter only to check kernel-4.9’s Kconfig selection only?
Someone from NVIDIA will have to comment, but the menuconfig from the kernel build area would be the one for building against that kernel. Run the menuconfig from the “kernel-4.9/” location. It is rare to go to the other locations for build (exceptions for example would be bootloader code).