yashsingh1/xdaforums huggingface dataset:
[Shield Android TV General] yuan.wang:
Thanks a lot for reply, does it means I miss up the step of 'flashing L4T 23.x rootfs' into micro SD instead of just 'copying' the img file into the micro SD? should I still use the utopic.img file provided in the google drive?

thanks!
[Shield Android TV General] yahoo2016:
Simply copying files to micro SD may not keep the right owner/permission. The steps were adapted from Nvidia Jeston TX1 sites.

I could not have the rootfs from the "utopic" thread working when I first got my SATV, that's why I followed instructions from Nvidia to use L4T rootfs.
[Shield Android TV General] crnkoj:
Why does 24.1 not work, got any ideas? It's 64 bit finally...
[Shield Android TV General] yahoo2016:
I believe it should work if DTB is replaced.
[Shield Android TV General] Steel01:
In theory you shouldn't have to do that. Use the android kernel with whatever config was working before, a 64-bit user space (most easily the l4t one or Ubuntu upstream equivilant), and the aarch64 tx1 driver package. Should be able to get accelerated X, opengl, etc, etc just like we have on the tablet. With everything else I'm working on, I don't have time to test that myself, though.
[Shield Android TV General] yahoo2016:
I tried the same kernel built from CM13 source and worked for l4t 23.1 and 23.2 rootfs, but it didn't work for the latest 64 bit l4t 24.1 rootfs.

Nvidia log stayed on screen forever.

I also tried kernel built from l4t 24.1 source with modified defconfig file, it did not work for l4t 24.1 rootfs either. I didn't try dtb from l4t 24.1.
[Shield Android TV General] senselessDev:
I have registered on xda-developers.com just for this thread and hence I am new here. So don't be to harsh on me ;)

First of all I have to thank you all for your contributions, really appreciating it! Currently I am running the prebuilt kernel from [MENTION=7098998]yahoo2016[/MENTION] and the 64bit debian rootfs from [MENTION=6864863]dieter.reuter[/MENTION]

My goal is to run a current version of docker on the SATV under a current 4.x kernel (like Dieter was/is (?) heading for also: http: / / blog.hypriot.com / post/getting-docker-running-on-a-highend-arm-gaming-console-for-fun-and-profit/). The [MENTION=7098998]yahoo2016[/MENTION] - kernel seems to have no support for kernel modules (at least lsmod is not showing any) and of course some docker needed modules are not available. That must have be the reason for building another custom kernel by [MENTION=6864863]dieter.reuter[/MENTION] as he stated on the blog. Unfortunately, I did not find his kernel. But on the other hand, it would be much nicer to have a newer kernel running.

So, in summary, my question is, what would be necessary to get a mainline kernel running?

Currently, the android kernel is only necessary because of the special mechanism of dtb passing, if I understand that correct?
[Shield Android TV General] yahoo2016:
I believe you are correct that dtb in special partition is needed for the kernel due to the boot loader. SATV uses fastboot instead of uboot and there is no serial console for debugging.

If someone can have uboot working as the 2nd (or 3rd) stage boot loader and have net console working, it'd easier to test alternate kernels.

Use rootfs other than l4t may have issues with GPU and some other devices since l4t includes some Nvidia binary drivers (l4t uses "apply_binaries" to apply those binary drivers).

I'm not sure SATVs running non-l4t linux have graphic accelerations and 4K support.
[Shield Android TV General] lm365cn:
Can I flash Root file system into Shield TV?
[Shield Android TV General] yahoo2016:
If you don't need dual boot Linux and Android you can replace Android rootfs with Linux rootfs and change the following line in "init.c":

mount("/dev/mmcblk1p1", "/dest", "ext4", 0, NULL);

to

mount("/dev/mmcblk0px", "/dest", "ext4", 0, NULL);

where "/dev/mmcblk0px", is the partition for Android rootfs.

Then you can follow the first post to make "boot.img" from kernel "image".
[Shield Android TV General] senselessDev:
Unfortunatley, I'm unable to find anything useful about fastboot -> uboot. Does anyone have a good starting point for that? Am I right saying fastboot does all the complicated stuff before so uboot has only to be started without fiddling around with dtb's etc?

Because i want to use my NSATV as a small, relatively powerful headless server, that is nothing I have to worry about.
[Shield Android TV General] yahoo2016:
I believe fastboot can only boot kernels or another boot loader (e.g., uboot) from either boot or recovery partition. if uboot is placed in either boot or recovery partition, fastboot should be able to boot to uboot. The difficulty is there is no serial console port on SATV to verify uboot is booted. To have net console working would be critical.

There are posts of building uboot from source for Jetson TX1 on "devtalk.nvidia.com", but Jetson TX1 does have serial console port, e.g.,

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

If you only use Linux, you could use the larger "user" partition (12 GB) for linux rootfs.
[Shield Android TV General] senselessDev:
I guess you have never got your compiled uboot running on the SATV hardware? Just compiled? Was net console built into it?
[Shield Android TV General] raubtier2:
Hello yahoo2016,

you are right, if you use the kernel and tegra210-foster-e-p2530-0930-e02-00.dtb from L4T24.1 64bit over SATV ROM 3.1, you can successfully start the ubuntu desktop with 4k resolution But at this point android is broken. But you can switch back to SATV ROM 3.1 without a problem. That was differnt with version 2.1.

Maybe you are interested to know this.
[Shield Android TV General] raubtier2:
One correction,

I made a mistake. SATV ROM 3.1 works with the tegra210-foster-e-p2530-0930-e02-00.dtb from L4T24.1.

So you can run android and ubuntu from sd-card parallel without a problem.
[Shield Android TV General] yahoo2016:
That's very important. Thanks.
[Shield Android TV General] yahoo2016:
I built and tried Jetson TK1 uboot and it worked. Jetson TK1 has serial console DB9 connector built in.

I built but did not try uboot on Jetson TX1 because I did not have the adapter cable for serial console.

I built and tried uboot on SATV but got neither HDMI nor net console output. I have too many other higher priorities to work on uboot.
[Shield Android TV General] yahoo2016:
I confirmed that both SATV 3.x and 64 bit L4T 24.1 work after replacing dtb from L4T 24.1.

The boot images for rootfs on external SD and USB can be downloaded from:

https://drive.google.com/file/d/0Bz5kaPQJx_AgUWxGTWp1NVlzRnM/view?usp=sharing

L4T dtb and script to flash the dtb are also included.

To make wifi working "fw_bcmdhd.bin" and "nvram.txt" in "/lib/firmware/brcm" need to be replaced with the files from above link.

Please follow "Getting Started" instructions from Nvidia L4T24.1 to download/decompress driver package and sample rootfs, run "sudo apply_binaries.sh" and copy rootfs to microSD card or USB drive. Please use "boot.img" for SD card and "bootusb.img" for USB drive.

For this build, bluetooth should be working.
[Shield Android TV General] yuan.wang:
Query about getting wifi working in SATV

Hey mate:

Thanks heaps for the instruction, we are able to get L4T 23.2 running on the SATV, however we still cannot getting wifi working on the machine, one possible approach is to rebuild linux kernel using new config file, to fix the wifi firmware adress. following the nvidia official guide we are need to find defconfig file called 'tegra21_defconfig' , just want to query if you have any idea about where we could find this file?

Jim
[Shield Android TV General] yahoo2016:
"tegra21_defconfig" should be in

kernel\arch\arm64\configs

of kernel source.
[Shield Android TV General] derern:
Could one switch to the nouveau driver for GM20b in L4T? As is used on the Pixel C?
[Shield Android TV General] deerish:
I broke my Shield TV a while back -- I was hacking in an IMU and damaged some traces -- the unit wouldn't power on. I contacted NVIDIA about the possibility of repairing the unit, at my cost, but they never really got back to me.

Today, I decided to take a look at it... So, I found the pad to power the unit up... but more interestingly, I found the UART.
[Shield Android TV General] yahoo2016:
The cost to have SATV repaired by Nvidia would be higher than buying a new SATV.

Where are the UART pads? I'd try uboot if UART is available.
[Shield Android TV General] senselessDev:
Also very interested in the uart pins!
[Shield Android TV General] deerish:
Look around here...

Any bricks for sale?
[Shield Android TV General] yahoo2016:
Thanks for posting the important discovery of UART. I had tried to use a oscilloscope to probe all exposed pads while power up SATV without success.

Nvidia did not make life easy for accessing the UART, the cable covering the pads would need to be removed to access the UART pins. Those pads couldn't be soldered, otherwise the cable wouldn't be able to be securely reattached.
[Shield Android TV General] deerish:
Wouldn't be too difficult to do a flex PCB interposer -- could include level shifting. Actually, I don't think the cable's head even occludes the TX/RX pads.

Pull this pad low to power the unit up.
[Shield Android TV General] yahoo2016:
I have designed many PCBs but have never used flex PCB interposer. Are they very expensive to fabricate? Ideally, the original SATV flex cable is replaced with a cable with a branch for UART and other interfaces (e.g., I2C, SPI, CSI-2).
[Shield Android TV General] deerish:
Check my edit.

I've never done one at this pitch, could be impractical.

What you describe would be ideal, yes. The mainboard of the Shield TV is interesting as, unlike the TX1 module, it has SD Card, USB 2.0, and HDMI ports directly on board. Much less bulky than the module on carrier paradigm.
[Shield Android TV General] senselessDev:
Unfortunaley i do not have the correct torx bit here to lift the connector. So i am not able to measure if these uart bins are available on the IO board as well, but I guess they are. If so it would be pretty easy to attach some enameled copper wire to the connector.

Do you know which pins on the IO connector are the UART ones?
[Shield Android TV General] demotomohiro:
Thank you very much for your efforts to run Linux on SATV and sharing how to do it.

I could install 64bit L4T 24.1 in my SATV(Software Upgrade 3.2) and it can boot both L4T and Android.

I recompiled my CUDA program and it is running on my SATV without any problems.

I found that dmesg is filled with error like "mmc1: Data CRC error ...".

They are fixed by replacing "fw_bcmdhd.bin" and "nvram.txt".

It seems I need to make wifi working or completely disable it to keep dmesg clean.

I used prebuilt boot.img from yahoo2016 in post #249 and Jetson TX1 64-bit Drivaer Package/Samples Root Filesystem from Nvidia.

But I found I need to enable some kernel config for my project and I built my kernel.

I downloaded Kernel source of L4T from here.

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

This page also has link "Documentation" which includes how to build Nvidia kernel for Jetson and how to build Toolchain to build that kernel.

I basically followed this document to build toolchain and my kernel but there were some confusions.

"Buiding the Toolchain" in the document refer to file "jetson-tx1-toolchain-build.tbz2".

It is included in the document file and you can find here:

"Tegra_Linux_Driver_Package_Documents_R24.1/nvl4t_docs/Tegra Linux Driver Package Development Guide/baggage/jetson-tx1-toolchain-build.tbz2"

I built Jetson TX1 Toolchain in "jetson-tx1-toolchain-build.tbz2", but I failed to build the Toolchain Suite.

I got errors when I tried to build ct-ng.

Anyway I found that I don't need the Toolchain Suite to build kernel.

I built my kernel and replaced the kernel in prebuilt boot.img from yahoo2016 with my kernel("Image" file, not "zImage") using abootimg -u command.

It works fine.
[Shield Android TV General] yahoo2016:
You summarized very well, it becomes much easier to port L4T to SATV since release of L4T R24.1 and SATV 3.x. The dtb for L4T R24.1 is compatible with SATV 3.x. Even Bluetooth works for the first time. I spent a lot of time to change "def_config" to make previous versions work, with new releases, I used "tegra21_defconfig" in L4T R24.1 to be able to boot to L4T.

Only the wifi firmware is different and needs to be replaced.
[Shield Android TV General] yahoo2016:
As Deerish pointed out "I don't think the cable's head even includes the TX/RX pads." It's very informational to know where the UART pins of SATV are , it makes USB/NET consoles more attractive. Many ARM boards have USB console implemented.
[Shield Android TV General] emanuelstanciu:
Hi [MENTION=7098998]yahoo2016[/MENTION],

I tried to use your latest update to install R24.1 on my SATV.

I previously had R23.1 which I installed following the instructions found on a blog by tatsch: Linux4Tegra with CUDA support on Nvidia Shield TV (cannot include URL, you can google it).

However, that was based on your instructions that you had developed over time here on XDA.

This was the 32b Ubuntu 14.04 which I initially updated to 14.04.03, but wanted to have the latest, so i updated it to 16.04.01 yesterday. There were some issues, but I was able to complete the upgrade, so I now have the latest LTS Ubuntu. There is one small issue with this. Since I completed the build following those instructions, I had issues with the SD card; the inodes have been misplaced and I had constant I/O errors. This locked the FS and re-mounted as read-only. I read tons of articles and did fdsk scans/repairs, etc but although it would fix the issues, after 10-15 minutes the system would crash again. The only way to fix this is with a reboot, which is not ideal if you try to do anything with the system.

So, I thought it's time to do the upgrade with R24.1. Used your instructions and downloaded the Driver + Sample FS and created the rootfs.tar and flashed it on the SD.

The issue is that the system is stuck at the nVIDIA logo and nothing happens. A difference between the two setups (my old one working and the new one) is that when I mount the SD on a separate Ubuntu machine, on the new R24.1 card all folders apart from tmp are showing a lock, so permissions might not be correct?

I have updated the boot.img with the latest in your update. The old R23.1 is working the new one doesn't. Please let me know what should be the next course of action and happy to provide more details if required.

Thanks a lot!
[Shield Android TV General] yahoo2016:
You did not mention you replaced dtb, you need to replace dtb of SATV 3.x with the dtb from L4T 24.1 as shown in the following post and posts before and after it:

http://xdaforums.com/showpost.php?p=67433510&postcount=249

dtb from L4T 24.1 should work for both L4T 24.1 and SATV 3.x.
[Shield Android TV General] emanuelstanciu:
Thanks again for your input [MENTION=7098998]yahoo2016[/MENTION],

You were right, part of the process, I didn't flash the new dtb file.

I did that now, but unfortunately, there's still no joy. The nVIDIA logo comes up and stays up for about 1 minute and then the console restarts.

I followed the exact steps you said and as I mentioned previously, the unit was working fine with R23.1.

Is there anything else I need to update to get this working with the new version? Anything you would want me to post for debug?

Thanks again for all your help.

Note: I also got the R23.1 to stop crashing, I think it was a power management issue in the OS, I simply disabled all the features to turn off screen, stand-by, etc and the system was stable for about a day (until I started to try to get R24.1 working)

---------- Post added at 11:02 PM ---------- Previous post was at 10:44 PM ----------

Short update on this: The old SD card with R23.1 is not working now either after the dtb flash.
[Shield Android TV General] yahoo2016:
Did you run "sudo apply_binaries.sh" after copied rootfs? Did you use my "boot.img" for L4T 24.1? Have you tried my copy of "rootfs" included in the above link? Which version of SATV ROM do you have? You should have ROM 3.x.

Have you tried different HDMI monitor?
[Shield Android TV General] yahoo2016:
After re-flashing SATV ROM, L4T 24.1 dtb need to be flashed again, otherwise HDMI monitor would be black for Ubuntu.

It's very useful to use ssh to troubleshoot, I should do it myself.

I'll try my "rootfs" in the archive on another SD card. The "boot.img" in the archive had been verified by other members.

You can use Nvidia L4T 24.1 rootfs and make sure to apply binaries to have graphic drivers installed.

Since you can ssh in, dmesg may provide some hints.
[Shield Android TV General] emanuelstanciu:
I re-flashed the dtb file and I am using your latest boot.img file. The file indeed boots the system and I can access it, but the HDMI is not working. I've seen in your initial post #1 that if HDMI is not working, then a particular defconfig should be replaced.

It would take ages for me to figure this out, so if possible (and you know that might be the issue) can you please compile another boot.img with that fix to make it work?

Also, if you can test your rootfs, that would be great. I compiled my own and applied the binaries and now I get a working SD card similar to yours, but still the display doesn't work.

I am stuck ATM, any advice is greatly appreciated. Thanks a lot.

---------- Post added at 06:34 PM ---------- Previous post was at 06:23 PM ----------

Just a quick one on this:

1) yes, used your boot.img and rootfs from the link provided. Same thing, also built mine successfully and still no go.

2) I have ROM 3.2

3) I have used 3 different cables on 3 separate HDMI monitors and all present the same bahaviour.
[Shield Android TV General] yahoo2016:
I made many changes on def_config when using L4T 23.x and CM kernel source.

For L4T 24.1, I used tegra21_def_config and have not made any change of it. It worked for a Seiki 4K TV/monitor and a Dell 1080P monitor.

Some changes on "tegra21_def_config" may make it more robust, but it's trial/error approach.

I'm at work and will be home late today. I'll do some experiments tomorrow.

If you can check dmesg outputs from ssh, that will help. I'll save my dmesg output and compare with yours.

Are there 3 monitors 1080P? I had issues with HDMI monitors less than 1080P before.
[Shield Android TV General] emanuelstanciu:
Yes, all are Full HD displays. These were working fine with R23.1 kernel you built.

Please find attached my dmesg output after boot.

Please keep me posted once you have time to look into this a bit more.
[Shield Android TV General] yahoo2016:
There are too many errors in your dmesg output, can you replace the files in /lib/firmware/brcm with the attached files to get rid most of the errors? You will need to replace the files to have wifi working.

Can you do "dmesg -t >output.txt" for easier "diff"?
[Shield Android TV General] yahoo2016:
I tried my "boot.img" in above link with different rootfs's, it appears using

sudo cp -a * <mntpoint> && sync

to copy uncompressed L4T 24.1 rootfs according to Nvidia L4T24.1 "Getting Started" worked.

Using "sudo tar -xpf" and compressed "rootfs.tar" seems unreliable.

I removed compressed rootfs, added boot image for USB drive and wifi files to the link:

http://xdaforums.com/showpost.php?p=67433510&postcount=249
[Shield Android TV General] emanuelstanciu:
Thanks again for all your help, unfortunately still no joy :(

There's one last thing I would try before giving up and going back to R23.1. Is there any chance you can make an .img file from your USB or SD card?

That way I can simply flash that exact copy which is working for you and see if it's an image issue or a SATV issue.

You can use dd to take an image under Linux or a tool like Disk Imager in Win. Afterwards please 7z it to make is small and add it to your drive.

I know I ask a lot, I really appreciate your help with this over the past week or so.
[Shield Android TV General] yahoo2016:
Feedback from other users are important, e.g., I found compressed rootfs's are not always working. It's also a learning experience for me.

I'd try the following:

sudo dd if=/dev/mmcblk0p1 of=l4t24rootfs bs=4194304 count=600 oflag=sync

This created 2.5GB file, but when I did

sudo dd if=l4t24rootfs of=/dev/mmcblk0p1 bs=4194304 oflag=sync

it did not boot, there was no ssh.

I tried 3 SDs (32 GB Patriot U1 and 32 GB Kingston Class 4) using

sudo cp -a * <mntpoint> && sync

followed instructions from Nvidia L4T24.1 "Getting Started", they all worked.

"dd" is much faster than "cp", but unfortunately it did not work as I tried.
[Shield Android TV General] emanuelstanciu:
Thanks for trying things out.. I had a different idea on how to make this:

Flash using your cp method one of the SD cards. Then please test it and make sure it works.

If it works, stick the card into your machine and run something like: dd if=[path to sd card, e.g. /dev/sda1] of=~/disk1.img

This should generate an image file the size of your SDcard.. if it's 32GB that would be best because my sdcard is 32GB as well (SanDisk).

Then archive using anything you want the img file and that should give you roughly 2.x GB archive.

You can send me that and I can flash the image straight onto my SD card. In that way we can make absolutely sure that the card and OS part is not causing this hastle.

Please let me know how this goes and thanks again for your help.

---------- Post added at 11:08 PM ---------- Previous post was at 10:57 PM ----------

The best archive algorithm is 7z as far as my research goes:

1) sudo apt-get install p7zip p7zip-full (to install 7zip)

2) 7z a archive.7z disk.img (to archive the new img file)

3) 7z t archive.7z (to test the integrity of the archive)
[Shield Android TV General] yahoo2016:
I found I should use "/dev/mmcblk0" (whole SD) instead of "/dev/mmcblk0p1" (one partition). I'll try again.
[Shield Android TV General] emanuelstanciu:
Yes, you are perfectly right. Whole SD card should be imaged.
[Shield Android TV General] yahoo2016:
I'm confused.

When I used (partition 1):

sudo dd if=/dev/mmcblk0p1 of=l4t24rootfs bs=4194304 count=600 oflag=sync

or whole SD:

sudo dd if=/dev/mmcblk0 of=l4t24rootfs bs=4194304 count=600 oflag=sync

to create the file and use partition 1:

sudo dd if=l4t24rootfs of=/dev/mmcblk0p1 bs=4194304 oflag=sync

or whole SD:

sudo dd if=l4t24rootfs of=/dev/mmcblk0 bs=4194304 oflag=sync

to copy the file, partition 1 disappeared from destination, I got only "/dev/mmcblk0".

The kernel is looking for partition 1, that's why it won't boot.

Does dd keep partitions?
[Shield Android TV General] emanuelstanciu:
I have used dd in the past to backup my running raspberry pi with something like:

sudo dd bs=4M if=/dev/sdb of=~/disk.img

No other options like the ones you put.

But you should definitely do the whole sd card rather than the partition.

If you have a Windows machine, you can use Win32 Disk Imager. That's extremely straightforward.

Thanks again for your effort
[Shield Android TV General] yahoo2016:
I'm trying "dd" to copy whole 16 GB SDs to see if it keeps the partitions. It worked, I'll compress it use 7z. It's here:

https://drive.google.com/file/d/0Bz5kaPQJx_AgZHEtbUZ3Qlh5dGc/view?usp=sharing

This is rootfs from L4T24.1 with binaries applied, wifi firmware replaced, nothing else has changed.

I tested it on SATV before compression by copying it to a Micro Center 16GB class 4 micro SD card using

sudo dd if=l4t24rootfs of=/dev/mmcblk0 bs=4194304 oflag=sync
[Shield Android TV General] yahoo2016:
This is a old post but may be related to your case:

https://devtalk.nvidia.com/default/topic/899021/jetson-tx1/console-mode-framebuffer-settings-/

You can try other HDMI monitors and we can play with kernel configurations and command line options.