JetPack 3.1 kernel source tag problem

I tried this tag “tegra-l4t-r28.1” and seems that some repos are lack of this tag.

./source_sync.sh -k tegra-l4t-r28.1 -u tegra-l4t-r28.1

Directory for kernel/kernel-4.4, /home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/kernel/kernel-4.4, already exists!
Syncing up with tag tegra-l4t-r28.1…
Switched to a new branch ‘mybranch_2017-07-25-1500970818’
/home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/kernel/kernel-4.4 source sync’ed to tag tegra-l4t-r28.1 successfully!

Directory for kernel/t18x, /home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/kernel/t18x, already exists!
Syncing up with tag tegra-l4t-r28.1…
Switched to a new branch ‘mybranch_2017-07-25-1500970819’
/home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/kernel/t18x source sync’ed to tag tegra-l4t-r28.1 successfully!

Directory for kernel/nvgpu, /home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/kernel/nvgpu, already exists!
Syncing up with tag tegra-l4t-r28.1…
Switched to a new branch ‘mybranch_2017-07-25-1500970820’
/home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/kernel/nvgpu source sync’ed to tag tegra-l4t-r28.1 successfully!

Directory for kernel/nvgpu-t18x, /home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/kernel/nvgpu-t18x, already exists!
Couldn’t find tag tegra-l4t-r28.1
/home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/kernel/nvgpu-t18x source sync to tag tegra-l4t-r28.1 failed!

Directory for kernel/nvhost, /home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/kernel/nvhost, already exists!
Couldn’t find tag tegra-l4t-r28.1
/home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/kernel/nvhost source sync to tag tegra-l4t-r28.1 failed!

Directory for kernel/nvhost-t18x, /home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/kernel/nvhost-t18x, already exists!
Couldn’t find tag tegra-l4t-r28.1
/home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/kernel/nvhost-t18x source sync to tag tegra-l4t-r28.1 failed!

Directory for kernel/nvmap, /home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/kernel/nvmap, already exists!
Couldn’t find tag tegra-l4t-r28.1
/home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/kernel/nvmap source sync to tag tegra-l4t-r28.1 failed!

Directory for kernel/nvmap-t18x, /home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/kernel/nvmap-t18x, already exists!
Couldn’t find tag tegra-l4t-r28.1
/home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/kernel/nvmap-t18x source sync to tag tegra-l4t-r28.1 failed!

Directory for kernel/display, /home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/kernel/display, already exists!
Couldn’t find tag tegra-l4t-r28.1
/home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/kernel/display source sync to tag tegra-l4t-r28.1 failed!

Directory for hardware/nvidia/soc/t18x, /home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/hardware/nvidia/soc/t18x, already exists!
Couldn’t find tag tegra-l4t-r28.1
/home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/hardware/nvidia/soc/t18x source sync to tag tegra-l4t-r28.1 failed!

Directory for hardware/nvidia/platform/tegra/common, /home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/hardware/nvidia/platform/tegra/common, already exists!
Couldn’t find tag tegra-l4t-r28.1
/home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/hardware/nvidia/platform/tegra/common source sync to tag tegra-l4t-r28.1 failed!

Directory for hardware/nvidia/platform/t18x/common, /home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/hardware/nvidia/platform/t18x/common, already exists!
Couldn’t find tag tegra-l4t-r28.1
/home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/hardware/nvidia/platform/t18x/common source sync to tag tegra-l4t-r28.1 failed!

Directory for hardware/nvidia/platform/t18x/quill, /home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/hardware/nvidia/platform/t18x/quill, already exists!
Couldn’t find tag tegra-l4t-r28.1
/home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/hardware/nvidia/platform/t18x/quill source sync to tag tegra-l4t-r28.1 failed!

Directory for hardware/nvidia/soc/t210, /home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/hardware/nvidia/soc/t210, already exists!
Couldn’t find tag tegra-l4t-r28.1
/home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/hardware/nvidia/soc/t210 source sync to tag tegra-l4t-r28.1 failed!

Directory for hardware/nvidia/platform/t210/common, /home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/hardware/nvidia/platform/t210/common, already exists!
Couldn’t find tag tegra-l4t-r28.1
/home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/hardware/nvidia/platform/t210/common source sync to tag tegra-l4t-r28.1 failed!

Directory for hardware/nvidia/platform/t210/jetson, /home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/hardware/nvidia/platform/t210/jetson, already exists!
Couldn’t find tag tegra-l4t-r28.1
/home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/hardware/nvidia/platform/t210/jetson source sync to tag tegra-l4t-r28.1 failed!

Directory for hardware/nvidia/soc/tegra, /home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/hardware/nvidia/soc/tegra, already exists!
Couldn’t find tag tegra-l4t-r28.1
/home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/hardware/nvidia/soc/tegra source sync to tag tegra-l4t-r28.1 failed!

Directory for u-boot, /home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/u-boot, already exists!
Couldn’t find tag tegra-l4t-r28.1
/home/xxx/jet_pack/64_TX2/Linux_for_Tegra_tx2/sources/u-boot source sync to tag tegra-l4t-r28.1 failed!

Hi ZhangXin,

We are aware of this tag issue. Please try with sources from https://developer.nvidia.com/embedded/dlc/l4t-sources-28-1 first and we will let you know once tag is fixed.

Hello Vicky, I think the source available at the download link you provided, is still incomplete. I am unable to locate TX2 related device tree files in it. I’m not sure what else is missing. Can you please check?

Hi Vicky,

Besides the DTS problem SirRobert mentioned, I encounter build problem when “make zImage” with the source code from the link you provide.“tegra18_defconfig” is used.

drivers/devfreq/governor_pod_scaling.c:54:22: fatal error: governor.h: No such file or directory
#include <governor.h>
^
compilation terminated.
scripts/Makefile.build:261: recipe for target ‘drivers/devfreq/governor_pod_scaling.o’ failed
make[2]: *** [drivers/devfreq/governor_pod_scaling.o] Error 1
scripts/Makefile.build:406: recipe for target ‘drivers/devfreq’ failed
make[1]: *** [drivers/devfreq] Error 2
make[1]: *** Waiting for unfinished jobs…
LD sound/soc/snd-soc-core.o
CC drivers/dma/of-dma.o
LD sound/soc/tegra-alt/snd-soc-tegra-alt-utils.o
LD sound/soc/tegra-alt/snd-soc-tegra-alt-pcm.o
CC sound/soc/tegra-alt/ahub_unit_fpga_clock.o
LD sound/soc/tegra-virt-alt/built-in.o
LD sound/soc/tegra-virtual/built-in.o
sound/soc/tegra-alt/ahub_unit_fpga_clock.c:31:31: fatal error: sound/tegra_audio.h: No such file or directory
#include <sound/tegra_audio.h>
^
compilation terminated.
scripts/Makefile.build:261: recipe for target ‘sound/soc/tegra-alt/ahub_unit_fpga_clock.o’ failed
make[3]: *** [sound/soc/tegra-alt/ahub_unit_fpga_clock.o] Error 1
scripts/Makefile.build:406: recipe for target ‘sound/soc/tegra-alt’ failed
make[2]: *** [sound/soc/tegra-alt] Error 2
make[2]: *** Waiting for unfinished jobs…
LD sound/soc/txx9/built-in.o
scripts/Makefile.build:406: recipe for target ‘sound/soc’ failed
make[1]: *** [sound/soc] Error 2
Makefile:973: recipe for target ‘sound’ failed
make: *** [sound] Error 2
make: *** Waiting for unfinished jobs…
LD drivers/dma/xilinx/built-in.o
LD drivers/dma/built-in.o
Makefile:973: recipe for target ‘drivers’ failed
make: *** [drivers] Error 2

Thanks.

We are fixing both tag and https://developer.nvidia.com/embedded/dlc/l4t-sources-28-1 issues.
Once ready, we will inform you here.
Sorry for any inconvenience!

Hi SirRobert and ZhangXin,

Sorry for the missing dts file for TX2. We will update it soon.

As for “governor.h”, I saw it under “kernel-4.4/drivers/devfreq”.

Hi WayneWWW,

Thank you for the reply. Do you have an estimation when the tag and kernel source will be ready?

If I change the ‘#include <governor.h>’ to ‘#include “governor.h”’, the problem seems fixed. However, there are still some similar problems and I think I should wait for your new release instead of solving them by myself. Not sure if it’s an environment problem. Is there any official document on how to compile the kernel? Currently I follow this instruction “https://developer.ridgerun.com/wiki/index.php?title=Compiling_Tegra_X2_source_code”.

Hi ZhangXin,

Yes, please refer to “L4T Documentation” in https://developer.nvidia.com/embedded/downloads.

There is a section named “Kernel Customization”.

Hi vickyy,

When I tried to compile kernel, it noticed this problem

In file included from /home/vu/Desktop/Projects/JetsonTX2/kernel_raw_rgb/sources/kernel/kernel-4.4/drivers/gpu/../../../nvgpu/drivers/gpu/nvgpu/gm20b/acr_gm20b.c:22:0:
/home/vu/Desktop/Projects/JetsonTX2/kernel_raw_rgb/sources/kernel/kernel-4.4/include/linux/platform/tegra/mc.h:28:47: fatal error: linux/platform/tegra/mc-regs-t18x.h: No such file or directory
 #include <linux/platform/tegra/mc-regs-t18x.h>
                                               ^
compilation terminated.
make[4]: *** [drivers/gpu/../../../nvgpu/drivers/gpu/nvgpu/gm20b/acr_gm20b.o] Error 1
make[3]: *** [drivers/gpu/../../../nvgpu/drivers/gpu/nvgpu] Error 2
make[2]: *** [drivers/gpu] Error 2
make[1]: *** [drivers] Error 2

Do you have any idea ?

Thanks

Hi forever3000,

We have confirm that this package does not include the source for TX2. Anything named “t18x” is for TX2.

I am really sorry about this. The new package will be updated soon.

I have similar problems with TX1.

What is more, there is missing “dev.h” file, which is included in /drivers/media/platform/tegra/camera/csi/csi.c"

When can we expect updates?

I suggest to align tag for u-boot too, otherwise is not possible to sync all source code!
Ok, it’s aligned!

Please align tag on:
linux-nvgpu-t18x.git
linux-nvhost-t18x.git

Thanks

I sync’d to tag tegra-l4t-r28.1 and make zImage succeeded, although there are some warnings about section mismatch for vmlinux.0

Hi xiaoyongtijee,

Did you just

  1. ./source_sync.sh -k tegra-l4t-r28.1
  2. make tegra18_defconfig
  3. make zImage
    and succeeded?

I still encounter some head file missing problems like

CC      drivers/gpu/../../../nvgpu/drivers/gpu/nvgpu/common/linux/kmem.o
drivers/gpu/../../../nvgpu/drivers/gpu/nvgpu/common/linux/kmem.c:30:25: fatal error: gk20a/gk20a.h: No such file or directory
 #include "gk20a/gk20a.h"
                         ^
compilation terminated.
scripts/Makefile.build:261: recipe for target 'drivers/gpu/../../../nvgpu/drivers/gpu/nvgpu/common/linux/kmem.o' failed
make[3]: *** [drivers/gpu/../../../nvgpu/drivers/gpu/nvgpu/common/linux/kmem.o] Error 1
scripts/Makefile.build:406: recipe for target 'drivers/gpu/../../../nvgpu/drivers/gpu/nvgpu' failed
make[2]: *** [drivers/gpu/../../../nvgpu/drivers/gpu/nvgpu] Error 2
scripts/Makefile.build:406: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:973: recipe for target 'drivers' failed
make: *** [drivers] Error 2

I can find the “gk20a.h” file somewhere else and move it to the proper place, however, I don’t think it’s the right way to solve these problem. So I wonder if you just did the above 3 steps.

Thanks.

ZhangXin,

Please try to build the kernel source with instructions in the document. There is a section teaching how to build NV kernel.

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

Hi WayneWWW,

It was my mistake. I thought “make -O=xxxx” was optional, however, it turned out to be mandatory. After adding the “-O=”, the kernel can be built successfully.

Hi,

I don’t understand the way this whole “O=” being mandatory to build zImage and/or modules. I think most of the errors are because a #include <> is used instead of #include “”. Adding -I./$(src) to the relevant Makefile solves the issue.

My point is that building with or withou “O=” shouldn’t matter. Please look into it.

Also, may I please know if t18x related source code has been added to the Sources tarball?

Nice it works.
Yes, I tried with -O first as well and that didn’t work

The t18x source in the kernel_src tarball issue has been root caused and resolved, those files have been added to the source tarball, please download it again from the link:

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

Thanks