5,597,871 Members 38,788 Now Online
XDA Developers Android and Mobile Development Forum

[Bootloader] LK for Xperia T

Tip us?
 
lilstevie
Old
(Last edited by lilstevie; 14th February 2013 at 03:07 PM.)
#1  
lilstevie's Avatar
Recognized Developer - OP
Thanks Meter 995
Posts: 1,282
Join Date: Apr 2009

 
DONATE TO ME
Default [Bootloader] LK for Xperia T

LK for Xperia T

LT30p Only - Unlocked Bootloader Required

WARNING 1: This modification makes changes
to the devices partition table. I (lilstevie) am not
responsible for any damage to your device or
data loss that may occur.

WARNING 2: ICS kernels currently do not boot
with this modification at this point in time. This
can only be used with JB kernels including those
from the alpha and leaked releases. At the time
of writing the TWRP 2.4.1.1 FOTA image has
everything required to boot without any changes.


Since getting the Xperia T the biggest annoyance is only having one bootable partition.
To combat this issue I have spent some time porting the Little Kernel bootloader. This
allows booting different kernels for recovery and boot as well as a full implementation
fastboot.

Features:
  • Separate boot and recovery partition.
  • Full fastboot implementation including fastboot boot (with correctly formatted boot.img)
  • Ability to load both Android boot image and sony elf formats.
  • Boot to recovery, and boot to recovery from userspace (requires patched kernel).

Known Issues:
  • No display until kernel has booted – This is also the case with S1Boot.
  • Cannot reboot into another boot mode without kernel patch.
  • No LEDs to indicate status.
  • ICS 3.0 kernels will not boot.

Usage:

After 1 second from pressing the power button LK will listen for input on the volume keys for 2-5 seconds:
  • Volume Up -> boot recovery.
  • Volume Down -> boot fastboot.

Credits:
  • Rebellos -- Inital work on getting eMMC and buttons working.
  • Dees_Troy -- extract_elf_ramdisk served as a base for elf parsing.
  • cdesai -- Bug fixes and hosting bootloader on his github.
  • Various others for support, if you think your name should be here
    and that I have forgotten all about you let me know.

How to install LK:
  1. Download LittleKernel-1.0-FINAL.zip
  2. Copy LittleKernel-1.0-FINAL.zip to device
  3. Boot into recovery
  4. Install LittleKernel-1.0-FINAL.zip

How to install LK ready kernel:
  1. Download JB_Kernel_LK.zip
  2. Copy JB_Kernel_LK.zip to device
  3. Boot into recovery
  4. Install JB_Kernel_LK.zip
Attached Files
File Type: zip LittleKernel-1.0-FINAL.zip - [Click for QR Code] (350.0 KB, 222 views)
File Type: zip JB_Kernel_LK.zip - [Click for QR Code] (9.38 MB, 233 views)
The Following 18 Users Say Thank You to lilstevie For This Useful Post: [ Click to Expand ]
 
lilstevie
Old
(Last edited by lilstevie; 14th February 2013 at 03:05 PM.)
#2  
lilstevie's Avatar
Recognized Developer - OP
Thanks Meter 995
Posts: 1,282
Join Date: Apr 2009

 
DONATE TO ME
Versions:

Version 1.0:
  • Initial Release.

MD5Sums:
  • LittleKernel-1.0-FINAL.zip - fd550025493533db904ecb5bc299ac9b
  • JB_Kernel_LK.zip - cc185b728e28865fe6323f4cc96e17a0


Building a boot image for lk should be done with the
following boot image settings:
  • Base Address: 0x80200000
  • Ramdisk Address: 0x81400000
  • Page Size: 2048
  • Cmdline: “user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 maxcpus=2 kgsl.mmutype=gpummu”


Copyleft:
The Following 4 Users Say Thank You to lilstevie For This Useful Post: [ Click to Expand ]
 
lilstevie
Old
#3  
lilstevie's Avatar
Recognized Developer - OP
Thanks Meter 995
Posts: 1,282
Join Date: Apr 2009

 
DONATE TO ME
reserved for future use
The Following User Says Thank You to lilstevie For This Useful Post: [ Click to Expand ]
 
lilstevie
Old
#4  
lilstevie's Avatar
Recognized Developer - OP
Thanks Meter 995
Posts: 1,282
Join Date: Apr 2009

 
DONATE TO ME
reserved for future use
The Following User Says Thank You to lilstevie For This Useful Post: [ Click to Expand ]
 
cdesai
Old
#5  
cdesai's Avatar
Recognized Developer
Thanks Meter 3969
Posts: 2,272
Join Date: Jan 2011
Location: IN YOUR HEAD

 
DONATE TO ME
CyanogenMod Maintainer | SGT7 | TeamBBQ

 
BBQLinux - An Arch based Linux distribution for Android developers
Website: http://www.bbqlinux.org | Downloads: [url]http://sourceforge.net/projects/bbqlinux/files//url]
IRC: #bbqlinux on freenode
The Following 2 Users Say Thank You to cdesai For This Useful Post: [ Click to Expand ]
 
tilal6991
Old
#6  
Recognized Developer
Thanks Meter 2428
Posts: 1,542
Join Date: Dec 2010
Default Re: [Bootloader] LK for Xperia T

Sweet. I saw the patch on gerrir and was wondering how it worked. Will have a try.

The only thing I'm wondering is whether there is a way to reverse the changes to the partition table.

Sent from my Xperia T using Tapatalk 2
Please don't send me PMs asking for help about any of my ROMs. I will not respond. I am much more interested in helping people posting in the relevant thread. Also don't PM or ask about ETAs for any of my ROMs - I don't have any.

HoloIRC - a lightweight, easy to use IRC app for Android - http://forum.xda-developers.com/show....php?t=2306025
Follow me on Twitter: https://twitter.com/tilal6991 or on G+: https://plus.google.com/u/0/110275089424166293093
My current device(s): Sony Xperia T
My retired device(s): Huawei Ideos (U8150-D), ZTE Skate
 
DooMLoRD
Old
(Last edited by DooMLoRD; 14th February 2013 at 11:45 PM.)
#7  
DooMLoRD's Avatar
Recognized Developer
Thanks Meter 34177
Posts: 12,239
Join Date: Jul 2010
Location: Pune, Maharashtra
Default Re: [Bootloader] LK for Xperia T

Very interesting... Awesome work guys...

And good to see cdesai around



I am still unclear on few things though..


Ok so from what I understand you are still depending on s1boot as primary bootloader. Then once the primary bootloader passes boot sequence to main kernel (mmcblk0p4) you have little kernel which will intercept it and then function as a bootloader? Which can then accept these commands or in turn boot a secondary kernel (fotakernel) or mmcblk0p16 which will now act as boot partition for the OS?

My concern is how are you making space for that mmcblk0p16? Are you repartitioning internal sdcard?

Sent from my LT30p using xda app-developers app


Quote:
Originally Posted by tilal6991 View Post
Sweet. I saw the patch on gerrir and was wondering how it worked. Will have a try.

The only thing I'm wondering is whether there is a way to reverse the to the partition table.

Sent from my Xperia T using Tapatalk 2
I think flashing a standard full stock firmware should restore partition table


Sent from my LT30p using xda app-developers app
Like my work? Please consider donating via PayPal

Lead Developer of Team UtterChaos & Member of Team ICX

Creator of DooMKernel making those Snapdragons fly higher and faster

Android Devices I use : Sony Xperia Z1, Z, SP, T | WISHLIST: Sony Xperia Z2

Contributions : Generic Android / Xperia X10 / Xperia 2011 devices / Samsung Galaxy S2 / Huawei Ideos X6 / Samsung Galaxy SCL (i9003) / HTC Flyer / Kindle Fire / HTC JetStream / Xperia P, Sola, U / HTC One X / Xperia S / Xperia T, V, TX / Xperia Z, ZL, Tablet Z / Xperia SP / Xperia Z1 / Sony ZU GPe / Xperia Z1 Compact / Xperia Z2, Z2 Tablet / Xperia T2 Ultra

My Apps on Google Play Store | Follow me on Twitter!
The Following User Says Thank You to DooMLoRD For This Useful Post: [ Click to Expand ]
 
cdesai
Old
#8  
cdesai's Avatar
Recognized Developer
Thanks Meter 3969
Posts: 2,272
Join Date: Jan 2011
Location: IN YOUR HEAD

 
DONATE TO ME
Default Re: [Bootloader] LK for Xperia T

There is 300mb free space at the end of the emmc, and this makes a new 30mb partition after the sdcard.

Like you said DooMLoRD, s1boot is still used, and it loads lk which in turn loads p16 as kernel, and p11(FOTA) as recovery.

There's still enough space left to add more kernels, and some sort of a boot menu to multi boot
CyanogenMod Maintainer | SGT7 | TeamBBQ

 
BBQLinux - An Arch based Linux distribution for Android developers
Website: http://www.bbqlinux.org | Downloads: [url]http://sourceforge.net/projects/bbqlinux/files//url]
IRC: #bbqlinux on freenode
 
lilstevie
Old
#9  
lilstevie's Avatar
Recognized Developer - OP
Thanks Meter 995
Posts: 1,282
Join Date: Apr 2009

 
DONATE TO ME
Quote:
Originally Posted by DooMLoRD View Post
Ok so from what I understand you are still depending on s1boot as primary bootloader. Then once the primary bootloader passes boot sequence to main kernel (mmcblk0p4) you have little kernel which will intercept it and then function as a bootloader? Which can then accept these commands or in turn boot a secondary kernel (fotakernel) or mmcblk0p16 which will now act as boot partition for the OS?
We can't actually replace S1Boot due to code signatures, and S1Boot is actually multiple bootloader stages in 1. Other devices would have pbl sbl and appsboot.mbn, Sony have combined them all into 1, LK is only a replacement for appsboot, thankfully between each stage everything that was turned on gets turned on for the purpose of appsboot (such as mmu) get turned off again before the next stage which allows us to do this without major hacks. Essentially what we are doing is adding an extra boot stage.

mmcblk0p16 which has been added to the end indeed does act as the new boot partition. I did originally plan to add another extra partition for boot, but after talking to Dees_Troy we worked out a situation where we could utilise FOTAKernel for recovery and not impact installation of TWRP from goomanager.

Quote:
Originally Posted by DooMLoRD View Post
My concern is how are you making space for that mmcblk0p16? Are you repartitioning internal sdcard?
I do understand this concern, however I did notice that all Xperia T's that I have encountered so far (I checked with ~10 peoples devices) and they all have 30025MB of unused, and unpartitioned space at the end of their eMMCs, I do not delete or resize any partitions. This is the script I run when installing lk if you are interested in seeing how it is done.

Quote:
Originally Posted by DooMLoRD View Post
I think flashing a standard full stock firmware should restore partition table
Utimately this is what eased my feelings towards modifying the partition table, I understand people get a little bit funny about things that cannot be easily reverted, and in this case flashing a stock ftf or using EMMA to reflash back to stock will undo the changes to the partition table.
The Following 2 Users Say Thank You to lilstevie For This Useful Post: [ Click to Expand ]
 
lilstevie
Old
(Last edited by lilstevie; 15th February 2013 at 12:32 PM.)
#10  
lilstevie's Avatar
Recognized Developer - OP
Thanks Meter 995
Posts: 1,282
Join Date: Apr 2009

 
DONATE TO ME
Please contact me if you have any of the following devices with a bootloader unlock: Xperia TX, TL (Are any of these unlocked?) and V. I would like to add support for these devices but as I do not have any of them I will need some testers.

EDIT: Xperia V is off the table for the moment as there isn't enough free space to remap the kernel partition.

The Following User Says Thank You to lilstevie For This Useful Post: [ Click to Expand ]
Tags
bootloader replacement, littlekernel, lt30p, xperia t
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes