[DEV] ArchLinux on the TF300T(G)

cb22

Senior Member
Dec 4, 2006
74
164
33
I've always been more of an Arch than Ubuntu person (how do you know if someone uses ArchLinux? Don't worry, they'll tell you)

This requires you to be unlocked and on the JB bootloader. I disclaim all responsibility if it somehow turns your tablet into a pile of ashes...

What works:
  • Dual boot with Android.
  • Internal storage and MicroSD Card
  • X11, with compositing
  • Audio
  • Mouse and keyboard on the dock, as well as dock hotplugging.
  • Touchscreen
  • Playing videos (full 1080P works great.) using Xfce's media player
  • Sensors (Light, compass, accelerometer, gyro). These are all exposed under sysfs.
  • Charging / Dock charging. This appears to be managed by the kernel.
  • USB gadget (as a RNDIS device for network access via USB)
  • CPU frequency scaling / Tegra LP core. The LP core is automatically used :) you can see its status in /sys/kernel/cluster/active (when that file reads LP) and its use is simply what the current CPU1 use appears to be.
  • WiFi, with NetworkManager
  • 3G, on the TF300TG model, with NetworkManager
  • Battery (and dock) status in Xfce
  • USB port on the dock
  • Some sensible key remapping (Back -> Escape, Search -> Alt, Home -> Super)

What doesn't work:
  • Bluetooth
  • Two finger scrolling with the mouse
  • Rebooting from Linux (have to do a sync then hard power off)
  • Basic framebuffer console - to get dual boot working I had to remove the FB console
  • Using "standard" xv (as in, mplayer -vo xv). Untested really, use gstreamer.
  • Cameras

Current priorities:
  1. Get Bluetooth working
  2. Get two finger scrolling working.
  3. Get rebooting working

Anything else is untested. Currently, I'm using the TF300TG's kernel source at https://github.com/cb22/tf300tg_jb_kernel - which is just the standard source from ASUS with a patch or two.

Dual booting:
At the moment, my "hybrid" initramfs checks for a file ".boot_linux" on the internal SD card (/data/media/.boot_linux or /storage/sdcard0/.boot_linux - same thing). If it exists, it boots Linux, otherwise, Android starts up. It wouldn't be difficult at all to make a simple Android app with a "Reboot into Linux" button, and vice versa one for Linux with "Reboot into Android"

Important note:
Currently, the provided kernel / initramfs is built for the TF300TG. It does seem to work fine on the TF300T however.

Downloads:
Kernel + Initramfs blob: https://rapidshare.com/files/2827313479/hybridkernel.blob
RootFS with Xfce: https://rapidshare.com/files/201953815/linux.tar.gz

Installation:
Flash the blob to staging using fastboot.
Untar the rootfs to /data/linux/. The easiest way to do this is probably to copy it across to the Transformer via adb or MTP, then run
Code:
$ su
# mkdir /data/linux
# tar -xzvf /storage/sdcard0/linux.tar.gz -C /data/linux
Issues:
Apparently permissions aren't set properly when untar-ing. This can be "fixed" by a chmod 755, apparently. As soon as I can, I'll make a better way of installing this (update.zip style)

Credits:
This work is based off the Arch Linux ARM distribution
 
Last edited:

Valantur

Senior Member
Aug 19, 2010
101
31
28
AWESOME! This is what I've been looking for. Thanks for kick starting this, I'm flashing the recovery right away. I suppose I'll start playing around with the .config and see where that takes me.

C'mon people! lets get this done so we can then try out dualboot options and bring some GNU/Linux flavor to the Transformer Pad.
 

Nekromantik

Senior Member
Apr 1, 2010
6,457
726
243
London
Good work. Im waiting for a working Ubuntu so I can install Blackbuntu.
Shame Im on ICS bootloader as I would have tried it.

The Prime Ubuntu project aint had any updates recently sadly.
 

-angel*

Senior Member
Sep 10, 2012
561
199
0
if you get this working, would you then maybe get the win8 tablet version also working? Loving linux, but Win8 on tablets even a bit better :good:
 

cb22

Senior Member
Dec 4, 2006
74
164
33
AWESOME! This is what I've been looking for. Thanks for kick starting this, I'm flashing the recovery right away. I suppose I'll start playing around with the .config and see where that takes me.

C'mon people! lets get this done so we can then try out dualboot options and bring some GNU/Linux flavor to the Transformer Pad.
That's the aim! It would be really nice to have Android for tablet mode, and GNU/Linux for dock mode.

Good work. Im waiting for a working Ubuntu so I can install Blackbuntu.
Shame Im on ICS bootloader as I would have tried it.

The Prime Ubuntu project aint had any updates recently sadly.
You can always use NVflash to backup your bootloader and such, then freely flash away. That's what I did (I'm on the TF300TG, and no one has uploaded their JB dlpkgfile *hint* *hint* and it's not available on ASUS's site yet) so I simply restored using NVflash to get my ICS with 3G back for when I'm not dev'ing.

Also - the ideas port over to any GNU/Linux system fairly easily once figured out - getting Ubuntu running wouldn't be much more effort. I'm using Arch to start since I understand it better (and prefer it)


if you get this working, would you then maybe get the win8 tablet version also working? Loving linux, but Win8 on tablets even a bit better :good:
Highly unlikely, sorry, and definitely not my field of expertise!
 
  • Like
Reactions: -angel*

-angel*

Senior Member
Sep 10, 2012
561
199
0
yeah nP - was just a think if they would have similar kernels...

Video looks very good, but as you say in the first post, nothing for ppl who don't know how to flash it and as I need the tablet for school I'd need dual boot at all... :/

But get on your working, really nice, but unfortunately I don't know anything about developing such things, so I can't help you...
 
Last edited:

Nekromantik

Senior Member
Apr 1, 2010
6,457
726
243
London
You can always use NVflash to backup your bootloader and such, then freely flash away. That's what I did (I'm on the TF300TG, and no one has uploaded their JB dlpkgfile *hint* *hint* and it's not available on ASUS's site yet) so I simply restored using NVflash to get my ICS with 3G back for when I'm not dev'ing.

Also - the ideas port over to any GNU/Linux system fairly easily once figured out - getting Ubuntu running wouldn't be much more effort. I'm using Arch to start since I understand it better (and prefer it)
Yeah.
Might try when I get some spare time.
 

spenat

Senior Member
Jun 27, 2012
118
25
58
Amazing! I just hope that it will be possible to dualboot with normal android installed. If so, it would be absolutely perfect. Keep going, buddy!
 

-angel*

Senior Member
Sep 10, 2012
561
199
0
Would it be possible to get it dualboot with an external HDD's? Because you can only get external SD's only up to 64gb (as I know and not all of them work) and external HDD's usually have a bit more storage :)
 

Valantur

Senior Member
Aug 19, 2010
101
31
28
I've been playing around with this today, and I was wondering if you could upload a barebones arch system (without KDE) but with any other improvements you might have been working on.

Thanks
 

cb22

Senior Member
Dec 4, 2006
74
164
33
Amazing! I just hope that it will be possible to dualboot with normal android installed. If so, it would be absolutely perfect. Keep going, buddy!
That's what I've been working on! I have a kernel that supports full features of both Android and Arch (well sorta - no FB console, so no boot messages or such) and an initramfs that allows you to select (at the moment its hard coded, but I'll make a simple interface to select which one to boot, as well as things like telling Android to reboot into Linux, or vice versa). In terms of implementation, essentially it's just an initramfs chain loader.

I've been playing around with this today, and I was wondering if you could upload a barebones arch system (without KDE) but with any other improvements you might have been working on.
Thanks
I shall - I've gotten WiFi working (works great with NetworkManager even) - I just have a very busy week with varsity work, I'll try and put the latest stuff online over the weekend.
 

keeganmccallum

Senior Member
Nov 16, 2011
174
410
0
Waterloo
That's what I've been working on! I have a kernel that supports full features of both Android and Arch (well sorta - no FB console, so no boot messages or such) and an initramfs that allows you to select (at the moment its hard coded, but I'll make a simple interface to select which one to boot, as well as things like telling Android to reboot into Linux, or vice versa). In terms of implementation, essentially it's just an initramfs chain loader.



I shall - I've gotten WiFi working (works great with NetworkManager even) - I just have a very busy week with varsity work, I'll try and put the latest stuff online over the weekend.
This project looks awesome. i have a tf300t and intermediate arch linux experience( have made multiple working setups, compiled drivers etc, and would love to do anything i can to help this project, let me know if there is anything i can do
 

cb22

Senior Member
Dec 4, 2006
74
164
33
I guess you could, once you get wifi working. We are waiting for cb22 to upload a new kernel+rootfs with a working wifi interface.
Unfortunately I didn't have time over the weekend to get things tidied up and uploaded - I start writing exams soon so things are a bit hectic on my side (coupled with the fact that I actually use my TF for varsity). I'll try to sort things out as soon as I can :)