[HELP] AOSP Froyo + HTC 2.6.29 kernel = no touch screen? - myTouch 3G, Magic Android Development

OK, here is the latest update. Instead of using kernel extracted from Rogers stock ROM, I compiled HTC kernel source downloaded from developer.htc.com.
To make touch screen work, one has to update sapphire_defconfig. Only one configuration has to be changed -- that is, to make the following unset.
#CONFIG_TOUCHSCREEN_CONCATENATE_REPORT=y
Then, compile kernel as usual and touch screen works with AOSP Froyo.
Hopefully, the above information is useful. Wifi is fine. But, camera is not working.
==================================
Guys, help is needed here.
In the past two weeks, I tried to compile AOSP Froyo (branch 2.2_r1) with HTC kernel (2.6.29) extracted from Rogers stock ROM. The compilation went fine. Boot also went smoothly until it reaches the screen that requires users to enter PIN code. At the moment, I found that I CANNOT enter anything from screen. (touch screen is gone)
As far as I can tell from the android architecture, touch screen is something related to kernel, right? HTC kernel does support touch screen. So, I was lost???
I tried to read init.rc, init.sapphire.rc, and init.goldfish.rc, and system/etc/ files to see if I missed some configurations. But found nothing.
What should I do? Any help is appreciated.

the driver in the kernel .29 do not fit the android 2.2 you need a different kernel, i got touchscreen by using the .34 kernel from froyorider

sharpt71 said:
Guys, help is needed here.
In the past two weeks, I tried to compile AOSP Froyo (branch 2.2_r1) with HTC kernel (2.6.29) extracted from Rogers stock ROM. The compilation went fine. Boot also went smoothly until it reaches the screen that requires users to enter PIN code. At the moment, I found that I CANNOT enter anything from screen. (touch screen is gone)
As far as I can tell from the android architecture, touch screen is something related to kernel, right? HTC kernel does support touch screen. So, I was lost???
I tried to read init.rc, init.sapphire.rc, and init.goldfish.rc, and system/etc/ files to see if I missed some configurations. But found nothing.
What should I do? Any help is appreciated.
Click to expand...
Click to collapse
I bet that you have a MyTouch with a 3.5mm headphone jack huh?
If not then you need to include more information.
In regards to the 3.5mm headphone jack version (also known as Fender or 1.2) it has slightly different hardware drivers that require the patch made by Voxluna. Most developers include this in their roms by default however if you are using any other source then odds are that they won't include the patch thus creating your problem.

capychimp said:
the driver in the kernel .29 do not fit the android 2.2 you need a different kernel, i got touchscreen by using the .34 kernel from froyorider
Click to expand...
Click to collapse
Since HTC source code was just released, will you please point me to the right files/folders so that I can find out the reasons why .29 does NOT work with Froyo?
I had once compiled AOSP Froyo with HTC kernel .27 by following instructions on http://www.lingnu.com/en/howto/72-android-aosp-htc-32a.html. Although camera (and maybe other devices) did not work, touch screen worked fine. Due to this experience and the limited reading of android architecture, I thought I could simply replace the kernel without affecting other layers. Hmm, to use layers design, why didn't google keep APIs intact?

Binary100100 said:
I bet that you have a MyTouch with a 3.5mm headphone jack huh?
If not then you need to include more information.
Click to expand...
Click to collapse
Sorry for not making this clean in the first place. Mine is a 32A which is running Rogers stock rom with root (made by capychimp) + chinese support + htc_cime (cooked by myself).
Ciompilation involved roughly the follwings:
1. AOSP froyo branch 2.2_r1
2. Comppilation of Froyo by following http://xy0811.spaces.live.com/blog/cns!F8AECD2A067A6B17!1526.entry?wa=wsignin1.0&sa=474748515 (which is similar to dferreira's howto)
3. unziped capy's Rogers_21_capychimp.zip instead of signed-google_ion-ota-14721.zip.
4. extracted kernel and wlan.ko from the boot.img in Rogers_21_capychimp.zip

the source from htc is for sense roms, way different drivers. I have a perfect .34 kernel for froyo but no cam so far.

carz12 said:
the source from htc is for sense roms, way different drivers. I have a perfect .34 kernel for froyo but no cam so far.
Click to expand...
Click to collapse
Thanks for the info. I just updated the current status at the 1st post.
From what I did, I kind of wondering whether or not the not-working camera problem is related to "configurations" because camera works on 2.1. But, I am not a kernel guy and will not be one.

sharpt71 said:
Then, compile kernel as usual and touch screen works with AOSP Froyo.
Click to expand...
Click to collapse
A screenshot of software information is attached. Oh, sdcard cannot be mounted unless it has no ext/swap partitions.

nice on the touch screen, will come in handy thx will try it on my wildfire port

Related

[32ANR][PORT] Multiple ROMs : sanpei 2.6.32.9 Repack Cooks Test and Info

Edit: wasn't even aware of the ROM kitchen before this.
Untested! I don't plan to provide support for these ports!
The reason I am publishing is from my recent trials of compiling my own kernel for new radio 32A Magic. I have learned a lot about what sanpei's kernel consists of and the similarities between our device and the GSM Hero. In particular, the only difference between our ROMs seems to be mainly just the kernel. Everything else is almost identical. As such I want the community to try to use a tested NR kernel, sanpei's 2.6.32.9, and apply it to some different ROMs and report back with results.
We don't need multiple threads of the same kernel on different ROMs. So I'm trying to consolidate some information here.
I can test it on my cousins phone probably this weekend as well. Hoping for some preliminary results till then.
sanpei2.6.32.9_villain_port
This is a repack of sanpei's kernel repacked via ordinary boot.img method, with init.hero.rc copied to init.sapphire.rc
Flash this after you flash Villain ROM:
http://www.villainrom.co.uk/viewtopic.php?f=44&t=680#p11789
2.1 Sense UI ROM
sanpei2.6.32.9_anykernel.zip
This is a repack of sanpei's kernel repacked via Koush Anykernel
The idea is that you can flash most ROMs from old radio using this port with some caveats.
READ THIS BEFORE YOU FLASH
You cannot use this port if:
1) You are NOT on a 6.35 series radio. This rules out any 32Bs or myTouch 1.2
2) the ROM uses squashfs anywhere (open up the update.zip of the ROM and look at /system/modules/lib and /system/
3) modules have special directory structure under /system/modules/lib (such as Cyanongenmod, which has modules under 2.6.xx.x-cyanogenmod instead of just 2.6.xx.x)
4) you use an ext4 apps2sd partition (it will simply not recognize it)
Explanations:
If the ROM uses squashfs, this kernel does not support it and you will need to fix those problems yourself.
There may be other issues involved when you use this kernel. It is recommended that you stick to the one that came with the ROM.
This rules out any Cyanogenmod because of the use of squashfs.
If missing init.sapphire.rc, copy the Hero one (if flashing a Hero ROM) using:
adb shell cp init.hero.rc init.sapphire.rc
Refer to the ROM Bible for reference:
http://forum.xda-developers.com/showthread.php?t=682243
Any new or old ROMs that already use new radio
This is just the kernel carz12 posted repacked:
http://forum.xda-developers.com/showthread.php?t=689652
Credits:
cyanogen for everything
Koush anykernel
sanpei for his version of AOSP kernel with integrated new radio support
And a lot more I might be missing
FYI and FWIW a few weeks back there were a lot of 6.35 roms that were cooked and posted in this forum. They were all using the 2.6.32.9 kernel that Sanpei ported. That is, the boot.img-kernel was the same for all. The ramdisk was changed as you have done and the two were re-packed into the boot.img.
I have successfully applied this approach for maybe 3 or 4 different 1.6 roms and maybe 10 different 2.1 roms.
dsixda's ROM Kitchen makes executing these steps a piece of cake
http://forum.xda-developers.com/showthread.php?t=633246
Then you just replace the wlan.ko module and GPS lib file for wifi and GPS compatibility.
You're probably aware of these details but I thought they might help others.
Tried to flash VillainROM 6.1, but during the flash it aborts saying "Failure at line 2: assert getprop("ro.product.device") == "hero"
How do I solve this?
pellen said:
Tried to flash VillainROM 6.1, but during the flash it aborts saying "Failure at line 2: assert getprop("ro.product.device") == "hero"
How do I solve this?
Click to expand...
Click to collapse
Must have hero recovery not patched recovery by cursor
Ahh...thougt cursors tweaked recovery didn't differ that much. *change recovery*
I am pretty sure the update script can also be modified. The assert statement can be removed and the rom should load fine on the Hero, Cursor and Amon Ra recoveries.
Ok, so now I've flashed VillainROM 6.1 with the sanpei2.6.32.9_villain_port and I can't say it's working especially well
First of all it doesn't ask me to enter the SIM card PIN when i boot, so the mobile connection is dead. Wifi and bluetooth is dead too. The camera flicker, and then fades to black, taking a pic resulted in reboot.
giant_rider said:
FYI and FWIW a few weeks back there were a lot of 6.35 roms that were cooked and posted in this forum. They were all using the 2.6.32.9 kernel that Sanpei ported. That is, the boot.img-kernel was the same for all. The ramdisk was changed as you have done and the two were re-packed into the boot.img.
I have successfully applied this approach for maybe 3 or 4 different 1.6 roms and maybe 10 different 2.1 roms.
dsixda's ROM Kitchen makes executing these steps a piece of cake
http://forum.xda-developers.com/showthread.php?t=633246
Then you just replace the wlan.ko module and GPS lib file for wifi and GPS compatibility.
You're probably aware of these details but I thought they might help others.
Click to expand...
Click to collapse
I completely missed that post actually . Plus it's now closed.
But I wanted to see specifically how well Hero ROMs translate over to Magic ROMs because of what I've been reading about the similar kernels. The thing is that while I know to copy over init.sapphire.rc to resolve some conflicts, I'm not sure what else is involved in porting a ROM right now to get it to work.
I'm new to porting ROMs.
Maybe mods ought to close this one then?
With Eris ports you will be missing SIM card features.
So with 2.6.32.9 bluetooth and wifi break? I was actually expecting bluetooth to work. What works?
I guess I'll do some reading again. But I haven't seen that information posted regarding how to resolve some of the issues of porting ROMs.
I was looking to figure out some of the incompatibility of the kernel I was compiling so I thought this might help
If the Hero ROMs worked well enough I had the idea of modifying the AnyKernel script to add cpio to recovery by updating busybox so that ROMs can be unpacked, modified and repacked all in recovery. It means unpacking the ramdisk gunzip, modifying it and repacking it, essentially adding one script to AnyKernel. But I guess they don't work that well so
xaueious said:
I'm new to porting ROMs......
I guess I'll do some reading again. But I haven't seen that information posted regarding how to resolve some of the issues of porting ROMs.
Click to expand...
Click to collapse
A lot of the issues when porting are not related to the kernel but to the modules and lib files.
Try testing and hacking through some issues. For example, replace the wlan.ko file in the /system/lib/modules folder with one from a similar rom that is working on 32a same radio version. If you're porting Hero, then pull the wlan.ko from one of Capy's roms.
To get camera working, you'll need to replace the camera related libs in the in the /system/lib/ folder with ones from a similar rom that is working on 32a and so on.
Porting involves, at a minimum, replacing the boot.img-ramdisk and the files for stuff that is not compatible with the 32a hardware, radio version, etc.
Once you figure out these basics by experimenting with swapping out stuff with working pieces from a 32a compatible rom on the same radio version, you can then get into making updates to the files in the boot.img-ramdisk yourself, the update-script, the build.prop files, the init files in /system/etc/init.d, etc.
xaueious said:
Maybe mods ought to close this one then?
Click to expand...
Click to collapse
I think it's a good thread. Maybe some of the guys who have been porting roms will add their comments. I may be wrong but I don't there is a how to guide for porting.
anykernel is useful for a direct kernel port like cm5 to EABI1 on same rom scenarios, nice piece of coding by koush though, way many files to change, an update package would work on roms made for your device(proper assert) but most need the update script modified and at least wlan.ko changed.
testing now Flashing
how long does it take to boot?
Working:
USB
Music app (Sound ok)
Gallery 3D OK takes a while to work
Not Working:
Camara
Wifi
Bluetooth
GSM connection
Issues:
Very very long and slow boot alot of patient is required.
Slow Menu Scrolling
Freezes some times (have to take battery)
Reboots alone sometimes

Relationship between Android and kernel

Hi all,
Looking to build my first custom Rom and had some queries terminology-wise.
What is the relationship between the kernel and Google's android platform? For instance, is froyo tied to a specific kernel and is this in the source tree?
Second q: HTC release their kernel sources. Say I wanted to get a froyo build up for a device that currently only has eclair, would the procedure be to diff the HTC modifications against the vanilla version and then make the appropriate changes to froyo?
Third q: what makes a Rom specific to a device? Probably linked to first question...
Many thanks,
Martin
Sent from my HTC Wildfire using XDA App
The kernel is basically just a linux kernel with device specific drivers and such added. I've done a 'diff' between the Eris 2.6.29 kernel from HTC and the 'generic' 2.6.29 kernel from kernel.org. It's kind of neat to see the difference. I highly recommend you do that.
There are also device specific drivers in the file structure that the ROM needs in order to function.
What I've done is compile AOSP from source, compile the kernel from source, zip up the needed files/folders, signed the ROM, and then flashed it to test. If you look at Android Builder in my sig, you can figure out the difference between the Eris and your device. You'll have to change the kernel that gets downloaded, of course. And it really just gives you a basic ROM without the device specific drivers, so things will not work without figuring the rest out. Grab a stock ROM to get drivers, libs, etc. out of.
/system/usr/keychars & /system/usr/keylayout usually have the keyboard drivers, which are somewhat important.
Also in my sig is the SgtShultz ROM where I tried to make a usable ROM from as close to source as possible. You might get some ideas from there. I still haven't figured out how to get the audio to work. If I get that worked out, I'll actually start using the ROM daily and work out the rest!
Froyo seems to work with kernel versions 2.6.29+, btw.
Many thanks for this; it's given me a good set of places to start reading.
Just pulling down all the AOSP source as we speak, with the hopes of getting a basic build up in the near future
gnarlyc said:
What I've done is compile AOSP from source, compile the kernel from source, zip up the needed files/folders, signed the ROM, and then flashed it to test. If you look at Android Builder in my sig, you can figure out the difference between the Eris and your device. You'll have to change the kernel that gets downloaded, of course. And it really just gives you a basic ROM without the device specific drivers, so things will not work without figuring the rest out. Grab a stock ROM to get drivers, libs, etc. out of.
[...]
/system/usr/keychars & /system/usr/keylayout usually have the keyboard drivers, which are somewhat important.
[...]
Froyo seems to work with kernel versions 2.6.29+, btw.
Click to expand...
Click to collapse
A couple of questions on this front...
I can see, obviously, where to get the kernel source and needed drivers; I am, however, unclear as to where I should obtain AOSP drivers from (to go, for instance, in /devices/htc/buzz and/devices/htc/buzz-common). Can I extract these from my device? (or do I need to wait until they release Froyo and then extract them from a device running the newer build?) Where on the device should I be looking for this driver set?
Thanks again,
Martin
MartinEve said:
A couple of questions on this front...
I can see, obviously, where to get the kernel source and needed drivers; I am, however, unclear as to where I should obtain AOSP drivers from (to go, for instance, in /devices/htc/buzz and/devices/htc/buzz-common). Can I extract these from my device? (or do I need to wait until they release Froyo and then extract them from a device running the newer build?) Where on the device should I be looking for this driver set?
Thanks again,
Martin
Click to expand...
Click to collapse
For the most part, any Eclair drivers seem to work. At least that's what I have used for the Eris. 2.1 -> 2.2 isn't too big of a jump. I used drivers from a stock 2.1 ROM.
Look up vendor tree, vendor config, and 'extract-files.sh'. You'll see what people with other devices have done. I have yet to quite get the whole vendor tree thing worked out, but others have. You can just come up with a list of needed drivers to add to the 'extract-files.sh' script and just copy those files in manually. (That's what I have done.) This will get pretty close to making an AOSP build complete. However, it appears that actually using the vendor tree setup while compiling will get things 'right'. There appear to be some libs that will compile differently for different devices.
So, basically, if you compile AOSP without a vendor tree for your device, the build will be located in out/target/product/generic. (And, you can copy drivers in later while using the kitchen, but you might miss out on some AOSP stuff with device-specific changes.) If you use the vendor tree, it will be in /out/target/product/buzz and will contain the drivers that the 'extract-files.sh' script grabbed from your device along with custom compiled libs.
If you are able to get a working vendor tree for your device, it will be helpful to the entire community. They'll all be able to use it for their builds. I highly recommend doing that. Most groups use github or something similar to post the code.
I still have much to learn myself, and you are starting to reach my limit! Good stuff.
Hi,
Many thanks for your reply; to a degree, it's about knowing the terms to search for -- the extract-files.sh is a godsend for information that I would have otherwise missed.
Anyway, onwards to build a usable vendor tree
Best,
Martin

[Kernel][HTC Sense 2.2 Froyo][OC] Based on HTC Froyo Source

Here is a kernel I compiled with the froyo source code on HTC Dev site. It has oc enabled. Remember to get setcpu.
Wipe cache/dalvik
Install via clockwork
http://droid.neolobster.com/roms/htcsense_froyo.zip
md5sum 9c915571372cbdb179360db478beee8c
http://www.github.com/jznomoney
report any issues here.
Updated for trackpad wake.
Thanks I will try this this weekend
Sent from my Liberty using XDA App
Everything works great so far, thanks for posting!
The only issue is trackpad wake doesn't work, just like in the OC kernel posted by Gene Poole. Any ideas?
I may have posted a version without it I'll fixit today.
I've been unable to locate the problem with trackpad wake. It is added to my kernel, but it doesn't work with the current froyo 2.2.2 framework. Trackpad wake works with my kernel installed over FR008 so I know the kernel changes are good. I just can't figure out what HTC changed between Gratia an the latest release that broke this.
Gene Poole said:
I've been unable to locate the problem with trackpad wake. It is added to my kernel, but it doesn't work with the current froyo 2.2.2 framework. Trackpad wake works with my kernel installed over FR008 so I know the kernel changes are good. I just can't figure out what HTC changed between Gratia an the latest release that broke this.
Click to expand...
Click to collapse
Which kernel of yours does it work with? I installed the hoxnet ones you posted right over FR008 and I still have issues. No problems of course with FR008 with the supplied OC kernel.
Perhaps a reinstall (without wipe) of FR008 and then one of these OC kernels might fix it. I know it's not that huge of a thing, but it's one of those nice little perks I got used to liking.
And I definitely will stick with one of the newer kernels over the regular FR008, because I notice a battery drain (with screen off) of at most 1% per hour vs 2% - 3% with the regular FR008 OC.
I've got a virgin install of FR008 in nandroid that I use for testing. I installed it with full wipe, then backed it up to restore when needed for testing. Trackpad wake works using 004b:
http://hoxnet.com/droid/update_hoxnet-liberated_oc_kernel_004b.zip
Gene Poole said:
I've got a virgin install of FR008 in nandroid that I use for testing. I installed it with full wipe, then backed it up to restore when needed for testing. Trackpad wake works using 004b:
http://hoxnet.com/droid/update_hoxnet-liberated_oc_kernel_004b.zip
Click to expand...
Click to collapse
Oh I was afraid of that. Do you think a wipe of system partition (not data), plus cache wipes might fix it without doing a master reset/clear? Something I've done along the way since initial FR008 install must be causing a conflict.
When I get time I could always try a clean install, double-check, and nandroid back I suppose too. Thanks again for helping!
im running fr008 right now. do i just go into CW and straight flash this? whats new on this puppy? thanks
Trackball wake is now working for me with this flash. All seems well however I'm wondering if the sense weather animations that show when the phone wakes up are functional...? I just cant seem to get the rain drops and windsheld wiper to display..I'll update this post when I see them..
..maybe they dont work when I bypass the lockscreen and go straight to my homepage...?
hmm..turned off NOLOCK so that I would see my lockscreen. Trackball wake does not work that way at all...plus the weather animations still dont show...I have to turn NOLOCK "on" which disables the lockscreen for the trackball wake to work...which is fine with me!
Still looking for the animations...
running this kernal with baseband 47.37.35.09u_7.08.35.06 and build 2.20.502.1 cl331188 release keys, software 2.20.502.1
jznomoney, any thoughts on submitting your kernels for distribution with Kernel Manager? App is now in market and users should be able to flash kernels to their devices directly through it.
Free/Pro
PM me and we can get you set up
So I finally installed the last update of the jznomoney kernel over FR008 and can confirm trackpad wake works with NoLock.
However, the Gene Poole hoxnet_004b still does not.
So how would one go about adding aufs to this kernel?
i would also like to know how to put aufs, if it is possible??
get source add files that pertain to aufs
drowningchild said:
get source add files that pertain to aufs
Click to expand...
Click to collapse
Y U NO DO IT FOR ME!?
I'm jk.
OK. I'll look into it.
Edit: when you say "add files"... does this require coding?
Another question...
How would one go about adding a kernel to a rom so that it didn't have to be flashed every time?
unpack the boot.img and replace the zimage
get android kitchen it has tools to do it its in the android kitchen forum here
and just look at the commift for aufs
https://github.com/CyanogenMod/htc-kernel-msm7227/commit/23cdb661e4f606041f568b7f7cd97f4d431fb814
Doh! My ADD is stronger than me! For some reason, unpacking my original boot.img just whooshed right past me. I have the rom kitchen but I'm still really new to all this.
I clicked your link. Is that your answer to my edit about coding? Because that might as well have been written in Chinese

[Q] Need Hastarin 7.2 Kernel for SD build!

MY QUESTION:
Can anyone help me backdate my Hastarin r8.5.1 kernel to Hastarin r7.2 on my current rom?(Rom details below.)
I feel like I've tried everything, but I think I need an official kernel update with the proper system files(like w/ root files, kernel updater, zImage, etc). If needed, I can supply any files for the 7.2 kernel that I got from another rom package(also listed below). I've already attached the zImage file from it, although I'm not sure how helpful it might be.
THE DETAILS:
So, you're probably asking yourself, "Why 7.2?" Good question.
Well, first I should say, I've used many different Android builds on my HTC HD2 over the last year & with them I've tried many different kernels. I'm currently using this Sense 3.5, Android 2.3.5, v. 7.0, sd build by Boxmax here: http://forum.xda-developers.com/showthread.php?t=1256423...because I like the function & look of the HTC Sensation XL. The SD build version of the rom comes packed with the Tytung r14 kernel, but it is really laggy. I've tried many other versions of Tytung on the build, as well as many other kernels uploaded to the thread, including Hastarin r8.5.1 & r8.6 because I had read that the Hastarin kernels were still the best for SD roms & I would have to agree, but they still lag a bit as well.
Ironically, the fastest Android build I've tried so far, out of all of them, was one called Mdeejay FroYo Sense v.3.0a. It was Android 2.2.1 & came bundled with the hastarin r7.2 kernel. It worked perfectly from the beginning and never lagged. I originally found the rom here: http://www.jayceooi.com/2010/10/14/download-mdeejay-froyo-sense-2-2-1-frg83-android-rom-for-htc-hd2/
So, I thought what if I update my Boxmax rom with Hastarin 8.5.1 & then just replace the zImage file in my Android folder with the Hastarin 7.2 kernel from the Mdeejay installation package while in Windows Mobile. I know this isn't the right way to do it, but I wasn't sure how to make an update package for it, so I backed up my original configuration & gave it a shot.
Sure enough though, I powered on Android and the build was FLYING faster than any other Kernel I had previously installed & the Android software info was showing I had the Hastarin r7.2 kernel. However, everything seemed to be working perfectly except for the camera. It would open without error & seemingly had all the functionality, except there was no preview of the picture in the display & it wouldn't take a picture. If I didn't like taking pictures so much with my phone I would have just kept it, but alas I replaced it again with Hastarin 8.5.1. The camera works again now, but of course it's back to lagging again, even after reinstalling the whole rom.
Does anyone have any possible solutions to this by chance? Thank You In Advance For Any Help Or Advice You Can Give!!! Very much appreciated!

[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:
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
Click to expand...
Click to collapse
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
Boots very sloooowly
Its' quite laggy just after boot.
GPS does not seem to work yet
Click to expand...
Click to collapse
CHANGELOG
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)
Click to expand...
Click to collapse
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/milestone.motorola/files/MILS2_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
Wow, thats perfect This could bring M2 development to another level.
Holding thumbs up and keep it up!
Great news! Thx for your work. I've just bought an OTG cable to start playing with kernel stuff and here's a surprise
Fabulous! That means it starts a new era in the development of our MS2 Roms!
Wonderful job man
Brilliant
Sent from my A953 using Tapatalk 2
I'm gonna try on the Motorola Bravo as soon as PA is done uploading. Hopefully this'll work on Froyo kernels as well :fingers-crossed:
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 .
Well good work OP, can this be implemented on other Moto phones like Defy?
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 ?
Great News!, Thanks
Waiting for source code
Wow! Tezet and Quarx on the same thread?! I feel like up on the Mount Olypmus lol
Great job, man!...been following your work from General section.
P.S. add Kabaldan to the list Clash of the Moto Titans
skeevy420 said:
I'm gonna try on the Motorola Bravo as soon as PA is done uploading. Hopefully this'll work on Froyo kernels as well :fingers-crossed:
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 .
Click to expand...
Click to collapse
Yes, I use MS2 GB U6_4.1-22(http://sourceforge.net/projects/milestone.motorola/files/MILS2_U6_4.1-22/) kernel... but with modified usb host driver.
nidhish91 said:
Well good work OP, can this be implemented on other Moto phones like Defy?
Click to expand...
Click to collapse
I think it can be.
With defy it probably should be easy, as I've seen there was 2ndboot(without radio) already build for it, so most likely only new kernel would need some tuning
czechop said:
I think it can be.
With defy it probably should be easy, as I've seen there was 2ndboot(without radio) already build for it, so most likely only new kernel would need some tuning
Click to expand...
Click to collapse
XT720 users also waiting for instructions for new kernel tuning, cause we have working 2ndboot without radio. =)
boorce.com said:
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 ?
Click to expand...
Click to collapse
It should be easy to apply some(perhaps most) 2.6.32 upstream patches to the motorola kernel sources.
Don't know however how difficult it would be to start from another kernel version. Don't know also how motorola proprietary modules/libs would behave with newever kernel version. But, as they say, impossible is nothing
czechop said:
I think it can be.
With defy it probably should be easy, as I've seen there was 2ndboot(without radio) already build for it, so most likely only new kernel would need some tuning
Click to expand...
Click to collapse
In kernel only modified usb driver or some more changes for boot?
fjfalcon said:
XT720 users also waiting for instructions for new kernel tuning, cause we have working 2ndboot without radio. =)
Click to expand...
Click to collapse
Will share source code probably early next week(currently am at work, and during weekend most likely won't be sober enough
Quarx said:
In kernel only modified usb driver or some more changes for boot?
Click to expand...
Click to collapse
In 2ndboot module I've added code to disable lcd before starting new kernel(otherwise new kernel could not initialise properly dss), and in new kernel I've only modified usb driver(perhaps more things will need to be modified, as I'm facing problem with BATTD sayins something about power ic fail, BTW, does someone know what that could mean?), so that it skips restaring EHCI, TLL and don't start enumeration, but just used the old usb device address(assigned by the original kernel), which for M2 is always 2(at least during my tests).
I2c Fail can be caused by wrong permissions for /dev/cpp*
I tried your prebuilt binaries on defy http://pastebin.com/jKjQ2ykn
Black screen + buttons lights and reboot after ~20sec
Quarx said:
I2c Fail can be caused by wrong permissions for /dev/cpp*
I tried your prebuilt binaries on defy http://pastebin.com/jKjQ2ykn
Black screen + buttons lights and reboot after ~20sec
Click to expand...
Click to collapse
Thanks for hint regarding permissions...will check that
Regarding prebuilt binaries on defy, hard to say what's wrong(not sure how much the phones differ). Anyway, you probably would need to use devtree from your device. Also you could unpack ramdisk, and check the init.*.rc scripts if they are ok(e.g. I mount system partion using p21, not sure if that's the same for defy, and staff like that).

Categories

Resources