Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Bootloader] LK for Xperia T

OP lilstevie

14th February 2013, 04:01 PM   |  #1  
lilstevie's Avatar
OP Senior Recognized Developer
Thanks Meter: 1,040
 
1,334 posts
Join Date:Joined: Apr 2009
Donate to Me
More
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, 270 views)
File Type: zip JB_Kernel_LK.zip - [Click for QR Code] (9.38 MB, 263 views)
Last edited by lilstevie; 14th February 2013 at 04:07 PM.
The Following 19 Users Say Thank You to lilstevie For This Useful Post: [ View ]
14th February 2013, 04:01 PM   |  #2  
lilstevie's Avatar
OP Senior Recognized Developer
Thanks Meter: 1,040
 
1,334 posts
Join Date:Joined: Apr 2009
Donate to Me
More
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:
Last edited by lilstevie; 14th February 2013 at 04:05 PM.
The Following 5 Users Say Thank You to lilstevie For This Useful Post: [ View ]
14th February 2013, 04:02 PM   |  #3  
lilstevie's Avatar
OP Senior Recognized Developer
Thanks Meter: 1,040
 
1,334 posts
Join Date:Joined: Apr 2009
Donate to Me
More
reserved for future use
The Following User Says Thank You to lilstevie For This Useful Post: [ View ]
14th February 2013, 04:02 PM   |  #4  
lilstevie's Avatar
OP Senior Recognized Developer
Thanks Meter: 1,040
 
1,334 posts
Join Date:Joined: Apr 2009
Donate to Me
More
reserved for future use
The Following User Says Thank You to lilstevie For This Useful Post: [ View ]
14th February 2013, 04:15 PM   |  #5  
cdesai's Avatar
Recognized Developer
Flag IN YOUR HEAD
Thanks Meter: 4,012
 
2,283 posts
Join Date:Joined: Jan 2011
Donate to Me
More
The Following 2 Users Say Thank You to cdesai For This Useful Post: [ View ]
14th February 2013, 06:19 PM   |  #6  
Recognized Developer
Thanks Meter: 2,576
 
1,606 posts
Join Date:Joined: Dec 2010
More
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
15th February 2013, 12:23 AM   |  #7  
DooMLoRD's Avatar
Recognized Developer
Flag Noida
Thanks Meter: 39,020
 
13,124 posts
Join Date:Joined: Jul 2010
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

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
Last edited by DooMLoRD; 15th February 2013 at 12:45 AM.
The Following User Says Thank You to DooMLoRD For This Useful Post: [ View ]
15th February 2013, 03:11 AM   |  #8  
cdesai's Avatar
Recognized Developer
Flag IN YOUR HEAD
Thanks Meter: 4,012
 
2,283 posts
Join Date:Joined: Jan 2011
Donate to Me
More
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
15th February 2013, 03:50 AM   |  #9  
lilstevie's Avatar
OP Senior Recognized Developer
Thanks Meter: 1,040
 
1,334 posts
Join Date:Joined: Apr 2009
Donate to Me
More
Quote:
Originally Posted by DooMLoRD

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

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

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: [ View ]
15th February 2013, 04:33 AM   |  #10  
lilstevie's Avatar
OP Senior Recognized Developer
Thanks Meter: 1,040
 
1,334 posts
Join Date:Joined: Apr 2009
Donate to Me
More
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.
Last edited by lilstevie; 15th February 2013 at 01:32 PM.

The Following User Says Thank You to lilstevie For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Tags
bootloader replacement, littlekernel, lt30p, xperia t
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes