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

Search This thread

schrdlu

Member
Feb 13, 2011
39
68
*** 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
 
Last edited:

schrdlu

Member
Feb 13, 2011
39
68
*** 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.
 
Last edited:

Keshukas

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

Good job, I will tray luck to night when I back from work.

P.S. I heave no dock - that means no keabord and mouse

Sent from my GT-I9100 using xda app-developers app
 
Last edited:

schrdlu

Member
Feb 13, 2011
39
68
Good job, I will tray luck to night when I back from work.

P.S. I heave no dock - that means no keabord and mouse

Sent from my GT-I9100 using xda app-developers app

Thanks for your interest.

Although I would be happy to have some feedback, it may be a bit early if you don't have a dock : it's completely functionnal with a dock and mouse (I've been using it for work - and build - for a few days), without a keyboard and mouse, you will not go farther than xubuntu' login screen.

Anyway if you still wan't to try it, tell me if you reach xubuntu blue login screen.
 

Keshukas

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

On the rabbit Ubuntu for tf700 are virtual keabord (beside clock switch ) witch I use to login to Ubuntu

Sent from my GT-I9100 using xda app-developers app
 
Last edited:

TechyNut

New member
Mar 15, 2013
2
1
Northeastern US
Assuming this is a dual boot kernel, how does the kernel know where ubuntu is installed if not installed on internal sdcard? Also what's the minimum size partition that can be used?
 
  • Like
Reactions: SlakWReX

matonka007

Senior Member
Mar 22, 2011
220
48
Žatec
Yes!!! :)) Thanks I wait for it :))) Xubuntu is my lovely linux, I have it on PC, Notebook, installed on fathers PC and now for tablet!! :) :good::good::good: :D
 

schrdlu

Member
Feb 13, 2011
39
68
On the rabbit Ubuntu for tf700 are virtual keabord (beside clock switch ) witch I use to login to Ubuntu

Sent from my GT-I9100 using xda app-developers app

I know that and it can be reproduced (look at rabits' /etc/X11/xorg.conf ; and needs packages xserver-xorg-input-multitouch and mtev).

But I have not yet abandonned all hope of doing it the ubuntu way (ie. with evdev).

Assuming this is a dual boot kernel, how does the kernel know where ubuntu is installed if not installed on internal sdcard? Also what's the minimum size partition that can be used?

Rabits modified the boot image so that it checks /dev/sda*, then /dev/mmcblk1p*, then an img file on /dev/mmcblk0p8. The first which looks to be an ubuntu partition is used as root. He also activated vt (having a console during boot) in is kernel configuration. I reproduced both.

Moved the thread for ya...

Thanks. Induced some noise on other threads :)
 
Last edited:
  • Like
Reactions: Keshukas

Keshukas

Senior Member
Aug 22, 2010
151
50
Ok starting test

1. Yours kernel most start android if no Linux in /dev/sda1 or /dev/mmcblk1p* or on /dev/mmcblk0p8. Some I understand ?

Now making backup of me tablet ( TF300t ) and flashing kernel to test it.

2. I planing Make Linux on me ExtSDcard (MiniSD 8 gb) and plug sdcard in tablet and then reboot tablet. i hope to start Xubuntu

:cowboy:
 
Last edited:

ColMustard

Senior Member
Jan 28, 2012
237
68
North of Boston, MA
Can't mount linux

So I thought I'd give this a try. These are the steps I took to install this:

1. Formated 8gig SD card as ext4
2. Extracted rootfs to SD card.
3. Inserted SD in base
4. copy /system/vendor and /system/etc from your tf into /system on that partition ; copy /data/misc from your tf into /data on that partition
5. fastboot -i 0x0b05 flash staging xubuntu_tf300tg_kernel-0.1.0.blob
6. reboot
6. Kernel boots prompting option, select 1 (linux) and fails to mount partition and boots into android with no other problem.

What am I missing?
 

schrdlu

Member
Feb 13, 2011
39
68
So I thought I'd give this a try. These are the steps I took to install this:

1. Formated 8gig SD card as ext4
2. Extracted rootfs to SD card.
3. Inserted SD in base
4. copy /system/vendor and /system/etc from your tf into /system on that partition ; copy /data/misc from your tf into /data on that partition
5. fastboot -i 0x0b05 flash staging xubuntu_tf300tg_kernel-0.1.0.blob
6. reboot
6. Kernel boots prompting option, select 1 (linux) and fails to mount partition and boots into android with no other problem.

What am I missing?

I have had some occurences of hitting return to fast at the prompt and init not detecting correctly the SD card. So maybe let it timeout into trying to boot linux.

If that does not work, you can choose "s" at the prompt, then from there check into /dev/ which disks / partitions are recognized. Provided that your linux partition is the first and only one on the SD card, you should have a /dev/sda and /dev/sda1. What do you see ?

Also remove any usb drive, which could appear as /dev/sda (and make the sd card appear as /dev/sdb).
 
Last edited:

Keshukas

Senior Member
Aug 22, 2010
151
50
Some RABIT write "In-device microSD really bad works." :crying:

I heave problems to boot from sd now i think extract xubuntu in /data/media/linux/rootfs.img

-- Update --
MicroSD - /dev/block/mmcblk1p1
 
Last edited:

ColMustard

Senior Member
Jan 28, 2012
237
68
North of Boston, MA
I have had some occurences of hitting return to fast at the prompt and init not detecting correctly the SD card. So maybe let it timeout into trying to boot linux.

If that does not work, you can choose "s" at the prompt, then from there check into /dev/ which disks / partitions are recognized. Provided that your linux partition is the first and only one on the SD card, you should have a /dev/sda and /dev/sda1. What do you see ?

Also remove any usb drive, which could appear as /dev/sda (and make the sd card appear as /dev/sdb).

Well it looks like it's a no go for me. it could be that I used Minitool Partition Wizard to format because I could not get to my linux machine at the time.

I also tried flashing the kernel over 3 different ROM:
1. CROMI 3.4.4 - Keep failing with Encryption error after boot animation prompting me to reset the device.
2. Hydro 7 - Keep failing with Encryption error after boot animation prompting me to reset the device.
3. CM 10.1 - Failed to get pass boot animation.

I'll have to re-flash Asus stock ROM (10.4.2.20) in order to fully test this, I might have to reformat the sd on linux also.
 

Keshukas

Senior Member
Aug 22, 2010
151
50
Well it looks like it's a no go for me. it could be that I used Minitool Partition Wizard to format because I could not get to my linux machine at the time.

I also tried flashing the kernel over 3 different ROM:
1. CROMI 3.4.4 - Keep failing with Encryption error after boot animation prompting me to reset the device.
2. Hydro 7 - Keep failing with Encryption error after boot animation prompting me to reset the device.
3. CM 10.1 - Failed to get pass boot animation.

I'll have to re-flash Asus stock ROM (10.4.2.20) in order to fully test this, I might have to reformat the sd on linux also.

Me to. I can't boot to android at all
I still tray boot to xubuntu with this kernel and I make img on the internal card
 

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.