[development]-kernel 3.4-freexperia

Search This thread

jerpelea

Senior Recognized Developer
Nov 7, 2006
7,474
40,177
Lund
sites.google.com
Project Status

- we got initial branch after diffing lost of branches
M7630AABBQMLZA203029A
https://www.codeaurora.org/gitweb/q...it;h=4b2b84c6a0b6d29864e982a7aecc223acfd2eaa1

forked to our git and with mogami patches aplied
https://github.com/freexperia/android_kernel_semc_msm7x30/tree/M7630AABBQMLZA203029A

latest CAF tag for 7630 not usefull for now
https://www.codeaurora.org/xwiki/bin/QAEP/release
"November 16, 2012 M7630AABBQMLZA40701070 - msm7630 - M7630AABBQMLZA40701070.xml - 04.01.02" android 4.1
 
Last edited:

CosmicDan

Senior Member
Jun 19, 2009
5,906
7,746
37
Sydney
Xiaomi Poco X3 Pro
This is a bold task. Perhaps you could look at the developments of irii-soft (and some others), they have replaced some crap Sony-specific code with generic wrappers. Main obstacle if I remember is memory maps now, there was an issue with partition maps but ATAG can be easily over-ridden via kernel command-line.

Getting it to boot should be trivial, sound and video will be difficult, and RIL may be never working due to lack of sources. Regardless, all the best. When I have more time I plan to help irii with his work on a "generic" 2.x kernel newer than what we have (because 3.x seems outrageous at this point).
 

Boudin

Senior Member
Sep 1, 2008
175
86
Rennes
Is there a wiki, a forum or something like that lists all the non-standard things that have already been found ? (some base of work to do)
 
  • Like
Reactions: Marchello1

CosmicDan

Senior Member
Jun 19, 2009
5,906
7,746
37
Sydney
Xiaomi Poco X3 Pro
Is there a wiki, a forum or something like that lists all the non-standard things that have already been found ? (some base of work to do)

Easy to do yourself - download official SEMC kernel source and diff it with the same version of the linux baseline kernel. So to port to newer kernel you can isolate or "extract" the specific code that has been added and changed, and merge or "inject" that into a newer kernel. Easier said than done though, there are massive changes even in linux kernel revisions (0.0.x.0) - let alone alone new majors and minors (x.x.0.0).

There wouldn't be a wiki or anything of this research, because documenting it all would take an unrealistic amount of labor. Considering there are only a small handful of developers capable of it, there's no point. Besides, that's what GitHub and commit logs are for.
 

The Gingerbread Man

Senior Member
Sep 4, 2010
8,096
3,948
Gloucester
To FXP team,

I don't know if you know or not or even got this far in the development stage but I just wanted to point out a couple of things which may or may not help you...

So with the 3.4 kernel brings newer WiFi drivers which will give a better connection signal on wpa2 security but you might find that devices won't be able to connect to open security networks and WiFi hotspot will probably be broken. I'm posting this as on my gnex using custom kernel (FrancoFransico) he incorporated the 3.4 WiFi drivers a few times and broken hotspot and not being able to use open security WiFi networks were repeatedly reported problems.

I think it may be something hardware specific which allows these features to work on the 3.4 WiFi drivers specific to the nexus 4? You may have more luck trying the 3.0.xx WiFi drivers and getting those to work fully.

Best of luck to you guys!

Sent from my Galaxy Nexus
 

CosmicDan

Senior Member
Jun 19, 2009
5,906
7,746
37
Sydney
Xiaomi Poco X3 Pro
I'm pretty sure wifi is way down on the priority list, not to be rude but really - who cares about that now. Priority list would be like this:

(1) Get it to boot
(2) Fix primary/critical hardware-specific code for msm7k and qcom platform (display, audio)
(3) Fix RIL
(4) Fix secondary hardware (sensors, bluetooth, wifi)

One step at a time. Getting wifi will probably be trivial because bcm sources are part of the mainline kernel.

With that said, I'm unsubscribing from this thread now. There is massive work to be done and I can see this thread is just going to be filled with posts that have nothing to do with actual development.
 

tom3q

Senior Member
May 31, 2011
358
1,611
Warsaw
github.com
Easy to do yourself - download official SEMC kernel source and diff it with the same version of the linux baseline kernel. So to port to newer kernel you can isolate or "extract" the specific code that has been added and changed, and merge or "inject" that into a newer kernel. Easier said than done though, there are massive changes even in linux kernel revisions (0.0.x.0) - let alone alone new majors and minors (x.x.0.0).

There wouldn't be a wiki or anything of this research, because documenting it all would take an unrealistic amount of labor. Considering there are only a small handful of developers capable of it, there's no point. Besides, that's what GitHub and commit logs are for.

I was asked by some user of this forum to give some kernel porting guidelines in this thread, so let me introduce myself first. I'm the developer of 3.0.x kernel for Samsung Galaxy Spica (also several other projects for Spica and Galaxy Apollo/Galaxy 3) and currently also Linux kernel developer at Samsung Poland R&D Center. Porting the kernel for Spica was a difficult task, because of poor quality of original kernel code, which required rewriting from scratch most of it, but it was very educational.

It's not easy to give advice, but I'd say that taking all the differences from clean kernel and applying all of that on top of newer version is what should be avoided. Of course those differences should be collected to see what was changed by the manufacturer, but this should be only used for further analysis, not as a ready code.

Another thing, rather than using the mainline Linux kernel to compare your phone sources with, it should be better to use Android kernel from Google's kernel/common tree (see https://www.codeaurora.org/gitweb/quic/la/?p=kernel/common.git;a=summary for older version archive) bumped to the same minor version using minor patches (found on kernel.org) or, possibly even better way, by pulling appropriate version tag from kernel.org git on top of proper branch of Android kernel tree. This will elminate Google's changes (that would be already available in your new base - android-3.4 branch of kernel/common) from the diff.

For getting the diff, I would personally also use Git. If you create a branch in your working tree which contains Android kernel in the version corresponding to your device kernel (using the way I described in previous paragraph), then copying your device kernel sources onto your working tree (remember to make distclean both trees to remove any compiled/generated files) will allow you to see the differences using git status and git diff. (See http://gitimmersion.com/ if you want to learn more about Git.)

Now it's important to split the changes into logically separate parts, for example core changes in arch/arm/mach-whatever_suitable_for_your_device, adding of particular drivers in drivers/, sound/ and include/, modifications to core kernel code in any other directories. It's essential to check whether all the changes are really required or not and why, because minimalizing the set of changes required to be replayed on top of your new base kernel sources will simplify your work.

After collecting all the changes, it's the time to apply them on top of your new kernel sources. All the changes should be applied one by one, checking how much the component that is being touched has changed since your old kernel and adjusting the changes properly. After applying each change, it should be verified that the kernel at least compiles, although it would be even better if you could get the kernel without any (or almost any) modification to boot to some state, e.g. showing something on the console (any chance to get access to serial console on your device?), and then check if it still boots after applying each next change.

Some links that might be useful:
- Linux cross reference, for comfortable reading of kernel code - http://lxr.linux.no/+trees
- Linux Device Drivers, a book about kernel programming - http://lwn.net/Kernel/LDD3/
- Git Immersion, a great Git tutorial - http://gitimmersion.com/
- Android kernel/common repository with full archive - https://www.codeaurora.org/gitweb/quic/la/?p=kernel/common.git;a=summary
- Linux stable repository, with all version tags - http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary

Hopefully what I wrote will be helpful in your project. Good luck and best regards.
 

scholbert

Senior Member
Aug 1, 2007
1,347
821
Hey tom3q,

thanks a lot for leaving some useful statements here!
Another thing, rather than using the mainline Linux kernel to compare your phone sources with, it should be better to use Android kernel from Google's kernel/common tree (see https://www.codeaurora.org/gitweb/quic/la/?p=kernel/common.git;a=summary for older version archive) bumped to the same minor version using minor patches (found on kernel.org) or, possibly even better way, by pulling appropriate version tag from kernel.org git on top of proper branch of Android kernel tree.
I digged for some base kernel for a while.
Found a chromium msm kernel 2.6.32.9 at codeaurora (i know this is not Android).
Anyway, the diff against stock was ~30MB... quite too much.
Like i assumed many basic things are missing as well, so too much to start from.
I guess, i'll step through the other projects... might try 2.6.32-rc8 from the msm tree... just for fun of course :angel:

After applying each change, it should be verified that the kernel at least compiles, although it would be even better if you could get the kernel without any (or almost any) modification to boot to some state, e.g. showing something on the console (any chance to get access to serial console on your device?), and then check if it still boots after applying each next change.
Nice point... i like these hardware hacks and asked about testpoints for UART3 on the Pro mainboard a few days ago.
It's mentioned and so far i got it, initialized in stock kernel as well. Unfortunately no-one seems to know anything about these testpoints.

Anyway i don't want to spam this thread, so thanks for your attention ;)

Regards,

scholbert
 

jerpelea

Senior Recognized Developer
Nov 7, 2006
7,474
40,177
Lund
sites.google.com
hy
scuse my ignorance
but
HOW do you compile an kernel ?

and maybe someone can explain what is the difference between bring-up and port

Hey tom3q,

thanks a lot for leaving some useful statements here!

I digged for some base kernel for a while.
Found a chromium msm kernel 2.6.32.9 at codeaurora (i know this is not Android).
Anyway, the diff against stock was ~30MB... quite too much.
Like i assumed many basic things are missing as well, so too much to start from.
I guess, i'll step through the other projects... might try 2.6.32-rc8 from the msm tree... just for fun of course :angel:


Nice point... i like these hardware hacks and asked about testpoints for UART3 on the Pro mainboard a few days ago.
It's mentioned and so far i got it, initialized in stock kernel as well. Unfortunately no-one seems to know anything about these testpoints.

Anyway i don't want to spam this thread, so thanks for your attention ;)

Regards,

scholbert
 
Last edited:

voyteckst

Senior Member
Jul 16, 2008
652
147
Cracow
hy
scuse my ignorance
but
HOW do you compile an kernel ?

and maybe someone can explain what is the difference between bring-up and port

I would say that porting is moving and correcting sources from 2.6.32 kernel in our case into 3.x. And bring up is writing particular drivers from scratch?

Sent from my Nexus 7
 

tom3q

Senior Member
May 31, 2011
358
1,611
Warsaw
github.com
diff is 5mb on proper tag
pushed on github

Sorry to throw my 3 cents again, but seeing the repository on github, I'd recommend you to use some time to go through Git Immersion. Even if it takes some time, it will simplify your further work, as Git used properly can really make many things easier.

Otherwise, the diff itself looks mostly fine as a starting point, although some of the differences can be probably eliminated.
 
Last edited:

jerpelea

Senior Recognized Developer
Nov 7, 2006
7,474
40,177
Lund
sites.google.com
Sorry to throw my 3 cents again, but seeing the repository on github, I'd recommend you to use some time to go through Git Immersion. Even if it takes some time, it will simplify your further work, as Git used properly can really make many things easier.

Otherwise, the diff itself looks mostly fine as a starting point, although some of the differences can be probably eliminated.

sony added too many changes to be usefull

since there are several api changes on 32->3.x diff is no good
we have to start from clean board-7x30 and populate devices porting drivers 1 by 1

we have to try an device bringup based on sony changes
 

Top Liked Posts

  • There are no posts matching your filters.
  • 313
    hy all
    this is an project starter for android 3.4 kernel development for all msm7x30 mogami devices

    sources are hosted on
    https://github.com/freexperia/android_kernel_semc_msm7x30

    br
    J
    173
    Project Status

    - we got initial branch after diffing lost of branches
    M7630AABBQMLZA203029A
    https://www.codeaurora.org/gitweb/q...it;h=4b2b84c6a0b6d29864e982a7aecc223acfd2eaa1

    forked to our git and with mogami patches aplied
    https://github.com/freexperia/android_kernel_semc_msm7x30/tree/M7630AABBQMLZA203029A

    latest CAF tag for 7630 not usefull for now
    https://www.codeaurora.org/xwiki/bin/QAEP/release
    "November 16, 2012 M7630AABBQMLZA40701070 - msm7630 - M7630AABBQMLZA40701070.xml - 04.01.02" android 4.1
    149
    ETA

    depending on problems and developers that will join
    from 6 months to NEVER
    124
    they say that a picture is worth a thousand words...

    so here goes...

    device-2013-05-02-150318.png
    device-2013-05-02-195013.png
    device-2013-05-02-195032.png
    device-2013-05-02-195131.png




    CM10 booting with touchscreen working fine!



    Current Status: [ As of 20130503-1930 IST ]

    • Device Boots [ OK ]
    • OS Boots [ OK ]
    • Display [ OK ]
    • Touchscreen [ OK ]
    • Hardware Keys [ OK ]
    • GPS [ Haven't Checked ]
    • BT [ Needs Fixing ]
    • WiFi [ Needs Fixing ]
    • GSM/WCDMA [ OK ]
    • Mobile Data [ OK ]
    • Camera [ Needs Fixing ] (only camera preview works)
    • Proximity Sensor [ OK ]
    • ALS [ OK ]
    • ADB/MTP [ OK ]
    • Charging [ Needs Fixing ] (works on external wall charger but doesn't charge when connected to PC)
    • Audio [ OK ] (fixed at 20130503-0140 IST)
    • Vibrator [ OK ]
    • SDCARD Mounting [ OK ]
    • MTD Mounting [ OK ] (fixed at 20130503-1930 IST)
    • Recovery [ OK ] (dancing recovery fixed thanks to @FXP... color/offset fixed thanks to @mikeioannina)
    • WiFi Tether [ Haven't Checked ]
    • USB Tether [ Haven't Checked ]






    sources pushed to: https://github.com/DooMLoRD/CAF_msm7x30-3.4.x/commits/master_anzu


    calling all devs to chip-in and help with fixes...
    88
    houston ......
    "WE GOT BOOT"