Giter Site home page Giter Site logo

linux-l4t-4.4's Introduction

change to linux-l4t-4.9 repository: https://github.com/InES-HPMM/linux-l4t-4.9.git

change to branch hdmi2csi/l4t-r28.2.1: https://github.com/InES-HPMM/linux-l4t-4.4/tree/hdmi2csi/l4t-r28.2.1

linux-l4t-4.4

This is the top-level repository for TX1/TX2 kernel and Device Tree. The Nvidia Source URLs can be found in the README.md files of the submodules.

Clone with Submodules

Use the following command to clone this repository and its submodules:

$ git clone --recursive <URL>

Already Cloned but no Submodules?

$ git submodule update --init --recursive

Building the Kernel

NOTE: This is the short version for advanced users. Step-by-step instructions can be found in the Custom Kernel Compilation Wiki.

# Go to the kernel-4.4 directory
$ cd kernel/kernel-4.4

# Set the environment variables
$ export ARCH=arm64
$ export CROSS_COMPILE=<aarch64_toolchain_prefix>

# TX1
$ make tegra21_hdmi2csi_defconfig
# TX2
$ make tegra18_hdmi2csi_defconfig

# Build the kernel, modules and dtb files
$ make -j8

Device Tree

NOTE: This is the short version for advanced users. Step-by-step instructions can be found in the Custom Kernel Compilation Wiki.

The Device Tree source files of the Linux kernel are located in the hardware directory:

TX1:

hardware/nvidia/platform/t210/jetson/kernel-dts/

TX2:

hardware/nvidia/platform/t18x/quill/kernel-dts/

For compiling the Device Trees, go to the kernel directory and run make:

$ cd kernel/kernel-4.4
$ make dtbs

Update Device-Tree

CAUTION:

Do not use extlinux.conf to define the generated .dtb file because u-boot makes changes on-the-fly to the Device Tree Blob. Otherwise, the screen might flicker or the kernel stops during the boot process.

Instead, use the flash script flash.sh from jetpack (or alternatively the Jetson TX1/TX2 64-bit Driver Package, see Custom Kernel Compilation Wiki):

TX1:

  1. Replace the existing .dtb file: JetPack/3.1/64_TX1/Linux_for_Tegra_64_tx1/kernel/dtb/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb with tegra210-jetson-tx1-p2597-2180-a01-devkit-hdmi2csi.dtb
  2. Flash the DTB partition: $ sudo ./flash.sh -r -k DTB jetson-tx1 mmcblk0p1

TX2:

  1. Replace the existing .dtb file: JetPack/3.1/64_TX2/Linux_for_Tegra_64_tx2/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb with tegra186-quill-p3310-1000-c03-00-base-hdmi2csi.dtb
  2. Flash the DTB partition: $ sudo ./flash.sh -r -k kernel-dtb jetson-tx2 mmcblk0p1

linux-l4t-4.4's People

Contributors

arw1 avatar dariis avatar weissric avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linux-l4t-4.4's Issues

Driver for jetpack 4.2.1

Thanks for this driver .
If there is any possibility to update this driver for the jetpack 4.2.1 with their latest kernel version ? or any timetable when it May be updated ?

Downloading zip file without using git clone

Hello , can anybody tell me how can i manually download all the submodules and files without using git clone. I can compile it but it gives me a + sign after the kernel version from uname -r command . Like 4.4.38-tegra+ . I am thinking maybe a manual download as a zip file could help me get rid of this . so i would like to know know how do i download the submodules mannually>
Regards

Support for R32.1

Hi,

Forgive me if this is kind of a stupid question but I am hoping to update the drivers you all have written here to the newest version of L4T (R32.1). I was wondering if you all would be able to point me in the direction of what would need to be changed to run it with this newest release?

Thank you in advance!

Interlaced capturing with Jetson TX2.

Hi all!
We have HDMI2CSI bridge (https://blog.zhaw.ch/high-performance/category/hdmi2csi/) working with Jetson TX2 (L4T 28.2.1). And we have trouble while trying to capture interlaced input stream. Capturing progressive works just great.

I have tried to wrote a letter directly to Tobias Kammacher but it was rejected. So decided to create an issue here.

While running gstreamer's pipeline with interlaced source in dmesg we get errors like:

tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
tegra-vi4 15700000.vi: ATOMP_FE syncpt timeout! err = -11

Currently we are investigating into changes made to L4T 24.2.1 to add support interlaced video signal for TX1. Sources from https://github.com/InES-HPMM/linux-l4t.
If we are on the right way, we should start from commit 3989691ee2ae75f7e3f2bf49be243493ecbed558.

As we understand, the core changes regarding interlacing are (tegra_vi2.c):

static int tegra_vi_fill_pix_format(struct v4l2_pix_format *pf,
        const struct v4l2_mbus_framefmt *framefmt)
{
...
  /* With interlaced try to return the requested field format */
  if (interlaced)
    field = tegra_vi_field_is_interlaced(pf->field) ?
      pf->field : V4L2_FIELD_INTERLACED_TB;
  else
    field = V4L2_FIELD_NONE;

  v4l2_fill_pix_format(pf, framefmt);
  pf->field = field;
...
}
static int tegra_vi_channel_set_format(
  struct tegra_vi_channel *chan, struct v4l2_pix_format *pf)
{
...
  /* Bus format */
  vi_writel(nv_mbus | (input->csi_channel << 8) | (interlaced << 12),
    &chan->vi_regs->image_dt);
  /* Resolution */
  vi_writel(((framefmt.height >> interlaced) << 16) | framefmt.width,
    &chan->vi_regs->image_size);
...
}

Also, support of interlaced input is already added to tc358840.c, so we should not edit anything there.

We will be grateful for any help in advising what we should to modify in the Linux kernel to capture interlaced signal on Tegra TX2. Thanks in advance, waiting for the response and have a good day!

HDMI-In does not work(there`s no /dev/video0(or 1)

Hi!

I've fl'shed my Jetson TX1 with linux-l4t-4.4 core from this repo and placed it on auvidea J130-4K board.

When i've tried
ubuntu@tegra-ubuntu:~$ modprobe tc358840
modprobe: FATAL: Module tc358840 not found in directory /lib/modules/4.4.38-tegra

then i had a look into dev.
ubuntu@tegra-ubuntu:~$ ls /dev/v* /dev/v4l-subdev0 /dev/vcs1 /dev/vcs4 /dev/vcs7 /dev/vcsa2 /dev/vcsa5 /dev/v4l-subdev1 /dev/vcs2 /dev/vcs5 /dev/vcsa /dev/vcsa3 /dev/vcsa6 /dev/vcs /dev/vcs3 /dev/vcs6 /dev/vcsa1 /dev/vcsa4 /dev/vcsa7

What`s wrong? How could i use HDMI-In on this board?
Thank you in advance

Device tree documentation for AGX Xavier

I have the adapter board pictured here: #8 to fit the connector on the AGX Xavier board. I was wondering where I could find documentation on the needed changes to make the device tree to work with the Xavier?

installation process of dtb

well , I tried it just now . but I have some queries on L4t 28.1 ,I didn't understand the installation process clearly .

  1. should i need to compile the kernel ? or should i just need to compile the dtbs doing only "make dtbs" .

  2. And how do i exactly replace the dtbs from linux-l4t-4.4/kernel/kernel-4.4/arch/arm64/boot/dts folder i can see there are total 8 dtb files and among them both tegra210-jetson-tx1-p2597-2180-a01-devkit-hdmi2csi.dtb and tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb exist . but in 64_TX1/Linux_for_Tegra_64_tx1/kernel/dtb folder. I saw 3 dtbs , these three have their counterparts in the linux-l4t-4.4/kernel/kernel-4.4/arch/arm64/boot/dts folder with the same name too, but sizes are different . so what should be the right way to replace them , replace only the tegra210-jetson-tx1-p2597-2180-a01-devkit-hdmi2csi.dtb or put all of them in the jetpack's dtb folder ? or just remove the tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb file and then paste the tegra210-jetson-tx1-p2597-2180-a01-devkit-hdmi2csi.dtb file ? or should i rename tegra210-jetson-tx1-p2597-2180-a01-devkit-hdmi2csi.dtb file to tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb

  3. should i also replace the Image and zImage and dtc files?

  4. I tried sudo ./flash -r -k DTB jetson-tx1 mmcblk0p1 this command and it says it's looking for tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb but i actually deleted it and placed tegra210-jetson-tx1-p2597-2180-a01-devkit-hdmi2csi.dtb

Please Advise
Regards

Jetpack 3.2/R28.2

Is there a plan to release a newer version compatible with Jetpack 3.2/R28.2? R28.1 and R28.2 are not far apart, but a quick diff of the current repository version vs nvidia R28.2 appears to show more diffs than I'd expect. Or there are more changes than I expect.

Audio is just static...

I know the wiki says audio is untested... so I thought I would give it a try. Long story short, audio is being sent to j21's i2s bus... but either the codec is wrong or something else, because all I get is static (except when the input source is silent). Unfortunately, I'm not too sure how to troubleshoot this. Any pointers?

How to use HDMI2CSI for Tegra TX2 within OpenCV?

Hi, I have a problem when using the HDMI2CSI module within OpenCV. I test it in the following platform:
(1) Platform: TX2
(2) OpenCV: 3.1 with cap_gstreamer support (gst version: 1.8.3)
(3) HDMI2CSI Driver: Image_28-1_hdmi2csi
(4) HDMI Input: the HDMI output of another PC
Before using OpenCV for testing, the commands used in https://github.com/InES-HPMM/linux-l4t-4.4/wiki/hdmi2csi#examples (using gst-launch-1.0) are test, and I found that these commands work very well. Then I use OpenCV to capture the gst-pipeline-stream. The code is very easy and shown below:
################################################################################
static const string PIPELINE_NAME = "v4l2src device=/dev/video0 ! video/x-raw, width=1920, height=1280, framerate=60/1, format=UYVY ! nvvidconv ! video/x-raw, format=BGRx ! videoconvert ! appsink sync=false";

class HdmiInputStreamer {
public:
static boost::shared_ptr Get() {
static boost::shared_ptr ptr;
if (! ptr) {
ptr.reset(new HdmiInputStreamer());
}
return ptr;
}
// output frame
void pop(cv::Mat* image) {
cap_ >> *image;
}
// show
void show() {
while (1) {
cv::Mat image;
pop(&image);
cv::namedWindow("HdmiInputStreamer", WINDOW_AUTOSIZE);
cv::imshow("HdmiInputStreamer", image);
cv::waitKey(1);
}
}
~HdmiInputStreamer() {
if (cap_.isOpened()) {
cap_.release();
}
}

private:
cv::VideoCapture cap_;
std::string pipeline_;
HdmiInputStreamer() {
pipeline_ = PIPELINE_NAME;
while(! cap_.open(pipeline_)) {
LOG(INFO) << "The hdmi input stream is unreachable, please check and wait ...";
// sleep
sleep(1000);
}
}
};
################################################################################
I use HdmiInputStreamer()::Get()->show() to display the input HDMI Stream, and the ERROR is shown below:
GStreamer Plugin: Embedded video playback halted; module v4l2src0 reported: Internal data flow error.
OpenCV Error: Unspecified error (GStreamer: unable to start pipeline
) in cvCaptureFromCAM_GStreamer, file /home/nvidia/Downloads/opencv_liliang/opencv/modules/videoio/src/cap_gstreamer.cpp, line 818
terminate called after throwing an instance of 'cv::Exception'
what(): /home/nvidia/Downloads/opencv_liliang/opencv/modules/videoio/src/cap_gstreamer.cpp:818: error: (-2) GStreamer: unable to start pipeline
in function cvCaptureFromCAM_GStreamer

Aborted (core dumped)

I have also tested some other pipelines with different names:
(1) "v4l2src device=/dev/video0 ! video/x-raw, width=1920, height=1280, framerate=60/1, format=UYVY ! nvvidconv ! video/x-raw(memory:NVMM), format=BGRx ! videoconvert ! appsink sync=false"
(video.bin:3726): GStreamer-CRITICAL **: gst_mini_object_copy: assertion 'mini_object != NULL' failed

(video.bin:3726): GStreamer-CRITICAL **: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(video.bin:3726): GStreamer-CRITICAL **: gst_structure_copy: assertion 'structure != NULL' failed

(video.bin:3726): GStreamer-CRITICAL **: gst_caps_append_structure_full: assertion 'GST_IS_CAPS (caps)' failed

(video.bin:3726): GStreamer-CRITICAL **: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(video.bin:3726): GStreamer-CRITICAL **: gst_structure_copy: assertion 'structure != NULL' failed

(video.bin:3726): GStreamer-CRITICAL **: gst_caps_append_structure_full: assertion 'GST_IS_CAPS (caps)' failed

(video.bin:3726): GStreamer-CRITICAL **: gst_mini_object_unref: assertion 'mini_object != NULL' failed

(video.bin:3726): GStreamer-CRITICAL **: gst_mini_object_ref: assertion 'mini_object != NULL' failed
GStreamer Plugin: Embedded video playback halted; module v4l2src0 reported: Internal data flow error.
OpenCV Error: Unspecified error (GStreamer: unable to start pipeline
) in cvCaptureFromCAM_GStreamer, file /home/nvidia/Downloads/opencv_liliang/opencv/modules/videoio/src/cap_gstreamer.cpp, line 818
terminate called after throwing an instance of 'cv::Exception'
what(): /home/nvidia/Downloads/opencv_liliang/opencv/modules/videoio/src/cap_gstreamer.cpp:818: error: (-2) GStreamer: unable to start pipeline
in function cvCaptureFromCAM_GStreamer

Aborted (core dumped)

(2) "v4l2src device=/dev/video0 ! video/x-raw, width=1920, height=1280, framerate=60/1, format=I420 ! nvvidconv ! video/x-raw(memory:NVMM), format=BGRx ! videoconvert ! appsink sync=false"
#The same error as (1)#

(3) "v4l2src device=/dev/video0 ! video/x-raw, width=1920, height=1280, framerate=60/1, format=I420 ! nvvidconv ! video/x-raw, format=BGRx ! videoconvert ! appsink sync=false"
./build/tools/video.bin
GStreamer Plugin: Embedded video playback halted; module v4l2src0 reported: Internal data flow error.
OpenCV Error: Unspecified error (GStreamer: unable to start pipeline
) in cvCaptureFromCAM_GStreamer, file /home/nvidia/Downloads/opencv_liliang/opencv/modules/videoio/src/cap_gstreamer.cpp, line 818
terminate called after throwing an instance of 'cv::Exception'
what(): /home/nvidia/Downloads/opencv_liliang/opencv/modules/videoio/src/cap_gstreamer.cpp:818: error: (-2) GStreamer: unable to start pipeline
in function cvCaptureFromCAM_GStreamer

Aborted (core dumped)
#The same error as in main test situation#

(4) "v4l2src device=/dev/video0 ! video/x-raw, width=1920, height=1280, framerate=60/1, format=UYVY ! nvvidconv ! video/x-raw, format=BGRx ! videoconvert ! video/x-raw, format=BGR ! appsink sync=false"
#The same error as in main test situation#

I am not sure what the problem is, and any help are appreciated!

make tegra18_hdmi2csi_defconfig error

I tried many times, but failed to compile on 32.2.1, so I dropped to 28.2.1. follow the steps:
clone the whole repository and check out:
74987ea47a13e9ef046c3bb6500a45852fede114 hardware/nvidia/platform/t18x/common (tegra-l4t-r28.1)
67b165cf14e6a34ce3113ce41715fec688dd794c hardware/nvidia/platform/t18x/quill (heads/hdmi2csi/l4t-r28.1)
0e4ac7bff000c458005bf532cc5bd58fbbed62b4 hardware/nvidia/platform/t210/common (tegra-l4t-r28.1)
d82ec996b2fbf97894721adf84d5488e1c08e48a hardware/nvidia/platform/t210/jetson (heads/hdmi2csi/l4t-r28.1)
53ff710dd05783e6ef444c545eee112dccda1fe5 hardware/nvidia/platform/tegra/common (tegra-l4t-r28.1)
412bb1bbb48945eed61f31accf83116ee3320dc7 hardware/nvidia/soc/t18x (tegra-l4t-r28.1)
ee8b9d78b2091deeead9e0a2c7282b3cdb47e2e7 hardware/nvidia/soc/t210 (tegra-l4t-r28.1)
4bcf1deb457958585c79a894957823e3617c7777 hardware/nvidia/soc/tegra (tegra-l4t-r28.1)
1bba0f819ede9a224141f9daae4300add35fbd03 kernel/display (tegra-l4t-r28.1)
878fbe7ba0789f2cbc0192fa53fd9b5d37ad342a kernel/kernel-4.4 (heads/hdmi2csi/l4t-r28.1)
c33aefb7c596874ee7ba31b0fb7dca3c6df19e7b kernel/nvgpu (heads/hdmi2csi/l4t-r28.1)
e62d00b7e110bc82b7eed3dd6faa1b48fadae435 kernel/nvhost (tegra-l4t-r28.1)
fc9b7fa02156503ada6fff3d71d388ca521d1130 kernel/nvmap (tegra-l4t-r28.3.1)
6b18b31b44f34cf4d8a65217c7773e965082db9b kernel/nvmap-t18x (tegra-l4t-r28.3.1)
8b76f7fc8fbdba75bf6f784634374e65a05d3314 kernel/t18x (tegra-l4t-r28.1)

export ARCH=arm64
export CROSS_COMPILE=/usr/bin/aarch64-linux-gnu-

make tegra18_hdmi2csi_defconfig:
error message show a lot of "syntax error":
'ernel/trace/Kconfig:405⚠️ ignoring unsupported character '
kernel/trace/Kconfig:405: unknown option "This"
kernel/trace/Kconfig:406⚠️ ignoring unsupported character ','
'ernel/trace/Kconfig:406⚠️ ignoring unsupported character '
kernel/trace/Kconfig:406: unknown option "kernel"
'ernel/trace/Kconfig:407⚠️ ignoring unsupported character '
kernel/trace/Kconfig:407: unknown option "stack-trace"
'ernel/trace/Kconfig:408⚠️ ignoring unsupported character '
kernel/trace/Kconfig:408: unknown option "then"
'ernel/trace/Kconfig:409⚠️ ignoring unsupported character '
kernel/trace/Kconfig:409: unknown option "is"

New TX1 vs Old TX1

I purchased quite a large number of TX1s and HDMI2CSI boards, and have run into a big problem. On my new boards, the driver pukes when trying to load the driver (specifically when the 2nd chip is initialized. (the one on 7h1f. The 7h0f seems to load fine.)

Has anyone else encountered this (or know of a fix?)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.