Nano jetson Kernel build issue

Hi Team,

I have enable SC16IS7XX driver using make menuconfig and get error after build kernel.

I am using below steps.
make menuconfig
make -C . ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j8 --output-sync=target zImage

Error is:
cimcon@cimcon:~/2-Nano-jetson/Kernel-source/Linux_for_Tegra/source/public/kernel/kernel-4.9$ make -C . ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j8 --output-sync=target zImage
** GEN ./Makefile**
** HOSTCC scripts/basic/fixdep**
** HOSTCC scripts/kconfig/conf.o**
** HOSTCC scripts/kconfig/**
** HOSTLD scripts/kconfig/conf**
scripts/kconfig/conf --silentoldconfig Kconfig

***** Configuration file “.config” not found!**

***** Please run some configurator (e.g. “make oldconfig” or**
***** “make menuconfig” or “make xconfig”).**

make[3]: *** […/scripts/kconfig/Makefile:39: silentoldconfig] Error 1
make[2]: *** […/Makefile:565: silentoldconfig] Error 2
make[1]: *** No rule to make target ‘include/config/auto.conf’, needed by ‘include/config/kernel.release’. Stop.
make: *** [Makefile:171: sub-make] Error 2
cimcon@cimcon:~/2-Nano-jetson/Kernel-source/Linux_for_Tegra/source/public/kernel/kernel-4.9$ ls .co
.cocciconfig .config
cimcon@cimcon:~/2-Nano-jetson/Kernel-source/Linux_for_Tegra/source/public/kernel/kernel-4.9$ cat .config | grep SC1

Please guide me How can build after make menuconfig

How did you configure prior to the menuconfig? If this did not start with a known working configuration, then I’d expect a lot of errors even if you configured some subset of the kernel.

Also, is this cross compile or native compile? Sounds like native, which is easiest, but want to make sure. More important though is whether or not you are using the compile “O=/some/where” to put temporary output somewhere other than the kernel source tree.

Hello team,

Kernel is building with default config file using below commands.
make -C . ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j8 --output-sync=target zImage
make -C . ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j8 --output-sync=target modules
make -C . ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j8 --output-sync=target dtbs

I am getting issue when enable SC16IS7XX driver with make menuconfig commands.
So please let me know how can i build after enable driver in kernel.

I am using nano-jetson b01 device So please let me know its device tree file name also because i need to add SC16IS7XX device in device tree file.

The compile steps look valid to me. When you run the “make menuconfig” is your output location guaranteed to have first been cleared (e.g., “make mrproper”) and then basic setup via “make tegra_defconfig”? I’m wondering if old code is conflicting. In theory, if using menuconfig, then any previous config which was valid would also be valid after setting an item. The part which is confusing is that it cannot find “.config” even though you have set “O=...”. It looks like every build and configure step used the “O=...” argument, and so this should not be an issue. Would you double check to see if every build and configure step used the same “O=...” option?

Thanks for update. My driver is build now.

Q1) I have build SC16IS7XX device using bellow link and install in our PC (Linux_for_Tegra/source/public/kernel/kernel-4.9/modules)modules dir. Please let me know how can integrate it on running jetson nano commands?

Q2) Can i connect other I2c Ic in CAM_I2C_SDA/CAM_I2C_SCL I2C. if yes then what will be i2c bus no ? and how will disable camera driver which is connected on CAM_I2C??

Within the kernel source there will be some subdirectory where the module shows up. Just as a contrived example, first cd to the modules themselves on the running system:
cd /lib/modules/$(uname -r)/kernel

Notice that each subdirectory here mirrors where a driver would be found after compile in kernel source. So if you built the serial UART driver ftdi_sio.ko, then it would be in this subdirectory of both kernel source and install location under “/lib/modules/$(uname -r)/kernel”:

If you’ve built modules and then installed them to some temporary location by a command such as this (you’d have had to have set environment variables TEGRA_KERNEL_OUT and TEGRA_MODULES_OUT to some empty directory):
…then this would mirror the the full install path.

Wherever that install path is would be where you’d copy the kernel module. You could then reboot or run “sudo depmod -a”. After this, if the module works, it should be available. You could manually run “sudo insmod ...” to insert the module file if you were at the file’s location, but this wouldn’t normally be needed after the above.

I don’t know about what is enabled in i2c, someone else will need to answer that. Devices on i2c do not normally have the ability to self-report unless they are using USB or PCI slots. If you happen to have i2c devices on an active i2c bus, then they might “just work” if you know the address to use. Mostly I think someone will need to provide details of adding a camera to the device tree, but it is something I can’t answer.

Hello team I have load our module.ko now.

Can you update me What will be device tree file I am using nano-jetson b01 device and kernel-4.9?

I couldn’t tell you which device tree to use. You might want to give an example use-case of what it is you want to accomplish, e.g., if you are asking how to install a device tree, versus if you are asking how to modify the device tree.

Hi Team,

My Question is :
Suppose we have add new device then what device tree file we need to update?
I am using nano-jetson b01 device and kernel-4.9?

On a booting system, what do you see after boot from:
dmesg | grep dts

cimcon@cimcon:~$ dmesg | grep dts
[ 0.207525] DTS File Name: /dvs/git/dirty/git-master_linux/kernel/kernel-4.9/arch/arm64/boot/dts/…/…/…/…/…/…/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-p3448-0000-p3449-0000-b00.dts
[ 0.412252] DTS File Name: /dvs/git/dirty/git-master_linux/kernel/kernel-4.9/arch/arm64/boot/dts/…/…/…/…/…/…/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-p3448-0000-p3449-0000-b00.dts

In which device tree file, We will have to update for SC16IS7XX I2C IC?

The above from the excerpt of the dmesg is the one you would use. Your edited content must exist in that.

Thanks for update,

That mean we need to update its device tree file for SC16IS7XX I2C IC. Am i correct?

Assuming you have device tree content targeting the SC16IS7XX I2C IC, then yes, this would be the tree you would modify on the host PC so that flash would propagate this during every flash. However, you could also edit (via reverse compile, edit, recompile) directly the same device tree file directly on the Jetson in the “/boot” (or subdirectory of) directory if the extlinux.conf file has an FDT key/value pair pointed at that device tree.

Incidentally, that file name ending with name suffix “.dts” is the source version, and this always gets converted to the binary “.dtb” version for actual use in boot. The dtc command can convert back and forth between the two forms. When you build the binary in the kernel the kernel source happens to have a copy of dtc, but you can also install the dtc command directly on a Jetson or host PC if it is missing. You’d install via “sudo apt-get install device-tree-compiler”.

An example of decompiling a binary so you can edit (pretend the file name is “example_file.something”, and that “something” is either “.dtb” or “.dts” depending on whether it is source or binary):
dtc -I dtb -O dts -o example_file.dts example_file.dtb

An example of converting source back to binary:
dtc -I dts -O dtb -o example_file.dtb example_file.dts

Note that source (".dts") files can be edited with an ordinary text editor.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.