yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy SL i9003] hillbeast:
This thread to collaborate all efforts towards porting kernel 3.x on to the Galaxy SL. If any developers wish to help then please let me know and I will add you to the repo on Github.

Do not ask for an ETA. If you do or try to cleverly disguise it by asking how long it takes on average or anything along these lines, your post will be reported to a moderator.

Changelog

https://github.com/hillbeast/android_kernel_samsung_latona/commits/ics-latona-3.0

I chose the Github commit system to be the changelog as there are so many things going on at once it would be impossible to keep up with, and I cannot be assed explaining it. If you don't understand then ask, but please don't ask EVERYTHING. Most of the answers will be 'It just does'.

Discussion Thread

This thread is for DEVELOPMENT ONLY. I know you all wish to praise the developers and give your support, but it really clutters things up when there is like 20 posts of 'thanks' and then one post of an update in progress for the project. So let's keep this thread for development, discussion on fixing bugs and such and you can discuss it all over at this thread kindly made over here:

http://xdaforums.com/showthread.php?t=1712224

Source Code

Source: https://github.com/hillbeast/android_kernel_samsung_latona

Members

hillbeast

dhiru1602

crackerizer

If anyone else who has a keen knowledge of the Linux kernel can help, then let me know. Fork the repository, make some changes and send me a pull request. If you don't know how to do that or can't figure out how to do it then you won't be able to help me.

Why Do We Need Kernel 3.

Easier updating the kernel to add security and performance boosts from mainline Linux kernels

More support for new versions of Android

Android 4.0 was built upon Linux Kernel 3.0.x and therefore expects kernel 3.0s APIs

Faster, more secure system

NO SAMSUNG MORONIC CODE

Because it's just better

Please let me know if you are interested (able to) in helping this cause. Please don't put your hand up if you can't dedicate your phone to this. This will result in your phone being out of action quite a lot while we are testing, and if you need your phone 24/7 then you're going to need to keep flashing back. You will also NEED ODIN. Flashing from CWM is not an option.
[Samsung Galaxy SL i9003] hillbeast:
How To Build

git clone git://github.com/hillbeast/android_kernel_samsung_latona -b android-latona-3.0

cd android_kernel_latona

make latona_defconfig ARCH=arm

./build.sh config

./build.sh
[Samsung Galaxy SL i9003] hillbeast:
Things to be aware of

I feel these things should be mentioned as they are important changes that may disrupt peoples user experience on the phone.

Odin will not work anymore for flashing ROMs. It's as simple as that. We will no longer be using STL/BML/TFSR for interfacing with the NAND, and that is what ODIN expects to be working with: partitions in STL format. We simply will not support STL when this kernel is complete as it is closed source and will not function on kernel 3.x. We will be moving over to MTD which is mainline, and regularly gets updates to improve performance, reliability and in general to make it better.

Kernels will however be flashable from ODIN. This WILL NOT change. Kernels, modems and bootloaders will all still work from Odin. Data, system and cache will not.

I know this will annoy a few people, as it will disrupt me too as a developer and a Windows user, it's nice to be able to flash a ROM this way, but we're going to have to move towards distributing ROMs in update.zips only.

There will be no support for Samsung Froyo/Gingerbread ROMs in kernel 3.x. The reasoning behind this is because Samsung ROMs want Samsung drivers and we won't be using any of them. We will be aiming to support CM7 and CM9, or generally any AOSP ROM, but not Samsungs proprietary ROM. You may think 'well why not make the drivers work for both', but the problem is not with making the drivers work, the problem is with the fact that a lot of these drivers were written for a kernel almost 10 major versions out of date by now, and will not function on the new kernels APIs. If we try to make them work, it will make the kernel unstable and it's going to degrade the experience for the end user. As well as that, we don't know how half these drivers actually work because they are either coded so badly it's impossible to make heads or tails of it, or it's closed source and we can't find sources for it.

Kernel 3.x will not allow us to work magic with the phone. Having a newer kernel won't allow us to make the CPU itself faster, we can't give it more RAM (or find more RAM in there). We won't be able to unlock more performance from x part. This is not a magical rebirth of the phone, this is just a major fix up of all the current issues we face with AOSP based ROMs on the phone. It will most likely make the phone faster, but we can't magically make it into a dual core or something like that. It just isn't possible.
[Samsung Galaxy SL i9003] hillbeast:
Did you see it? Could have been anyone. Could you spot him in a crowd? Probably not. It's just a reserved post.
[Samsung Galaxy SL i9003] hillbeast:
And I think this should do it for reserved posts. You may now post.
[Samsung Galaxy SL i9003] sachin sharma:
i will be glad to help
[Samsung Galaxy SL i9003] hillbeast:
For the Galaxy 3 I use Codesourcery 4.5.2 as Linaro doesn't work on it. I will see what works best for this phone. I have to learn the whole device.
[Samsung Galaxy SL i9003] sachin sharma:
m connfused??????

in ur build.sh u have used

TOOLCHAIN=/usr/linaro/bin/arm-linux-gnueabi-?????

y is this lenaro toolchain for?

r u going to edit it n use sum other toolchain???

---------- Post added at 12:18 PM ---------- Previous post was at 12:03 PM ----------

i m going to fork ur repostory!!!

downloading vmware now as i dont have linux environment due to hard disk issues
[Samsung Galaxy SL i9003] hillbeast:
Oh perhaps I am using Linaro. I was at work when I wrote that so I wasn't really thinking.

I have a build server that I use for my development, but I used to use VMware for my Linux devving so that will work fine for you too.

Also update on the USB issue I was having, it must have been the condensation because it's working fine now after leaving it to dry out while I was at work. I'm flashing Gingerbread on it so I have a stable platform while I learn the device.
[Samsung Galaxy SL i9003] hillbeast:
Right so first priority is to get UART output. My current UART cable with a 612K resistor (I think it was 612K) doesn't give me any output. I'd say that is the wrong resistor for this device, so I need to find out which one it is. However the cable does JIG the phone to start up.
[Samsung Galaxy SL i9003] hillbeast:
Update to this: got this output:

AST_POWERON

BOOTING COMPLETED

That's the modem speaking to me over UART. Gotta change the UART mode to PDA instead of MODEM. Will do that once I root the phone.
[Samsung Galaxy SL i9003] hillbeast:
Another update, I did this in adb shell:

echo PDA > /sys/devices/platform/switch-sio/uart_sel

Then rebooted the phone with my UART cable attached and now I get this:

Uncompressing Linux... done, booting the kernel.

So it's giving me output up until the kernel boots which told me the console attribute in the cmdline isn't set. I looked and that confirmed it that it wasn't. I will get the sourcecode for a kernel and compile it with the console attribute.

So yes, this phone will do UART. I just have to do it a bit weirdly.
[Samsung Galaxy SL i9003] Skander1998:
I made a discussion thread here, post only developement related things in here, and everything else goes there :)
[Samsung Galaxy SL i9003] hillbeast:
It means I will be able to debug the kernel while I am developing it.

Thanks. I will subscribe to it.
[Samsung Galaxy SL i9003] hillbeast:
Right so I just had to figure out how to compile kernels on this phone. It's completely different to doing it on the Galaxy 3. On the G3, we just use zImages, whereas here it's using boot.imgs which is quite different. I've updated my build.sh to account for this. I'm still not actually working on Kernel 3.x. I'm still learning the device and getting it set up so I can develop on it.
[Samsung Galaxy SL i9003] TheFrankenstain:
Maybe this help :)
[Samsung Galaxy SL i9003] arindammanidas:
Yup.... the boot.img contains both the zImage and ramdisk ...
[Samsung Galaxy SL i9003] hillbeast:
Already figured it out, but thanks anyway.

zImages can contain ramdisks too. Been using it like that on the G3 for long time. We used LZMA compression and managed to cram a hell of a lot into the boot partition.
[Samsung Galaxy SL i9003] sachin sharma:
i can make boot.img for u

if u want
[Samsung Galaxy SL i9003] hillbeast:
Don't know why I didn't think of this earlier but to get around the kernel potentially crashing or the phone potentially not booting into the kernel for whatever reason... why don't I just use kexec...

God I'm a dumbass.

EDIT: here I'll use this as a reference when I get home: http://xdaforums.com/showthread.php?t=1361943

Sent from my Serenity Galaxy S2
[Samsung Galaxy SL i9003] mhajho29:
@hill beast

so kexec runs a 2nd.init to run a new kernel right...? i check the thread you post... but seems like at the end its not really kexec...!!! its a compiled part to used kexec on what i have read.... will it still be useful?
[Samsung Galaxy SL i9003] cdesai:
Uh no, it doesn't

Kexec allows "live" booting of a new kernel "over" the currently running kernel., but getting that to work on android will be tricky.

hillbeast, what you need it this :)

https://github.com/CyanogenMod/andr...mmit/c1da0ec80dfd3b437bebf011b39835939fc251ce

More info on it : http://xdaforums.com/showthread.php?t=1266827
[Samsung Galaxy SL i9003] hillbeast:
Thanks. I'll put this in my list of material. I'll work on it on Monday.

kexec will also make testing the kernel easier as I won't have to keep Odining the kernel on there.
[Samsung Galaxy SL i9003] hillbeast:
Okay so I've just had a discussing with Dhiru, and it's looking bleak.

I still am stumped about the lack of decompression (not giving up on it, I have a few more ideas up my sleeve), and he has also been talking with other developers who have dealt with kernel 3.x on OMAP and they have been recommending it against it and for good reasons, namely because... well you guys pretty much have ICS working 99%. There are the few things that aren't working, like WiFi and video recording, but most of it is working. Once kernel 3.x is in the stage that it can start Android, kernel 2.6.35 will still be ahead, and it's going to have more functionality for quite a while to come (assuming I can get it to boot in the first place) which makes kernel 3.x almost seem a lot less important.

Sure, things will work better on the new kernel, but apparently (I am not familiar with all this as I mainly deal with Samsung SoCs which have all their drivers put into mainline kernels unlike OMAP where it's a bit all over the place and you go through OMAPZoom) the newer kernels have been breaking support for OMAP3 seeings it's apparently 'old'. I saw this myself when I tried to compile 3.4 for OMAP3630 SDP, which should work just fine, and it was trying to compile a bunch of crap for OMAP5 and then erroring out. Not a good sign really.

So what does this mean for this project?

Well I'm going to still get kernel 3.x working on this phone even if it's the last thing I do, but I'm going to change my priorities now. As I said, kernel 3.x isn't THAT important on this device seeing most of it works in ICS and it'll be the same story for JB. Instead I'm going to put my efforts for this device into helping Dhiru get ICS finished. I can't make any guarantees I'll be helpful there as I'm a kernel developer, not an Android developer, but I can certainly try. I'll also work on improving the current kernel and getting rid of proprietary drivers from it (namely STL/BML/FSR) and moving it to mainline to improve support in Android and all that crap.

This project is by no means dead, it's just taking a back seat for a bit while I figure out what the hell is going on.
[Samsung Galaxy SL i9003] Hetalk:
^^ I'll say this would be the best way forward, as I understand that Dhiru's managed to get a little support for video recording working on 2.6.35 working. If you guys (and gals?) can get it working, I'm sure most people who are on GB will surely move to ICS.

All the best to you and Dhiru and all of us using this device.

I hope there wont be many(any?) negative comments on this decision, as I guess you are the devs and I'll trust you to know the best way forward for 9003.
[Samsung Galaxy SL i9003] Sp8ky:
thanks a lot hillbeast, nobody can contest how hard you are trying. We really appreciate your efforts!!!
[Samsung Galaxy SL i9003] |DM|:
I think that your choose is good

ICS full is realy near, there are 2-3 bug (like video rec and frontal cam) but it's better than stock

I think that try to fix @ 100% the "old" 2.6.35 is the best way to get a stable ICS versione in short time
[Samsung Galaxy SL i9003] Wahaha123:
The main thing we wanted from kernel 3x was to have a perfect replica of ics on are phone, so your choice was as good as ours. it is best to continue dhiru's ics in 2.6.35 kernel than once its perfect, you could continue on that 3.x kernel bulding... :)) brilliant plan!
[Samsung Galaxy SL i9003] mR_:
So basically you guys taking a shortcut to get 100% working ICS which is the main thing thank you
[Samsung Galaxy SL i9003] Gondya bhau:
a bit dissapointed with the news but its allright...you gave it all you could.....so thanks for the effort :good:

anyways..now that you are planning to improve the current kernel with dhiru, will you be getting just features working or will you be going down to improving the basics of this kernel ???

like how you removed the memory(60MB) allocated for some message cache and gave it to system cache in kerenl 3.x.....stuff like that...
[Samsung Galaxy SL i9003] luiseteyo:
Doomlord said it was possible to backport a lot of things from 3.0 kernel to 2.6 one and everything was working pretty good on JB. I imagine u and dhiru are going to do that, am I right hillbeast?

And another think, I ask this because I don't know the answer, but I doubt that every device with JB running has 3.0 kernel, is this true? What I mean is that dhiru said that almost everything was working well in CM10...now, with hillbeast help I think they can adapt CM10 to our kernel, so hillbeast decission is no so bad.

During doing that, @hillbeast, please, continue thinking where can be the problem, ask other developers, don't give up in ur head. Thank u very much for your efforts and for explaining everything in the forum. You are always explaining what u do, what u are going to do, what u think, and that is very good for us, to know what the hell is happening to our phone, so BIG THANKS
[Samsung Galaxy SL i9003] matapollos:
I used to enter this thread almost everyday, I loved the way you explained everything you were doing, and that taught me a lot.

I also understand your posture, if I were you I'd do the same ;) Furthermore: many times is better to take some distance and give up on focusing on a stone just to see the whole building (just a metaphore, haha).

Hope you don't mind this post, cheers!
[Samsung Galaxy SL i9003] marshygeek:
Same as above. :) I got a feeling of upside down depends on the latest news on this project. I almost gave up knowing that kernel 3.x is always not going as what you want it to go. So i flashed stock rom and accept the fact that this is MY REAL ROM. NO ICS NO OTHER THIS IS MY 9003.

I'm happy for i know now what will i wait for. Not just from you, but the other devs also. Thanks HB! :)
[Samsung Galaxy SL i9003] hillbeast:
I don't know what the status is of Jellybean as I haven't really been looking. I don't really read much of what goes on in any forums, not even the Galaxy S2. I only really produce stuff and don't bother to look around. Not really a good example I'm setting but that's just how I am: I'm too busy to keep track of everything at once.

To answer your question, yes it is possible to port kernel 3.0 drivers to 2.6.35, but it's generally not recommended as you are then making a bit of a mess, but to be honest I'm beyond caring seeing Samsung already make a mess of their kernels.

And as I said, I'm not giving up, just moving my efforts to something else until I come up with a bright idea.
[Samsung Galaxy SL i9003] :
Good luck.
[Samsung Galaxy SL i9003] crk1995:
Check alfrix's public activity. https://github.com/alfrix

I found him mentioning that there is a different uart_switch for latona....
[Samsung Galaxy SL i9003] vishal24387:
I was searching for usb otg over xda site & surprisingly I found omap 3630 datasheet. I remember that once u had said that u are not getting proper datasheet related to omap 3630. Thats why I posted it here. Hope it will help u. (If u have already this then please ignore this post :))
[Samsung Galaxy SL i9003] hillbeast:
Yeah I found it a while ago. I remember I had it when I got UART working properly on 2.6.35.
[Samsung Galaxy SL i9003] crackerizer:
Hillbeast,

I'm investigating into the 2.6.x kernel and need to ask you a question.

What happen when you boot the phone with kernel 3.0? Is there anything shown up on the screen? :confused:
[Samsung Galaxy SL i9003] hillbeast:
Nah all I see is the normal Galaxy SL logo as it shows from the bootloader. Most likely either the display drivers aren't working or it crashes before it reaches that stage where it initialises the drivers.
[Samsung Galaxy SL i9003] Gondya bhau:
this may be useful
[Samsung Galaxy SL i9003] hillbeast:
I'm looking into how difficult it will be to port the Black kernel to our device. Just running some tests now.
[Samsung Galaxy SL i9003] hillbeast:
So I just compiled the Black kernel for our phone, flashed it and put in the UART, and this is the output:

Uncompressing Linux... done, booting the kernel.

Well that's more than kernel 3.0 ever gave me. Does this mean it's not going to work? Hell no. The fact I have anything showing up is a HUGE plus. Means now I can start spamming the UART with debug messages to find where exactly it's stopping and fix the bugs. Perhaps I could port the LG Optimus Black kernel to our phone. Sounds like a good project.
[Samsung Galaxy SL i9003] crackerizer:
Ahh, this is a very good news. I'll get the kernel and have a look at it. HB, do you have a git repo of it?
[Samsung Galaxy SL i9003] hillbeast:
Not yet. I've initialised a repo, but it's not on Github right now. I'm just poking around with it first.
[Samsung Galaxy SL i9003] Sonoo:
DSSCOMP

@ HB

One query, dhiru said in cm9 forum that our device hasn't got "DSSCOMP". Isn't it based on the kernel level? Kindly clarify!
[Samsung Galaxy SL i9003] Silentkiller101197:
http://www.gsmarena.com/lg_optimus_black_ics_update_confirmed_by_the_retail_box-news-4677.php

Sorry for the off topic..
[Samsung Galaxy SL i9003] crackerizer:
DSSCOMP is a part of DSS2 which is available in OMAP kernel 3.0. If we are able to get the 3.0 then we get DSSCOMP.
[Samsung Galaxy SL i9003] dhiru1602:
If would be interesting to see how LG implements DSSCOMP on the Optimus Black.
[Samsung Galaxy SL i9003] crackerizer:
HB, can you post the link to the kernel source? I couldn't find it. :silly:
[Samsung Galaxy SL i9003] alfrix:
i tried to port memblock and ion for dsscomp but failed every time, here are the sources i was poking around.

https://github.com/CyanogenMod/lge-kernel-sniper/commits/android-omap-2.6.35-ics?page=1
[Samsung Galaxy SL i9003] crackerizer:
alfrix, thanks for the link. But it seems like 2.6x kernel. I thought we are talking about the optimus's 3.0 kernl, aren't we? :confused:
[Samsung Galaxy SL i9003] alfrix:
official ics for p970 isn't released yet, so sources are not released for it yet. that is the cyanogenmod ics branch of p970 which has some nice features that we are needing.
[Samsung Galaxy SL i9003] dhiru1602:
I have talked to Hillbeast about porting the Optimus Black 2.6.35 kernel to our phone. This would give us some experience with it and would be useful in the future when the ICS Optimus Black kernel is to be ported to our device.
[Samsung Galaxy SL i9003] ardicli2000:
New Galaxy S Duos seems to have the same Camera with SL but I am not sure of course :(. And the Duos has ICS running. it may be helpful.

And I think more importantly someone ported Jelly Bean to Nokia N9 which has the same processor and GPU:

http://blog.gsmarena.com/android-4-1-jelly-bean-ported-onthe-nokia-n9/

Sorry just saw that he used kernel 2.6.xx :(:(:(
[Samsung Galaxy SL i9003] crackerizer:
Oh, sorry for my confusion.:D
[Samsung Galaxy SL i9003] hillbeast:
I really hate assembler. It's such a pain in the ass to deal with. Finally I have a debugging function working at the decompression stage:

Uncompressing Linux... done, booting the kernel.

STILL ALIVE

STILL ALIVE

Those two messages come from my debugging macro debugmsg, and are put here:

call_kernel:	bl	debugmsg
bl	cache_clean_flush
bl	cache_off
mov	r0, #0	@ must be zero
mov	r1, r7	@ restore architecture number
mov	r2, r8	@ restore atags pointer
bl	debugmsg
mov	pc, r4	@ call kernel

That's the last part of the decompression, and you see bl debugmsg at the first and second last lines which means the code is still working there. The final line the the line that boots the kernel (mov pc, r4 - move processor cursor to the location set at register 4). So the decompression is fine. Now I need to get debugging to work in the early stages of the kernel.
[Samsung Galaxy SL i9003] hillbeast:
I think my main goal is to make a kernel that is compatible with both the Latona and the Sniper (codenames for the Black and the SL). Even if its not a "flash this on both phones and it works" kernel rather a kernel that just needs to be compiled, it would be cool. I hate how fragmented it is to have a kernel on each phone.

Sent from my Serenity Galaxy S2
[Samsung Galaxy SL i9003] Sonoo:
Bundle of thanks. Fingers crossed for fixed HW composer:)
[Samsung Galaxy SL i9003] Wahaha123:
make things clear, you got the decompression working on 3.0 using black's 2.6.35 as reference? or is this a 2.6.35 port from black? lol sorry im slow today, i'm not really in normal state right now.. :P
[Samsung Galaxy SL i9003] dhiru1602:
Precisely. Maybe we could use the same kernel with a different defconfig.
[Samsung Galaxy SL i9003] sh7adeh:
I follow your girthub repo ,., looking at your new project with LG kernel ... optimus black will have kernel 3 with ICS or this 2.6.53 build will help you figuring whats wrong with omapzoom kernel or simply you will deconfig currently optimus black kernel 2.6.XX and use it later on SGSL ??

regards:D
[Samsung Galaxy SL i9003] hillbeast:
This is to help me learn the LG kernel.

Sent from my Serenity Galaxy S2
[Samsung Galaxy SL i9003] ardicli2000:
Yey :D

http://www.gsmarena.com/lg_singapor...timus_2x_black_3d_lte_and_prada-news-4695.php
[Samsung Galaxy SL i9003] kamilien:
It seems we have something now!

http://xdaforums.com/showthread.php?t=1869514
[Samsung Galaxy SL i9003] vishal24387:
@ hillbeast

Buddy can u give in detail tutorial about how to setup all UART connection??? Now a days you are busy so if u provide a tutorial about UART then it will help alot to dhiru & other developers to work on porting optimus black kernel by using their own UART setup.

Also hope LG will soon release optimus black kernel source code. Hope u will come back in action that time.
[Samsung Galaxy SL i9003] hillbeast:
http://xdaforums.com/showthread.php?t=1713404

I'm on holiday next week and plan on doing some serious development then. I'm going to take a bit of a look today once I've woken up a bit.
[Samsung Galaxy SL i9003] nsle:
http://git.omapzoom.org/?p=kernel/omap.git;a=shortlog;h=refs/heads/p-android-omap3-3.0
[Samsung Galaxy SL i9003] hillbeast:
Why are you linking something we have been using for ages?
[Samsung Galaxy SL i9003] shriom_manerker:
what are u currently working on ? is ur linux server finally up ? or is it still installing ? :)
[Samsung Galaxy SL i9003] hillbeast:
It's currently compiling Android to make sure everything is alive and working.