[LINUX] Use PX-S1UD / PX-Q1UD with Jetson nano

Introduction

Since there were many articles on building a recording server on Raspberry Pi, I thought that Jetson could also build it, and it is a summary of various stumbling blocks. The reason I decided to build with Jetson nano was that when I looked at the specifications, the encoding performance was4K @ 30 | 4x 1080p @ 30 | 9x 720p @ 30 (H.264/H.265) Since it is said that 4ch real-time encoding can be done aside from the necessity. ?? ?? I started building it. The focus is on getting the tuner ready for Jetson, so please refer to other articles for recording setup and more.

What you need

Prerequisite environment

OS installation on Jetson nano and terminal operation with SSH etc.

OS environment

Jetson Nano Developer Kit SD Card Image JP 4.4 Kernel 4.9.140

procedure

Introduction

In the above environment, if you stab the PX-Q1UD,

terminal


$ dmesg
[ 1942.289567] usb 1-2.1.1: new high-speed USB device number 11 using tegra-xusb
[ 1942.310251] usb 1-2.1.1: New USB device found, idVendor=3275, idProduct=0080
[ 1942.310257] usb 1-2.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1942.310261] usb 1-2.1.1: Product: PX-S1UD Digital TV Tuner
[ 1942.310265] usb 1-2.1.1: Manufacturer: PLEX Digital TV Tuner

You will only see a kernel message like this and the DVB driver will not be applied. This is because the DVB driver is omitted in the Jetson standard kernel. ** First stumbling block: sob: **

Kernel build

There is a very easy-to-understand reference article. Please refer to here for the meaning of the command. https://qiita.com/yamamo-to/items/6fc622df7b5cce3eccfb

Kernel config

Commands from kernel download to displaying the Config setting screen

terminal


$ sudo jetson_clocks
$ sudo apt install -y libncurses5-dev
$ cd && mkdir kernel && cd kernel
$ wget https://developer.nvidia.com/embedded/L4T/r32_Release_v4.2/Sources/T210/public_sources.tbz2
$ tar xvf public_sources.tbz
$ cd Linux-for-Tegra/source/public
$ tar xvf kernel_src.tbz2
$ cd kernel/kernel-4.9
$ zcat /proc/config.gz  > .config
$ make menuconfig

Download destination of latest source L4T Driver Package (BSP) Sources is the URL

If you go to this screen, after some time,

スクリーンショット 2020-05-11 19.02.08.png Since the menuconfig screen is displayed, Go to Device Drivers-> Multimedia support. スクリーンショット 2020-05-11 19.02.17.png スクリーンショット 2020-05-11 19.02.35.png

Within Multimedia support

I will change the area. (There may be unnecessary things)

After changing it, save it with Save and hit Esc repeatedly to exit.

Kernel patch

It would be nice if I could build and use it with this, but it seems that there is a bug in the Siano driver when using it with arm64, and when I insert the tuner, it hangs after a certain period of time. ** Second stumbling block: sob: **

If you check dmesg smsusb:smsusb_onresponse: error, urb status -71, 0 bytes smmu_dump_pagetable What's mc-err What's wrong I get an error like this.

A patch to solve the problem has been released, so I will apply it.

Very grateful reference article https://blog.ayushio.com/2018/12/27/rock64-record/

terminal


$ cd ~/kernel/Linux_for_Tegra/source/public/kernel
$ wget -O siano.patch https://patchwork.kernel.org/patch/10256121/raw/
$ cd kernel-4.9
$ patch -p1 < ../siano.patch

Build

terminal


$ make oldconfig
$ make prepare
$ make modules_prepare
$ make -j4 Image && make -j4 modules

It takes about an hour. Let's cool it down.

Installation

terminal


$ sudo make modules_install
$ sudo cp -p /boot/Image /boot/Image.org
$ sudo cp arch/arm64/boot/Image /boot/Image

Reboot when finished so far (it will take some time)

Verification

After inserting the PX-Q1UD / PX-S1UD into the USB port, When I run dmesg,

terminal


[ 2402.115532] usb 1-2.1.1: new high-speed USB device number 10 using tegra-xusb
[ 2402.136510] usb 1-2.1.1: New USB device found, idVendor=3275, idProduct=0080
[ 2402.136515] usb 1-2.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2402.136519] usb 1-2.1.1: Product: PX-S1UD Digital TV Tuner
[ 2402.136522] usb 1-2.1.1: Manufacturer: PLEX Digital TV Tuner
[ 2402.137321] smsusb:smsusb_probe: board id=18, interface number 0
[ 2402.189130] DVB: registering new adapter (Siano Rio Digital Receiver)
[ 2402.189613] usb 1-2.1.1: DVB: registering adapter 0 frontend 0 (Siano Mobile Digital MDTV Receiver)...
[ 2402.189718] smsdvb:smsdvb_hotplug: DVB interface registered.
[ 2402.189721] smsmdtv:smscore_init_ir: IR port has not been detected
[ 2402.189724] smsusb:smsusb_probe: Device initialized with return code 0

If such a log flows and the device exists under / dev / dvb /, it is successful.

Finally

I was surprised that there were many articles in Japanese. It absorbs faster than English, so it's very helpful. Thanks to those who shared it as an article.

Recommended Posts

Use PX-S1UD / PX-Q1UD with Jetson nano
Jetson Nano JETPACK 44.1 (2020/10/21) with Tensorflow
Use chainer with Jetson TK1
How to use Realsense's Python wrapper PyRealsense with Jetson Nano
Run the original YOLO with Jetson Nano
jetson nano setup
Use mecab-ipadic-neologd with igo-python
Use RTX 3090 with PyTorch
Use pipdeptree with virtualenv
[Python] Use JSON with Python
Use indicator with pd.merge
Use Gentelella with django
Use mecab with Python3
Use tensorboard with Chainer
Use DynamoDB with Python
Use pip with MSYS2
Use Python 3.8 with Anaconda
Use pyright with Spacemacs
Set up Jetson nano
Use python with docker
Use TypeScript with django-compressor
Use LESS with Django
Easy face recognition try with Jetson Nano and webcam
Use MySQL with Django
Use Enums with SQLAlchemy
Use tensorboard with NNabla
Use GPS with Edison
Use nim with Jupyter
Use Trello API with python
Use shared memory with shared libraries
Use "$ in" operator with mongo-go-driver
Use custom tags with PyYAML
Use directional graphs with networkx
Use TensorFlow with Intellij IDEA
Use Twitter API with Python
Use pip with Jupyter Notebook
Use DATE_FORMAT with SQLAlchemy filter
Use TUN / TAP with Python
Use sqlite3 with NAO (Pepper)
Use sqlite load_extensions with Pyramid
Use Windows 10 fonts with WSL
Use SSL with Celery + Redis
Use Cython with Jupyter Notebook
Use Maxout + CNN with Pylearn2
Use WDC-433SU2M2 with Manjaro Linux
Use OpenBLAS with numpy, scipy
Use subsonic API with python3
Use Sonicwall NetExtener with Systemd
Use prefetch_related conveniently with Django
Use AWS interpreter with Pycharm
Use Bokeh with IPython Notebook
Use Python-like range with Rust