• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Android v
« Previous 1 … 44 45 46 47 48 … 128 Next »

How to boot Ubuntu 16.04 on the Shield TV with X1 GPU drivers
View New Posts | View Today's Posts

Pages (4): 1 2 3 4 Next »
Thread Rating:
  • 3 Vote(s) - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
How to boot Ubuntu 16.04 on the Shield TV with X1 GPU drivers
05-06-2017, 07:03 PM (This post was last modified: 05-07-2017, 05:12 AM by Helios.)
#1
Helios Offline
Stellaaaaaaa
**********
Developers (Some Administrators and Super Moderators)
Posts: 4,395
Threads: 15
Joined: May 2012
So because Android can be kind of annoying sometimes for dev work, especially if you're just interested in working on the aarch64 JIT or GLES code, booting a Linux distro can be pretty useful. This guide can also be extended to outright installing Ubuntu on the Shield TV by flashing the boot partition but we won't cover that. Also note, everything about this guide is non-destructive, so unless you decide to flash anything, you can't break your Shield TV.

I'm writing this guide assuming you have a functional UNIX environment of some sort and a non-pro Nvidia Shield TV 2015. The pro variant WILL NOT WORK with this specific guide, but the boot files are given for them as well in the XDA links below.

You'll need a USB device or MicroSD at least 4 GB large. 8 GB or higher is highly recommended.

Quick and easy way to get up and running

Go download all the files here: https://drive.google.com/drive/folders/0...nBlRUJPRzA

Explanation on the boot images can be found here: https://forum.xda-developers.com/shield-...u-t3274632

I have not gotten around to figuring out how to compile those myself. 
  1. Extract rootfs.tar.xz to either the root of a microSD card or a USB device.
  2. Boot your Shield TV into fastboot mode. Use Google to figure out how to do this. I recommend using ADB because the hardware method is difficult and frustrating.
  3. Connect your MicroSD or USB device to the Shield TV

if you extracted rootfs to a MicroSD, boot the microsd.img file with

Code:
fastboot boot microsd.img

If you extracted to a USB, boot the usb.img file with

Code:
fastboot boot usb.img

and you're done. This will give you a functional Ubuntu distro with GPU drivers. Except for Wifi. Due to licensing issues the Broadcom Wifi firmware can't be included and you need to copy that yourself from Android. See the guide below.



Long way - create your own L4T ready rootfs


This is a good general guide to follow if you want to figure out how to boot your favorite distro instead of Ubuntu 16.04.
  1. Download the boot images from here (I have yet to figure out how to compile this, lazy): https://drive.google.com/file/d/0Bz5kaPQ...JFcmM/view

    See here for explanation on the boot images

    https://forum.xda-developers.com/shield-...u-t3274632

  2. Download the Linux for Tegra filesystem and drivers for the X1 here: https://developer.nvidia.com/embedded/linux-tegra-r2421

    you want the "Jetson TX1 64-bit Driver Package" and the "Sample Root Filesystem". Download both of those

  3. Extract the driver package

    Code:
    sudo tar xpf Tegra210_Linux_R24.2.1_aarch64.tbz2
    cd Linux_for_Tegra
  4. Extract the filesystem

    Code:
    sudo tar -jxpf (path to Tegra_Linux_Sample-Root-Filesystem_R24.2.1_aarch64.tbz2)
    cd ..
  5. Run the script that will install the GPU drivers (And a custom build of chromium?)

    Code:
    sudo ./apply_binaries.sh

  6. OPTIONAL: Copy the broadcom firmware files for wifi from Android located in Android at "/system/vendor/firmware/bcm4354/" to "/lib/firmware/brcm/fw_bcmdhd.bin" in your Linux rootfs directory.
  7. Copy the rootfs to your microSD or USB device

    Code:
    sudo cp -a rootfs/* $path_to_device
    sync

  8. Boot your Shield TV into fastboot mode. Use Google to figure out how to do this. I recommend using ADB because the hardware method is difficult and frustrating.
  9. Connect your MicroSD or USB device to the Shield TV


if you copied rootfs to a MicroSD, boot the microsd.img file with

Code:
fastboot boot microsd.img

If you copied to a USB, boot the usb.img file with

Code:
fastboot boot usb.img

and you're done. This will give you a functional Ubuntu distro with GPU drivers and optionally wifi.

Additional notes

Again, I haven't gotten around to figuring out how to compile those image files myself, but somebody on xda documented it (kind of). It's certainly doable, and I imagine it's entirely possible to boot whatever distro you want. I might look into that later. Also, if you want to just boot Linux without having to connect the shield to your computer every time, simply flash the image file to the boot partition. DO NOTE THOUGH, this will make it extremely difficult to get back into bootloader mode because you can no longer use ADB to reboot the device, and the capacitive power button is unimaginably irritating to consistently get into bootloader mode. If you flash the wrong image file on a Shield TV Pro, you will brick it!

Do not try to "sudo apt-get dist-upgrade". You will blow up your rootfs. Also, the useful repos are disabled so it may be worth enabling them so you can install things.
Find
Reply
05-06-2017, 08:27 PM
#2
slayerkodi Offline
Junior Member
**
Posts: 24
Threads: 5
Joined: Jan 2017
I know this might sound stupid but how do you extract to usb? It won't let me paste or extract there
Find
Reply
05-06-2017, 10:48 PM (This post was last modified: 05-06-2017, 11:35 PM by slayerkodi.)
#3
slayerkodi Offline
Junior Member
**
Posts: 24
Threads: 5
Joined: Jan 2017
Ok I figured it out, that was not as straight forward as it seems lol. what is the command we use to flash to recovery partition? can i make it so without doing anything it will boot satv and loading into recovery will boot linux?
Find
Reply
05-07-2017, 04:18 AM
#4
slayerkodi Offline
Junior Member
**
Posts: 24
Threads: 5
Joined: Jan 2017
ok i thought i figured it out but it only booted that first time, i reinstalled to try to get wifi working but it didnt work, it looks like its going to load but then it says it will reboot in 30 seconds and turns off. i have tried to follow the instructions but i dont know where im going wrong. can someone look at this and see what the problem is please. https://pastebin.com/ZTa6C0QE
Find
Reply
05-07-2017, 05:07 AM
#5
Helios Offline
Stellaaaaaaa
**********
Developers (Some Administrators and Super Moderators)
Posts: 4,395
Threads: 15
Joined: May 2012
For wifi you're going to need to copy the firmware files in/system/vendor/firmware/bcm4354/ in Shield TV Android to /lib/firmware/brcm/fw_bcmdhd.bin in Linux. I'll update the guide with that. Dunno if I can put that in the pre-made rootfs due to licensing issues.

As for your booting problem, I don't know. The Shield TV doesn't give much boot output until the kernel is fully loaded.
Find
Reply
05-07-2017, 06:19 AM (This post was last modified: 05-07-2017, 06:31 AM by slayerkodi.)
#6
slayerkodi Offline
Junior Member
**
Posts: 24
Threads: 5
Joined: Jan 2017
I am rooted and looked in that folder but bcm4354 is not there. Do I need to be on a certain firmware? I'm not sure I do as it booted once earlier. I am rooted in latest stock firmware. This is whats happening to me following the standard instructions https://youtu.be/vNz_QvDx30Q. If anyone has discord and can help me https://discord.gg/qj9pfZm I will be there. Just @ me (@slayerkodi) and I'll get it. Easier to talk in real-time. Thanks in advance
Find
Reply
05-08-2017, 02:54 AM
#7
afeld88
Unregistered
 
(05-06-2017, 07:03 PM)Helios Wrote: So because Android can be kind of annoying sometimes for dev work, especially if you're just interested in working on the aarch64 JIT or GLES code, booting a Linux distro can be pretty useful. This guide can also be extended to outright installing Ubuntu on the Shield TV by flashing the boot partition but we won't cover that. Also note, everything about this guide is non-destructive, so unless you decide to flash anything, you can't break your Shield TV.

I'm writing this guide assuming you have a functional UNIX environment of some sort and a non-pro Nvidia Shield TV 2015. The pro variant WILL NOT WORK with this specific guide, but the boot files are given for them as well in the XDA links below.

You'll need a USB device or MicroSD at least 4 GB large. 8 GB or higher is highly recommended.

Quick and easy way to get up and running

Go download all the files here: https://drive.google.com/drive/folders/0...nBlRUJPRzA

Explanation on the boot images can be found here: https://forum.xda-developers.com/shield-...u-t3274632

I have not gotten around to figuring out how to compile those myself. 


  1. Extract rootfs.tar.xz to either the root of a microSD card or a USB device.
  2. Boot your Shield TV into fastboot mode. Use Google to figure out how to do this. I recommend using ADB because the hardware method is difficult and frustrating.
  3. Connect your MicroSD or USB device to the Shield TV

if you extracted rootfs to a MicroSD, boot the microsd.img file with



Code:
fastboot boot microsd.img

If you extracted to a USB, boot the usb.img file with



Code:
fastboot boot usb.img

and you're done. This will give you a functional Ubuntu distro with GPU drivers. Except for Wifi. Due to licensing issues the Broadcom Wifi firmware can't be included and you need to copy that yourself from Android. See the guide below.



Long way - create your own L4T ready rootfs


This is a good general guide to follow if you want to figure out how to boot your favorite distro instead of Ubuntu 16.04.


  1. Download the boot images from here (I have yet to figure out how to compile this, lazy): https://drive.google.com/file/d/0Bz5kaPQ...JFcmM/view

    See here for explanation on the boot images

    https://forum.xda-developers.com/shield-...u-t3274632

  2. Download the Linux for Tegra filesystem and drivers for the X1 here: https://developer.nvidia.com/embedded/linux-tegra-r2421

    you want the "Jetson TX1 64-bit Driver Package" and the "Sample Root Filesystem". Download both of those

  3. Extract the driver package

    sudo tar xpf Tegra210_Linux_R24.2.1_aarch64.tbz2cd Linux_for_Tegra
  4. Extract the filesystem

    sudo tar -jxpf (path to Tegra_Linux_Sample-Root-Filesystem_R24.2.1_aarch64.tbz2)cd ..
  5. Run the script that will install the GPU drivers (And a custom build of chromium?)

    sudo ./apply_binaries.sh
  6. OPTIONAL: Copy the broadcom firmware files for wifi from Android located in Android at "/system/vendor/firmware/bcm4354/" to "/lib/firmware/brcm/fw_bcmdhd.bin" in your Linux rootfs directory.
  7. Copy the rootfs to your microSD or USB device

    sudo cp -a rootfs/* $path_to_devicesync
  8. Boot your Shield TV into fastboot mode. Use Google to figure out how to do this. I recommend using ADB because the hardware method is difficult and frustrating.
  9. Connect your MicroSD or USB device to the Shield TV


if you copied rootfs to a MicroSD, boot the microsd.img file with



Code:
fastboot boot microsd.img

If you copied to a USB, boot the usb.img file with



Code:
fastboot boot usb.img

and you're done. This will give you a functional Ubuntu distro with GPU drivers and optionally wifi.

Additional notes

Again, I haven't gotten around to figuring out how to compile those image files myself, but somebody on xda documented it (kind of). It's certainly doable, and I imagine it's entirely possible to boot whatever distro you want. I might look into that later. Also, if you want to just boot Linux without having to connect the shield to your computer every time, simply flash the image file to the boot partition. DO NOTE THOUGH, this will make it extremely difficult to get back into bootloader mode because you can no longer use ADB to reboot the device, and the capacitive power button is unimaginably irritating to consistently get into bootloader mode. If you flash the wrong image file on a Shield TV Pro, you will brick it!

Do not try to "sudo apt-get dist-upgrade". You will blow up your rootfs. Also, the useful repos are disabled so it may be worth enabling them so you can install things.
ive followed all steps in this tutorial on my ubuntu machine and i get to booting the boot image however it hangs and reboots into android tv, here is the output i get

alex@alex:~/Downloads/boot_images$ sudo adb reboot bootloader

alex@alex:~/Downloads/boot_images$ sudo fastboot boot microsd.img
downloading 'boot.img'...
FAILED (data transfer failure (Cannot send after transport endpoint shutdown))
finished. total time: 12.267s
Reply
10-09-2017, 09:20 AM
#8
zovc Offline
Junior Member
**
Posts: 24
Threads: 5
Joined: Mar 2016
I'm not sure if this is the right thread to ask these sort of questions, but:

I've been considering how the Shield TV seems like it would make the perfect HTPC, but I'm a Windows kid. I've used Linux before and I'm not crazy intimidated by something as accessible as Ubuntu, just, I'm much more comfortable solving problems in Windows.

How would a Shield TV running Ubuntu handle Steam In-home Streaming? Once you get a Shield TV into Linux, could you theoretically run windows in a VM with GPU passthrough? Does the Shield's controllers work in Linux? Do other controllers work in Linux on a Shield TV? (I really like PS4 controllers with DS4Windows.) Will this hack work on the "2017 version" of the shield?

And those things considered, would you say a Shield TV is good value as a HTPC? I've been considering saving up for a living room PC and just haven't been able to justify throwing upwards of $300 to $400 or more.
Find
Reply
10-09-2017, 11:05 AM (This post was last modified: 10-09-2017, 11:07 AM by Helios.)
#9
Helios Offline
Stellaaaaaaa
**********
Developers (Some Administrators and Super Moderators)
Posts: 4,395
Threads: 15
Joined: May 2012
(10-09-2017, 09:20 AM)zovc Wrote: How would a Shield TV running Ubuntu handle Steam In-home Streaming?

It wouldn't. Steam does not have an aarch64 client. Only x86_64.

Quote:Once you get a Shield TV into Linux, could you theoretically run windows in a VM with GPU passthrough?


No.

Quote:Does the Shield's controllers work in Linux?

Not wirelessly.

Quote:Do other controllers work in Linux on a Shield TV? (I really like PS4 controllers with DS4Windows.) 

Yes. Just plug them in via USB. Doubt bluetooth works.

Quote:Will this hack work on the "2017 version" of the shield?

Probably not. The 2017 shield doesn't have an mSD slot needed for booting.

Quote:And those things considered, would you say a Shield TV is good value as a HTPC? I've been considering saving up for a living room PC and just haven't been able to justify throwing upwards of $300 to $400 or more.

If you keep it on Android, it's reasonably useful as an HTPC. It can do nvidia gamestream (Which is basically the same as Steam's).  The Shield TV supports plugging in an NTFS external drive for local media (And Plex serving). Android has a Kodi port for local media playing. The Shield TV has streaming apps for most major services. The Shield TV *I think* has a plex server app so you can share out media to other systems.

Note, my guide here is really targeted for getting an aarch64 dev environment going (Or a low powered server). Not really ideal for HTPC
Find
Reply
05-18-2018, 01:44 PM
#10
Trivas Offline
Junior Member
**
Posts: 15
Threads: 0
Joined: May 2018
[color=#000000]Hi, I want to install ubuntu on shield 2017 using usb drive and I found that the boot images now has no usb.img or mircrosd.img as you mentioned,  there is only sda1.img , mmcblk0p1.img and some others can be used. [/color]
[color=#000000]I used the usb drive and sda.img, and it seems starting install ubuntu, but it reboots in ten seconds and returns to android.[/color]
[color=#000000]I didn't try under developer mode. Will developer mode be help?[/color]
Find
Reply
« Next Oldest | Next Newest »
Pages (4): 1 2 3 4 Next »


  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma