Skip to content

Instantly share code, notes, and snippets.

@thoroc
Last active April 24, 2024 23:43
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thoroc/9c7284103a8381fbd8e2e749a0f72f8f to your computer and use it in GitHub Desktop.
Save thoroc/9c7284103a8381fbd8e2e749a0f72f8f to your computer and use it in GitHub Desktop.
How to boot Ubuntu 16.04 on the Shield TV with X1 GPU drivers

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/0B39Ag2JMI49DcDJUTnBlRUJPRzA

Explanation on the boot images can be found here: https://forum.xda-developers.com/shield-tv/general/build-kernel-source-boot-to-ubuntu-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

fastboot boot microsd.img

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

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/0Bz5kaPQJx_AgZ3lvWWZFNmJFcmM/view See here for explanation on the boot images: https://forum.xda-developers.com/shield-tv/general/build-kernel-source-boot-to-ubuntu-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.tbz2
cd Linux_for_Tegra
  1. Extract the filesystem
sudo tar -jxpf (path to Tegra_Linux_Sample-Root-Filesystem_R24.2.1_aarch64.tbz2)
cd ..
  1. Run the script that will install the GPU drivers (And a custom build of chromium?)
sudo ./apply_binaries.sh
  1. 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.
  2. Copy the rootfs to your microSD or USB device
sudo cp -a rootfs/* $path_to_device
sync
  1. 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.
  2. Connect your MicroSD or USB device to the Shield TV

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

fastboot boot microsd.img

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

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.

Shamelessly lifted from https://forums.dolphin-emu.org/Thread-how-to-boot-ubuntu-16-04-on-the-shield-tv-with-x1-gpu-drivers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment