5,595,196 Members 46,541 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
czechop
Old
(Last edited by czechop; 4th October 2012 at 08:12 PM.)
#1  
Senior Member - OP
Thanks Meter 518
Posts: 207
Join Date: Aug 2012
Smile [2ndboot][04-10-2012] Custom kernel... this time with radio

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:	6046
Size:	23.7 KB
ID:	1359294  
Attached Files
File Type: tar 2nd-boot.sh.tar - [Click for QR Code] (10.0 KB, 407 views)
File Type: patch radio.patch - [Click for QR Code] (10.9 KB, 367 views)
File Type: tar 2ndboot.tar - [Click for QR Code] (3.78 MB, 401 views)
The Following 162 Users Say Thank You to czechop For This Useful Post: [ Click to Expand ]
 
Anonymous_
Old
#2  
Anonymous_'s Avatar
Senior Member
Thanks Meter 130
Posts: 387
Join Date: Jul 2010
Wow, thats perfect This could bring M2 development to another level.

Holding thumbs up and keep it up!
my quick comparsion of ROM speed (smoothness)
(from fastest to slowest; bold one is the ROM I'm currently using)
  1. MS2Ginger 5 (-Danik-) / CM7 (tezet)
  2. Stock Gingerbread ROM (UK SBF)
  3. MIUI (will5)
  4. CM10 (tezet)
  5. Stock Froyo ROM (UK SBF)
 
tezet
Old
#3  
tezet's Avatar
Senior Member
Thanks Meter 897
Posts: 335
Join Date: Jul 2007
Location: Cracow
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: [ Click to Expand ]
 
JoseBerga
Old
#4  
JoseBerga's Avatar
Member
Thanks Meter 26
Posts: 86
Join Date: Sep 2011
Location: Formosa - Argentina

 
DONATE TO ME
Fabulous! That means it starts a new era in the development of our MS2 Roms!

 
djlooka
Old
#5  
djlooka's Avatar
Member
Thanks Meter 23
Posts: 97
Join Date: Sep 2011
Wonderful job man
SAMSUNG Galaxy Note II (N7100) - Stock 4.1.2
Previously: Motorola Milestone 2 (A953) - Mine is dead, I miss it so much...
Available for testing purposes: Motorola Milestone 2 (A953) - my dad's old phone -- LG Optimus One (P500) - my sister's old phone
 
handsomeboy1702
Old
#6  
Senior Member
Thanks Meter 12
Posts: 308
Join Date: Nov 2010
Location: Ho Chi Minh City
Brilliant

Sent from my A953 using Tapatalk 2
 
skeevydude
Old
#7  
skeevydude's Avatar
Recognized Contributor
Thanks Meter 2644
Posts: 2,578
Join Date: Feb 2012
Location: Hot Springs
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 .
If I managed to help you, click Thanks.
Please post help questions in your respected devices Q&A forum. That's we have them.
If you need my help, add an @skeevydude to your post or quote me. I'll see it.
Thank You & Have a Nice Day.
Help Me Help You. Sign up for 15gb of free storage at Copy.com using this referral -- I get 5 more GB and you get 5 more GB. We both win.
Atrix HD Off Topic Thread
"Remember there are no stupid questions, just stupid people." -- Mr. Garrison
The Following 3 Users Say Thank You to skeevydude For This Useful Post: [ Click to Expand ]
 
nidhish91
Old
#8  
nidhish91's Avatar
Senior Member
Thanks Meter 344
Posts: 894
Join Date: Feb 2011
Well good work OP, can this be implemented on other Moto phones like Defy?
Phone: Samsung Galaxy Note ll N-7100
Rom: AOSB
Kernel: Devil Kernel
Mods: Xposed Framework

Love Android? This page is just for you: ANDROID
The Following User Says Thank You to nidhish91 For This Useful Post: [ Click to Expand ]
 
boorce.com
Old
#9  
Member
Thanks Meter 21
Posts: 32
Join Date: Jan 2011
Location: Lille (Nord)

 
DONATE TO ME
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 ?
 
Quarx
Old
(Last edited by Quarx; 28th September 2012 at 06:00 AM.)
#10  
Quarx's Avatar
Recognized Developer / Contributor
Thanks Meter 14281
Posts: 802
Join Date: Jun 2007
Location: Omsk

 
DONATE TO ME
Great News!, Thanks
Waiting for source code

The Following 50 Users Say Thank You to Quarx For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes