yashsingh1/xdaforums huggingface dataset:
[Milestone 2 Android Development] czechop:
BTW, when I boot via 2ndboot, and then restart and boot via 2nd-init, then the first time I'm getting the following lines at the top of logcat:

ARMAssembler: generated scanline__00000077:03545405_00000000_00000000 [ 36 ipp] (50 ins) at [0x40ae21e8:0x40ae22b0] in 152588 ns^M

I ARMAssembler: generated scanline__00000077:03545405_00000A08_00000000 [ 37 ipp] (59 ins) at [0x40ae22b8:0x40ae23a4] in 152587 ns^M

I don't get them the second time 2nd-init and also I'm not getting them when I boot 2nd-boot after 2nd-init. Do you have any idea what they can mean?
[Milestone 2 Android Development] Quarx:
it's normal messages from bootmenu:)

Which features i should enable in kernel config?
[Milestone 2 Android Development] czechop:
Really? Strange, I haven't seen it when booting via 2ndboot... but perhaps I haven't look too carefully:D

No, you don't need to enable any feature. I was asking if you enabled some features in the kernel? E.g. at some point of my tests I was trying to enable debug_fs(CONFIG_DEBUG_FS), but with it, I was getting constant crashes. Perhaps you enabled something which does not like BP?:D

And BTW, where did you get your kernel from? And which version it is? Could you compile the version for milestone2(the one from the first post) and check if it works for you?
[Milestone 2 Android Development] Quarx:
I restored original config and ril works:)

Tomorrow I'll find what is crash it:)
[Milestone 2 Android Development] tezet:
Still I don't get one crucial thing... Do you connect RS232 <-> USB to the phone in host mode? Or there is actually UART output on the USB pins on the phone side? Could you explain how it's connected?
[Milestone 2 Android Development] czechop:
Cool :)
[Milestone 2 Android Development] ela1103:
quarx

please implement this features in custom kernel in our defy

1.swap support

2.usb otg support

3.ram performance

4.overclocking

5.locking apps in memory
[Milestone 2 Android Development] czechop:
There is actually uart output on the usb pins:)

The power module(TWL5030) could be configured to supply RxD TxD on it's micro USB D- D+ pins. And the omap3630 SCM could wire UART output to power module:)
[Milestone 2 Android Development] Skrilax_CZ:
Seeing the issues, 2nd-init source is here btw.: https://github.com/a853/a853_2nd_init/blob/master/2nd-init/2nd-init.c
[Milestone 2 Android Development] kabaldan:
See http://www.droid-developers.org/wiki/UART and e.g. http://www.droid-developers.org/wiki/UsbSerialCable
[Milestone 2 Android Development] devil1406:
OFFTOP!

A little bit of offtop :) but I want to say that it's really nice to watch how Quarx and Czechop are cooperating! I mean the russian and polish guy!

Keep up guys and good luck! :good:
[Milestone 2 Android Development] hackergnome:
WTH!

UART was right under our nose and I was searching the whole board for it!(Months ago!)
[Milestone 2 Android Development] czechop:
Just updated front page with the link to the 2ndboot sources... however they do not differ much from the mileston1 version, so not sure if they will work for your device, but perhaps they will:) (you should change the memory module map boulding to only intialize 256MB(I suppose that your device has 256MB of ram))
[Milestone 2 Android Development] Quarx:
So, need find a way to get it work stable. I really hate this reboots:silly:

P.s UART works too:)

But wtf after "<6>omap-uart.3: ttyS2 at MMIO 0x49020000 (irq = 74) is a OMAP UART3" ? messages are broken.. http://quarx2k.ru/log_02231201.log

fixed in omap-serial.c http://quarx2k.ru/log_03000225.log
[Milestone 2 Android Development] czechop:
I don't like the reboots too:). Do you only get reboots at bootanimation, or also once it booted?

I've checked dmesg from the custom kernel, and from the motorola one, and they look almost the same(even the timing is similar).

The problem arises when the init process starts to invoke system processes. The logcat logs looks almost identical, but when started via 2ndboot, everything takes much longer. Do you know if dalvik can check if the current kernel is the same as the last one executed and if not, then it rebuilds it's cache or something? As this looong booting looks similar as when you clean cache/dalvik cache after installing new system.

Also do you know where can I find sources of tls_enable.ko module? At some point I've enabled TLS in the kernel hoping that I can disable this module, but I was getting constant crashes:(

Regarding the uart... messages are broken as new kernel reconfigures few things(wiring etc.) which are necessary to be getting console output. I will look the things I've chagned to make the uart survive and post a patch file:)
[Milestone 2 Android Development] kabaldan:
Ufff. Finally got the first successful 2ndboot with working GSM/UMTS on Milestone 1 :)

Regarding the non working GPS: add console=ttyMTD10 to cmdline, at least on m1 it's necessary for working GPS. (GPS is fine here after 2ndboot).

Regarding the slow device operation after 2ndboot: I very much doubt it has anything to do with dalvik etc. It seems to be a pure kernel issue.

The memory and i/o benchmarks (quadrant) are very low for some time after 2ndboot (like 300/400 instead of usual 1300/1400). Later (presumably after some time spent in suspend) it suddenly gets much better.

EDIT:

Regarding the TLS: the original tls_enable module source can be seen here - https://github.com/a853/a853_modules_froyo/blob/master/tls/tls-enable.c

As I mentioned in the notes at the beginning of that file, it acts as a revert of two older kernel hack commits used by Motorola in most of their kernels (those hacks have been used to workaround a bionic issue with TLS, fixed in Gingerbread, yet the kernel hacks still used by Moto in GB kernels, unnecessarily).

The 'TLS enable' commit for a custom kernel is here: https://github.com/nadlabak/kernel/commit/6d0d7c7b0df022bfa1c2a522538dfe25411e7405
[Milestone 2 Android Development] espaciosalter20:
OT: Now, we are talking about development... czechop, tezet, quarx, skeevy420, m11kkaa, royale1223 and kabaldan on the same thread... That's very impressive! i feel like i'm on olimpus right now...

On-Topic: someone can check if this could be combined with this modified 2ndboot in order to prevent some of the problems related on booting, at least, moto defy....
[Milestone 2 Android Development] hackergnome:
If people don't know,

Easy recovery is a vulnerable recovery which allows Defy and Defy+ to flash zips /w Google's sign key. Was taken from moto's beta gb leak.
[Milestone 2 Android Development] hsrars-d:
Just a quick question, could we add more cpu steps/vSels or are they hard-coded somewhere else?
[Milestone 2 Android Development] hackergnome:
I'm working on it...
[Milestone 2 Android Development] Quarx:
Yes, reboots on bootanimation in random time.

After patch for Radio, not wakelock stackstrace...
[Milestone 2 Android Development] czechop:
Cool :)

Thanks for this... but it didn't help... probably I still have some mess in the init.*.rc scripts(as with the battery problem):D

So probably the radio patch skips too much regarding initialization. Maybe usb keeps issuing irqs all the time?

Thanks, this patch works. I could remove insmoding tls_enable.ko:)
[Milestone 2 Android Development] czechop:
So without the radio patch, and with this wakelock returning null it was booting ok 95% of time, but with the radio patch you are not getting wakelock problems, but it reboots randomly, is that right?
[Milestone 2 Android Development] kabaldan:
czechop: I don't think that the performance issues are directly caused by your patches. The original 2ndboot worked fine for the 2.6.29 kernel, but some reset/reinitialization is missing for the 2ndboot to 2.6.32 kernel.

See this old conversation:

http://mmlogs.doshaska.net/#milestone-modding/2012-02-15.html
[Milestone 2 Android Development] Quarx:
@czechop, i tried use another method to enable DSS (as in m1)

I disabled "disable dss" and applied yakk patches and no reboots at all:)
[Milestone 2 Android Development] czechop:
Wow... great:D

Where can I find those patches?
[Milestone 2 Android Development] Quarx:
There :):

https://github.com/Quarx2k/jordan-kernel/commit/dc05687dc875dc38c253eaf956f317d9be1e68da

Main patch for DSS.

+

https://github.com/Quarx2k/android_...mmit/5fe4bef50d3a409d06ed1db56f6b6a72861c2190
[Milestone 2 Android Development] Shubhamqweasd:
is it the same DSS that is needed for hwcomposer to work ?

maybe performance will increase after hwcomposer implementation :D
[Milestone 2 Android Development] czechop:
This DSS does not seem to work on milestone2(red moto logo remains on screen), so I need to keep this disable_dss() call.

However the watchdog and/or usb changes improves situation a lot... it indeed boots every time now(checked some 3 times in a row):D

Thanks a lot:)
[Milestone 2 Android Development] czechop:
Thanks for this:)

Do you think there is a chance that some upstream 2.6.32 patch could also improve situation(instead of digging what reset/initialization needs to be done in 2ndboot)?
[Milestone 2 Android Development] Skrilax_CZ:
We're actually trying 2.6.32.59 kernel on MS1 (developed on engineering phones). MS2 / Defy has updated dss over MS1, so the patch probably won't work right away, the dss patch is to reset status bits in DISPC_SYSSTATUS. I suppose the watchdog was causing the reboot problems.

btw. I recall the only issue with the incremental patches from .9 to .59 was the phone not entering suspend on the mmc patch which I reverted, otherwise there should be no problem.
[Milestone 2 Android Development] czechop:
Thanks for this info:).

It seems that on milestone2 there is something more to be cleared/resetted in dss to make it work(without resetting it in 2ndboot module). But that's not a huge problem. The main problem is now with GPS not working:(

BTW, good to know that there were not many issues with incremental patching up to .59:)
[Milestone 2 Android Development] czechop:
@kabaldan

Do you know maybe how the GPS unit is connected to the board?
[Milestone 2 Android Development] Quarx:
About GPS. This works on defy.
[Milestone 2 Android Development] ufish2:
hope this moves forward to the Droid x....would be awesome...;)
[Milestone 2 Android Development] RenegadeX44:
Would this possibly work on Motorola Motoluxe?
[Milestone 2 Android Development] Skrilax_CZ:
Motorola Droid X uses different BP from QC, which will probably be trivial to handle (QC MDM6600 is known to work well with kexec). Motorola Motoluxe is not an OMAP phone at all (QC platform).

This is mainly for OMAP3 phones with Wrigley 3G as BP.
[Milestone 2 Android Development] m.ksy:
So, can someone start working on this for Droid X?
[Milestone 2 Android Development] Shubhamqweasd:
so guys , can we now think of hwcomposer ??

LG has released official ICS for a OMAP 3630 device , but with a 3.0 kernel , so can we backport hwcomposer from it ??

casue JB needs some performance improvement on OMAP3 devices :D

also galaxy sl maintainer , made some hwcomposer hacks to work on 2.6.35 kernel - maybe it could help :D --

http://xdaforums.com/showthread.php?t=1868074
[Milestone 2 Android Development] m11kkaa:
The best would be to use the 3.x kernel of omapzoom as base and port moto's (cpcap)-patches to it.
[Milestone 2 Android Development] bone101:
Sounds good so lets look what quarx will do
[Milestone 2 Android Development] AnTerNoZ:
look here github.com/Quarx2k/jordan-kernel/tree/p-android-omap3-3.0

Jelly powered.Defy
[Milestone 2 Android Development] Megalith27:
my understanding is that Quarx's kernel won't work on Milestone 2.

guess, we will have to wait for tezet to do his magic
[Milestone 2 Android Development] UEman:
They are almost the same. If quarx has a running 3.x kernel tezet just needs some (easy) changes to make it work on the milestone 2
[Milestone 2 Android Development] Swift_LawnGnome:
Sorry if this has been asked, but the search function isn't working. Does this mean anything for the Droid X?
[Milestone 2 Android Development] benitoxu:
It seems a little difference between MS2 and Defy. Defy's kernel wouldnt be used on MS2

And I think we should wait for czechop and tezet to deal the problem for a longer period.

Why MOTO make them different,I really wanna kick its ass.
[Milestone 2 Android Development] czechop:
Actually defy and milestone 2 kernels are almost identical... they differ only in 3 or 4 places(and the changes are identical, if I remember correctly, as the ones done to the Brazil milestone 2 kernel 4.5.2-51). So in theory, and most likely in practise also:D, defy kernel made by Quarx should work on milestone2:)

My only concern is about GPS, which seems to not work during my tests for milestone2, but it works on defy, so perhaps I've made some mistake.

BTW, as I've seen, Quarx is making a lot of changes/patches to the kernel, so I think that there is a high chance that the stability and speed will be much improved as compared to the kernel motorola provided:)
[Milestone 2 Android Development] Quarx:
i need help with getting uart work on 3.0.8 kernel.. can't understand why it not work.

Didn't see

Uncompressing Linux............................. done, booting the kernel
[Milestone 2 Android Development] ppero196:
Any errors...I might know about this..I had some experience with kernels

Sent from my house via interwebs to You!
[Milestone 2 Android Development] czechop:
I presume that you can see output from 2ndboot module, right?

Do you have right UART set in kernel .config?
[Milestone 2 Android Development] Quarx:
Yes, log http://pastebin.com/VQjEM4Ai

Commits: https://github.com/Quarx2k/jordan-kernel/commits/p-android-omap3-3.0
[Milestone 2 Android Development] czechop:
You most likely will need to patch this file:

https://github.com/Quarx2k/jordan-k.../arch/arm/plat-omap/include/plat/uncompress.h

and set the board to use UART3. I guess that most likely it uses UART1 from this statement:

DEBUG_LL_OMAP3(1, omap_3630sdp);

EDIT: Actually the mach id is not 3630sdp but mapphone, so you would need to add

DEBUG_LL_OMAP3(3, mapphone);

to the __arch_decomp_setup function in that file.
[Milestone 2 Android Development] ppero196:
I read somewhere that there were issues with TI drivers and UART

Sent from my house via interwebs to You!
[Milestone 2 Android Development] Quarx:
No changes, the same output.

https://github.com/Quarx2k/jordan-kernel/commit/12b6b3efe3d0ad6828b13c9b319ae3c302f0a112
[Milestone 2 Android Development] Shubhamqweasd:
maybe guys on this thread may help see the 2nd post ..

http://xdaforums.com/showthread.php?t=1711061
[Milestone 2 Android Development] czechop:
Perhaps it does not get that far, and maybe it crashes earlier? You could insert something like this:

void uart_send_char(char c)

{

uint32_t uart_base = 0xFB020000;// UART3

while ((__raw_readl(uart_base + 0x44) & 1) != 0);

__raw_writel(c, uart_base + 0x00);

}

in the https://github.com/Quarx2k/jordan-kernel/blob/p-android-omap3-3.0/arch/arm/boot/compressed/misc.c

and call it at the begining of decompress_kernel(e.g. uart_send_char('B') to see if it gets that far(I'm not quite sure if the virt/phys addresses haven't changed betweend 2.6.32 and 3.0, so don't know if 0xFB020000 is still valid, but I presume it should be).

If you can see 'B' char, than most likely it would have something to do with you using zoom board config file.
[Milestone 2 Android Development] Quarx:
No, i'm not see any chars in uart...
[Milestone 2 Android Development] czechop:
So either this procedure does not work, or kernel crashes earlier.

For the second option, I have one more idea.

You could define DEBUG macro at the top of:

https://github.com/Quarx2k/jordan-kernel/blob/p-android-omap3-3.0/arch/arm/boot/compressed/head.S

or in the Makefile in this directory, rebuild it and check if this time you get some output. This should be the kernel start point, and this calls decompress_kernel.

If this does not show anything, you can also modify this:

https://github.com/Quarx2k/jordan-k...rch/arm/mach-omap2/include/mach/debug-macro.S

and set:

---------------------------------------------------

omap_uart_phys:	.word	0x49020000

omap_uart_virt:	.word	0xFB020000

---------------------------------------------------

to hardcode values and overcome wrong configuration.
[Milestone 2 Android Development] Quarx:
both variants doesn't show any output:(
[Milestone 2 Android Development] royale1223:
How about looking at the diff between moto and omapzoom 2.6.32 kernels for changes related to uart?
[Milestone 2 Android Development] czechop:
:(

My next step would be to call "putc" at different stages(starting from .start macro) of head.S to see if there is some output, and if yes, where it disappears. But this is quite boring and long job.

Another option probably would be to see if there is some difference between head.S from 2.6.32 and 3.0.8
[Milestone 2 Android Development] ktmbikerman:
Sorry I can't make a positive contribution, just want to say a huge thanks for all the effort put into making this work... there are many Moto users out there rooting for you guys.
[Milestone 2 Android Development] tezet:
Here's first draft build of CM10 for M2 with 2ndboot kernel:

http://dl.dropbox.com/u/76376732/cm10/CM10-20121007-NIGHTLY-milestone2.zip

Seems that everything is working there, but I haven't done any kind of testing yet. (Edit: actually there is problem with paid apps, but it's not related to 2ndboot).

Many thx to Czechop, Quarx2k and Nadlabak!
[Milestone 2 Android Development] hillbeast:
My findings of the OMAPzoom kernel was that it appears to be broken, or at least it wouldn't work for me at all on the Galaxy SL. Perhaps I wasn't looking in the right place, but the issue doesn't appear to be with UART, rather before that, perhaps a bad mach id or something. I really don't know where it has gone wrong, but I've now switched to using the LG Optimus Black code as a base for my efforts in getting kernel 3.0 working on the Galaxy SL.

I'm planning on taking another jab at a later stage using a mainline kernel, but right now I'm more interested in the Optimus Black kernel as that has given me the most progress so far.
[Milestone 2 Android Development] carcinus:
How to install? These data should be cleaned? :cool:
[Milestone 2 Android Development] YaPeL:
Yeah, one kernel to rule them all ( samsung galaxy sl, lg optimus black, motorola milestone 1/2, defy/+/bravo)

Enviado desde mi MB525 usando Tapatalk 2
[Milestone 2 Android Development] Quarx:
After two commits

https://github.com/Quarx2k/jordan-kernel/commit/bc58d1955f40a1494f245d2b63b780d8052703fc

https://github.com/Quarx2k/jordan-kernel/commit/44fbf9e35c4b06a3bf5f50c14987c2ff0bda71d3

I got UART on clean omapzoom 2.6.32, but not help to 3.0.8(lg too).
[Milestone 2 Android Development] :
the draft cm10 released fo M2 won't be usefull in any way for the UART 3.0 kernel from defy I guess right? :( im following this thread closely day2day thx for all your hard work
[Milestone 2 Android Development] czechop:
You could try to apply the latest head.S patch:

http://git.kernel.org/?p=linux/kern...ff;h=e1e5b7e4251c7538ca08c2c5545b0c2fbd8a6635

this most likely will not help, but should not cause problems either.

I've checked the difference in head.S between 2.6.32 and 3.0.8, and there are plenty of them, so it would be difficult to track which one causes the problem.
[Milestone 2 Android Development] sebrein:
I guess this patch could be the reason:

http://omapzoom.org/?p=kernel/omap.git;a=commit;h=06832fd8b2fa2c4dadec81ecb2af35325fb19465

You still need to add CONFIG_EARLY_PRINTK=y to the config and maybe debug earlyprintk to the cmdline, if not already done (http://elinux.org/Debugging_OMAP_kernel).
[Milestone 2 Android Development] Quarx:
Looks like uart problem after rework it.

2.6.32 from omapzoom - uart works (old style uart code)

2.6.35/3.0.8 - new uart style code - didn't work. https://github.com/Quarx2k/jordan-kernel/commit/0c8219f0302d0d27fda52c790d38406801e547ec
[Milestone 2 Android Development] ofmb:
Maybe in sec_param.h - hiilbeast also had many problems with uart

http://xdaforums.com/showpost.php?p=28880958&postcount=93
[Milestone 2 Android Development] Quarx:
'/arch/arm/plat-omap/include/plat/omap-serial.h interesting file.

I'll look into it..

sec_param.h only fro samsung devices.
[Milestone 2 Android Development] ofmb:
what about #define OMAP_TAG_UART	0x4f07 ?

can't find this value in arch/arm/plat-omap/include/plat/board.h

or baudrate too high console=ttyS2,115200?? -edit:nope

" # CONFIG_SERIAL_8250_EXTENDED is not set " should be =y?

also CONFIG_GPIO_SYSFS,

CONFIG_TWL4030_WATCHDOG ,

CONFIG_SDIO_UART ,
[Milestone 2 Android Development] czechop:
Your kernel reaches uncompressing staff, and does not crash earlier:)

To get "Uncompressing..." you could replace:

arch/arm/plat-omap/include/plat/uncompress.h

with the one from 2.6.32, and hardcode uart address:

#ifdef CONFIG_ARCH_OMAP

uart = (volatile u8 *)(0x49020000);

Haven't reached further.
[Milestone 2 Android Development] Quarx:
Yes, i boot it too, but without replace uart adress.

http://pastebin.com/pJgb5Cwz

Kernel still using old machine id and adding "mapphone" doesn't make any sense.

I changed zoom3 uart define to uart3.
[Milestone 2 Android Development] czechop:
But that's strange. 2ndboot passes 8c1(mapphone) as machine id(as you can see for e.g. in one of your logs: http://pastebin.com/VQjEM4Ai), so don't know where from it gets this 9a0
[Milestone 2 Android Development] Quarx:
I just replace number (for tests).

It works: http://pastebin.com/Wzzri4aF

I think there are some more defines about machien id.
[Milestone 2 Android Development] czechop:
Right.

You can add initcall_debug on the command line to help diagnose kernel execution(what init function is called, what was the result and the time it took) :)
[Milestone 2 Android Development] Quarx:
Problem with machine ID fixed and uart:)

https://github.com/Quarx2k/jordan-kernel/commit/53c02daf80fefa43a8f81cb4c33ad4371eb9b73e

Bug from stock rom there too. I prevented uart from dying, to see logs in later boot.

In stock kernel i fixed by kill initialize uart on ttyS2, but there not helped.

http://quarx2k.ru/uart.txt log
[Milestone 2 Android Development] czechop:
If you add initcall_debug to the command line parameters, you should find out which function messes with the uart.
[Milestone 2 Android Development] Quarx:
Yes, http://pastebin.com/yHh8czCu

look like one of "clocks" broke it...
[Milestone 2 Android Development] czechop:
For the 2.6.32 kernel, I had to add in mach-omap2/clock.c the following patch:

https://github.com/czechop/kernels/commit/d89c2706aa784f43cb66e7b62bc2c24359fbdf14

to preserve uart. Perhaps this will work for 3.0 too.
[Milestone 2 Android Development] Quarx:
Applied your patch to /arch/arm/mach-omap2/clock.c

Tried with patch and without https://github.com/Quarx2k/jordan-kernel/commit/746ed733138d5fac01ffe1bf840370961d8d7868 No changes.

Without my patch uart dying after "<4>omap_hwmod: gpt12_fck: missing clockdomain for gpt12_fck."

Btw: where is ram define in "boot"? in past you say that you change from 256 to 512ram.
[Milestone 2 Android Development] czechop:
I think you mean mmu map initialization. In milestone1 256 MB was initialized, while in Milestone 2 512 had to be initialized. This was done in:

https://github.com/czechop/2ndboot/blob/master/hbootmod/hboot.c (lines 213, 214)

Regarding clocks... in omap_hwmod.c there are some pr_debugs, so maybe adding EXTRA_CFLAGS += -DDEBUG to the mach-omap2/Makefile will tell something more? :)
[Milestone 2 Android Development] Skrilax_CZ:
btw. add this: https://github.com/nadlabak/2ndboot/blob/master/boot/main.c#L44 (disable watchdog, find the register addressin OMAP3630 TRM, on 3430 it's on 0x48314000) to 2nd-boot binary so you can disable the watchdog patch.
[Milestone 2 Android Development] JayH5:
gpt12_fck: missing clockdomain for gpt12_fck

Quarx, I sent you a PM but you probably get a lot of those...

You could try this patch that was introduced in Linux 3.1, it doesn't seem to have any dependencies (but I could be wrong):

https://patchwork.kernel.org/patch/1086632/
[Milestone 2 Android Development] Quarx:
New log, after enabling more debug http://quarx2k.ru/uart.txt