Friday, March 15, 2013

HOWTO

hi guys!
finally we got a stable version of this hack.
follow this article for got any linux distro on your TF201 ;)
a special thanks to Smasher816, he help me so much with the "GUI" ;)



prerequisites

This guide requires the Jelly Bean bootloader from ASUS, and will assume you already have installed it.
WARNING: if not, follow this guide before upgrading your TF201.
WARNING: for now only stock android works. custom "roms" kernels need to be patched. i'll post them here ASAP.
NOTE: in android /dev/mmcblk0p8 is /dev/block/mmcblk0p8 and it's mounted over /data
NOTE: your browser can add an extensions to the downloaded files, if yes remove them.
ERROR: sorry for my doggish english :( any suggestion/correction is appreciated
ERROR: ubuntu does not work now, we are debugging this.

downloads



step 1


install a linux distro somewhere

pick up an arm root FS of your prefered linux distro.
here you are some links:


the standard way is to extract the tarball to the root of the microsd or the USB stick.
ensure that the partition used is an ext2/ext3/ext4 filesystem.
thanks to root_choooser you can also have your distro inside a disk image or into a subdirectory of another device ( like the internal mmc ).
for extract a tarball you have to change the current directory to the root of your new linux system ( the USB stick for example ). then if the tarball ends with "gz":
tar -xzf /path/to/the/downloaded/tarball.tar.gz
else if ends with "bz" or "bz2":
tar -xjf /path/to/the/downloaded/tarball.tar.bz
now you have to configure it according to your chosen distro.

step 2


apply the root_patch

after you had set your distro you have to apply a root patch.
the root_patch is a distro-independent tarball that contains firmware, kernel modules and an alsa configuration file.
you have to change directory where you have extracted the previous tarball.
then extract the root_patch as follow:
tar -xzpf /path/to/root_patch.tar.gz
after this you should apply a distro-related patch. this is needed since any distro has it's own way to handle config files and modules options.
lets say that you have gentoo. always from the root of your distro you have to run this:
tar -xzpf /path/to/gentoo.tar.gz

step 3

configure kernel_chooser

you have to configure kernel_chooser before flashing it.
kernel_chooser read every file inside the /data/.kernel.d directory and parse it as follow:
NAME/DESCRIPTION
blkdev:kernel:initrd
CMDLINE
where:
  • NAME/DESCRIPTION is an optional description for the boot entry
  • blkdev is the device where other files are sotred
  • kernel is the kernel to boot
  • initrd is an optional initial ramdisk
  • CMDLINE is an optional commandline for the new kernel
if no CMDLINE is found or it's length is 0, the default one will be used,
if it starts with a '+' sign the rest of the CMDLINE will be appended to the default one.
otherwise CMDLINE will be used as new command line for the booted kernel.
keep in mind that the TF201 stock kernel require at least this string for boot:
"mem=1022M@2048M mem=1022M@2048M tegra_fbmem=4098560@0xabe01000 gpt"

kernel_chooser support also an optional default entry. the /data/.kernel file.
if this file exist you have 10 seconds to stop the default boot.

WARNING: kernel_chooser don't have an android initrd built in like root_chooser. you have to create a config for boot android too.

if you want to be able to boot android you have to create the related entry in the kernel.d directory.
let's say that you have the android_kernel and android_initrd under the /data/boot directory.
your /data/.kernel.d/android file will be:
android
/dev/mmcblk0p8:/boot/android_kernel:/boot/android_initrd
ok, lets make some example.
if you have your linux distro on your microsd and you have the kernel in /data/boot/zImage you should have a file named /data/.kernel.d/mylinux with this content:
my linux distro from my microSD
/dev/mmcblk0p8:/boot/zImage
+root=/dev/mmcblk1p1 rootwait
if you have your linux distro on an usb stick with the kernel on the /folder directory of the same device, your file /data/.kernel.d/anyname should looks like:
my linux distro from my USB stick
/dev/sda1:/folder/zImage
+root=/dev/sda1 rootwait
explication of some terms:
the "rootwait" kernel parameter tell to the kernel to wait for the specified root device, this is required for booting from USB stick and microsd because they are recognized after the kernel tries to mount the root device.
the "root" kernel parameter tell to the kernel what is the root device. this should point to the device containing your linux distro.

note for ubuntu users: please read carefully the Step 4.

from v3 we support a background image :)
you have to put your background in /data/background.bmp.
it MUST be in bitmap format with size of 1280 x 800 and 24bit of depth.
here you are a screenshot. ( colors are inverted )

Step 4

configure root_chooser


if you have installed your linux distro in the root directory of a device ( usually usb stick or microsd ) you can skip to step 5, except if you use ubuntu, which refuse to start without root_chooser due to some extra-userfriendly-feature. ( thanks to Vanryu )

if you have extracted the tarball into a sub directory of a device or you have an ext4 dd image of a root FS you must use root_chooser as initramfs.
the trick is that kernel_chooser can optionally load an initial ramdisk beside your kernel.
i made root_chooser, which read configuration from the kernel command line.
the syntax is the following:
newroot=blkdev:root_directory_or_image:init_path,init_arg1,init_arg2
where:
  • blkdev is the block device where your penguin lives
  • root_directory_or_image is the path to the directory where you extracted the tarball or the path to the dd image of a ext4 partition.
  • init_path is the path to the init process
  • init_arg1,init_arg2,init_arg3... are optional parameters for the init_path program
let's do some example!
i have a gentoo chroot under /data/gentoo, a working kernel in /data/boot/zImage and the root_chooser initrd in /data/boot/root_chooser. my /data/.kernel.d/gentoo will be:
gentoo
/dev/mmcblk0p8:/boot/zImage:/boot/root_chooser
+newroot=/dev/mmcblk0p8:/gentoo:/sbin/init
if i want a rescue entry:
gentoo ( rescue )
/dev/mmcblk0p8:/boot/zImage:/boot/root_chooser
+newroot=/dev/mmcblk0p8:/gentoo:/sbin/init,single
i have an ext4 dd image of a working ubuntu in /data/media/ubuntu.img ( /data/media = /sdacrd on our TF201), the usual kernel in /data/boot/zImage and root_chooser v6 in /data/boot/root_chooser6.gz, my kernel_chooser config file will be:
ubuntu from dd image
/dev/mmcblk0p8:/boot/zImage:/boot/root_chooser
+newroot=/dev/mmcblk0p8:/media/ubuntu.img:/sbin/init

let's say that you have ubuntu on the root of your microSD, you must use root_chooser anyway, due to some ubuntu's extra-userfriendly-features. ( this is a workaround IMHO ).
you'll have:
 ubuntu from SD
/dev/mmcblk0p8:/boot/zImage:/boot/root_chooser
+newroot=/dev/mmcblk1p1:/:/sbin/init

step 5

flash kernel_chooser

WARNING: ensure to have created the android config and files.

first of all you have to choose what method to use for flash the image.
  • fastboot - it's an open source program that uses an open source protocol
  • nvflash - it's a closed source program that writes partitions using nvidia custom stuff
personally i prefer fastboot since i can look at his source code if i wish, while when you launch nvflash everything is a secret....
download the image :
now connect you TF201 to your pc and shut it off. if you choose to use fastboot:
  1. take your TF201
  2. keep pressed the volume down button
  3. press the power button until the tablet vibrates
  4. release the volume down key after you see 4 icons
  5. press volume down until the green USB icon being selected
  6. press volume up
  7. go to your pc
  8. open a shell and type fastboot -i 0x0b05 flash boot /path/to/fastboot.blob
  9. you should see a blue bar on your TF201
if you choose to use nvflash:
  1. take your TF201
  2. keep pressed the volume up button
  3. press the power button until the tablet vibrates
  4. release the volume up button after 5 seconds
  5. go to your pc
  6. open a shell and type wheelie --blob your_secter_blob_file.bin
  7. then run nvflash -r --download 6 /path/to/nvflash.LNX


Step 6

reboot

reboot you TFP. we are done! ;)

TODO

notes for chroot into arch linux
tegra video drivers instructions
give a look to opentegra
ubuntu and arch_linux root_patches.

NO VIDEO AVAILABLE FOR v7, can someone make this ?


72 comments:

  1. Hello, I'm really interested in your post to install linux on my prime. But it seems, except the first two links, the other links to download files are unavailable. Could you tell me where can I get those files? Thanks in advance :)

    ReplyDelete
    Replies
    1. hi azssa, thanks for your corection.
      we had make some mistake on the github repo....:P
      i fixed the links, thanks again ;)

      PS:
      i upgraded the how to the kernel_chooser v7 ;)

      Delete
  2. Hey man, great stuff. You are as of now my personal hero.
    I've been struggling with ubuntu tho, and after a loooong while I found out the answer right here on your blog, the "read on" section. Turns out that for ubuntu to boot you need to use root chooser, even if it is on the root of the sdcard. The following .kernel.d is an extract from that section, and it totally works. (You should update the post to save people some pain.)

    ubuntu
    /dev/mmcblk0p8:/boot/zImage:/boot/initrd.gz
    +newroot=/dev/mmcblk1p1:/:/sbin/init

    ReplyDelete
    Replies
    1. thanks for the congratulations :)
      i fixed the post, can you double check it? i don't have ubuntu on my prime.
      if you can confirm that the this howto now works for ubuntu too i can remove the "read on" article, which is making many confusions to other users.
      thanks again for pointing that out!

      Delete
  3. I installed ubuntu on my prime successfully by your great works! Thanks!
    One problem is that I didn't have any user account making process so I can log-on only from guest account.
    I spend a few days to solve this, but i couldn't find any solutions.
    So now I'm trying to use gentoo or arch linux on my prime.
    Anyway, thanks again for your great works! :)

    ReplyDelete
    Replies
    1. hi azssa, i have to study a lot in these days, i have to make the ubuntu root_patch.
      btw, for adding an user, chroot into ubuntu from android, and, as root:
      # useradd -m username
      # passwd username
      keep me updated :)

      Delete
  4. Hi, thanks for your great work! I managed to get ubuntu 12.04 working but ran into problems getting the nvidia tegra3 driver working as described on the gentoo wiki http://wiki.gentoo.org/wiki/Asus_Transformer_Prime

    So I am having a go using gentoo now, but I have run into a problem, I am not as good in gentoo as I am in ubuntu; I follow your guide above, I can log into gentoo as root, but I have no way of getting the wifi running! Some guides suggest using emerge but, catch 22, I need wifi running before I can emerge! Is there a tool built into gentoo I can use at the terminal to configure my wifi, essid, etc? Thanks!

    ReplyDelete
  5. hi chicky,
    i don't suggest you to use gentoo for the first time in a experimental environment like this.
    btw, you have to check if the kernel recognize the wifi device.
    From terminal: iwconfig
    you should see a network device recognized as wireless nic. if not you have to look deeper in the tf201 gentoo wiki.
    for connect to a wireless network look in the gentoo x86 handbook ( search it on google ).
    anyway i suggest you to back into ubuntu and debug the whole thing from here.
    take a look to /var/log/Xorg.0.log, if you don't understand the problem please pastebin that file and i'll help you.

    keep me updated ;)

    ReplyDelete
    Replies
    1. Hello again! It has been a long time since I was able to try Ubuntu on the transformer prime. I have Ubuntu 12.04.02 running now with gui and tried extracting the nvidia_driver and config tar gzipped files from the cardhu driver suite on nvidia's website, as per the gentoo wiki. I think the driver is loading, as there's lots of positive tegra comments here -> http://pastebin.com/ce2Xzvyr

      However, three things lead me to think I haven't done things quite right;
      1) neither glxgears nor glxinfo appear to work in ubuntu:
      user@localhost:~$ glxgears
      Error: couldn't get an RGB, Double-buffered visual
      user@localhost:~$ glxinfo
      name of display: :0
      Error: couldn't find RGB GLX visual or fbconfig
      2) I can't change the brightness using the keys on the keyboard anymore - I could before
      3) I would expect the UI to be snappier with the Nvidia Tegra driver, I am still getting the same sluggish UI performance as befoe.

      You have already been so instrumental in getting many of us this far, any idea what I may be doing wrong with the nvida tegra drivers?

      Delete
    2. You're right, it doesn't work...
      But your Xorg.0.log looks fine...
      Except for the used VT.
      Can you put the "vt01" in front of the X command ?
      Look at the gentoo wiki, we say that you have to use VT01.
      Another thing that could be a problem is the ABI version.
      From the log I saw that you are using the Xorg with ABI 11 and the tegra drivers with the same versions. Can you check that /usr/lib/xorg/modules/drivers/tegra_drv.so points to the tegra_drv.abi11.so file ?
      Thanks for making this hack better ;)

      Delete
    3. Thanks for the swift reply! I'll go through what I have tried:
      > Can you put the "vt01" in front of the X command ?
      I modified my /etc/X11/xinit/xserverrc so now the last line reads "/etc/X11/Xsession vt01"
      >Another thing that could be a problem is the ABI version.
      I noticed when I did "cd /usr/lib/xorg/modules/drivers; ln -s tegra_drv.abi13.so tegra_drv.so" from the gentoo wiki, I would get an error appearing whilst loading X: "(EE) module ABI major version (13) doesn't match the server's version (11)"
      I modified the above to "cd /usr/lib/xorg/modules/drivers; ln -s tegra_drv.abi11.so tegra_drv.so" and the error message went away.

      After doing these things, I can now run glxgears and glx_info again, however when I looked over lilstevie's video again to see what kind of things he had (from here -> http://androidroot.mobi/2012/06/17/ubuntu-on-the-transformer-prime-preview/ ) I noticed the following:
      lilstevie runs a tool called "es2_info" and gets the following information "GL_RENDERER : NVIDIA Tegra 3". When I run the same command, I get "GL_RENDERER: Software Rasterizer".

      Did I do something wrong when unzipping the nvidia_driver package? I read on the Nvidia Developer documentation from -> http://developer.download.nvidia.com/devzone/devcenter/tools/files/l4t/r16_Release_v1.0/Tegra_Linux_Driver_Package_Documents_R16.tar , in the Tegra_Linux_driver_Package_Developers_Guide.pdf inside the tar file, on p29/p30 under the heading "OPENGL/EGL Gears Test Application" it suggests the following:
      Manually create the sym-links in the target root file-system for /usr/lib/libEGL.so.1 and /usr/lib/libGLESv2.so.2.
      $ mv /usr/lib/libEGL.so /usr/lib/libEGL.so.1
      $ mv /usr/lib/libGLESv2.so /usr/lib/libGLESv2.so.2
      $ ln -s /usr/lib/libEGL.so.1 /usr/lib/libEGL.so
      $ ln -s /usr/lib/libGLESv2.so.2 /usr/lib/libGLESv2.so

      Which I also did too. Any ideas?

      Delete
    4. the big difference between lilstevie and us is the kernel version.
      he use the 2.6 kernel while we are using the 3.1.10 kernel.
      we made this choice since tegra drivers require the 3.1.10 kernel from version 15 ( if i remember well ) and android JB require it too.
      you can patch the 2.6 kernel to be kexec'd and install the version 14 drivers, which is the same that are using lilstevie.
      thanks to kernel_chooser you can still have JB because you can switch the kernel on boot.
      or you can work harder to get them working with the 3.1.10 kernel and the lastest nvidia tegra drivers.
      now i can't help you so much, we are developing android_chooser, so i can't test the drivers on ubuntu.
      please let us known what is your choice.
      back to a stable version or working for got the new one work properly?
      red pill or the blue one? :)

      Delete
    5. The fact that you can run glxgears means that you're not using nvdidia's drivers, as they don't have support for GLX...

      Nvidia needs to run on vt1... However even though you set up the X server to use it, lightdm (the login screen) is by default configured to use vt7 and up. We need to have it start on vt1 instead. Add the following to the BEGINNING of your /etc/lightdm/lightdm.conf file:



      [LightDM]
      minimum-vt=1
      maximum-vt=1

      Delete
  6. Hi Great work!!!! I must say....however please I have installed Ubuntu but i cannot add a user. I am trying to chroot to ubuntu from within android but I'm not able to mount the sd card as in the instructions. How can I add a user....maybe if you can post the syntax necessary to mount the sd card and chroot into ubuntu through android. Thanks a lot anyway for the great work.

    ReplyDelete
    Replies
    1. Are you root?
      Do you have busybox installed ?
      What command do you sue?
      You should mount with "mount /dev/block/mmcblk1p1 /anywhere"
      And then chroot with "chroot /anywhere"
      Sorry for the little reply but i 'm writing from phone.
      See you!

      Delete
    2. Thanks for replying so soon.
      I am root, I tried the "su mount /dev/block/mmcblk1p1 /data/mmc" command and i am getting a message that "permission denied" error.
      This however is more than I was getting last night anyway so some progress is being made. I think it may be the Android Terminal Emulator i am using.
      Thanks for responding though.
      Cheers!

      Delete
    3. Again from my phone buddy :)
      You should use su and then mount.
      Su makes you root, it's different from sudo.
      Bye!

      Delete
    4. Hi
      When i do the su then mount i get the following response:
      Usage: mount [-r] [-w] [-o options] [-t type] device directory
      I know you are being very patient and considerate by responding so
      Thanks again

      Delete
    5. Is there any way to add users from my ubuntu pc directly to the ubuntu installation on the sd card?

      Delete
    6. Ah! You're right!
      If I remember well android mount require the filesystem type argument.
      Try to give -text4 to the mount command.
      Good luck ;)

      Delete
    7. I used the "-t ext4" in the mount command and i got a message, mount: Device or resource busy.

      Delete
    8. It means what it say :)
      Probably the sdcard it's yet mounted.
      Give a look to the 'df' command.
      Bye!

      Delete
    9. Hey
      Thanks alot for all your help. I got it working perfectly. The mistake i was making was that i had the sd card partitioned into two. the second partition being fat32 so i can also store music to be accessed between the android and ubuntu. I reformatted to ext4 the entire partition and in the mount it was necessary to include "-t ext4" in the command. and everything worked out! Thanks again. so you should update the instructions to include the "-t ext4" for the sd card to be mounted.
      Cheers!

      Delete
    10. Hey,
      i had the same Problem with the mounting. It worked with "mount -t ext4 bla bla" but on the next step "chroot /data/mmc /bin/su" i get Permission denied. ("chroot: cant't execute '/bin/su': Permission denied")
      how do i change the permission (im new to linux)?? :p

      Delete
    11. found the problem... I extracted and copied all data from my ntfs partion, so everything had no rights...

      Delete
  7. What do you do when the USB port is broken and you can't use it anymore? I'm only able to load my tablet but I'm not able to use the USB Ports (neither Dock nor Tablet) or SD Card slot or speaker anymore... Only MicroSD works...

    ReplyDelete
    Replies
    1. i can answer you that there is many way of sharing data over the network though your wifi router.
      but you need to use fastboot....this can be done only with a working USB connection....
      the only other thing you can try it's to use jtag, but it's for write directly on the emmc, nothing related to fastboot, nvflash and others.
      anyway you can flash you blob files writing them to /dev/block/mmcblk0p4, but this is VERY VERY DANGEROUS for you, this because if something goes wrong you will able to use fastboot only from USB...
      btw, use the IRC channel on freenode, maybe there are someone that known more about it: #asus-transformer

      good luck!

      Delete
    2. On the IRC sadly there is no one responsing...

      Delete
  8. Hi tux_mind,
    I followed your instructions but I have a problem. When I try to boot Gentoo the screen goes blank after the bootloader, then the tablet reboots in kernel_chooser. Any idea?

    I am using kernel v7 from your repo on androtransfer and a 32 GB microSD card with one ext4 partition.

    Android boots normally.

    ReplyDelete
    Replies
    1. Oh stupid me... I haven't used Gentoo in so long that I forgot about the bootstrap! Sorry for the silly question.

      Delete
  9. This comment has been removed by the author.

    ReplyDelete
  10. Hello, thanks for your great work.
    I'll try to compile the kernel according to the gentoo wiki .
    But I could not get JB15.patch.
    Could you tell me where can I get JB15.path?

    ReplyDelete
    Replies
    1. we have to update a lot of things.
      i will resume to working on it after my exams.
      for clone the kernel from our kernel repo:
      git clone git://asinus.buridanica.org/tf201-kernel.git
      it's yet patched and ready to compile.
      feel free to contact me via email.

      Delete
  11. Thank you for your reply.
    I was able to download from the repo and compile the kernel.
    > feel free to contact me via email.
    Thank you! I will contact you via email if I have any questions about that.

    ReplyDelete
  12. Hi,
    I need your help,
    I saw your post regrading the TF201 & WiFi dongle.
    I'v also a TF201 and a WiFi dongle, RT2870/RT3070 Wireless Adapter,so the driver is rt2800usb.
    I have the original stock kernel,i rooted using motochopper.
    how can i get it to work?

    Thank for your help,
    Hen

    ReplyDelete
    Replies
    1. i suggest you to use our kernel repo, the stock one gives you some compilation errors.
      git clone git://asinus.buridanica.org/tf201-kernel.git
      anyway after you got the kernel sources just:
      cd tf201-kernel
      make menuconfig
      enable as Module MAC80211
      enable as Module RT2X00
      enable as Module RT2800USB
      save and exit
      make -j4 modules
      mount -orw,remount /
      find . -iname "rt8200usb.ko" -exec cp "{}" "/system/lib/modules/" \;
      mount -oro,remount /
      insmod /system/lib/modules/rt8200usb.ko

      please contact me via email if you need more help.

      glad to help ;)

      Delete
  13. Hello,

    I think I'm almost all of the way to having a running linux install on my TFP, but I'm haivng a problem with root_chooser. When it attempts to mount /data, I get this line: [ERROR] mounting /dev/mmcblk0p8 on "/data" - Invalid argument. I suspect it's because my tablet is encrypted.

    Do you know of anything I can do to make it work? Would it be possible to read the root_chooser config from a different location?


    Thanks!
    John

    ReplyDelete
    Replies
    1. kernel_chooser ( i think you are using kernel_chooser, not root_chooser, due to the error string ) uses a define as blockdev source ( next version will have an auto-detect function ), so isn't possible to change the source ( /dev/mmcblk0p8 ) unless you recompile kernel_chooser by yourself.
      anyway.
      from the mount(2) manpage:
      EINVAL source had an invalid superblock. Or, a remount (MS_REMOUNT) was attempted, but source was
      not already mounted on target. Or, a move (MS_MOVE) was attempted, but source was not a
      mount point, or was '/'.
      kernel_chooser mount call is that 'mount(DATA_DEV,"/data","ext4",0,"")'.
      so the only option for that error it's the invalid superblock, which includes your theory of an encrypted partition.
      after diffing a little with the android fstab i learned that android can encrypt partition using a very dummy method.
      it puts the key in the end of you encrypted partition...anyone can read you data :P
      btw, can you pastebin your android fstab ?
      please contact me via email, so we can solve this issue together :)
      massimo[dot]dragano[at]gmail[dot]com

      happy hacking ;)

      Delete
    2. oooops.
      i misunderstand the encryption process.
      @all: we are working to mount you encrypted device as well...

      Delete
  14. Hello Dragano,

    Any news on this project?

    Greetings Jos.

    ReplyDelete
    Replies
    1. hi jos,
      as i write in our ML i made a kernel repo here: https://github.com/tux-mind/tf201-kernel.
      that kernel is the one that should be fine for every linux distro.

      for the hibernation trouble i haven't tried yet.
      i gave an exam a few hours ago and i have another on 12/9, 18/9 and 26/9 :(

      maybe you can help me by giving me the logs of your device, when it goes to sleep and stucks here.

      for the "universal arm bootloader" we will resume working on october.
      as usually, any help it's appreciated! :)

      a few months ago we got a working bootloader that can boot ubuntu, archlinux, gentoo, stock-android and cyanogenmod on the same device.

      our "workaround" were to make an image of the /data and /system partition for every android "rom".
      then android_chooser will change android fstab just a moment before booting.

      this is required because:
      1 - every android rom have a different /system ( what it's usually called ROM it's a /system image imho )
      2 - from android 4.2 /data changed it's layout.

      *some* roms will "wipe" your /data partition on boot if layout it's different from their expected one.
      i lost all my stuff for this trick...

      i'm looking forward to resume working on this wonderful project, but i'm very busy ATM.
      if someone want to carry on my work just give a look to my github, you'll find everything there :)

      Delete
  15. Hi,
    Really great job! Ubuntu 12.04 is working but, it runs not too fast. Is there any chance to run it from internal SD. Ubuntu is placed in /data/ubuntu catalog and I tried to star it from mmcblk0p8 partition,writting ubuntu file as follows:
    /dev/mmcblk0p8:/boot/zImage:/boot/initrd.gz
    +newroot=/dev/mmcblk0p8:/ubuntu:/sbin/init
    but it hangs up on screen with 4 penguins.
    What is mmcblk of sdcard0?

    Congratulations and
    best regards
    Robert

    ReplyDelete
  16. Hi tux_mind,

    I have managed to get Ubuntu to boot, but my CM10.1 installation gets stuck at "starting applications", probably because now it's no longer using CM10.1 kernel, but stock kexec patched kernel. Please can you help me in how to patch the CM10.1 kernel with kexec? I have been unable to find a clear kexec patch for tf201 4.2 kernel.

    ReplyDelete
    Replies
    1. hi Label,
      for make the stock kernel kexecable and make it able to start new kernels ( host kexec kernel )
      look at the last 5 commits of day 23/8/13 from the tf201-kernel repo: https://github.com/tux-mind/tf201-kernel/commits/master.

      thanks for your contribute ;)

      Delete
  17. I think I found a way to fix the intermittent wifi issue!

    I saw that the nvram_4329.txt on Android and Linux were different, so I edited the linux one to match the Android one much much closer.

    This worked for me, even after several reboots. Please will somebody update the xda post with this information? I can't, I don't have enough posts yet.

    Below is the file:

    # bcm94329sdagb board
    # $Copyright (C) 2008 Broadcom Corporation$
    # $id$

    sromrev=3
    vendid=0x14e4
    devid=0x432f
    boardtype=0x57e

    # board revision 1.1
    boardrev=0x11

    # boardflags
    boardflags=0x10000200
    #boardflags2=0x00400000

    # specify the xtalfreq if it is otherthan 38.4MHz
    xtalfreq=37400

    aa2g=3
    #aa5g=1

    ag0=0x0
    ag1=0x0

    # 11g paparams
    #pa0b0=5544
    #pa0b1=64307
    #pa0b2=65282
    pa0itssit=62
    pa0maxpwr=72
    opo=0x44444444
    mcs2gpo0=0x8888
    mcs2gpo1=0x8888

    # sel = 1 : 20% evm sel = 2 : 27% evm sel = 3 : 16% evm
    cckdigfilttype=1

    # 11a paparams lowband
    #pa1lob0=6654
    #pa1lob1=63794
    #pa1lob2=65134
    # paparams midband
    #pa1b0=5970
    #pa1b1=63982
    #pa1b2=65122
    #paparams high band
    #pa1hib0=5910
    #pa1hib1=63998
    #pa1hib2=65130

    #pa1itssit=62
    #pa1maxpwr=60
    #opo=0
    #mcs5gpo=0x22222222

    # 11g rssi params
    rssismf2g=0xa,0xa,0xa
    rssismc2g=0xb,0xb,0xb
    rssisav2g=0x3,0x3,0x3
    bxa2g=0

    # 11a rssi params
    #rssismf5g=0x8
    #rssismc5g=0x6
    #rssisav5g=0x0
    #bxa2g=0

    # country code
    ccode=ALL
    cctl=0x0

    # Channel gain adjustments
    #5g_cga=0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0
    #boardnum=2048
    #macaddr=00:90:4c:c5:34:23
    #######
    nocrc=1

    #for mfgc
    otpimagesize=182

    # sdio extra configs
    hwhdr=0x05ffff031030031003100000

    #This generates empty F1, F2 and F3 tuple chains, and may be used if the host SDIO stack does not require the standard tuples.
    RAW1=80 02 fe ff

    #This includes the standard FUNCID and FUNCE tuples in the F1, F2, F3 and common CIS.
    RAW1=80 32 fe 21 02 0c 00 22 2a 01 01 00 00 c5 0 e6 00 00 00 00 00 40 00 00 ff ff 80 00 00 00 00 00 00 00 00 00 00 c8 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 20 04 D0 2 29 43 21 02 0c 00 22 04 00 20 00 5A

    ReplyDelete
    Replies
    1. Just to be clear: the file (in Linux) is /lib/firmware/nvram_4329.txt. This has also fixed the speed of the wifi connection (before, the few times that it was working, it would start at about 12 kbps and then quickly drop to 1kbps or less).

      I'm still working on patching the CM10.1 kernel. I'm thinking it may not necesarily be the kernel per se, but perhaps the android initrd mismatch that caused the failure on "starting apps"... Building CM is tricky: the guide on their wiki was slightly wrong... Will keep you posted.

      Delete
    2. Hey guys is there anyway to do this via windows pc as my hp envy won't run live usb and vmware spitting out smylnk errors. I only want to get ubuntu on my tf201 dual booting with cm10.

      Delete
    3. @Deano: windows is bloated and deprecated lol.
      @Label, news? i had some issue with the WiFi NIC too.

      Delete
  18. Hi, could you tell us how did you build / get kernel image (bzImage) ? Currently trying to boot trusty tahr with no success yet.

    Thanks !

    ReplyDelete
    Replies
    1. just build the kernel as usual with these sources: https://github.com/tux-mind/tf201-kernel

      happy compiling ;)

      Delete
    2. I am very interested to use Ubuntu 14.04 (trusty tahr) on my Transformer Prime, too. However, building the apropriate kernel by myself hasn't been successful yet :-( (I successfully compiled the kernel, however it won't boot ubuntu 14.04)

      As a noob, I have probably made some mistakes. Therefore, I would like to ask kindly for some help:
      1. Can I use your config file under https://github.com/tux-mind/tf201-kernel/blob/master/.config for compiling the new kernel? Or do you suggest to change some settings so that it will work for ubuntu 14.04?
      2. Do you agree that I must compile another kernel version since ubuntu 14.04 use kernel version 3.13 while ubuntu 12.04 use kernel version 3.2?

      By the way I have alsready checked some tutorials like http://xda-university.com/as-a-developer/getting-started-building-a-kernel-from-source. But as a non-developer it's not easy to understand all single steps.

      Many thanks in advance!

      Delete
    3. Hi my friend :)

      you can use my .config for compile the 3.1.10 kernel from my sources.
      other kernels will not work or will partially work. ASUS changes the Linux kernel to support the TF201 hardware.

      for debug what is going wrong pass the following parameter on your kernel command line:
      console=tty1

      ubuntu it's only another linux distro, they have their own init system, but will be stupid to bound a linux distro to a specific version of the kernel. so i suppose that you can use the 3.1.10 kernel with ubuntu 14.04. probably you will have to adjust a little the kernel config but when you got an error search it on google to find out what is missing.

      the best think to do is to try myself, but i broke my TF201 cable and i bought a chinese one from ebay. i can only recharge my TF201 now :P

      happy hacking!

      Delete
  19. Hi, thanks for the great work. Could you provide the patch and the instrcution on how to do it on a custm ROM for the guys with android 4.2? I amreally insterested in trying that in my tablet. cheers

    ReplyDelete
    Replies
    1. Hi Amir,
      my bootloader are quite ROM-independent.

      kernel_choser require a working kernel for your device.
      root_chooser require a default initrd to use it as fallback.
      android_chooser require that android filesystems are stored as ext images on your sdcard ( still a WiP ).

      you can find a good introduction to the project on the github repo: https://github.com/tux-mind/tf201-dev

      read the README files, and the top of the program files ( root_chooser.c, kernel_chooser.c, android_chooser.c ) to understood how my programs works.

      once you learned what them do you are ready to hack your device to let it boot everything :)

      btw ensure to make a recovery of the vital partitions via fastboot/nvflash to have a way to back to stock if something goes wrong.

      feel free to report here your answers and progress, i'll be happy to help you.
      happy hacking.

      Delete
    2. Good, thanks for the info. I am gonna take a look at them ASAP, just wanted to ask if your approach is different from the one reported in the Ubuntu website here : https://wiki.ubuntu.com/Touch/DualBootInstallation

      Delete
    3. No, that method will use the recovery boot to boot ubuntu.
      in that way you will no able to access android recovery and can only have 2 OS.

      with my programs you can have any number of different OS on your phone.
      my method requires kexec, while the ubuntu one not.

      Delete
  20. Hi, any chance of mirroring the files since androtransfer.com is down (permanently)? :)

    ReplyDelete
    Replies
    1. Yeah! Could you please put the files back up on like somewere else?? :3

      Delete
    2. oh, really?
      i have to contact androtransfer to get a copy of the files and put them somewhere.

      do you have any clue of a free and easy webstorage service ?

      Delete
  21. I want to say thank you for your great work as well! However, one option is really missing and I would like to ask if it's possible to include it in a new version:

    If you successfully install a multi boot system on the TF201 by using kernel_chooser according to your instructions, you can choose between the different entries in the new kernel_chooser boot menu. However, you must use a keybord dock in order to confirm your choice. In this connection, I would really appreciate if the hardware buttons could be used alternatively in the future as well. This would be a benefit if

    a) you are on a trip for example and you want to use only your tablet
    b) you have troubles with the recognition of your dock (it seems that several TF201 users have experienced troubles because the keybord is sometimes not properly recognized)

    Although Volume Down button seems to work by moving the selection one step down in the kernel_chooser menu, it is currently not possible to start the subsequent booting process by using another button.

    ReplyDelete
    Replies
    1. yeah, we tried to use the volume buttons for make you able to choose without the keyboard, but we failed.
      we didn't found a way to make ncurses recognizing those inputs as valid keycodes, and kernel_chooser run over ncurses, so there is no chance for kernel_chooser to work without the keyboard.
      anyway linux it's linux, there always another way, but the time to find that is missing :(

      i modified the current programs to make them more organized, but i got a strange error with ncurses, after that i break my cable and i cannot debug this issue.

      sorry for the missing feature, if i will work again on this project i will try to make it work.

      Delete
  22. Hey Dragano, NIce work. Any chance you found a new place to host the files? Realy interested in trying this out.

    Also I saw a comment from a user installing on HairyBean 2.31 does that mean you can use other modified bootloaders? or do I need to go back to the stock Jelly Bean Loader?

    ReplyDelete
    Replies
    1. AFIK the bootloader it's locked, and cannot be changed. we can change the initrd. with kernel_chooser you can use any initrd you want, which means that you can use any ROM you want. anyway android will assume that your /system ( the core of your ROM ) it's on a particular partition, i've wrote another program called android_chooser, which will mount an ext image file over a loop device and let android think that this device is the /system one, making you able to boot ant ROM you want. android_chooser will also allow you to specify a custom data and cache partition.

      i didn't found anything on the web that allow me hosting my files for sharing them with anyone. all free services like Google Drive, Dropbox, Box, Etc... , are designed for let you access your files from your devices, not to share them to the whole internet. i need a server or an host with no space limit.

      anyway i read an article about using dropbox and github together.. i'll update you soon.

      Delete
    2. Thank you so much for getting the files back up. I really appreciate you sharing all your hard work!

      Delete
  23. links updated, moved everything on dropbox.

    let me known if there is any problem.

    ReplyDelete
  24. Hey! Is there any way to use this with some KitKat rom (or maybe with the next Android release)?
    Thank you again ;)

    ReplyDelete
  25. Hi, I was wondering if the sleep / hibernation issues (never wakes up) were ever fixed? I installed Xubuntu well over a year ago (cannot remember where from) but i remember it being an issue in most distributions of Linux for the TF201. I would much rather just run Linux on the device but having to boot and shutdown the device whenever i want to use it is not fun. Also is there a way of underclocking the processor when not under heavy load as the battery performance under Linux is alot poorer than in Android. Thanks alot for all your work on this project!

    ReplyDelete
  26. Hi I can make a video for you, I just wanted to know if this software is up to date or if I have to find updated software first, Let me know if you would like me to make a video for you, I can also make other videos if you'd like, just let me know

    ReplyDelete
  27. Hi, Thanks for this great job
    any update to run a more recent kernel and/or ubuntu version ?

    Can anyone give a list to build a more recent kernel for this device ?

    Regards,

    ReplyDelete
  28. This is a really good job and I'm very close to getting it working.

    The problem I have is that when I select ubuntu from the bootloader menu, it reloads the bootloader. I then can select android and it boots to android.

    ReplyDelete
  29. Hi, Thanks for this great job! I'v done all the steps, but my TP is showing a red box with a message: "An unrecoverable error ocurred! new_item - Unknown error -2... press to continue..." and does not boot anything (nor android neither ubuntu!)! Please help! My config: tf201 JB 10.4.2.18, unlocked! thks again! (sorry my english)

    ReplyDelete