FORUMS
Remove All Ads from XDA
Honor View 10
Win an Honor 7X!

Jhinta Kernel for Lilstevie Ubuntu

694 posts
Thanks Meter: 274
 
By Jhinta, Senior Member on 3rd April 2012, 07:11 PM
Post Reply Email Thread
Dont have this tap anymore so cant support it anymore !!!

I do things manual as i want to know what has be done !
So every thing below is hardcore installation. This will give you the why and know how of things !!!

About bootimg.cfg
This file is need for creating boot.img
You can find it by unpacking a boot.img,but one is provided already.
The important part of this file is the first and last option.
The first one will say how big the image wil be, and the last is kernel cmdline.
This is also wehre you say loop= for a loop file

Pack or unpack blob files
Code:
cd /tmp
git clone git://github.com/AndroidRoot/BlobTools.git
cd BlobTools
make -j2
sudo cp blobpack /usr/bin/
sudo cp blobunpack /usr/bin/
cd ~
Unpack a boot.img
We create a folder and place a boot.img in it.
Code:
mkdir ~/test
cd ~/test
abootimg -x boot.img

Unpacking a initrd image

Code:
cd ~/test
mkdir ramdisk
cd ramdisk
gzip -dc ../initrd.img | cpio -i
Now you will have a directory with the ramdisk source files in ~/test/ramdisk
to repack it, run
Code:
cd ~/test/ramdisk
find . | cpio -o -H newc | gzip > ../new-initrd.img
for gzip
Code:
 find . | cpio -H newc -o | lzma -c > ../initram.lzm
for lzma
This will give you a new-initrd.img file in ~/test/ for you to use............versions<
Go to the folder and select ALL file or folder BUT source and build !!!!
And compres it file wel be made in home.
modules are install in ubuntu in /lib/modules/


About kernel and initrd and boot.img and blob

Kernel = basic hardware installations and setup
initrd = like a ramdisk
boot.img = kernel + initrd
blob = boot.img + TF special header

Blob file you find in cwm.zip like a kernel update for android
boot.img you will find when using nvflash
kernel gets compiled from a git or source
initrd you can make your own or reuse

i will create cwm.zip to do the flashing
To do this i do.
Code:
mkdir ~/test
cd ~/test
cp ~/TF101-GNU-kernel/arch/arm/boot/zImage ~/test/zImage
abootimg --create ./ubuntu.img -f ./bootimg.cfg -k ./zImage -r ./initrd.img
This will give me a ubuntu.img ready for nvflash but i want cwm.
so i do
Code:
./blobpack kernelblob LNX ubuntu.img
(LNX is boot partition dont change this unless you know what your doing)
Now i got a new file kernelblob that i can add to a cmw.zip file
To do this , open !!!! the cmw.zip below and remove and add the file kernelblob.
Thats it, and ready for flashing.


Rootfs
You sould be able to use any rootfs that is for arm.
you can also build a rootfs with rootstock
keep in mind a rootfs kan have diffrent types of names like ( rootfs.img.ext234 or ubuntu,dabian,linux.img.ext234 or evrey name you want it to be its just a name+ext)
If you want to relock it for oem-config ( nice first setup like name location keyboard setup) do
Code:
touch /var/lib/oem-config/run
Ubuntu
Kbuntu
XBMX

So how do we even flash ?
I use nvflash directly or cwm
The easy why is just using Olife.
Keep in mind that i will never use uboot , only original bootloader of android.
So dualboot is what you need.
if you have dualboot flashed, do this.
Replaced (backup!) initrd-2.6.38.img and 2638-zImage in the kernel folder with my files,
and in Olife update your chromium kernel.

For those that want to use a loop file
Just flash this zip file
And copy the rootfs to sdcard (nand) /sdcard/linux/ubuntu.img (more will come, thats why linux/ubuntu.img)

Wifi setup
Wifi simply needs 2 files and you can get them from android space -> then copy them to Ubuntu space to /lib/firmware/
/data/misc/wifi/nvram.txt -> /lib/firmware
/data/misc/wifi/wpa_supplicant.conf -> /etc/wpa_supplicant.conf #optional
just use a root exploror to copy them to sdcard or usb ( this can alo be done when your in Ubuntu space (/system = mmcblk0p1, /data = mmcblk0p7))
and put them on the right place for Ubuntu.

Bluetooth setup
There are 3 file needed from android space, to get this,
Enable bluetooth
Rename you bluetooth name to what ever you want ( once in Ubuntu you cant change this !!!! )
Leave it on !! and boot to Ubuntu
/data/misc/bluetooth/{bcm4329.hcd,mac.txt} -> /lib/firmware
brcm_patchram_plus (lives on the net) -> /usr/sbin/brcm_patchram_plus (already in)
As last edit /etc/init.d/bsp-tf101 and correct your mac adress --bd_addr ***** (replac *** with mac !!!, mac is located in mac.txt)
.
Code:
#! /bin/sh

do_stop(){
#look if Board Support Package is already running
PS=$(ps -A | grep " brcm_patchram_plus\>")
if [ -n "$PS" ]; then
echo "* Stoping Bluetooth Support Package..."
killall brcm_patchram_plus
fi
}

do_start(){
#if already started then stop first
do_stop
#now start all board support binaries
echo "* Starting Bluetooth Support Deamon..."
rfkill unblock 0
modprobe bcm4329
/usr/sbin/brcm_patchram_plus --enable_hci --baudrate 921600 --bd_addr ***** --patchram /lib/firmware/bcm4329.hcd /dev/ttyHS2&
# making sure the nvtegra dev nodes have the correct permissions
echo "* Setting correct permissions on nvtegra device nodes..."
chmod 0666 /dev/nv* /dev/tegra_*
}

case $1 in
start | restart)
do_start
;;
stop)
do_stop
;;
esac
and reboot and your done.

Installing Tegra HEADER files ( needed when building things like XBMC )
Copy as root all folder to /usr/include/

Installing Opengl-ES
Download the Tegra drivers from Nvidia
Once downloaded unpack it and open a cmdline and go to that direction Where those files are and type,
Code:
sudo ./app*.sh --help
-r = your root directeroy whey you want to install this
--abi = witch version of abi your running, to get you version run in ubuntu on TF
Code:
aptitude show xserver-xorg-core | grep abi
So when running this directy on the TF in Ubuntu you wil get this
Code:
sudo ./app*.sh --abi 10 -r /
Get audio working
Code:
sudo usermod -a -G audio 
sudo chmod -R 777 /dev/snd/*
Then open alsamixer and enable
playback
Left And Right speaker mixer DACL/R
Set DC input to DMIC
And sound sould work right away.

Install zram
Code:
sudo wget -O /etc/init/zramswap.conf 'https://wiki.ubuntu.com/ARM/TEGRA/AC100?action=AttachFile&do=get&target=zramswap.conf'
Installing XBMC
sudo apt-get install (try installing all dependencies you can in the readme.ubuntu in xbmc folder , some will fail so just remove them) )
Code:
cd ~
git clone git clone git://github.com/xbmc/xbmc.git
cd xbmc
./bootstrap
./configure --enable-tegra --enable-gles --disable-openmax --disable-vdpau --disable-hal --disable-joystick --disable-debug --disable-dvdcss
make -j2
sudo make install
sudo apt-get install libgl1-mesa-swrast
Loop or native parition
in your config (dualboot.cfg)
You kernel cmdline would be
( if you have native root=/dev/mmblk0p8 rw.........)
( for loop support you add loop= ( location of file !!! + root= (the partition where the file is located !!)
root=/dev/mmcblk0p7 rw loop=/xxx/xxx

Default Kernel
files


Support
hdmi ( audio ? )
USB ( full working )
jack ( mic ? )
Opengl-ES
zram ( needs script also a most have beacuse of low ram space )
-more to come

Sources
kernel
Khronos header package
Tegra Opengl-ES drivers
Blobtools

THANKS TO:
The Following 9 Users Say Thank You to Jhinta For This Useful Post: [ View ] Gift Jhinta Ad-Free
 
 
3rd April 2012, 11:40 PM |#2  
Senior Member
Thanks Meter: 22
 
More
Quote:
Originally Posted by Jhinta

Supports..

Code:
OpenGL-ES
zram
Wifi
Bluetooth
FB -> half working no txt output
HDMI fully supported
Kexec enabled , dont know if its even working
Not working !!!
Sound
Touchpad


If you want to use this make sure the 3D driver are installed ( no FB !!! ), so install them first !!!!
And add the modules to you rootfs.
And keep in mind unity does not have gles support yet ( kde sould but didnt tryed it yet )

Download
Kernel
Modules
Source


make sound hardware pupup , still no sound
sudo usermod -a -G audio <your username here>
sudo chmod -R 777 /dev/snd/*

I will give this a shot tonight and let you know how it goes.

I'm sorry if this is a stupid question but what is FB? I tried searching on the forum and online but the only reference I could find was facebook.
The Following User Says Thank You to Ke1evraTi For This Useful Post: [ View ] Gift Ke1evraTi Ad-Free
4th April 2012, 12:37 AM |#3  
lilstevie's Avatar
Senior Recognized Developer
Thanks Meter: 1,043
 
Donate to Me
More
could you use git, or post a .patch for the framebuffer patch because there is no way I am going to spend ages downloading the kernel source from 2shared then having to try and find WTF you did
4th April 2012, 06:32 AM |#4  
Junior Member
Thanks Meter: 1
 
More
Ke1evraTi: It just means the framebuffer which is the base graphics support under linux. Basically since it does not work, you won't see much until the X11 drivers kicks in.


lilstevie: Pulling the original kernel from Asus was way slower than 2shared. Also creating the patch was quick. Only a few hundred lines to skim. I have attached it for you or anyone else who is interested. If my diff options do not suit your fancy, kindly suggest different ones and I will re-post.
Attached Files
File Type: patch atoj_gl.patch - [Click for QR Code] (11.3 KB, 49 views)
4th April 2012, 09:48 AM |#5  
Jhinta's Avatar
OP Senior Member
Thanks Meter: 274
 
Donate to Me
More
Quote:
Originally Posted by lilstevie

could you use git, or post a .patch for the framebuffer patch because there is no way I am going to spend ages downloading the kernel source from 2shared then having to try and find WTF you did

Sorry m8 i didnt had any sleep last two day's i was broke when i uploaded it , was easy for me fast upload thats why. but looking add the path above that sould do it if not ill will send a patch.

? any one tested already?
4th April 2012, 10:50 AM |#6  
Junior Member
Thanks Meter: 0
 
More
download link
I coldn't use the download link, the host gives error like "Gateway Timeout". Can you check it please, is it me or the host?
4th April 2012, 12:57 PM |#7  
lilstevie's Avatar
Senior Recognized Developer
Thanks Meter: 1,043
 
Donate to Me
More
Quote:
Originally Posted by dismis

I coldn't use the download link, the host gives error like "Gateway Timeout". Can you check it please, is it me or the host?

The server is currently down for maintenance and will be back up in the next few hours

All done now
4th April 2012, 02:49 PM |#8  
Jhinta's Avatar
OP Senior Member
Thanks Meter: 274
 
Donate to Me
More
Quote:
Originally Posted by lilstevie

The server is currently down for maintenance and will be back up in the next few hours

All done now

lil , look on nvidia git , tty fix maby? i'm add work cant do anything.
5th April 2012, 10:13 AM |#9  
stonerhino28's Avatar
Junior Member
Thanks Meter: 0
 
More
Ok. I am running ubuntu on a sbk2 tf101 using the method posted by jozka.1 how do i apply the new kernels like the on posted here to that install? i know that this is a total noob question but i want to try it on my unit. I know that it says that the video acceleration does not work on unity but should work on kde. will it work on gnome?

Sent from my Transformer TF101 using XDA Premium HD app
5th April 2012, 05:45 PM |#10  
Junior Member
Thanks Meter: 0
 
More
Sorry, kernel isn't working for me. I installed the latest linux4tegra driver package, added the modules folder posted to /lib/modules and flashed the kernel through CWM, but the GUI fails to load and running startx from the command line does nothing. I'm not sure if this was my mistake, but the modules posted were for the 2.6.39.4 kernel and Jhinta posted a 2.6.36.4 kernel. Where did I mess up?
5th April 2012, 06:46 PM |#11  
Jhinta's Avatar
OP Senior Member
Thanks Meter: 274
 
Donate to Me
More
Quote:
Originally Posted by MrMuffin24

Sorry, kernel isn't working for me. I installed the latest linux4tegra driver package, added the modules folder posted to /lib/modules and flashed the kernel through CWM, but the GUI fails to load and running startx from the command line does nothing. I'm not sure if this was my mistake, but the modules posted were for the 2.6.39.4 kernel and Jhinta posted a 2.6.36.4 kernel. Where did I mess up?

ore you flashed the wrong zip file ore the flashes didnt install make sure after cwm you see the blue line going meening its flashing the blob
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread