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

[2ndboot][04-10-2012] Custom kernel... this time with radio

OP czechop

27th September 2012, 08:40 PM   |  #1  
OP Senior Member
Thanks Meter: 564
 
216 posts
Join Date:Joined: Aug 2012
It seems that finally I was able to boot custom kernel with working radio
It's not very stable yet(it stops/crashes at bootanimation quite frequently), and is quite laggy just after boot, but once it boots it seems to be almost usable. Wifi works, sdcard also. Haven't checked bluetooth.

Credits for this goes to:
* milestone1 devs... for sharing 2ndboot source code and providing so much info regarding milestone1/2 phones
* Motorola ... for providing source code(not fully working, but was a great help anyway) for enabling UART over micro usb for debugging purposes(without this I woudn't make any progress)
* tezet... for making quite good roms used by 2ndboot

If you wish to try it(BEWARE THAT IT MIGHT BRICK YOUR PHONE, SO DON'T SAY THAT I HAVEN'T WARNED YOU ), then do as follows:

Quote:

1. Install tezet's JB10(if you don't have one already).
2. extract 2ndboot.tar(attached) into /data folder, check that /data/2ndboot/hbootuser file has execute permissions.
3. overwrite /system/bootmenu/script/2nd-boot.sh(DON'T TOUCH 2nd-init.sh!!!) with the one from tar(2nd-boot.sh.tar) and check it has execute permissions.
4. reboot into bootmenu
5. change the default boot method to 2ndboot
6. Restart your phone. Most likely it will crash few times at bootlogo, but be patiant, it finally should boot
7. If you wish to get back to 2nd-init, then enter bootmenu again and change default boot method back to 2nd-init, or manually boot 2nd-init

Please let me know if someone actually run it and was able to boot(so that to find out if I haven't forgot to include some more files(see changelog for 03.10.2012)

KNOWN LIMITATIONS
Quote:

  • Boots very sloooowly
  • Its' quite laggy just after boot.
  • GPS does not seem to work yet

CHANGELOG

Quote:

01.10.2012 - corrected battery problems(thanks to Quarx and kabaldan)
03.10.2012 - corrected ramdisk(previous one was calling some script which I forgot to attach to this post, new one has this script inside), so that now you should be able to boot it; updated instructions how to install it; enabled TLS in the kernel(thanks to kabaldan)
04.10.2012 - touch driver updated, now should work with lastest JB(thanks to Eleanor_Ir, Quarx), adb fixed(I hope, stability fix(thanks to Quarx)


NOTES for devs
In milestone2(as probably in many others UMTS phones made by Motorola) the BP is somehow very sensible and does not like to be disconnected/reenumerated. The main goal of this 2ndboot is then to not allow it to be disconnected. To do this, in the new kernel I've skipped a few resets(EHCI, TLL, individual port resets), and instead of enumerating BP, I've used the hardcoded usb device address(which for milestone2 seems to be equal to 2).
I attach patch(radio.patch) with the changes I've done to the kernel sources from here:

http://sourceforge.net/projects/mile...LS2_U6_4.1-22/

This seems to work(sometime) for both milestone2 and defy.

For other motorola phones:
1. First of all, check with lsusb what's the address and vendor/product id of your BP(for milestone2 it's 0x22b8 and 0x40e6).
2. If the BP usb device address is 2, then just apply the patch(probably it will need some small modifications), and check if it works.
3. If the BP usb device address is not 2, then edit usb/core/hub.c function hub_port_init(providing that it's there for your kernel), and replace 0x02 in the place where usb_control_msg to get descriptors is sent with address of your device

If it does not work, then you can try the following:
Create a procedure to send usb GetDescriptors request using omap3 ehci registers, and call it at different boot stages/usb initialization stages to find out how long the radio remains attached, and comment/change appropriate fragments of kernel code, to preserve this until usb port is initialized. If you wish, I can share the procedure I've written(in the patch file this is that czecho_get_descriptors called in many places) for milestone2, but it probably would need some modification to work with your device).

2ndboot module sources are here:
https://github.com/czechop/2ndboot
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2012-09-27-19-11-21.jpg
Views:	6182
Size:	23.7 KB
ID:	1359294  
Attached Files
File Type: tar 2nd-boot.sh.tar - [Click for QR Code] (10.0 KB, 434 views)
File Type: patch radio.patch - [Click for QR Code] (10.9 KB, 394 views)
File Type: tar 2ndboot.tar - [Click for QR Code] (3.78 MB, 439 views)
Last edited by czechop; 4th October 2012 at 09:12 PM.
The Following 162 Users Say Thank You to czechop For This Useful Post: [ View ]
27th September 2012, 08:59 PM   |  #2  
Anonymous_'s Avatar
Senior Member
Thanks Meter: 130
 
387 posts
Join Date:Joined: Jul 2010
More
Wow, thats perfect This could bring M2 development to another level.

Holding thumbs up and keep it up!
27th September 2012, 09:41 PM   |  #3  
tezet's Avatar
Senior Member
Flag Cracow
Thanks Meter: 898
 
335 posts
Join Date:Joined: Jul 2007
More
Great news! Thx for your work. I've just bought an OTG cable to start playing with kernel stuff and here's a surprise
The Following 10 Users Say Thank You to tezet For This Useful Post: [ View ]
27th September 2012, 10:35 PM   |  #4  
JoseBerga's Avatar
Senior Member
Flag Formosa - Argentina
Thanks Meter: 67
 
155 posts
Join Date:Joined: Sep 2011
Donate to Me
More
Fabulous! That means it starts a new era in the development of our MS2 Roms!

27th September 2012, 10:46 PM   |  #5  
djlooka's Avatar
Member
Thanks Meter: 23
 
97 posts
Join Date:Joined: Sep 2011
More
Wonderful job man
28th September 2012, 12:50 AM   |  #6  
Senior Member
Flag Ho Chi Minh City
Thanks Meter: 12
 
308 posts
Join Date:Joined: Nov 2010
More
Brilliant

Sent from my A953 using Tapatalk 2
28th September 2012, 03:56 AM   |  #7  
skeevydude's Avatar
Recognized Contributor
Flag Hot Springs
Thanks Meter: 2,864
 
2,850 posts
Join Date:Joined: Feb 2012
More
I'm gonna try on the Motorola Bravo as soon as PA is done uploading. Hopefully this'll work on Froyo kernels as well

What kernel are you using? A recompiled MS2 GB kernel unmodified?

Awesome job man. This could possibly be the start of a new generation of roms for our common platform if this works on other similar phones like the Defy\Bravo. Only time will tell .
The Following 3 Users Say Thank You to skeevydude For This Useful Post: [ View ]
28th September 2012, 04:25 AM   |  #8  
nidhish91's Avatar
Senior Member
Thanks Meter: 345
 
927 posts
Join Date:Joined: Feb 2011
More
Well good work OP, can this be implemented on other Moto phones like Defy?
The Following User Says Thank You to nidhish91 For This Useful Post: [ View ]
28th September 2012, 06:33 AM   |  #9  
Member
Flag Lille (Nord)
Thanks Meter: 23
 
33 posts
Join Date:Joined: Jan 2011
Donate to Me
More
Prompt
Great work !

I see that your work is based on Moto's Linux kernel (2.6 branch as far as I remember...)

Any hope of using another kernel source one day ?
28th September 2012, 06:57 AM   |  #10  
Quarx's Avatar
Recognized Developer / Contributor
Flag Omsk
Thanks Meter: 17,449
 
1,053 posts
Join Date:Joined: Jun 2007
Donate to Me
More
Great News!, Thanks
Waiting for source code
Last edited by Quarx; 28th September 2012 at 07:00 AM.

The Following 50 Users Say Thank You to Quarx For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes