JetPack 3.1 kernel source tag problem

Thank you, kayccc :)

Thanks kayccc. Hopefully, everything should work fine now.

Hi, thanks for the link.

I was trying to build the kernel for TX1 and I find the same error:

…/kernel/kernel-4.4$ make -j4

drivers/gpu/../../../nvgpu/drivers/gpu/nvgpu/common/linux/kmem.c:30:25: fatal error: gk20a/gk20a.h: No such file or directory

I found the file in
…/kernel/nvgpu/include/linux

Hi eddytrex,

Please try to add “-O=xxxx” after the make command. The “gk20a/gk20a.h: No such file or directory” error should be gone.

I don’t know why but it worked for me.

Please follow the section “Kernel customization” in L4T documentation. The Image should be built.

https://developer.nvidia.com/embedded/dlc/l4t-documentation-28-1

Well, it’s because of the way the #include has been done. Many of these errors are because #include <> has been used instead of #include “”. Somehow, running make -j22 doesn’t go through the Makefile to include the directory containing, for e.g. gk20a/gk20a.h when compiling the .c file including it. The Makefiles do contain line including(-I) the directory gk20a, but it is not taken into consideration when running make -j22 but it does when running make -j22 O=xxxx.

Note: It is “O=xxxx” and not “-O=xxxx”

Hi, thanks all
It did work!!

But I notice, the bluethoot is not working.

Hi eddytrex,

Do you mean bluetooth? Could you tried

#blueooth list
rfkill list
#enbale bluetooth
sudo rfkill unblock bluetooth

Yes, Sorry.

I get this.

nvidia@tegra-ubuntu:~$ rfkill list
Can't open RFKILL control device: No such file or directory
nvidia@tegra-ubuntu:~$ sudo rfkill unblock bluetooth
Can't open RFKILL control device: No such file or directory
nvidia@tegra-ubuntu:~$

Does this show any errors?

sha1sum -c /etc/nv_tegra_release

I get this, no erros

sha1sum -c /etc/nv_tegra_release 
/usr/lib/xorg/modules/extensions/libglx.so: OK
/usr/lib/xorg/modules/drivers/nvidia_drv.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libtegrav4l2.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite_utils.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvparser.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvtx_helper.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvfnetstoredefog.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvos.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcameratools.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvdc.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmedia.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libglx.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvimp.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcamlog.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvll.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvtvmr.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libargus.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvidia-egl-wayland.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvtestresults.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmm_contentpipe.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcam_imageencoder.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmm_parser.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcolorutil.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnveglstream_camconsumer.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvfnet.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvrm.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvddk_2d_v2.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvexif.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite_video.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmm_utils.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvddk_vic.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvfnetstorehdfx.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvodm_imager.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libargus_socketclient.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcamerautils.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvrm_graphics.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvomxilclient.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvtnr.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvavp.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libargus_socketserver.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvrm_gpu.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libscf.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvapputil.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite_image.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvosd.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvomx.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvwinsys.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmm.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnveglstreamproducer.so: OK
/usr/lib/aarch64-linux-gnu/libv4l/plugins/libv4l2_nvvidconv.so: OK
/usr/lib/aarch64-linux-gnu/libv4l/plugins/libv4l2_nvvideocodec.so: OK

What’s interesting is that rfkill should be present by default. The basic install process should make this available even without any updates or additions. Do you see rfkill from this?

ls -l /usr/sbin/rfkill

rfkill is there but respond with an error

ls -l /usr/sbin/rfkill 
-rwxr-xr-x 1 root root 10392 Nov 24  2015 /usr/sbin/rfkill

Basically I just wanted to rule out anything wrong with the rfkill program itself. If you look back at this from your prior post:

nvidia@tegra-ubuntu:~$ rfkill list
Can't open RFKILL control device: No such file or directory
nvidia@tegra-ubuntu:~$ sudo rfkill unblock bluetooth
Can't open RFKILL control device: No such file or directory
nvidia@tegra-ubuntu:~$

…it seems there is no device for rfkill to operate on, yet we confirmed the NVIDIA-specific driver files are all in place and valid (this was via the sha1sum command).

So a question arises as to what rfkill thinks is there. Check this:

<s>sudo rfkill --list</s> Oops! No "--", just "list"
sudo rfkill list

Is not a valid command

$ sudo rfkill --list
Usage:  rfkill [options] command
Options:
        --version       show version (0.5-1ubuntu3 (Ubuntu))
Commands:
        help
        event
        list [IDENTIFIER]
        block IDENTIFIER
        unblock IDENTIFIER
where IDENTIFIER is the index no. of an rfkill switch or one of:
        <idx> all wifi wlan bluetooth uwb ultrawideband wimax wwan gps fm nfc

I accidentally added a “–” in “–list”, but it should be just “sudo rfkill list” without the “–”. Edited the original post. However, this verifies you have rfkill and permissions to execute it. Try again and see if it allows opening the device. You should see this:

0: bluedroid_pm: Bluetooth
        Soft blocked: yes
        Hard blocked: no
1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
2: brcmfmac-wifi: Wireless LAN
        Soft blocked: no
        Hard blocked: no

thanks for help me out here.
but no luck :/

$ sudo rfkill list
Can't open RFKILL control device: No such file or directory

It seems like whatever device driver the rfkill command talks to is missing. It sounds like you added a custom kernel, and I’m wondering if perhaps the config was missing something. Did you replace the “/boot/Image” file, and if so, was the kernel built with a starting config of “/proc/config.gz”? What is “uname -r”?

Yes I did, yes was build with /proc/config.gz (zcat /proc/config.gz > .config)
the only thing was add SWAP

$ uname -r
4.4.38

You are missing the custom NVIDIA tag at the end of the revision.
This means that the modules will not load, because your kernel version doesn’t match.
Re-build, defining the correct -tegra exended version.
(This is a pretty common gotcha; you’re not the first to run into it!)

You want your .config file to contain this:

CONFIG_LOCALVERSION="-tegra"

Unfortunately, just making modules install may not be enough, because the binary-only modules don’t get re-built that way.