[DEV][WIP] xubuntu on tf300tg 0.1.2 (updated 130408)

Search This thread

schrdlu

Member
Feb 13, 2011
39
68
Yeah, I did notice that the kernel looks for the /data/media/linux/.img for a last effort. I was thinking on doing the same.

I will try to upload a working rootfs .img sometime in the week-end. Also it seems that both of you are on a tf300t rather than a tg. Am I right ? If so I'll try other options for next version of the kernel.
 

ColMustard

Senior Member
Jan 28, 2012
237
68
North of Boston, MA
Re: [DEV][WIP] xubuntu on tf300tg 0.1.0

I will try to upload a working rootfs .img sometime in the week-end. Also it seems that both of you are on a tf300t rather than a tg. Am I right ? If so I'll try other options for next version of the kernel.

Yes that's correct, I'm on a tf300t. Let's see if the rootfs.img works as a better option.

Sent from my TF300T using Tapatalk HD
 

Keshukas

Senior Member
Aug 22, 2010
151
50
I will try to upload a working rootfs .img sometime in the week-end. Also it seems that both of you are on a tf300t rather than a tg. Am I right ? If so I'll try other options for next version of the kernel.

OK

dd if=/dev/zero of=rootfs.img bs=1MB count=0 seek=4096 ( 4GB - 4096, 8GB - 8192 )
mke2fs -F rootfs.img
sudo mount -o loop rootfs.img /mnt
sudo tar -C /mnt -zxf xubuntu_tf300tg_rootfs-0.1.0.tar

and ..... copy /data and so on

sudo umount /mnt

flash kernel, reboot and Hope that starts

Or I think we can use directory /data/linux ( internal storage ) to untar xubuntu_tf300tg_rootfs-0.1.0.tar
I relay hope Rabit Kernel luking for linux or ubuntu directory
 
Last edited:

schrdlu

Member
Feb 13, 2011
39
68
Yes that's correct, I'm on a tf300t. Let's see if the rootfs.img works as a better option.

Sent from my TF300T using Tapatalk HD

Here it is :

http://d-h.st/Rts

66626880092ef7590e41f304bfcd2b0d xubuntu_tf300tg_rootfs-0.1.0.img.lzma

Decompress and rename into linux/rootfs.img in internal storage (/data/media/linux/rootfs.img)

Remove any sdcard that may have a linux partition and reboot.
 

Keshukas

Senior Member
Aug 22, 2010
151
50
Re: [DEV][WIP] xubuntu on tf300tg 0.1.0

uploadfromtaptalk1363451198107.jpg

:(

I think we need recompile kernel with some patch for TF300T to boot xubuntu

Can't boot android with this kernel

Sent from my ASUS Transformer Pad TF300T using xda app-developers app
 
Last edited:

matonka007

Senior Member
Mar 22, 2011
220
48
Žatec
Here it is :

http://d-h.st/Rts

66626880092ef7590e41f304bfcd2b0d xubuntu_tf300tg_rootfs-0.1.0.img.lzma

Decompress and rename into linux/rootfs.img in internal storage (/data/media/linux/rootfs.img)

Remove any sdcard that may have a linux partition and reboot.

Working very nice. Booting fine to xubuntu and android too. Have CleanRom. For me wifi do not work.(in Xubuntu) Big thumb up for you, good work, Xubuntu is good system. If you need testers I'm here :))
 
  • Like
Reactions: schrdlu

schrdlu

Member
Feb 13, 2011
39
68
Working very nice. Booting fine to xubuntu and android too. Have CleanRom. For me wifi do not work.(in Xubuntu) Big thumb up for you, good work, Xubuntu is good system. If you need testers I'm here :))

Thanks. At last some good news ! I was beginning to worry...

If you just unpacked the rootfs.img and did not copy files from /system and /data (cf. first post), it's normal that wifi does not work. The wifi module is loaded before android /system and /data are mounted, and the firmware and nvram of the wifi chip are there.

To enable it for the current session : once logged in, type in shell "sudo rmmod bcm4329;sudo modprobe bcm4329". Not sure it covers all variants of tf300tg since the boot.img supports a few different wifi chips. You can also try "sudo modprobe bcmdhd" or "sudo modprobe bcmdhd_34. Tell me.

And if it works with modprobe, you can enable it for real, by copying system/vendor and system/etc from /dev/mmcblk0p1 to /system, and data/misc from /dev/mmcblk0p8 to /data. You first will have to unmount /system and /data where mmcblk0p1 and mmcblk0p8 are already mounted and remount those two elsewhere.

Also, can you tell me if you are on a tf300t or tf300tg ?
 
Last edited:

schrdlu

Member
Feb 13, 2011
39
68
View attachment 1809694

:(

I think we need recompile kernel with some patch for TF300T to boot xubuntu

Can't boot android with this kernel

Sent from my ASUS Transformer Pad TF300T using xda app-developers app

Well, I spent some time this evening on the different bootimg from tf300tg stock, from rabit, from ubuntu nexus 7... And concluded that I will have to spend some time working on kernel and initrd. Until then, and if you have had some success with rabit's ubuntu, you may try my rootfs with his boot image. I have had some problems with it and internal microsd, but it mostly worked on the dock' sd.

Also, if you are not on stock android (or cleanrom), don't expect to be able to boot into android. Most notably I didn't even look at cm10 (is there a tg' version somewhere ?) and it seems that kernels / initrd are not compatibles.
 
  • Like
Reactions: ColMustard

ColMustard

Senior Member
Jan 28, 2012
237
68
North of Boston, MA
Here it is :

http://d-h.st/Rts

66626880092ef7590e41f304bfcd2b0d xubuntu_tf300tg_rootfs-0.1.0.img.lzma

Decompress and rename into linux/rootfs.img in internal storage (/data/media/linux/rootfs.img)

Remove any sdcard that may have a linux partition and reboot.

Now we're getting somewhere. Boot works for both xubuntu and CROMI 3.4.4, however there's no wifi in xubuntu. Might have a look at ArchLinux to see which driver they used for the wifi which did work for me on my TF300T. This is a much better solution with the rootfs.img.

Thanks for your efforts.
 

matonka007

Senior Member
Mar 22, 2011
220
48
Žatec
Thanks. At last some good news ! I was beginning to worry...

If you just unpacked the rootfs.img and did not copy files from /system and /data (cf. first post), it's normal that wifi does not work. The wifi module is loaded before android /system and /data are mounted, and the firmware and nvram of the wifi chip are there.

To enable it for the current session : once logged in, type in shell "sudo rmmod bcm4329;sudo modprobe bcm4329". Not sure it covers all variants of tf300tg since the boot.img supports a few different wifi chips. You can also try "sudo modprobe bcmdhd" or "sudo modprobe bcmdhd_34. Tell me.

And if it works with modprobe, you can enable it for real, by copying system/vendor and system/etc from /dev/mmcblk0p1 to /system, and data/misc from /dev/mmcblk0p8 to /data. You first will have to unmount /system and /data where mmcblk0p1 and mmcblk0p8 are already mounted and remount those two elsewhere.

Also, can you tell me if you are on a tf300t or tf300tg ?

I am on TF300T and sudo rmmod bcm4329;sudo modprobe bcm4329 showed me availible WIFIs but cant connect do not know why, going to delete password in router and report :)

EDIT: It show me networks but can't connect with password to securited network - WPA2 personal, trying next...
 
Last edited:

Keshukas

Senior Member
Aug 22, 2010
151
50
Ok i tray and tray with yours kernel - no progress. Problem - main tf300t heave android 4.2 (updated)

Internal memory is in /data/media/0/
 

ColMustard

Senior Member
Jan 28, 2012
237
68
North of Boston, MA
Thanks. At last some good news ! I was beginning to worry...

If you just unpacked the rootfs.img and did not copy files from /system and /data (cf. first post), it's normal that wifi does not work. The wifi module is loaded before android /system and /data are mounted, and the firmware and nvram of the wifi chip are there.

To enable it for the current session : once logged in, type in shell "sudo rmmod bcm4329;sudo modprobe bcm4329". Not sure it covers all variants of tf300tg since the boot.img supports a few different wifi chips. You can also try "sudo modprobe bcmdhd" or "sudo modprobe bcmdhd_34. Tell me.

And if it works with modprobe, you can enable it for real, by copying system/vendor and system/etc from /dev/mmcblk0p1 to /system, and data/misc from /dev/mmcblk0p8 to /data. You first will have to unmount /system and /data where mmcblk0p1 and mmcblk0p8 are already mounted and remount those two elsewhere.

Also, can you tell me if you are on a tf300t or tf300tg ?

Wow, not sure how I missed this post. This worked "sudo rmmod bcm4329; sudo modprobe bcm4329", I now have wifi on my tf300t. Thanks!
 

spenat

Senior Member
Jun 27, 2012
119
26
Oh yes, this is what I've been waiting for! Keep up the good work, sounds reeeealy promising! Will try on my TF300T ASAP and will post results!
 

matonka007

Senior Member
Mar 22, 2011
220
48
Žatec
I found something very interesting, when I am in room when I have WIFI router I can't connect to wifi, but when I go to anoher room everything is fine :eek: internet is fast and stable. When i go back to my room it disconnected me again :D

I do not know why is there this problem.

Now trying to do working sound.
 
  • Like
Reactions: Keshukas

**Menos**

Senior Member
May 27, 2012
136
84
Vinnytsia
Good evening, I have a question, can I set it to a memory card which is located in the docking station. How do I do this?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 23
    *** ABOUT ***

    This is an attempt to build a completely clean installation of xubuntu for the tf300tg (and probably tf300t). Most notably it does not reuse the ac100 ubuntu package.

    I also want it to be as completely documented as possible starting from an official ubuntu repository and kernel source, until everything is working. Which does not mean it is for a complete beginner to reproduce...

    It's not (yet) packaged : you at least need to be able to install a blob for the kernel, and a rootfs to a dedicated partition.

    It's also not yet as cleaned up and documented as I would for the kernel side of things.

    Everything is done on device on (and for) a tf300tg but as been reported to work on tf300t.

    Most of the hard work was done by others. I mostly started from rabit's tf700 ubuntu, and added some insight from cb22 work on arch to get something working.

    *** STATUS ***

    What works :
    - it boots into a clean xubuntu dm/desktop, with wifi (improved), 3g
    - it also boots into android (stock, didn't try cm)
    - 3g also works under android (new)
    - touchpad / touchscreen
    - 3d acceleration (version 16.3 of nvidia drivers)
    - cpu and gpu overclock (respectively to 1,5 GHz and 446 MHz)

    What I know doesn't work, isn't there yet :
    - sound
    - bluetooth
    - some key remapping (esc, alt, ...)

    Many other things I didn't check (sensors ?).

    *** HOWTO install ***

    0. of course you can break many things doing that ; you should have access to nvflash (never had to use it though) and with a recovery installed (I'm on twrp 2.4.3.0)

    1. unpack xubuntu_tf300tg_rootfs-0.1.2.img.lzma to the internal storage and move / rename to linux/rootfs.img (/data/media/linux/rootfs.img)

    1bis. you can change your keyboard layout in /etc/default/keyboard (replace "us" by whatever is your locale)

    2. install the kernel blob using fastboot or "dd if=xubuntu_tf300tg_kernel-0.1.2oc.blob of=/dev/block/mmcblk0p4"

    You should be able to reboot into xubunfu (or android).

    3. log in as guest, from "user and groups" in the "settings manager", add one user, set password, change account type to administrator, add to sudo group (root password wil be asked : root)

    4. logout, then login into your newly created user

    5. open "language support" from the settings manager, and when it says missing locales, either choose install if you want "en" or "ask me later" if you want something else (in which case you can chose to install your own language, and configure them on the "regional format" page ; don't forget to apply system wide on both pages

    6. change root password

    Your second reboot should be more satisfying

    *** HOWTO improve ***

    1. find out what does not work and tell in the thread

    2. understand what is documented bellow and propose correction / evolutions in the thread

    3. don't hope for frequent updates : I do that alongside a more than full time job and tending to a two years old child. Still I will update.

    *** DOWNLOAD ***

    rootfs : http://d-h.st/vYf
    kernel : http://d-h.st/UAy
    misc config files : http://d-h.st/TEZ
    nvidia drivers : http://d-h.st/pwQ

    md5sum :
    4f572c110c3f06f54699c826fed692f4 src-0.1.2.tar.lzma
    249826271f4fadff4352217467e4ed2e xubuntu_tf300tg_kernel-0.1.2oc.blob
    3263de707c2586d1e2177367f067361a xubuntu_tf300tg_rootfs-0.1.2.img.lzma
    cf20b01281be3ef4b6d4631ae5cea67b R16.3.tar.lzma
    15
    Since the original post hasn't been updated in a long time, I think it would be useful for folks to know what works at the moment.

    I currently have a pretty functional system, by following these steps, hopefully it can save folks time in the future.

    I haven't tested the bluetooth, but I can verify wifi, sound, and stuff in general is working quite well.

    I took the kernel from here:
    http://xdaforums.com/showpost.php?p=48413781&postcount=327
    and flashed it into the system using fastboot.

    The kernel is quite cool, it detects at boot and will allow you to boot from usb, micro sd slot, or local filesystem in that order.
    I prefer to use a micro sd card because it feels faster and this way I dont risk too many writes to internal system.
    Also, on amazon.com you can buy a 16 GB samsung ultra fast micro sd card for $13, with 25 mb/s write, 90 mb/s read. That;s definitely faster than the internal disk.
    I took a 16 GB micro sd card and partitioned it into 8 gb (system), 3 GB (home) and 4 GB swap using the gparted linux tool.

    I took the rootfs from here:
    http://xdaforums.com/showpost.php?p=47791204&postcount=284
    and flashed it to the first partition (8 gb), using the dd command. Unfortunately, because the image is only 3.5 GB, that's all the space that will show in that partition.

    After installing xubuntu kernel, you will lose wifi in android. Download script from here and run it in xubuntu to fix that problem.

    http://xdaforums.com/showpost.php?p=47990253&postcount=311

    Graiden05 has done a lot of stuff regarding cpu governor tweaking, can read through the posts to find out.
    I just max out my governor (set to userspace at highest freq) because I don't care about battery life. Install cpufrequtils from the repository and use cpufreq-set
    to set frequency.

    To get flash, I used the info in this post:
    http://xdaforums.com/showpost.php?p=40813881&postcount=129

    I than used the info here to setup my swap as being the third partition on the micro sd card.

    http://www.thegeekstuff.com/2010/08/how-to-add-swap-space/

    If you don't setup a swap space, programs will randomly get killed when you run out of RAM, which is kinda annoying if you want a stable and fast system.

    I than installed java using Ubuntu Software Centre, installing OpenJDK with the plugin option. Afterwards java worked in firefox.

    Also, if you want to access your android files while in linux do this:
    mkdir myandroid
    sudo mount /dev/mmcblk0p8 myandroid

    Now your files will be mounted under myandroid, specifically your files are here:
    cd myandroid/media/0

    I still need to get the key mappings sorted out, and try to get vnc working with my company's wifi but this feels like a regular laptop now.
    I just want to disable the trackpad when a mouse is plugged in, so I dont hit it accidentally.
    11
    *** HOW is it done / rootfs ***

    I did it from ubuntu (rabits') on my tf300tg. Should be doable from another platform. Definitly doable from self.

    As root.

    # unset languages / locales
    export LANG=C
    unset LC_ADDRESS
    unset LC_IDENTIFICATION
    unset LC_MEASUREMENT
    unset LC_MONETARY
    unset LC_NAME
    unset LC_NUMERIC
    unset LC_PAPER
    unset LC_TELEPHONE
    unset LC_TIME

    # mount a cleanly ext4 formated partition (futur root partition)
    mount /dev/mmcblk1p2 /media/p1

    # install initial minimal system
    apt-get install debootstrap
    debootstrap quantal /media/p1 http://ports.ubuntu.com/

    # prepare to chroot
    mv /media/p1/etc/apt/sources.list /media/p1/etc/apt/sources.list.orig
    cp src/sources.list /media/p1/etc/apt/sources.list
    mv /media/p1/etc/fstab /media/p1/etc/fstab.orig
    cp src/fstab_chroot /media/p1/etc/fstab
    mkdir /media/p1/run/user

    # chroot into the new system and mount all special filesystems
    chroot /media/p1
    mount -a

    # download xubuntu (avoiding unity which is recommended by lightdm)
    apt-get update
    apt-get upgrade
    apt-get install xserver-xorg
    apt-get --no-install-recommends install lightdm
    apt-get install lightdm-gtk-greeter
    apt-get install xubuntu-desktop

    # install nvidia drivers and tuned nv.conf
    tar xf R16.3.tar
    update-alternatives --force \
    --install /etc/ld.so.conf.d/arm-linux-gnueabihf_EGL.conf arm-linux-gnueabihf_egl_conf /usr/lib/nvidia-tegra/ld.so.conf 9000 \
    --slave /usr/lib/xorg/modules/drivers/tegra_drv.so nvidia_drv /usr/lib/nvidia-tegra/xorg/modules/drivers/tegra_drv.abi13.so
    ldconfig -v
    update-rc.d ondemand disable

    # change root password to something of your chosing and exit chroot
    passwd root

    # configure touchscreen and touchpad
    apt-get install xserver-xorg-input-multitouch
    exit
    cp src/mtev.so /media/p1/usr/lib/xorg/modules/input
    mkdir /media/p1/etc/X11/xorg.conf.d
    cp src/50-elan* /media/p1/etc/X11/xorg.conf.d

    # change hostname
    # edit /media/p1/etc/hostname and replace tf300tg with your chosen hostname
    # edit /media/p1/etc/hosts and insert a line (second one) with "127.0.0.1 yourhostname"

    # hide the partitions from mmcblk0 (thanks cb22)
    echo 'ENV{ID_PATH}=="platform-sdhci-tegra.3", ENV{UDISKS_IGNORE}="1"' > /media/p1/etc/udev/rules.d/80-hide_tf300tg_partitions.rules

    # change keyboard defaults
    # edit /media/p1/etc/default/keyboard ; replace "pc105" by "asus_laptop" ; you can also change "us" to your locale

    # create mountpoints for system and data
    mkdir /media/p1/system /media/p1/data

    # configure for loading wifi module
    echo bcm4329 >> /media/p1/etc/modules

    #
    cp /media/p1/etc/fstab.orig /media/p1/etc/fstab

    *** HOW is it done / kernel ***

    The kernel source is default asus 10.4.3.9 from asus' website download section. Patched to add cpu overclock from faux's kernel and gpu overclock from motley's kernel (diff file in src.tar.lzma).

    Initial kernel config file is taken from stock 10.4.3.9 android, with options added to support ubuntu and oc. path to the nvram for bcm4329 modified.

    Ramdisk is mostly that from rabbits 0.8.0, with some modificaitons to enable modem support under android.

    *** Todo ****

    - modify config / kernel to use nvidia's R16.3 tool to patch wifi ;
    - build initramfs anew from tf300t/tg stock android initramfs (currently rabbits modified tf700) ;
    - bluetooth and sound ;
    - key remapping.
    8
    Flash in Chromium

    Don't know if anyone already figured this out, but I got full flash working in chromium using the chromebook pepper plugin found here. I placed the file found on that post into /usr/lib/chromium-browser/plugins/ and then added the following to /etc/chromium-browser/default :

    CHROMIUM_FLAGS="--ppapi-flash-path=/usr/lib/chromium-browser/plugins/libpepflashplayer.so --ppapi-flash-version=11.5.31.105 --ppapi-flash-args=enable_hw_video_decode=1,enable_stagevideo_auto=0,enable_trace_to_console=0" ,

    replacing the original CHROMIUM_FLAGS= line. Works fairly well on hulu and youtube, minor stuttering but no too bad. I couldn't seem to get sound working using the method mentioned earlier, so I do not know how sound performs under flash. Hope it is useful!
    8
    V2.2.4 kernel blob, zip and script. Added bluetooth for linux (thanks to schrdlu). Put Your username in "user" file and run setup_bluetooth.sh as root.