Board with CH341 chip not recognized by TX1

I have a board (Makeblock Orion) that has such USB-to-serial chip and the TX1 won’t recognize it when connected through USB 3.0 port.

This is the workaround that works, but it’s pretty annoying: http://www.jetsonhacks.com/2016/09/28/build-tx1-kernel-and-modules-nvidia-jetson-tx1/

Can CH341 chip be supported by the standard Jetson pack build? Maybe in JetsonPack 2.4?

I don’t know about the particular chip, but what it comes down to is that when a USB device is connected there needs to be a driver to handle the device. The serial devices from FTDI are so common they are always supported. Other chips may or may not be there by default, but if not recognized when connected, then probably you have to build at least a kernel module. If the module was not built, then it isn’t likely a different kernel source version would make a difference…it’s a configuration issue in most cases and not a kernel source issue (add the configuration and it would work…the source already supported the driver, but wasn’t told to install it). Some drivers are not ported to arm64, but I suspect any serial USB chip would work on most any architecture when configured.

Thanks Linuxdev. Any recommendation on how to change the Kernel configuration for this particular instance?
Or what is suggested in the link I posted above is the fastest way to go?

Save a copy of your current Jetson’s “/proc/config.gz”. Start with that. You do need to learn to cross compile to build a kernel for the TX1, but you can just get the kernel source here (you don’t need to use git)…be sure your current release matches the kernel source:
https://developer.nvidia.com/embedded/linux-tegra-archive

If you are using the current release it will be R24.2.1 from here (look for kernel source):
https://developer.nvidia.com/embedded/linux-tegra

Note that this same page has a “Documentation” download which includes compile instructions:
https://developer.nvidia.com/embedded/dlc/l4t-documentation-24-2-1

The URL you gave seems to concentrate on using the most recent sources via git, but also mentions the documentation download I just gave. You might want to skim that documentation first (for kernel build), then look at the article you mentioned for other details.

I already have tools installed, and those tools are different than what an Ubuntu user would use (I’m using Fedora, I manually installed a lot of different compilers…it’s easier to just use the ones available as standard packages on Ubuntu if you have that).

Some environment variables important to set (my specific case is just an example, yours will not match exactly):

export CROSS_COMPILE=/usr/local/aarch64-linux-gnu/gcc-linaro-5.3-2016.02-rc1/bin/aarch64-linux-gnu-
export CROSS32CC=/usr/local/arm-linux-gnueabihf/gcc-linaro-5.3-2016.02/bin/arm-linux-gnueabihf-gcc
export ARCH=arm64

You probably also want to pre-create an output location, e.g.:

mkdir ~/build
mkdir ~/build/kernel
mkdir ~/build/modules
mkdir ~/build/firmware
export TEGRA_KERNEL_OUT=~/build/kernel
export INSTALL_MOD_PATH=~/build/modules
export INSTALL_FW_PATH=~/build/firmware

(you won’t actually build firmware, but it is in my notes)

Place your .config at “~/build/kernel”. Make sure the CONFIG_LOCALVERSION matches…either edit the file or use something like the “make O=$TEGRA_KERNEL_OUT nconfig” and search for CONFIG_LOCALVERSION (this was the suffix from the running Jetson’s “uname -r”).

Note that there are edits needed for this kernel to build. The edits may already exist in some versions, I’ll mention below more about that.

Technically you don’t need to build the whole kernel, but it does some configuration and is preferable as an error check. Actual build (after some edits…the nconfig stage is where you look for your driver…commands are from the kernel source tree):

make mrproper
make O=$TEGRA_KERNEL_OUT mrproper
make O=$TEGRA_KERNEL_OUT nconfig
make O=$TEGRA_KERNEL_OUT Image
make O=$TEGRA_KERNEL_OUT modules
make O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=$TEGRA_MODULES_OUT

…take a look in $TEGRA_MODULES_OUT…you’ll get to a subdirectory with the actual modules and within that somewhere will be the module of interest…this will get manually copied to the analogous location on the Jetson and it’ll be done (you’ll probably reboot the Jetson even though you could just manually run commands to insert the module).

Remember, I gave the path to some tools that are my version on Fedora, adjust paths to your tools.

About fixes needed for the source to compile…check the following within your kernel source…some may already be fixed:

# R24.1, NOTE: drivers/base/Kconfig, line 234, missing double quote to close string.
#        NOTE: May need to edit "drivers/platform/tegra/tegra21_clocks.c:1065"
#            c->state = ((!is_lp_cluster()) == (c->u.cpu.mode == MODE_G)) ? ON : OFF;
#        NOTE: toplevel Makefile, KBUILD_CFLAGS_KERNEL := -fomit-frame-pointer

Thanks you very much. Will give it a shot soon.