Need help rebuilding kernel with an additional item

You might find this useful:
https://forums.developer.nvidia.com/t/topic/262647/12

Are you using the compile option with “O=/some/where” to put temporary output there? This makes it easier to explain, but basically, whatever your output location is, any configuration will generate the “.config” file. The “make mrproper” removes configuration, so the two are inverses of each other (well, sort of). One normally starts with pristine source, then set a base config of “make tegra_defconfig” (perhaps with “O=...”). After that you can use a dependency-aware editor. There are actually several editors, and the most common is “make menuconfig” (perhaps with “O=...”). I prefer “make nconfig” because although it appears to be a nearly exact duplicate of menuconfig it has a symbol search function.

Any configuration item is represented by a “symbol”, which has a name “CONFIG_something...”. This is what the “.config” file contains (it’s human-readable, take a look at it after a tegra_defconfig). For example, this is a symbol which nconfig can find and set as either module or integrated (more on that below):
CONFIG_GFS2_FS

Content which is only in a module is very easy to work with. You just copy it to the right place (see that URL on kernel config above), and run “sudo depmod -a” (perhaps reboot), and you are done. It’s fairly risk free. Modules are part of the kernel, they just load or unload while running. The rest is “integrated”. In the editor (I mean a dependency-aware editor, not a regular editor), the m key sets the feature as a module, the y key sets the feature as integrated, and the n key disables the feature (either commenting out the symbol or setting it “=n” disables the feature).

Do not forget to set the “CONFIG_LOCALVERSION”, which is a string, and on Jetsons it defaults to “-tegra”. If you build a module, then keep that as “-tegra”. If you build more than a module, then set a new name, e.g., “-test”. The output of “uname -r” is the base kernel version, plus CONFIG_LOCALVERSION. This is part of the path the kernel uses to search for modules:
/lib/module/$(uname -r)/kernel

Installing any change to the integrated kernel, the Image file, is far riskier and more involved. Not all features can be a module (most can), and not all features can be integrated. If you can build it as a module, then it appears somewhere in a subdirectory of the build. The kernel source might have produced your module here (a contrived example, I have no idea if this is really the module name):
$TOP/drivers/net/gfs2.ko

In that case you would copy to:
/lib/modules/$(uname -r)/kernel/drivers/net/gfs2.ko
…then “sudo depmod -a”.