FORUMS
Remove All Ads from XDA

Linux4Tegra R23.1/R24.1 beta for the Shield Tablet

406 posts
Thanks Meter: 824
 
By Bogdacutu, Senior Member on 26th December 2014, 11:34 PM
Post Reply Email Thread
Stuff that doesn't work: 3G/LTE, accelerometer, GPS, camera, and maybe some other stuff that I'm not remembering
Stuff that does work: GPU (full OpenGL 4.5 and Vulkan), sound, USB device and host, WiFi, Bluetooth, touchscreen (including stylus), SD/USB install

Downloads:
Installation instructions:
  1. Install MultiROM (+ TWRP + touch support + patched kernel)
  2. Download Linux4Tegra and install it through TWRP (Advanced -> MultiROM -> Add ROM)

Tips/notes:
The Following 53 Users Say Thank You to Bogdacutu For This Useful Post: [ View ] Gift Bogdacutu Ad-Free
 
 
26th December 2014, 11:38 PM |#2  
Gnurou's Avatar
Member
Flag Tokyo
Thanks Meter: 58
 
More
I am *very* interested in knowing which kernel you have used for this. Upstream, L4T, Android? This looks very promising in any case.
26th December 2014, 11:46 PM |#3  
Bogdacutu's Avatar
OP Senior Member
Thanks Meter: 824
 
Donate to Me
More
Quote:
Originally Posted by Gnurou

I am *very* interested in knowing which kernel you have used for this. Upstream, L4T, Android? This looks very promising in any case.

I've tried L4T 21.2, 19.3 and Lollipop. All of them need a small kernel patch (which might break HDMI, I have no idea) for the graphics to work, but apart from that they should all work fine for the most part.

Code:
In drivers/video/tegra/dc/dc.c, in tegra_dc_probe, after "int i;" add:

        static int num_probed = 0;
        if (++num_probed > 1) return -ENOENT;
Edit: this actually isn't needed, I was just using the wrong cmdline
27th December 2014, 12:51 PM |#4  
Bogdacutu's Avatar
OP Senior Member
Thanks Meter: 824
 
Donate to Me
More
Getting Started
THESE INSTRUCTIONS ARE OUTDATED. CONSIDER USING THE PREBUILT INSTALLER FROM THE MAIN POST INSTEAD!

You need a computer with Linux installed and some free space (I don't have the exact numbers, but 5GB would probably be enough). On the tablet, you need 2-3GB of free space (on the internal memory), an unlocked bootloader , root and you need Busybox installed too.

On the computer, you'll need to compile your kernel first (this guide includes the compiler, and there's a prebuilt boot.img in the attachments if you want to skip this part). I recommend using https://github.com/Bogdacutu/STLinux-Kernel, with st8_linux_defconfig.

The initramfs is pretty simple, it just mounts the relevant system partitions and loads Linux from them: https://github.com/Bogdacutu/STLinux-Initramfs. You'll need to edit KERNEL_PATH in build.sh and make the kernel beforehand, then running build.sh will result in a boot.img which you can boot with fastboot:
Code:
fastboot boot new_boot.img -c "console=tty1 fbcon=map:10 fbcon=rotate:2 fbfix"
For the rootfs, Linux4Tegra is the easiest place to start from. All the Tegra K1 versions should work fine. For example, with R21.2: (the sudo is necessary there)
Code:
$ wget http://developer.download.nvidia.com/mobile/tegra/l4t/r21.2.0/pm375_release_armhf/Tegra124_Linux_R21.2.0_armhf.tbz2
$ tar xfvj Tegra124_Linux_R21.2.0_armhf.tbz2
$ cd Linux_for_Tegra
/Linux_for_Tegra$ wget http://developer.download.nvidia.com/mobile/tegra/l4t/r21.2.0/pm375_release_armhf/Tegra_Linux_Sample-Root-Filesystem_R21.2.0_armhf.tbz2
/Linux_for_Tegra$ cd rootfs
/Linux_for_Tegra/rootfs$ sudo tar xfvj ../Tegra_Linux_Sample-Root-Filesystem_R21.2.0_armhf.tbz2
/Linux_for_Tegra/rootfs$ cd ..
/Linux_for_Tegra$ sudo ./apply_binaries.sh
/Linux_for_Tegra$ cd rootfs
/Linux_for_Tegra/rootfs$ sudo tar cfvj ../rootfs.tar.bz2 .
The resulting rootfs.tar.bz2 you'll need to somehow get on the device. For the next part, I'll assume it's in /sdcard/rootfs.tar.bz2. You'll need to do this on the device (through ADB or through Terminal Emulator)
Code:
$ su
# cd data
/data# mkdir linux
/data# cd linux
/data/linux# tar xfvj ../media/0/rootfs.tar.bz2
Enabling Bluetooth with brcm_patchram_plus:
Code:
$ sudo brcm_patchram_plus -d --patchram /system/etc/firmware/bcm43241.hcd --baudrate 3000000 --enable_lpm --enable_hci --use_baudrate_for_download --no2bytes --tosleep 1000 /dev/ttyTHS2
Prebuilt boot images:
  • new_boot(80).img - working WiFi and sound
  • new_boot(90).img - added pointer emulation to touchscreen driver
  • new_boot(94).img - fixed Bluetooth stability
  • new_boot(114).img - fixed HDMI, added support for non-LTE partition table, my tegra driver patch is now optional (without it fbcon doesn't work properly, enable by adding fbfix to cmdline)
  • new_boot(123).img (newest at the moment) - fbfix isn't needed anymore, added support for tmpfs ACLs, enabled XZ compression (because after reaching a certain size, the kernel wouldn't find the initramfs anymore), enabled KVM
The Following 5 Users Say Thank You to Bogdacutu For This Useful Post: [ View ] Gift Bogdacutu Ad-Free
30th December 2014, 09:54 AM |#5  
_TB_TB_'s Avatar
Senior Member
Flag Ruda Śląska
Thanks Meter: 175
 
More
Quote:
Originally Posted by Bogdacutu

Code:
In drivers/video/tegra/dc/dc.c, in tegra_dc_probe, after "int i;" add:

        static int num_probed = 0;
        if (++num_probed > 1) return -ENOENT;

Won't this code always return - ENOENT?

Sent from my Xperia Z1 Compact using Tapatalk
30th December 2014, 03:03 PM |#6  
Bogdacutu's Avatar
OP Senior Member
Thanks Meter: 824
 
Donate to Me
More
Quote:
Originally Posted by _TB_TB_

Won't this code always return - ENOENT?

Sent from my Xperia Z1 Compact using Tapatalk

It will always return -ENOENT except for the first time the function gets called (which is enough for the screen to get initialized).
The Following User Says Thank You to Bogdacutu For This Useful Post: [ View ] Gift Bogdacutu Ad-Free
1st January 2015, 10:42 PM |#7  
Senior Member
Flag Cleveland
Thanks Meter: 47
 
More
Unless you are looking to completely break the Ubuntu install, do not perform a release upgrade to 14.10.

Everyone here probably already knows this but I wanted to see what would happen, which was rendering the x-server unusable. These results did not surprise me but hopefully this will save someone else who has the same idea as I did some time.
1st January 2015, 10:49 PM |#8  
Bogdacutu's Avatar
OP Senior Member
Thanks Meter: 824
 
Donate to Me
More
Quote:
Originally Posted by joshtheitguy

Unless you are looking to completely break the Ubuntu install, do not perform a release upgrade to 14.10.

Everyone here probably already knows this but I wanted to see what would happen, which was rendering the x-server unusable. These results did not surprise me but hopefully this will save someone else who has the same idea as I did some time.

Try doing
Code:
sudo apt-mark hold xserver-xorg-core
before doing the upgrade, to prevent the driver from being overwritten.
The Following 2 Users Say Thank You to Bogdacutu For This Useful Post: [ View ] Gift Bogdacutu Ad-Free
1st January 2015, 11:14 PM |#9  
Senior Member
Flag Cleveland
Thanks Meter: 47
 
More
Quote:
Originally Posted by Bogdacutu

Try doing

Code:
sudo apt-mark hold xserver-xorg-core
before doing the upgrade, to prevent the driver from being overwritten.

Thanks, that was the command I couldn't remember. Let me do a backup of it first then I will try again to see if the outcome is any different, I'll let you know how it goes once I have a chance.
2nd January 2015, 02:25 AM |#10  
Senior Member
Thanks Meter: 128
 
More
Great i need a dual boot Android/Linux
2nd January 2015, 09:32 PM |#11  
Member
Thanks Meter: 30
 
More
Quote:
Originally Posted by Bogdacutu

What works:

  • Audio
  • WiFi

Quote:
Originally Posted by Bogdacutu

Got it working thanks to /u/GenuineAster, will post a full guide in a day or two.

Quote:
Originally Posted by Bogdacutu

Photos:

I got my tablet 2 days ago, and I'm already trying to mess up with it... I decided to try to install Ubuntu on my Shield Tablet (WiFi only, EU model).

So basically, I managed to boot it up thanks to you tutorial. It seems to be working well, but there are some things that does not work, and I see you apparently solved those issues already...

The issues I have are the following, ordered by priority:
- No WiFi (I see that you apparently solved this issue, can you please explain how you managed to do that?)
- While I was writing this message, I went to keyboard layout options, and the OS crashed, it went back to login screen twice (I was on the same window each time, it showed nvidia black screen, then the login screen)
- No audio (I only have a device named "Dummy audio input/output", you seem to have audio, can you confirm that?)
- Graphics flickering on some textures, for example, on the main sidebar menu, when my mouse pointer is over an icon, there is a background on that icon, but the background is flickering, that's weird...
- No touchscreen (But you don't neither)

For the moment, I think the most important thing is WiFi, since I can't do anything without network connexion. Can you help me with that? Thank you!
The Following User Says Thank You to etienne51 For This Useful Post: [ View ] Gift etienne51 Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes