yashsingh1/xdaforums huggingface dataset:
[Shield Android TV General] jagger11:
IIRC I installed TWRP, used adb, dumped /proc/config, downloaded kernel sources from that time from nv-repo...., and compiled it. I think that over time nvidia was changing the kernel sources, and the problems started to mount (unresolved symbols, problems with CROSS32 etc.) over time. I can see that now when compiling newer sources.

I created init.c mostly blindly, i.e. using __NR_reboot syscall to indicate that some other syscall succeeded or not - in the absence of any other feedback that was my best chance :). Then I had to modify it a bit to make it usable (DEVTMPFS, android paranoid security). Once I got shell it was easy.
[Shield Android TV General] yahoo2016:
Thanks. That's important hint to dump "/proc/config". I found I had to used some files from Shield TV, e.g., the WIFI firmware files.

The latest posts by deerish and Thanks-Meter from the other thread indicate when kernel source was from Linux (L4T), dtb partition has to be replaced with dtb from L4T. Is this a Linux/Android issue or version issue?

Is it true that, you don't need to replace stock dtb when using kernel from old Linux kernel source?
[Shield Android TV General] jagger11:
I just checked and it's somewhat random. Some kernels will work with any dtb (e.g. from the current nv repo, or the prebuilt one from L4T), some with original dbt only (early Android kernel, similar to TWRP's).

PS. I just YOLO and uploaded incorrect DTB from L4T, and my shield tv is bricked. Was fun though :).
[Shield Android TV General] yahoo2016:
It's good to know the randomness of kernel/dtb combinations.

What ROM version do you have? ROM 2.1 bootloader is time bomb can be triggered by many events.

Do you still have Nvidia logo? If yes, it may be recoverable by tapping power buttons as posted by Thanks-Meter in the link below:

http://xdaforums.com/showpost.php?p=64723006&postcount=85
[Shield Android TV General] Thanks_Meter:
Don't get me wrong: I don't have experience with wrong dtbs. I just made the experience that if holding the power button does not work then tapping can be a solution.

I can verify that tegra210-foster-e-p2530-0930-e02-00.dtb which is 231260 bytes and which has sha256 7738251d3d5ce0e46377bc5709baea706e1c5bf99ee648df5ebc181197baccfe will work with standard Linux kernels (but not with Android kernels) and will not brick your shield tv - don't use anything else!
[Shield Android TV General] crnkoj:
we really need to get u-boot on it working, than we can use it as a second/third stage bootloader and we can load whichever dtp, kernel we want and have rootfs on usb without issues....
[Shield Android TV General] yahoo2016:
I agree. I have thought of putting u-boot in Boot partition and put kernel/rootfs/dtb on SD or USB drive.

I have built u-boot's for Jetson TK1 and TX1 and tested on TK1. The problem is none has figured out how to add serial console port for SATV (Shield Android TV) and it's difficult to test u-boot without console logs.

I have read netconsole and OTG console for some ARM processors, but u-boot's for Jetson TK1 and TX do not have netconsole or OTG console implemented.
[Shield Android TV General] dieter.reuter:
u-boot would be really great. Maybe anybody can find out, if there are the UART pins available on the mainboard. I've just opened my Shield months ago, but wasn't able to see any UART pins. But I guess, it could be there - one have to dismount the mainboard, maybe the UART pins are hidden below...:fingers-crossed:
[Shield Android TV General] Thanks_Meter:
Maybe there is a way to use an USB to serial converter for this if there is something like CONFIG_USB_SERIAL_CONSOLE in the uboot config.
[Shield Android TV General] crnkoj:
I do honestly not believe that UART is there or if its there, that its functioning.

How did oy umanage to build the u-boot? do you have any tutorial? did you just download teh srouces for uboot from l4t and than compile it? probably we need to use other dtb from the kernel for the shield in there and possibly some other changes (like EMMC/UMS). might have to try blindly to boot it...
[Shield Android TV General] yahoo2016:
I used "source_sync.sh" in L4T for TK1 and TX1 to download u-boot source code and built u-boot images, see posts there:

https://devtalk.nvidia.com/default/topic/905345/built-tx1-u-boot-from-source/

I suspect u-boot has dtb built-in for itself. The dtb in dtb partition is for kernel.
[Shield Android TV General] Thanks_Meter:
As far as I know u-boot does not use dtbs for its own. For this reason you must do things like setting up the pinmux or configurating the drivers manually in c-code (like linux kernel prior to 3.8).
[Shield Android TV General] yahoo2016:
My point was bootloaders (u-boot or fastboot) do not need the dtb in dtb partition (which is for kernel only) to function, replacing dtb in dtb partition should not cause bootloaders or recovery mode to fail.

Some members bricked their SATV by replacing dtbs, I don't believe it's dtb issue, but issue of post V1.3 bootloader. When wrong dtb was put in dtb partition, kernel failed to load, but recovery mode should still work.

That's why I recommend to revert to ROM 1.3 which has more reliable recovery mode.
[Shield Android TV General] kgersen:
some guys managed to get a full Linux 4 Tegra 64 bit to run on the Shield: http://blog.hypriot.com/post/gettin...ighend-arm-gaming-console-for-fun-and-profit/

no X11 yet and so far they haven't published their changes but they will.

It's a promising start, something to watch and if you can help them , they're asking for it:
[Shield Android TV General] tbm13:
This blog is written by dieter.reuter who has participated in this thread.
[Shield Android TV General] praveenonwww:
Have any body tried Flashing Ubuntu with the step provided in the first of this thread for NVIDIA SHIELD ANDROID TV Pro Developer Only OS Image 3.0.0 from https://developer.nvidia.com/gameworksdownload#?search=SHIELD%20ANDROID%20TV%20Pro%20Developer&tx=$additional,shield.
[Shield Android TV General] gffmac:
Can the sdcard image be written to a usb external drive instead and boot from that?
[Shield Android TV General] yahoo2016:
you''ll need to change "init.c" to boot from /dev/sda1 (first partition of USB drive) instead of /dev/mmcblk1p1, see here:

http://xdaforums.com/showpost.php?p=65401522&postcount=187

If you updated to SATV SW 3.0, you won't be able to boot to ubuntu using the kernel from this thread.
[Shield Android TV General] gffmac:
Thanks, I will wait for a 3.0 based kernel to attempt this.
[Shield Android TV General] mateusdsrs:
I have trouble to boot Ubuntu, after insert de SD card with linux image and boot nvidia_linux.img the shield restart and show nvidia start screen after this displays a black screen, after some moments with black screen restart it from zero .

tricks tempted

*change SD card

* flash de nvidia_boot on recovery shield partition

*download images the kernel e OS again

Thanks
[Shield Android TV General] mateusdsrs:
I think founded the problem, it´s the version of system of nvidia shield tv is 3.1, i can´t boot nome linux with any kernel image.

i go to back the system for 2.1 to can boot ubuntu.
[Shield Android TV General] BlInK311:
I am having the same issues where I cant boot into Ubuntu. My nvidia shield tv does have SW version 3.1 and I tested 3.0 that nvidia has an image for on their dev site. That didn't work either. Is there a prebuild image of 2.1 available? Or did you build it from sources?
[Shield Android TV General] KzRSylveR:
I have the same issue, black screen after booting on nvidia_boot.img with nvidia-shield-tv-utopic.arm64.img.2G image on the SDCard... I'm seeking the 2.1 image to downgrade and try to boot on linux, but I don't find this image...
[Shield Android TV General] mateusdsrs:
BlInK311 and KzRSylveR I solved the problem of black screen after changing some system components will list exactly what I'm using . I believe that the upgrade 3.0 / 3.1 has a version of the previous boot obsolete.

*Write the SD Card with de Image the Ubuntu System ( I have used Ubuntu Xenial Image )

*Insert the sdcard In Shield TV

*Enable Dev options on Android tv

*install the adb/fastboot

*Reboot to bootloader with commands | adb devices and adb reboot bootloader

* Unlock the boot loader with fastboot oem unlock

*Download this kernel image from this link https://drive.google.com/file/d/0Bz5kaPQJx_AgcUJ2TlBTUW9ZR0k/view

* Boot the kernel with with this command fastboot boot boot.img
[Shield Android TV General] KzRSylveR:
Thanks for your reply, could you tell me where you dl this Ubuntu Xenial Image ?

Edit : I have trying with your boot.img, the screen stop to the nvidia logo, so no black screen, but after a long time Android booting instead of my SDCard with linux on it
[Shield Android TV General] mateusdsrs:
Sometimes the Ubuntu boot does not work on the first try , try at least twice , I lost a lot of time to figure it out.

Link of Ubuntu Xenial https://drive.google.com/open?id=0B...ZSS1VxUVBJZmFqSXNFYUhpN2lHcklhVzZtX0Z5OENxdU0

Note: do not know why but Ubuntu Utopic in my case does not recognize the wired network card and a wireless network card.

The Xenial despite not having video driver, but works well stable
[Shield Android TV General] heebe:
My problem is that Utopic, Xenial and Hypriot images boot great but they run stable only for 2-5 minutes. Then suddenly the whole device reboots and falls back into Android. I have experimented with these three images using two sd cards. All combinations show this rebooting behaviour. I have found no trails or hints in log files.

Has anyone else seen similar issues? Original android seems to work stableI have no trails or hints in log files.
[Shield Android TV General] frankjt:
A note to the enforced rebooting of 3.0 / 3.1 systems, a possible cause is,

in addition to the kernel config, the device tree configuration of the tegra watchdog timer. Since version 3.0 the timer´s heartbeat is set to 120 seconds.

Within this time interval the system software, e.g. systemd, has to send at least

one ping to the watchdog device, otherwise the system reboots after a hardware

reset. In order to avoid that with systemd, in /etc/systemd/system.conf the option RuntimeWatchdogSec must be set to a non-zero value, e.g. 40s :

RuntimeWatchdogSec=40

(See man page of systemd-system.conf)

systemd will now send a ping to the hardware every 20 seconds.
[Shield Android TV General] heebe:
Perfect, you saved my day! Now it runs stable and smooth. I had to tweak also /etc/resolv.conf from Xenial image to make networking work.

However, all kernels seem to be running single core only. /proc/cpuinfo reports only one processor. Is there any tweak to utilize all 8 cores of A57 & A53?
[Shield Android TV General] tailslol:
wow,interesting . I was not expecting Ubuntu on shield TV.

for the 500gb it is OK but for the 16gb I was more expecting chromium OS.

for the video acceleration I guess you will find something in some pixel c sources I hope.
[Shield Android TV General] sashavingardt:
Hi folks,

my apologies if this is not the right thread. Just received my brand new Shield. It automatically upgraded to 3.2. I have unlocked it. But whenever I try to do anything else fastboot related I get the "waiting for any device" message. adb devices works perfectly fine. I'm on a mac (tried it on linux too to no avail). Should I downgrade anything for it to work? What am I missing?

Thank you so much in advance!
[Shield Android TV General] dietgert:
current state ?

Whats the current state of this ubuntu "port" ?

I was not able to boot the images with the current 3.2 nvidia software installed.

After downgrading with the recovery image to 2.1 this was possible.

However, I was not able to set the resolution to 4k - I doubt, this is possible with the provided boot-image.

Question: Did somebody succeed in setting the resolution to 4K ?

BR

didi
[Shield Android TV General] derern:
AFAIK it works with the L4T images from [MENTION=7098998]yahoo2016[/MENTION]
[Shield Android TV General] Stevio2:
Should we partition Google for official Linux support? With x86 binary transliteration to run code, and that system that allows Ubuntu and redhat applications (professional software use) on the system. They probably burnt half their sales by not having it when released, as it was so ahead.
[Shield Android TV General] j-m-s:
If you see the device with "adb devices", then you do "adb reboot-bootloader".

After that, you can check with "sudo fastboot devices".
[Shield Android TV General] Seattleweather:
I can not get fast-boot mode. Plug into PC did nothing. Any other way to reflash the firmware? Thanks.
[Shield Android TV General] fruithat:
The guys who hacked the Nintendo Switch managed to get the GPU to work under Linux. The console used the same gpu and cpu.

Are there any better methods to install Ubuntu on the box? Is there a better way than flashing the OS onto the recovery partition? Does it work for 2017?

Maybe a new kernel works by now?
[Shield Android TV General] trandu0ngduc1994:
has anyone tested yet ?
[Shield Android TV General] crnkoj:
Hey,

is it possible to boot from an usb drive? For instance, that i get the nonpro vesion and than install linux on an usb 3.0 hdd and boot from there?

thanks
[Shield Android TV General] kdb424:
USB s a little harder when making this as it's hard to know what "spot" it's in, and we don't have a bootloader like multirom yet. So for the moment, unless you want to manually change things and try your luck, no sorry.
[Shield Android TV General] urisma:
It's harder but still not impossible. I have the 500 gig version, so my usb drives always show up as /dev/sdb. I'd assume that the 16 gig version would have a usb drive appear as /dev/sda. You can edit the init file in the directory OP posted to change mmcblk1p1 to where ever your root partition is, then rebuild the kernel image, and boot from that. It works just fine.
[Shield Android TV General] crnkoj:
Thanks guys.

I have some more questions:

Does it use uboot as bootloader?

Are those drivers/kernel sources from the tx1 jetson, that nvidia released, useful for the shield TV?

Do we necessarily need an initrd for it to boot (I used to have a pandaboard and had it booting gentoo from usb without an initrd)

Thanks
[Shield Android TV General] urisma:
No idea about uboot. They're most likely useful. I've been meaning to try out installing everything, but my shield that I use for development and tinkering is bricked and I haven't replaced it yet., but I'll get around to messing with that eventually if no one beats me to it.And no, I doubt you need the init.rd. I tried booting from fastboot with all of the arguments once and it didn't work, so instead of figuring out what was up I just kept on using the init.rd
[Shield Android TV General] kdb424:
I don't think we need initrd but I can't say for sure.

The bootloader in this system is janky at best. By that I mean the lowest level where you use fastboot. The work "bootloader" is a lot of different things when it comes to Linux and android, so thought I'd specify. I haven't actually worked on a Linux system on an android box personally as they always seem to be very... Different. That being said, when the first shield TV's went out for companies to benchmark, they ran Ubuntu with full driver support. It'd be nice if they just released that to let us do what we wanted with the hardware we bought.

Source:

http://www.phoronix.com/scan.php?page=article&item=nvidia-tegra-x1&num=1
[Shield Android TV General] Helios747:
I'm looking to create a working image with nvidia's Linux drivers for the X1 that I pulled from their Jetson board software package. I'm trying to avoid using this Linux image because I would prefer a more updated environment, but I can't seem to get a kernel image booting properly. I was self-modifying a guide I found on booting Linux on the N9, as the hardware is similar. However, no access to a UART serial line on the Shield TV makes this very tricky as I can only compile the kernel, set up the filesystem on USB, and hope it works (No boot output to HDMI until you start x).

Does anybody know how to correctly setup a kernel for the Shield TV? My other idea was to just set up the filesystem like I was doing, and then try to use this kernel image the OP provided.

I want to avoid doing that though because my end goal is to provide a guide for everybody to be able to get the latest kernel, ubuntu env + GPU drivers on their shield tv.

I got nvidia's kernel, used your config, but got a black screen after bootloader on both my own and your filesystem. If I use your image, it works.
[Shield Android TV General] WonderfulVoid:
cooperation

I am strongly considering acquiring an Nvidia Shield TV (available at a discount at a local webstore) to use for 64-bit ARM development so I will have to install proper Linux and file system (e.g. Ubuntu). Rebuilding kernels is very likely. I hope for cooperation with other like-minded people like you.
[Shield Android TV General] yahoo2016:
Comparing with $599 Jetson TX1, Shield TV with free remote and free shipping for $199 is great deal for 64 bit ARM/Cuda 7.5 development. I already ordered one from newegg.com (same deal from Amazon).

I'd install Linux image according to instructions from OP and then use Shield to build kernel from source to avoid cross compiling.

Has anyone had Cuda running on Shield TV?
[Shield Android TV General] WonderfulVoid:
Is there any limitation in driver source availability? GPU driver missing one can assume...

I am hoping that 16GB will be (barely) enough for a self-hosted environment. The 500GB configuration is a bit more expensive than this limited deal for the 16GB configuration. Useful (to me this means non-mobile) 64-bit ARM platforms have been slow at appearing. Still waiting for the AMD Huskeyboard (96boards.org although it is not mentioned there) to show up. Quite possibly I have waited enough and will go for the Shield TV instead.
[Shield Android TV General] yahoo2016:
I recently converted my Tegra K1 base chromebook to fully functional Cuda development machine:

The scripts for the conversion copy drivers from Nvidia developer site. Newly released Jetson TX1 L4T should have some driver source for Shield TVs

I ordered 32 GB chromebook such that I have ChromeOs and Ubuntu both boot from 32 GB internal MMC, but I use external 32 GB MMC card for another copy of Ubuntu and Cuda. The advantage of using external MMC is I can have multiple copies of different OS configurations by switching MMC cards.

I'll open my Shield TV when it arrives and hope there will be a SATA connector for additional HD, but I'm planning use external MMCs for ubuntu and cuda, and use external USB3 ports for additional storage. I have micro MMC to USB adapter to flash MMC if needed.

32 GB MMCs can be bought for under $15. MMCs of 64 GB/128GB are becoming cheaper and cheaper.
[Shield Android TV General] raubtier2:
Hello all,

now there is a L4T-release (Linux for Tegra) for jetson tx1.

I flashed it to my nvidia shield console (see the steps in first post (changed the rootfs and Image from L4T). Everything looks good with a HD-(1920x1080)-resolution. All is running fine.

But if use my 4K-Monitor I can't see my monitor. The same problem exists, if I connect to my 1920x1200 monitor. The system don't crashes, because I can ssh from another place in my network, but the monior

is black. If somebody solved this problem with his shield console or can give me a hint, please let me know.
[Shield Android TV General] yahoo2016:
The first post provided binary image, how did you create kernel and copy rootfs from L4T? How did you partition the MMC? Do you mind to post details? Some other members had failed to boot from rebuilt kernel.

When you get black screen, can you hit ctrl-Alt-F1 to bring up terminal from 4K monitor? Is yes, the problem is graphic driver.
[Shield Android TV General] dieter.reuter:
Thanks for the info that L4T is successfully running, now I'm really happy. I just ordered a new ShieldTV today. Would you mind to write down a detailed installation tutorial, how to install a new device with L4T, please? As soon as I get my device, hopefully on Saturday, I will try it anyway and will write it down as an easy to follow tutorial. I'd like to use the ShieldTV as an ARM64 dev machine. One part will be to build even a more recent kernel, because I need a 4.1 or newer - but then we'll loose the Nvidia specific driver for Cuda etc.

If anybody is interested in helping to get this done, I will create a public GitHub repo soon.
[Shield Android TV General] yahoo2016:
My Shield TV is on the way. I downloaded Jetpack-l4t-2_0 from developer.nvidia.com to my 64 bit ubuntu laptop and am installing it now.

Hopefully Jetpack-l4t-2_0 will generate the image to be flashed to MMC and run on Shield TV..

Jetpack image did not work for my Chromebook, I had to use kernel from Chromimium and use rootfs from L4T.
[Shield Android TV General] raubtier2:
No, I think you can't do it that way. The bootloaders are different. The official tx1-developemnet board

uses u-boot, the shield fastboot. Flashing is very different. You don't have to compile your own kernel.

You need the rootfs and Image from the official release, then you can build up your system with

the method from the first post.

My advice for you. First try the images from the first post:

(1) nvidia-shield-tv-utopic.arm64.img (rootfs)

(2) boot nvidia_boot.img (kernel + ramdisk)

save (1) to sd card. (dd if=nvidia-shield-tv-utopic.arm64.img.2G of=/dev/sd??? bs=4194304 oflag=sync)

put (2) to your shield (fastboot flash recovery nvidia_boot.img)

Then boot from recovery. Now you are, if all runs well, inside linux.

Next step:

Put the L4T rootfs to your sd-card.

Get

ht tp://developer.download.nvidia.com/embedded/L4T/r23_Release_v1./Tegra210_Linux_R23.1.1_armhf.tbz2

and

ht tp://developer.download.nvidia.com/embedded/L4T/r23_Release_v1.0/Tegra_Linux_Sample-Root-Filesystem_R23.1.1_armhf.tbz2

Thats all you need:

Read this:

(3) ht tp://developer.download.nvidia.com/embedded/L4T/r23_Release_v1.0/l4t_quick_start_guide.txt

to build the rootfs.

Mount your sd-card from your first try to another linux box.

Goto the rootfs there and erase everything. Then put the new created filesystem to the mounted sd card. Be careful with ownerships. Best: first tar the rootfs and untar it to the sd card.

Put your sd card back to the shield. You can keep nvidia_boot.img on the device. You can boot with this kernel the newly build linux. You don't have sound and other things with this.

But if all goes well you have now a nice linux on your shield.

The last step is to change nvidia_boot.img. Therefore you need nvidia_initrd

from goo.gl / sl6rMu.

Inside is a Makefile to build the boot-image.

Here is the contents:

(1)	aarch64-linux-gnu-gcc-4.8 init.c -o init -static

(2)	find ./ | cpio -H newc -o >/tmp/nvidia_initrd

(3)	rm -f /tmp/nvidia_initrd.gz

(4)	gzip /tmp/nvidia_initrd

(5)	abootimg --create /tmp/nvidia_boot.img -f bootimg.cfg -k zImage -r /tmp/nvidia_initrd.gz

to (1): Here you define a few starting things. Here the system is told to boot from the sd-card.

(2) - (4) are ok.

(5) is the main task. Use the Image (not zImage) from the L4T 23.1 release (option - k (Image from L4T))

Your newly created Boot-Image has another size, so you must change a parameter in bootimg.cfg.

bootsize = 0x179f000 fits for me.

The newly created bootimage you can flash to the shield (see at the beginning)

That's all.
[Shield Android TV General] yahoo2016:
Thanks! The detailed instructions are very helpful and will save me and others many days of work.

This is different from Chromebook where I created 2 partitions on external MMC, the first 16MB partition for kernel and the second ext4 partition for rootfs. Chromebook can be easily configured to boot from external kernel/rootfs without flashing kernel to internal MMC or using fastboot through adb.

I'll follow your instructions creating SD/MMCs and try them as soon as I receive my Shield TV.

One more question, what format should I use for SD/MMC, ext4 or others?