Tf700t

= Installing Gentoo Linux on Asus Transformer Infinity (TF700T) =

Since i bought the amazing Infinity (Asus TF700T) with the keyboard dock, i started wondering how to put a real OS on it, which is my beloved Gentoo.

Finally i managed to get to the point and achieve something usable.

In this wiki page i will be describing what i did and provide both instructions AND the final product.

Preliminary notes
dock mandatory install on microsd speed issues low ram issues

Before the first linux boot
The Asus Infinity (TF700T) comes out of the box as an Android tablet, it'd provided with android 4.2.1 or something similar but it is not so important because we want to install Linux on it, so these steps will provide infos on how to enable dual boot on this device, and they need to be performed with your current android installation.

Unlock and root
You must unlock your bootloader first, follow these instructions:

Go to this link: support page on Asus website, select OS Android and from utilities download the "Unlock Device App: Unlock boot loader". Now install, follow directions and enjoy your boot-unlocked tablet (yes, this will void your warranty, you have been warned).

For more directions, check this XDA thread: XDA on unlock TF700T

At this point you need root. My recomandation is to install a custom ROM which will do everything for you. Which one is on you, check this link on XDA how to root and custom ROMS for detailed instructions and a list of ROMS. For the multi-boot to work you MUST install either CROMi-X, CROMBi-KK or ZOMBi-X latest versions, on insternal SD only.

Making your tablet unbrickable
While there is basically no threat of briking your tablet, it's strongly advised to follow these steps here on how to make your tablet "safe" from any messing up you might do.

In short: - download this: flatline - install google's ADB and fastboot (from SDK) on oyur linux pc - flash the downloaded custom recovery: fastboot flash recovery flatline_device.im - reboot device to recovery, select "advanced" and "wheelie", select "Step 1: Flash AndroidRoot BL" - it will poweroff. Reboot to asndroid, let it boot, use a bit, then reboot to recovery again - select "Step 2: Generate wheelie blobs" from the same menu as before - when finished, reboot and save from the device the files it has created (check under /data or /tmp for AndroidRoot or similar)

Keep these files safe, they are your lifeline. (NOTE: these instructions are given with no warranty, use at your risk!)

Prepare the storage
I don't advise to install Gentoo on the internal memory, due to the tear-and-wear that might kill it ahead of time. Gentoo, compared to Android, required a lot more writes to disk, so maybe if you want to use internal memory make sure all your portage builds and logs are stored somewhere else. I suggest to plug in a very fast microSD (class 6/10 if supported, mine supports only up to class6 but some get to class10, YMMV). From a linux pc on this mSD prepare two partirions: one, the first, format as EXT4, the second keep as VFAT, for data exchange. Get at least 16gb for Gentoo, the more the better. Of course you can have only one EXT4 and not VFAT if you like.

You could also use a loopback image on the internal memory alongside Android, or you could wipe out android and install Gentoo instead of it... I do not recomand any of these two solutions because both requires you to use the internal memory which cannot be fixed when it breaks down nor recovered if your tablet starts pushing daisies for any reason. You can still access the internal memory anyway fron Gentoo if you need the extra storage or whatever.

Repartitioning the internal memory is STRONGLY NOT ADVISED. I was thinking about it but was discouraged by the fact it does not use any common partition scheme and no linux tools are able to mess with it. Plus the fact that it can really brick your tablet requiring you to grab the lifeline from last paragraph.

Setting up dual-boot
Dual-booting the tablet is done using a kexec method which is just brilliant. The full thread on XDA is here.

In short, with the changed we need for Gentoo: - Check you have a supported ROM and recovery (CROMBi-KK and TRWP for me worked well) - boot into your ROM and make sure you have terminal emulator, root and busybox installed - download this: scripts - extract where you like, usually under /data is the best place (for permissions and ease of access) - don't download any rootfs, you will be making your own with Gentoo on it soon enough - XXXX run script XXX

As Workdowg himself explains on XDA:

''"What happens here is by flashing the kexecboot kernel blob (to mmcblk0p4) you are given a menu to choose a rootfs to boot from, ie Android, Linux image file, Linux on a partition... So in order for the kexecboot kernel to be of any use to you, you need to install Android and Linux kernels in your rootfs. It then reboots using the kernel you chose. The config file, boot.cfg, is installed to a small 5MB vfat partition (mmcblk0p5)

ANDROID: Android mounts root (mmcblk0p1) "/" as /system. So we install a kernel (without modules, you did that when you installed your ROM) to a directory we make called /boot which needs to be in the mount /system directory. This kernel (zImage and initrc.img) is just extracted from _that's cm112 or _that9oc+ kernel blobs and a copied to the /boot directory.

LINUX: This kernel was especially compiled by JoinTheRealms from _that5 source using configs moreD_cn came up with. It needs to be installed in /boot of a Linux rootfs."''

At this point you have a working dual-boot on your tablet, at this point we need to build gentoo so you also have something to dual-boot!

Download stage3 for ARM-hf
Download and extract (tar cjvfp) the ARM stage3 select the hard-fp (arm-hf) or the tegra binary drivers will not work

do the usual gentoo initial stuff
chroot into the uncompressed stage3 and follow the gentoo handbook to install it. Just bear in mind your only network interface is wlan0, you do want to specify the "xxx,noatime" mount option to ensure maximum life and speed from your solid state memories (either mSD or internal). Also, remember you must NOT install any bootloader (lilo, grub, etc) and you CANNOT install a linux kernel, you must use the same kernel you are using in the dual boot we have set up. Since some stuff will need the kernel sources to compile, just emerge git and download there sources to /usr/src and make a symlink called /usr/src/linux to them. You can now reboot android and try out the dual boot, if all goes well, you will get to a grentoo login and you can login as root.

Mask and unmask packages
The provided tegra drivers works only with X up to 1.14 (which is not very stable) and since 1.13 has been masked due to security flaws, you must mask any xorg-server above or equal to 1.13. I recomend the following accept_keywords and mask: 

Install Tegra packages
Download the NVIDIA binary package for Tegra3 DEcompress.... copy the following files: <....>

Install touchscreen and touchpad drivers
from here <> and here <>

Suggested configuration from here
You have only 1gb of ram and swap file is strongly discouraged. So i suggest you install lxde-meta and the nice XDM replacement °slim°. I usually configure it for auto-login due to some strange long delays in the login.

Fine tuning some things
Video standby simply hangs 75% of the times, so forget it. Disable any screen blanking from your screensaver. Instead, use this script: <>

install xbindkeys and the following scripts: <->

In this way you can lock the screen and put the brightness to 0 by pressing the power button. If you don'y do this, well, simply the metal dock will keep pressing randomly your touchscreen all the time... and this is NOT what you want!