Generally speaking this produces a file you can copy to the system in the right place.
You start with the kernel source, set its configuration to the same as your running system, run a program to edit the configuration to change to the configuration you want, and run the “make” command. You end up with the file. Keep in mind this is a developer embedded board and not a desktop system, so some steps which are automated or included by default for a desktop PC don’t exist.
If you do this once it isn’t too difficult, you may need some patience to get to that point if you are new to Linux or building kernels since this is an embedded system and most of the time (not always) you will build the file on your host PC (cross compiling) instead of directly on the Jetson (native compiling).
The short answer (which is the higher learning curve) is that the L4T R28.1 downloads area has a “Documentation” download, and within this is a kernel customization section telling about this.
There are also some other guides out there. In each case be aware that on R28.1 some instructions changed, so if you look at old information most of the build and compile is the same, but some details might differ.
As of R28.1 both the Jetson TX1 and TX2 use the same sample rootfs, so you may see information for both listed in the same place. Some details may differ (mostly on installing updates, much less difference in actual kernel builds).
Here is one place you can look:
[url]https://developer.ridgerun.com/wiki/index.php?title=Compiling_Tegra_X1_source_code[/url]
(note that JetPack 3.1 probably implies L4T version R28.1…mostly TX1 and TX2 info will be the same…any reference to a t21 or t210 is a reference to a TX1…any reference to a t18 or t186 or quill is a reference to a TX2)
This is a case of information specifically on the ttyACM module and is probably where you want to start:
[url]http://www.jetsonhacks.com/2017/08/07/build-kernel-ttyacm-module-nvidia-jetson-tx1/[/url]
A bit of knowledge which will save you some time: Initial configuration. Sometimes you will see mention of “make tegra21_defconfig”…this is a default initial configuration, but may not match your Jetson. A better step is to copy “/proc/config.gz” from your running system, use “gunzip” on the file to unzip it, and then copy it to name “.config” where you are building your kernel. Other than one detail this will almost get an exact starting match to your running kernel. Then your ACM edit can be the only change to get a working configuration.
I say “almost an exact starting match” because there is one detail the “/proc/config.gz” does not copy. Each Linux system responds with a version from the command “uname -r”. Kernel modules are looked for in “/lib/modules/$(uname -r)/”. The base kernel source code version determines the prefix of this, but in the “.config” file there is a “CONFIG_LOCALVERSION” you can edit and this will set the suffix of “uname -r”. So if your “uname -r” is “4.4.38-tegra” it means your kernel source code is “4.4.38” and that the CONFIG_LOCALVERSION was set to “-tegra” when the kernel was built, and thus modules are found in “/lib/modules/4.4.38-tegra/”.
Give that a shot and ask more questions when you run into something. Whichever system you build on you will probably want to install package “libncurses5-dev” (“sudo apt-get install libncurses5-dev”). This makes some of the editors available. An example is that within a kernel build “make menuconfig” or “make nconfig” offer different editors for changing a configuration item without directly editing the “.config” file…these require libncurses5-dev.