TX2i WiFi support

Any time the kernel is configured it produces the file “.config”. If you are building directly in the kernel source (a bad idea), then the top level directory of that source tree has the “.config” file. If you use “O=/some/temp/output/location”, then this is where the “.config” will be (e.g., “O=/some/temp/output/location/.config”). One can put that file in place with an initial configuration one of three ways:

  • Use a config editor and set every single option possible by hand (not a good idea).
  • Use “make O=/some/temp/output/location tegra_defconfig”. Provides a default initial configuration for the Jetson series. Typically very similar to a default flash.
  • Copy “/proc/config.gz” to that location, e.g.:
  1. cd /some/temp/output/location
  2. cp /proc/config.gz .
  3. gunzip config.gz
  4. cp config .config"
  • Now use “make O=/some/temp/output/location nconfig”. You might need to add package “libncurses5-dev” prior to any version of “make nconfig”:
    sudo apt-get install libncurses5-dev

Strong suggestion: Edit the “.config” and set “CONFIG_LOCALVERSION” to this prior to doing anything else:
CONFIG_LOCALVERSION="-tegra"

When this is all in place you will be able to build and configure. Whatever is in that “.config” at the moment you start building something is what you build. Even if you just build modules I recommend first running a full “make Image” first (or with “O=/some/temp/output/location”) as a sanity check. If you just build a subcomponent, then you have extra config to do. Building “Image” both sanity checks and sets up all config for anything else.

Note: I did not give all possible details. There may be different options for different circumstances, e.g., cross compile from a host PC differs from compile directly/natively on the TX2.

Thanks @linuxdev, everything went smoothly until I tried any of the “make” commands. I used /home as my temp location. Running “ make O=/home nconfig ” gave: make: *** No rule to make target 'nconfig'. Stop.

libncurses5-dev was also already installed, and I added “-tegra” to .config, and tried running as sudo. I also tried “ make O=/home tegra_defconfig ” which gave “make: *** No rule to make target 'tegra_defconfig'. Stop.”

It seems like whatever I have next to “O=/” doesn’t even register.

Thanks @linuxdev, everything went smoothly until I tried any of the “make” commands. I used /home as my temp location. Running “ make O=/home nconfig ” gave: make: *** No rule to make target 'nconfig'. Stop.

libncurses5-dev was also already installed, and I added “-tegra” to .config, and tried running as sudo. I also tried “ make O=/home tegra_defconfig ” which gave “ make: *** No rule to make target 'tegra_defconfig'. Stop .”

It seems like whatever I have next to “ O=/ ” doesn’t even register.

Using “/home” as a temp location is a really really bad idea. I would carefully delete any subdirectory there which is not part of a user home.

Hint: In what follows the tilde ‘~’ character is a macro for that user’s home directory. For example, “cd ~” goes to your home directory.

More typically:

cd ~
mkdir kernel_build
export TEGRA_KERNEL_OUT="~/kernel_build"
# Verify:
cd $TEGRA_KERNEL_OUT
pwd
# Then for all of the make commands:
make O=$TEGRA_KERNEL_OUT ...the rest of the command...

Note that for any of the make commands to work you have to be at the top most directory of the kernel source tree. Just as an example (I am just making this up as an example), if your kernel source exists at “~/sources/kernel/kernel-4.9/”, then this would mean you have to first “cd ~/sources/kernel/kernel-4.9/” before starting, and you’d need to verify “echo $TEGRA_KERNEL_OUT” names an empty temp location. Then this would be a valid command:
make O=$TEGRA_KERNEL_OUT tegra_defconfig

If config works, then this would be a valid editor command (might require you to add “sudo apt-get install libncurses5-dev” if you don’t have it already):
make O=$TEGRA_KERNEL_OUT nconfig

What this would do is to place a “.config” file in “$TEGRA_KERNEL_OUT” (check cd “cd $TEGRA_KERNEL_OUT”, and then “ls .config”).

An example to build a full kernel would then be:
make O=$TEGRA_KERNEL_OUT Image
…or modules:
make O=$TEGRA_KERNEL_OUT modules

In the above I left out the options needed if you are cross compiling, but what I gave above would work natively directly on a TX2. Cross compile would require a few more parameters so the host PC would know this is for a foreign architecture and which compiler to use (the host PC’s native compiler won’t work on ARMv8-a/arm64/aarch64).

If you need to cross compile, then the docs provide the commands for that, or you can ask here. The host PC though would need to have the cross toolkit installed.

Thanks @linuxdev, I will fix the the temp location. I just found the solution to the issue, turns out it was more of a problem with ROS and configuring some drivers. Also had to switch a setting on the controller.

I appreciate the help.