yashsingh1/xdaforums huggingface dataset:
[Shield Android TV General] yahoo2016:
I installed the latest Jetpack 2.3 on SATV (except "flash OS") and was able to run Cuda 8.0 samples. As far as I can tell, SATV works same as Jetson TX1 under Ubuntu 16.04. How did you test hardware decoders for 4k/video?

It seems latest Stock ROMs work with dtbs from latest L4T, but not the other way around. When dtb from L4T is used, SATV can boot to Ubuntu or Android. I only use SATV "rooted" ROMs, I believe there is "flash_all.sh" scrip, you can comment out lines such as "fastboot flash recovery ...." or "fastboot flash boot ...." if you don't want ubuntu kernel be deleted.

I do "sudo apt-mark hold xserver-xorg-core" before "sudo apt-get update" to avoid Nvidia driver be overwritten.

I have not done "sudo apt-get upgrade".

Someone followed ubuntu 16.04 upgrade prompt when L4T was still 14.04, but it did not work.
[Shield Android TV General] crnkoj:
1. for the video, i tried youtube in the chromium browser, where even 1080p is lagging (even if i use the jetsons clock script to max the frequencies), the tegrastats show almost full 100% load on the cpus, and like 10-20% on the gpu, hence my thought that video acceleration isnt working.

2. about recovery i found out, the thing is that stock android tv OS reflashes stock recovery if you boot the stock android tv os with a custom recovery kernel (in our case ubuntu kernel), i found out that under /system one has to remove/rename the recovery-from-boot.p file and it stops doing this.

3. about the upgrade, "apt-get update" does nothing by itself, did you mean that yo u dont do "apt-get dist-upgrade" or actually "apt-get upgrade" which would mean that you dont do any updates whatsoever.

4. i have to check on installing the jetpack 2.3 (probably there are instructions on nvidias page where one can dl the rootfs etc.)

thanks again. edit: i might be somehow dumb, but i dont seem to be able to download this anywhere, just the whole jetpack that it wants me to isntall on a 64 bit ubuntu host system (which i dont have/use), is there any direct link for the cuda files? i remember on the old l4t (23.1) it was possible to pull those files directly from the terminal on the shield running the L4T (this CUDA 7.0 Toolkit software download for L4T R23.1.).

edit2: is there a repo for cuda to add to the l4t ubuntu onthe shield, so one can just install it using apt-get?

edit3: so i got this jetpack to ru n on my gentoo system by just extracting the run file and running "Chooser", there however i dont have the option to install CUDA for L4T 2.3 TX1, what there is possible is CUDA for L4T 2.3 TK1 ubuntu 14.04 as well as L4T 2.2.1 TX1 (32bit) CUDA for 14.04. Im confused. Can you point me in the right direction, thanks
[Shield Android TV General] yahoo2016:
1. I believe it depends if the software (e.g., Chromium) has ARM GPU (Tegra X1) support. Have you tried to download some HD/4K videos and use ubuntu "video" player and other players?

2. I misunderstood your question. I have always been using "boot" partition for ubuntu and "recovery" partition for Android kernel.

4. Screen capture of Jetpack2.3 under ubuntu 14.04 is attached, it highlighted Cuda for ubuntu 14.04. Jetpack creates "_installer" and "jetpack_download" folders. In "_installer", there is cuda-l4t.sh:

#!/bin/bash
# $1: cuda debian file name
# $2: cuda_ver (example 6.0, 6.5)
# $3: cuda_dash_ver (6-0, 6-5)

if [ $# != 3 ] ; then
echo "Incorrect arguments, use following command to install cuda"
echo "$0 cuda_deb_file_name 6.5 6-5"
exit 1
fi

while sudo fuser /var/lib/dpkg/lock > /dev/null 2>&1; do
echo "Waiting for other apt-get command to finish"
sleep 3
done

sudo dpkg --force-all -i ~/cuda-l4t/$1
sudo sed -i.bak 's/\(^deb.*main restricted\)\s*$/\1 universe multiverse/g' /etc/apt/sources.list
sudo sed -i.bak 's/\(^deb.*main restricted universe\)\s*$/\1 multiverse/g' /etc/apt/sources.list

sudo apt-get -y update
sudo apt-get -y --force-yes install cuda-toolkit-$3 libgomp1 libfreeimage-dev libopenmpi-dev openmpi-bin

grep -q "export PATH=.*/usr/local/cuda-$2/bin" ~/.bashrc || echo "export PATH=/usr/local/cuda-"$2"/bin:$PATH">>~/.bashrc

if dpkg --print-architecture | grep -q arm64; then
lib_dir=lib64
else
lib_dir=lib
fi
grep -q "export LD_LIBRARY_PATH=/usr/local/cuda-$2/$lib_dir" ~/.bashrc || echo "export LD_LIBRARY_PATH=/usr/local/cuda-"$2"/"$lib_dir":$LD_LIBRARY_PATH" >> ~/.bashrc
export LD_LIBRARY_PATH=/usr/local/cuda-$2/$lib_dir:$LD_LIBRARY_PATH

which installs cuda from "cuda-repo-l4t-8-0-local_8.0.34-1_arm64.deb" in "jetpack_download" folder.

If you can't run jetpack to generate the about files I can put them on my google drive. "cuda-repo-l4t-8-0-local_8.0.34-1_arm64.deb" is 1.2GB.

To install cuda 8.0 manually on SATV, you'd need to create a "cuda-l4t" folder under home ("~") of SATV ubuntu, copy "cuda-l4t.sh" and "cuda-repo-l4t-8-0-local_8.0.34-1_arm64.deb" to it and run

./cuda-l4t.sh cuda-repo-l4t-8-0-local_8.0.34-1_arm64.deb 8.0 8-0

You can run "nvcc -V" to verify cuda installation after opening a new terminal.

You can run "sudo make" in "/usr/local/cuda/samples" to build cuda samples in "usr/local/cuda/samples/bin/aarch64/linux/release"".
[Shield Android TV General] crnkoj:
Hi, thanks.

But what you highlighted is CUDA for HOST system, not for l4t so to say (perhaps i dont understand something here, but if you select TK1 than t hers CUDA for the TK1 not for host system).

I managed to unpack the .run with the simple inherent command and can run "Chooser" hence where i get this. But my screenshot looks otherwise. See attached screenshot.

I think it would be easiest, if you could upload the cuda.deb file to google drive or any other platform, so that i can dl it. Otherwise ill just have to install ubuntu in a vm. I dont need the cuda-l4t.sh as i managed to extract that.

One more thing. L4T 24.2 is ubuntu 16.04 LTS not 14.04

ps are yo u using charmm too?

thanks

edit more: i just installed ubuntu in a vm, doing the install now. i think i wont need the file from you. thanks
[Shield Android TV General] yahoo2016:
On Cuda 8.0 download site, there isn't Arm64 version. I believe you need Cuda 8.0 for ubuntu 14.04 to cross build Cuda 8.0 for TX1/SATV.

L4T24.2 has ubuntu 16.04 for TX1, but Jetpack 2.3 needs ubuntu 14.04 on host, according to Nvidia.

I have cuda 8.0 for arm64 in the following link in case you need it:

https://drive.google.com/file/d/0Bz5kaPQJx_AgUmVYTjk1Z1JKMU0/view?usp=sharing
[Shield Android TV General] crnkoj:
thanks man.

oh my i installed 16.04 lts in vm, now im getting the issue that libavcodec-extra-54 cant be found... jezus. i might just try with yours.

edit: getting it to work even with 16.04, just had to select cuda for host and cuda for l4t. the one thing that made issues (opencv) seems to be irrelevant
[Shield Android TV General] yahoo2016:
I'm glade you have Jetpack2.3 working on host with Ubuntu 16.04, others had issues with Ubuntu 16.04, and Nvidia posted "The host PC needs to be running Ubuntu 14.04, however, yours is Ubuntu 16.04 machine to cause this issue.":

https://devtalk.nvidia.com/default/...1/host-ubuntu16-04-install-jetpack-2-3-error/
[Shield Android TV General] crnkoj:
yep same issue, but to install cuda only, it doesnt matter. Installed a second vm with 14.04, here it works all.
[Shield Android TV General] crnkoj:
Hey so, i upgraded the l4t ubuntu on the shield with apt-get update -> apt-get upgrade, i held the three xorg packages and all seems to work as before the update. Still cant get proper video acceleration or w/e to call it (decoding movies) to work (neither the built in video player, nor the chromium that comes with l4t). But it is a big step forwards compared to the first l4t builds.

thanks again for your contributions yahoo2016
[Shield Android TV General] yahoo2016:
It appears hardware video decode only works with Nvidia gst-launch-1.0, the following are from "Tegra X1/Tegra Linux Driver Package Multimedia User Guide":

Video Decode Examples Using gst-launch-1.0

The following examples show how you can perform video decode on Gstreamer-1.0. H. 264 Decode (NVIDIA accelerated decode)

gst-launch-1.0 filesrc location=<filename.mp4> ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! nveglglessink -e

H.265 Decode (NVIDIA accelerated decode)

gst-launch-1.0 filesrc location=<filename.mp4> ! qtdemux name=demux demux.video_0 ! queue ! h265parse ! omxh265dec ! nvoverlaysink -e

MPEG-4 Decode (NVIDIA accelerated decode)

gst-launch-1.0 filesrc location=<filename.mp4> ! qtdemux name=demux demux.video_0 ! queue ! mpeg4videoparse ! omxmpeg4videodec ! nveglglessink -e
[Shield Android TV General] beantek:
Python3 & OpenCV Development Environment

Thanks for all the info on this forum. The entire process was rather painless after figuring out exactly what was going on with adb/fastboot. Ironically, the biggest issue I had was copying rootfs onto the MicroSD. I kept getting a read-only error during the copy process which was caused by the USB card reader. Once I changed card readers, I was able to transfer the files without a problem. Also had issue with the display not working. I had to flash the corresponding dtb and use a 1920x1080 monitor. I was using a 1600x1200 monitor that only showed a black/gray background with a purple vertical line. If anyone else wants the info on getting OpenCV installed for python 3, follow the instructions below. Unfortunately, JetPack isn't available for Ubuntu 16.04 so I couldn't install the CUDA 8 or TensorRT. Has anyone had any luck with this?

INSTALLING OPENCV FOR PYTHON3

After booting to Ubuntu, make sure to run:

sudo apt-mark hold xserver-xorg-core

Prevent NVIDIA driver been overwritten

sha1sum -c /etc/nv_tegra_release

Make sure Ubuntu is updated:

$ sudo apt-add-repository universe && sudo apt-get -y update && sudo apt-get -y upgrade

Install Python3, GDBM, NUMPY

$ sudo apt-get install -y python3 && sudo apt-get upgrade -y python3 && sudo apt-get install -y python3.5-dev python3-gdbm python3-sklearn python3-numpy

INSTALL THE OPENCV PREPREQUISITES:

$ sudo apt-get install -y build-essential cmake pkg-config libtiff5-dev libjpeg-dev libjasper-dev libpng12-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev protobuf-compiler libprotobuf-dev

DOWNLOAD OPENCV SOURCE & EXTRA MODULES

$ cd ~ && git clone https://github.com/Itseez/opencv.git && cd opencv && git checkout 3.1.0
$ cd ~ && git clone https://github.com/Itseez/opencv_contrib.git && cd opencv_contrib && git checkout 3.1.0

BUILD OPENCV

$ cd ~/opencv && mkdir build && cd build
$ sudo cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_CUDA=ON -D CUDA_ARCH_BIN="3.2" -D CUDA_ARCH_PTX="" -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -D INSTALL_PYTHON_EXAMPLES=OFF -D INSTALL_C_EXAMPLES=OFF -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules -D INSTALL_C_EXAMPLES=OFF -D BUILD_DOCS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF ..
$ sudo make
$ sudo make install
$ sudo ldconfig

Everything should be working. You can test whether CV2 is installed by doing the following:

$ python3
>> import cv2

If everything is in order, no errors should come up.
[Shield Android TV General] yahoo2016:
I do not use python, but I installed Cuda 8.0, openCV and other software using Nvidia Jetpack 2.3.
[Shield Android TV General] beantek:
How did you go about installing the package? It errored out on me because I'm not using the compatible Ubuntu 14.04 environment.
[Shield Android TV General] yahoo2016:
Unfortunately Jetpack 2.3 only runs on Ubuntu 14.04 on Intel CPUs. I have an HP laptop with Ubuntu 14.04 dedicated for SATV/TX1 development.
[Shield Android TV General] jpiat:
Hi,

i tried the method described here and when trying to boot the image with rootfs on the sd card, i get a blank screen and then the shield reboots to android. Its not clear to me wether or not i need to flash the dtb from /boot to get Ubuntu working with filesystem on the sd card.
[Shield Android TV General] yahoo2016:
Flashing dtb from /boot of L4T 24.2 is needed, otherwise you will get black screen.

Shield rebooting to android is likely problem of roofts on sd card. Make sure the SD card is not U3, Tegra X1 only support U1. SD card partition 1 should be formatted to ext4.
[Shield Android TV General] jpiat:
I made a modification to my sd card layout, following advices from a previous post saying that you should have a first fat32 partition and then the ext4 filesystem. Doing this got me to have kernel messages printed, but that ends with a reboot in 30s ...

I have used rootfs from L4T R24.2.0 and i noticed that some of the forum instructions use R24.2.1. Could this be the problem ?
[Shield Android TV General] jpiat:
I tried again with a single partition on the sd card and it worked. It seems that the key is to use the corrent boot image but there are plenty available along the thread. The one that worked for me is the boot image contained in l4t24-2satv.tar.bz2 .
[Shield Android TV General] deerish:
If someone can post a high quality photograph of the back of the board (i.e. the side opposite the SoC), focusing on the area around the eMMC, I can point out and annotate the pads for direct access to the chip.
[Shield Android TV General] yahoo2016:
The bottom of the board has shield and only shows partial part number of EMMC.

Were you able to find if CSI2s can be accessed for cameras?
[Shield Android TV General] deerish:
Thank you. Specifically, I need a photograph of the highlighted area in the attached image. I removed the entire shield, but cutting out just that section will do. The eMMC is the SanDisk SDIN9DW4-16G, by the way.

I have not found the CSI-2 traces/pads. I will look if I can get my hands on a working Shield TV.
[Shield Android TV General] gxk133:
Linux on Shield TV (current) instructions?

Hello Everyone --

I'm new to this forum .. I've been trying to research how to get Linux installed (for CUDA-based development) on my Shield TV. Most of the posts are about a year old (there was a lot of activity back then). Am I too late to the game? Could someone please point me to some detailed step-by-step instructions that are still current and would work smoothly? I would really appreciate it.

Thank you!
[Shield Android TV General] yahoo2016:
The first post was updated for the latest L4T 24.2.
[Shield Android TV General] gxk133:
Thank you. Are there any step-by-step instructions someplace that I can follow? The original post in this thread appears to be mainly pointing to the files I'll need. I'm a little afraid of making a mistake and bricking my system. :eek:
[Shield Android TV General] yahoo2016:
The last part of the first post has some detailed information, you need to change L4T version to the latest version:
[Shield Android TV General] c0rnt0z:
unlock boot loader

Hi, I'm a first time 'poster' but I've found this forum to be incredibly helpful. In the steps provided above does anybody know if there is an easier/faster method to unlock boot loader other than ADB and fastboot; Not that this method is terribly complicated but I may need to root a couple dozen Shield TVs and a less 'hands-on' approach would be a real time saver.

Thank You in advance.
[Shield Android TV General] yahoo2016:
I'm not aware there is easier way to unlock boot loader of multiple 16 GB Shiled TVs, you would need to turn on "Developer" mode from Android to enable fastboot and do "oem unlock".

You could use HDMI keyboard switchs to unlock multiple SATVs in parallel.

For Shield TV Pros, I believe you could unlocked on of them and clone the others.

Shield TV Pros do have advantages for developers, e.g., they are unlikely bricked because you could clone and keep the original SSHD.
[Shield Android TV General] ithuestad:
boot.img

I had a question about "boot.img". I have successfully unlocked bootloader and untar-ed rootfs onto a microsd card, however I am unsure how to locate the boot image. Is this already on the sd-card or is it something I need to make? How would I go about referencing the path in fastboot to boot.img?

thank you
[Shield Android TV General] yahoo2016:
There is a link for boot images for different rootfs locations and SATV models in the first post

Since your rootfs is on sd card, you should use "mmcblk1p1.img".

You can bootusing "mmcblk1p1.img" on host PC for testing or flash it to internal EMMC of SATV, i.e.,

For testing:

sudo fastboot bootmmcblk1p1.img

To flash "mmcblk1p1.img" to EMMC "recovery" partition:

sudo fastboot flash recovery mmcblk1p1.img

To flash "mmcblk1p1.img" to EMMC "boot" partition:

sudo fastboot flash boot mmcblk1p1.img

You will need to replace SATV dtb file with dtb file from L4T 24.2 /boot.
[Shield Android TV General] ithuestad:
Thank you for all your help thus far. I've flashed the appropriate dtb file but when booting from the boot image for the sdcard the SATV starts to load ubuntu and then it looks like it encounters some errors and reboots back into android.
[Shield Android TV General] yahoo2016:
Can you try the following?

https://xdaforums.com/showpost.php?p=69202451&postcount=421
[Shield Android TV General] ithuestad:
This worked, thank you very much.
[Shield Android TV General] ithuestad:
I've been playing around with the Shield for a while now, and would love to flash the boot image to native storage along with the contents of the SDcard. It looks like 'fastboot flash boot \path\boot.img' should work as long as I choose the proper image to boot from the emmc. However I'm having difficulty finding out how to move rootfs to the emmc. I'm wondering if there is a straight forward way such as 'fastboot flash rootfs' ? Any help would be greatly appreciated.
[Shield Android TV General] yahoo2016:
It has been a while, as I recall, you boot to Ubuntu on SATV SD card first, then extract L4T24.2.1 rootfs to a folder on SD card and apply binaries as you did on ubuntu host PC.

You can then change to rootfs folder and use:

sudo cp -a * /dev/mmcblk0p29 && sync

to install rootfs on User Data partition. You'll not be able to use Android after User Data partition is overwritten.

Then you will need to flash "mmcblk0p29.img" from the link on the first post to boot partition.

You should notice ubuntu boots much faster from emmc than from SD card.
[Shield Android TV General] crnkoj:
Hey mate,

i was considering to buidl the kernel myself, because i need a few options in the kernel for "iotop" to work, namely "CONFIG_TASKSTATS, CONFIG_TASK_DELAY_ACCT, CONFIG_TASK_IO_ACCOUNTING", but wasnt sure from the first post which source code and defconfig to use, since there it says for cm12, but now the kernel is substantially newer. Do you have a current branch that you use, or could you eventually do a prebuilt kernel with these options enabled? THe thing is, im using an usb 3.0 key (rather fast read/write 350/250mb/s) and for some reason the thing keeps blinking constantly- even in absolute idle, like it would be constantly accessed, but i cant find the reason for it (latest L4T - 24.2 and your prebuilt kernel). Did anyone else perhaps find out why it constantly keeps accessing the root storage?
[Shield Android TV General] yahoo2016:
I deleted outdated steps in the first post and added information of building kernel from the latest L4T. A link to example configuration is added.
[Shield Android TV General] crnkoj:
thanks mate

btw, they released a minor update to l4t - 24.2.1, nothing really impressive:

https://developer.nvidia.com/embedded/linux-tegra

edit:

which toolchain did you actually use to compile the kernel, the one that nvidia suggested or the default one in ubuntu?

edit1: sorry to be stupid again, but how do i get the compiled kernel into the img that we can flash (needs ramdisk and everything)?

thanks

edit2:

k got it to work with help of abootimg to replace your kernel with mine in teh image.

but how could i do a full image from scratch, where did you get the ramdisk and the cmd line?
[Shield Android TV General] shiquanwang:
Is this process applicable for Shield TV 2017

A quick question: Is this process applicable for Shield TV 2017 (pro or not) to build and run L4T with CUDA capabilities?
[Shield Android TV General] deerish:
Yes.
[Shield Android TV General] yahoo2016:
I don't have SATV 2017, I just noticed the microSD and micro USB are missing.

I'm wondering if dtb from L4T 24.2.1 still works for SATV 2017.
[Shield Android TV General] deerish:
I didn't flash the dtb. "data" is on mmcblk0p33, if you want to provide an image for that.

edit: Yes, the dtb provided with L4T still works.
[Shield Android TV General] deerish:
Just to note, some other "fastboot oem" commands are; audio-uart, audio-no-uart, ecid, off-mode-charge.
[Shield Android TV General] rascustoms:
Has anyone else came across the issue where after running 'fastboot flash recovery mmcblk1p1.img', upon entering fastboot and selecting 'Boot recovery kernel' the nvidia logo will appear for a short period follow by a sick andriod with a warning logo in it's chest with 'No command' appearing above it? If 'fastboot boot mmcblk1p1.img' is ran, this boots no problems.

Also [MENTION=7191545]deerish[/MENTION], are you running l4t off a usb or the internal mmc in your sheild 2017?

Thanks
[Shield Android TV General] deerish:
I have run it off of both. My init looks first for a USB drive, but will mount "mmcblk0p33" if a USB drive is not found.
[Shield Android TV General] shiquanwang:
[MENTION=7191545]deerish[/MENTION] Great to know this! Thanks.

[MENTION=7098998]yahoo2016[/MENTION] It's great if you would spend some time preparing an image for Shield TV 2017.
[Shield Android TV General] dronus2:
Module version mismatch?

Hi,

many thanks for the kernel images!

However, using Tegra210_Linux_R24.2.1_aarch64.tbz2 and 24.2.1 sample rootfs, the kernel version magic doesn't match the kernel modules it seems. The rootfs modules version magic has a "-tegra" suffix that the kernel does'nt it seems.

It is booting anyway from USB, but won't boot properly from mmclk0p29 if written there, getting stuck in framebuffer terminal after failing to run the graphical desktop.

On both accasions, there are no modules loaded from the beginning, but for the USB variant, graphics and eth0 is up.

So for what are the modules needed? How to get them right?
[Shield Android TV General] Slayerkodi:
ok so im trying to install this to boot from my 16 micro sd card, but my card reader is not working but i can access my card over network using the shield network storage option. so following the tut im up to:

3. Copy L4T rootfs to SD card or USB drive

Prepare your SD card or USB drive such that it has at least one primary partition, using fdisk or gparted.

Assuming the first partition of the SD card or USB drive shows as "/dev/sdb1" on your ubuntu laptop and your are still in <L4T_install_folder>/Linux_for_Tegra folder:

Code:

sudo mkfs.ext4 /dev/sdb1

sudo mount /dev/sdb1 /mnt

sudo cp -a rootfs/* /mnt && sync

im wondering if there is a way to change the path from dev/memblock0 (or whatever it is) to the network path for the memcard instead, is this possible?? sorry if i didnt explain my point very well
[Shield Android TV General] abdul.malek:
2017 Pro not working microSD or ext USB

[MENTION=7191545]deerish[/MENTION] I picked up one of the 2017 pro units, Yahoo2016's images don't work on either the microSD or the external USB (with the same SD). Confirmed the rootfs is correct by loading it on a microSD in my 2015 16gb unit. Compiled my own images, same problem.

Effectively, no matter what I do on the 2017 Pro, it's looking for the rootfs and doesn't find it (I can replicate the behaviour by using the mmcblk1p1 image on my 2015 16GB and not plugging in the microSD). It loads up like it's loading linux fine, then 9 seconds in it panics.

Anyone also deal with this? What are our options? Load the rootfs directly on the SSHD from another linux box?