I have taken the source files from Nvidia download center L4T 32.5.1 and then did enabled this :
ports {
usb2-0 {
status = “okay”;
/mode = “otg”;/
mode = “host”;
};
in tegra186-p3636-0002-lanai.dts
enabled serial@c280000 { as told in TX2 NX RS232 Communication Problem - #10 by JerryChang
and bulit using below commands:
make tegra_defconfig
make -j4 Image
make -j4 modules
make dtbs
deploy the modules I built into our root file system
sudo -E make INSTALL_MOD_PATH=/home/…/…/Linux_for_Tegra/rootfs/ modules_install
copied dtb files to /Linux_for_Tegra/kernel/dtb/
and image file to /Linux_for_Tegra/kernel/
and Flashed using this command:
$ sudo ./flash.sh jetson-xavier-nx-devkit-tx2-nx mmcblk0p1
specifically I made changes to UART, USB from the stock BSP