[DEV] ArchLinux on the TF300T(G)

Search This thread

cb22

Senior Member
Dec 4, 2006
74
165
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
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.
 

-angel*

Senior Member
Sep 10, 2012
561
199
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
165
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
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:

Charle692

Senior Member
Jul 7, 2012
164
20
Ottawa
This is awesome i'm gonna have to read up on this to see how it works! great work! Always wanted something like this. :)
 

Nekromantik

Senior Member
Apr 1, 2010
7,054
1,032
London
Google Pixel 7 Pro
Google Pixel Watch
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.
 

Spark1223

Senior Member
Sep 24, 2011
321
46
Finally, a real reason to unlock the tab. When this works and it's dual boot, I will be unlocking and installing this.
 

spenat

Senior Member
Jun 27, 2012
119
26
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
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
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
165
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
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
165
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 :)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 60
    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
    13
    Hi everyone

    I've uploaded a new rootfs + kernel in an upload.zip for testing.

    This is a testing release, as such, dual boot is disabled, and it will only boot into Arch. Flash back your Android kernel blob of choice to get back into Android, or my original hybrid kernel to boot into your old Arch install. (They can co-exist)

    Changes:
    • The building of this rootfs has been completely automated with a little set of scripts I wrote. Busy cleaning them up and I'll pop them on Bitbucket - so anyone can build a customized rootfs.
    • The brcmfmac drivers are now in use instead of the bcm4329 ones - this should fix all the wifi issues (hopefully)
    • Some tweaks to what mode the CPU gets set in and such, feels faster to me.
    • Compositing is done by xcompmgr
    • Unfortunately no Bluetooth / Suspend working just yet.
    • All the upstream goodness and updates.
    • Changed to gdm as the login manager
    • Two finger scrolling works, and the mouse feels nicer.
    • I've made a bit of a dodgy hack to the nvidia gpu kernel driver to try and sort out the graphics corruption that occurs sometimes. It might work, it might make things worse. Please let me know.
    • Keyboard remap is still TODO. The folks over at the TF700 Ubuntu porting effort seem to have a nice one that we should be able to use.

    Errata:
    • Please run
      Code:
      systemctl enable tf300-cpu.service
      and reboot, after first boot.
    • GDM selects GNOME session by default, you'll want to select XFCE

    The default usernames are root and initial, with the corresponding passwords being root and initial.

    I've only tested flashing this update.zip with CWM. TWRP should work, but since my touchscreen is broken, I can't test it out.

    I've uploaded it to my Dropbox: https://www.dropbox.com/sh/x4ot84wu462c1aq/ow7mzRu5ob

    Hopefully this will work a bit better than all the other file hosting sites.
    10
    So, after two day of coding I have made a really amazing dual boot menu :D. Check out this video https://www.youtube.com/watch?v=ndEuYMYdIAE . So next days I need to hack the kernel to make it possible for every device, then I will publish it.
    6
    noob question; What are the advantages of running it this way vs a chroot/vnc method?
    (perfomance obviously but how so; is it noticibly faster this way [compared to something like complete linux installer with all other apps closed]?)

    obviously the main advantage of a chroot method is how easy it is to switch back and forth

    on a side note has anyone seen a free app that installs whatever distro you want (like say via an iso file)?
    edit: actually complete linux installer will do that if you configure a zip of the image properly

    It's much, much, much faster GUI wise. Like on par, if not faster than a normal Atom based Netbook.

    Thank you. The only problem is I cannot seem to download the linux.tar.gz without it 1) taking ages and 2) interrupting after 2-3 hours :(
    Can anybody reupload it somewhere else please or create a torrent file and seed? I really would like to try this...

    I'm almost done with a new rootfs / kernel, that has the latest brcm80211 in-tree drivers from the 3.8 kernel (which should hopefully fix all the issues people have been encountering) as well as Bluetooth, and a much better mouse feel. (two finger scrolling, too!) I've pulled in the latest Tegra drivers, and there seems to be a performance improvement too - the GUI feels snappier and there doesn't seem to be any weird artifacting (although maybe that's due to Xorg 1.13)

    I've requested hosting from goo.im - so hopefully I'll get that, and with it a fast place to host files. If not, I'll grab myself a server somewhere. It's something I've been meaning to do for a while.
    6
    As I promised today I finish the next beta of my kernel, https://dl.dropbox.com/u/1664131/firekernel-TF300T-betav2.zip hope everything works (I am making all changes on my rootfs, so putting in then into a zip is hard, but I think I made everything good). The kernel have dual boot menu like I posted in my last video, it is full working, only the screen is a little bit flickering, the are try options in it - Android, Arch, and some extra I add e2fsck option - this option will check you data partition for errors - for my it often happens the Android reboots when booting after a hard reboot, so this option should be usefully. Note this kernel should disable login manager (if I did everthing in the zip good, you will by autologin in initial user), this is because the enebled framebuffer console brakes xserver starting when it starts before the getty procces.