[Q] Mainline kernel for Galaxy S III - Galaxy S III Q&A, Help & Troubleshooting

Dear users!
A few days ago I compiled a mainline Linux kernel for my server and I saw this kernel supports the Samsung Exynos 4412 so I had the idea to run a mainline kernel on my S III. The reason why I want this is that I want to run Debian, which is available for ARMv7 processors, on my S III.
My question is: How do I have to compile the kernel to get a binary out that's compatible with my phone? Do I need a special configuration?
I'm sorry for writing it here but I don't have permission to write into the correct part of this forum and I need the information.
Thank you!

I m no expert but there too much out-of-tree code running on a typical handset; mainline kernels simply lack the drivers needed to make everything on that handset work. A typical phone is running 1-3 million lines of out-of-tree code. Read more here
https:**lwn.net*Articles*662147* (replace * by / ) i cant post links yet

Related

[Q] Kernel 2.6.29

What do you make of this.
http://forum.archosfans.com/viewtopic.php?f=63&t=44030
I'm no Android or Linux expert or even Above Beginner really so would appreciate any info available.
Is it usual to base newer FW on older Kernels. Someone also says Android 1.6 was based on 2.6.29???
Cheers
It shouldn't really make any difference in this case. It's definitely not a 'fake' Froyo as that person is calling it.
When comparing Archos' kernel (it's included in their GPL package) with Android's kernel 2.6.29, there are a lot of differences, about 1000 files changed. I guess they've added some omap patches (I'm not allowed to post external links, yet, so let me describe the git repository: git (dot) kernel (dot) org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git) or even use the omap kernel, because Archos' kernel suffix is also "-omap1".
Good to see that the omap guys are up-to-date with their kernel. So... let's try to make it work on our Archos devices!

[REF] Galaxy S II Kernel source code repository. Please use it instead of .tar

Hi everyone.
git repositories is the best modern way to work with Linux Kernel sources, designed by Linus himself in this purpose.
Today Samsung release sources as plain tarballs, often with a few missing files and it makes collaboration between developers difficult: instead of merging branches or patch in 2 commands, it creates a lot of headaches.
But also community fragmentation!
Sources are available now, source code will be shared here here as common reference point.
Also, benefit of this approach is free cleaned up upgrades when Samsung releases new sources for everyone.
Stay tuned, and contact me if you're an experienced developer that want to be involved in this source organization: https://github.com/GalaxySII
Galaxy S II Kernel sources
Galaxy S II Initramfs
Sample compile script template:
https://github.com/project-voodoo/scripts/blob/supercurio/galaxysii_build_kernel.sh
Sample flashing script:
https://github.com/project-voodoo/scripts/blob/supercurio/galaxysii_flash_kernel.sh
git remotes used:
origin git://github.com/GalaxySII/samsung-kernel-galaxysii.git (fetch)
origin [email protected]:GalaxySII/samsung-kernel-galaxysii.git (push)
android-common git://android.git.kernel.org/kernel/common.git (fetch)
android-common git://android.git.kernel.org/kernel/common.git (push)
linux-2.6-samsung http://git.kernel.org/pub/scm/linux/kernel/git/kki_ap/linux-2.6-samsung.git (fetch)
linux-2.6-samsung http://git.kernel.org/pub/scm/linux/kernel/git/kki_ap/linux-2.6-samsung.git (push)
longterm-linux-2.6.35.y git://git.kernel.org/pub/scm/linux/kernel/git/longterm/linux-2.6.35.y.git (fetch)
longterm-linux-2.6.35.y git://git.kernel.org/pub/scm/linux/kernel/git/longterm/linux-2.6.35.y.git (push)
stable-linux-2.6.35.y git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.35.y.git (fetch)
stable-linux-2.6.35.y git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.35.y.git (push)​
So samsung will publish the source code on there or you will? Sorry I had trouble understanding - if samsung is that's great news!
good deal dude
jaju123 said:
So samsung will publish the source code on there or you will? Sorry I had trouble understanding - if samsung is that's great news!
Click to expand...
Click to collapse
Samsung will very probably release sources as a plain tarball.
But we are working to fully integrate the Galaxy S II sources they will release with Samsung mainline kernel repository on kernel.org.
http://git.kernel.org/?p=linux/kernel/git/kki_ap/linux-2.6-samsung.git;a=summary
In order to get the best quality source, easiest to upgrade etc.
Okay Galaxy SII sources are not available yet, but I messed with different source repo to make a clean starting point that will serve as base for the Samsung source drop.
Contains stuff from Linux 2.6 , Linux 2.6.35 stable (2.6.35.7) and linux-2.6-samsung.
Added initramfs !
https://github.com/GalaxySII/initramfs-galaxysii/tree/master/i9100-2.3.3-xwkdd
message to moderators: STOP RENAMING MY THREADS!
Especially with the most useless, unrelated and stupid name: "[KERNEL] coming soon..."
Thank you.
Sources are UP!
I somehow manually re-created commits from Samsung archive.
Before merging Samsung ED24 SHW-M250S sources, I created on a big merge branch named 2.6.35.7-samsung-android, containing
- 2.6.35
- Samsung mainline repository 2.6.35 (merged)
- 2.6.35.7 (merged)
- android 2.6.35.7 (merged)
Awesome!!! Wow! With developers like these we are sure in for a wonderful time ahead. Device got released in UK on May First and already we are seeing such development!! Thank you!
you actually took the time to split the commits by hand into categories
thats cool!
I just threw 5 euros your way for your work on Voodoo for the i9000, and also for the new work on the i9100. Seems fair since I used the kernel for the entire life of the i9000. My next step to pick up the i9100.
Merged manually M250K ED25 sources: https://github.com/GalaxySII/samsung-kernel-galaxysii/tree/shw-m250k-gingerbread
Merged manually M250L (WCDMA phone) ED27 sources: https://github.com/GalaxySII/samsung...0k-gingerbread
http://opensource.samsung.com/reception/reception_main.do?method=reception_search&searchValue=I9100
Galaxy S II source code
Rawat said:
http://opensource.samsung.com/reception/reception_main.do?method=reception_search&searchValue=I9100
Galaxy S II source code
Click to expand...
Click to collapse
Thanks! Just waking up.
Hold on with the tarball guys, you'll get it clean from the git repository very soon!
Galaxy S GT-I9000 source now all merged manually, with split categorized commit !
https://github.com/GalaxySII/
supercurio said:
Galaxy S GT-I9000 source now all merged manually, with split categorized commit !
https://github.com/GalaxySII/
Click to expand...
Click to collapse
Does this mean we have the whole thing? As in: full control of everything from hardware up to UI (drivers, kernel etc)? We "own" the hardware and can do as we please kind of thing?
OneTwoPi said:
Does this mean we have the whole thing? As in: full control of everything from hardware up to UI (drivers, kernel etc)? We "own" the hardware and can do as we please kind of thing?
Click to expand...
Click to collapse
Interested in knowing the same thing - how much control do "we" got over updates and sorts now? I heard this makes it really easy to update to the latest Linux kernel. Is that true?
OneTwoPi said:
Does this mean we have the whole thing? As in: full control of everything from hardware up to UI (drivers, kernel etc)? We "own" the hardware and can do as we please kind of thing?
Click to expand...
Click to collapse
kind of but not really. the consensus is that not everything is included in the source that samsung released. i'm just not clear on to what extent this is true.
i'm looking thru to try to find the audio files that could be easily edited to increase volume output, but i couldnt find it yet. maybe someone can shed some light.
RogerPodacter said:
kind of but not really. the consensus is that not everything is included in the source that samsung released. i'm just not clear on to what extent this is true.
i'm looking thru to try to find the audio files that could be easily edited to increase volume output, but i couldnt find it yet. maybe someone can shed some light.
Click to expand...
Click to collapse
There is no such consensus.
Galaxy S II kernel is 100% open source.
Some driver are partially Kernel partially user-space as usual, and we don't have source for those but speaking of the kernel we have everything. (already proven with custom kernels using arbitrary version numbers and no pre-compiled binary kernel module like mine)

Forking and porting CM7 to an unsupported device? (Gio GT-S5660M)

Hello,
So far, I have:
A working Android build environment (Ubuntu 11.10 x64).
Managed to build, install and boot AOSP on my Nexus S. (I have downloaded but not attempted to build CM7 yet.)
Created a Github account.
Samsung's open source files for my target device, the Galaxy Gio GT-S5660M.
I've read some documentation and forum posts about Github, but I remain unsure as to what I should do to fork in a way that:
I'll be able to keep on syncing the remainder of the code.
My new device directories and modifications could be brought back (pulled?) to the main CM7 code base.
Will avoid needless frustrating re-downloads of the source code.
Thanks in advance,
Darkshado
After some further reading, I'm beginning to grasp some git basics...
I've forked two CM7 repos so far, added them as remotes in the appropriate installations. (Instead of forking and cloning, since I already had repo sync'ed the whole CM7 source. My commits show up on Github like they should, and I should be able to merge in commits to the origin remotes.)
I'm not going to do any pull requests until I've managed to build and boot.
By the way, yesterday I attempted to build AOSP with a bunch of files overwritten by the Samsung sources (that's how they tell you to do it!!) and this failed, as I expected.
Goodbye,
Darkshado
Update: I'm currently trying to port CM7 to the Gio 5660M. Still attempting a first successful build as I'm writing these lines.
My main issue so far has to do with the camera. I get the following error message:
make: *** No rule to make target « out/target/product/gio5660M/obj/lib/libcamera.so », needed by « out/target/product/gio5660M/obj/SHARED_LIBRARIES/libcameraservice_intermediates/LINKED/libcameraservice.so ». Stop.
After toggling off the camera by using the stub, I hit the same error further into the build with this:
make: *** No rule to make target « vendor/samsung/gio5660M/proprietary/wifi/ath6k/AR6003/hw2.0/athtcmd_ram.bin », needed by « out/target/product/gio5660M/system/wifi/ath6k/AR6003/hw2.0/athtcmd_ram.bin ». Stop.
I know this has to do with makefiles, but that's about it...
Thanks in advance for any help,
Darkshado
hi i'm interested too.
hi I found your github because I also interested poriting cyanogemod to galaxy gio korea(SHW-M290K). the device hardware is different from s5660. so I need some modification.
and your libcamera problem is that there is some reason that the make system can't find libcamera.so, so they cannot compile libcamera service. it should be in ./vendor/samsung/gio/proprietary according to your extract-files.sh .
have one cuorisity. I searched gio android device make file. and none of them are relreased source code. how did you make them?
I found this information. it may help you.
http://processors.wiki.ti.com/index.php/TI-Android-GingerBread-2.3.4-DevKit-2.1_PortingGuides
I'll have to update my Github, hadn't been in a rush due to lack of progress, but now my problem lies with libaudio instead.
I got the Samsung sources for the 5660M on their open source website, although I mostly worked with the CM7 ports for similar devices like Tass and Cooper as well as a Gio source provided by Phiexz but it didn't build either.
Thanks for the link, I'll check it out.
proprietary does not help
do you have any progress since last time?
well, I admit that proprietary files does not help.
does your s5660m hardware identical to s5660v?
becasuse galaxy gio in Korea(shw-m290k,shw-m290s) does different hardware.
well in this case, like me, you need to hack into not only android pdk, but also android kenel.
I have seen that phiexz has released kernel with latest cyanogenmod kenel in his github and I am modifing it to shw-m290k. there are some hardware differences i have to apply to.
I suggest you to compare phiexz's kernel and samsung original kernel from samsung opensource homepage.
My problem right now is that I don't have that much spare time to put into this, and that I'm very much learning as I go, so progress is not always that quick. Also, I'd like to get my Touchwiz based ROM updated and working properly before trying to build AOSP or CM again.
Another thing I want to try is building the kernel (probably based on Phiexz's) that will support ext4, and compare performance of the Touchwiz ROM on ext4 versus RFS.
As far as we can tell, GT-S5660 (Europe/Asia) GT-S5660M, L and V are identical except for the radio firmware. People with the 5660M initially encountered issues after flashing 5660 ROMs because they also contained the AMSS image.
my cyanogen kernel is based on samsung open source kernel
because cm-kernel on cyanogenmod github dont support our device, if we wnt use that kernel we must add some hardware pofile & board for galaxy gio
so alternative is make samsung's open source kernel compatible with cyanogenmod
Wouldn't it be much better from a code maintainability standpoint to make the CM kernel work on the Gio? (Also if you ever hope to get official CM team support, that's a given.)
The way I understand repo and git, you could create a github repo for your device and board configs and add those to your repo manifest so the whole CM7 source and your modifications all sync properly.
I've forked the CM7 manifest files off github, added my gio files and removed all those extra devices I didn't need, so my repo syncs are much faster too. (The idea comes from http://slightlymorethanworthless.blogspot.com/2011/05/remove-unwanted-devices-from.html)
hey a quick question...
just starting out here..
i'm on win7 32 bit, going to run ubuntu on virtualbox.
shud i choose ubuntu 32 bit or 64?
sorry for OT.
doesn't really matter
roofrider said:
hey a quick question...
just starting out here..
i'm on win7 32 bit, going to run ubuntu on virtualbox.
shud u choose ubuntu 32 bit or 64?
sorry for OT.
Click to expand...
Click to collapse
doesn't really matter. but compiling process needs much cpu power. so 64x would be better.
Well, im not a dev or a user of gt5660m, but good luck to you, hope u can finally port it
Sent from the GUN in my pants
darkshado, if you have same problem untill now.
http://strazzere.com/blog/?p=220
look this page. and check out koush's proprietary page. especially for samsung cooper(galaxy ace). because many of kernel procedure are same for gio.
https://github.com/coolya/android_device_samsung_cooper.git
https://github.com/koush/proprietary_vendor_samsung
i've upload galaxy gio source + proprietary files for galaxy gio
please see & help to fix some problem
github.com/phiexz
Darkshado said:
Hello,
So far, I have:
A working Android build environment (Ubuntu 11.10 x64).
Managed to build, install and boot AOSP on my Nexus S. (I have downloaded but not attempted to build CM7 yet.)
Created a Github account.
Samsung's open source files for my target device, the Galaxy Gio GT-S5660M.
I've read some documentation and forum posts about Github, but I remain unsure as to what I should do to fork in a way that:
I'll be able to keep on syncing the remainder of the code.
My new device directories and modifications could be brought back (pulled?) to the main CM7 code base.
Will avoid needless frustrating re-downloads of the source code.
Thanks in advance,
Darkshado
Click to expand...
Click to collapse
Really the best kernel for your phone is here:
http://forum.xda-developers.com/showthread.php?t=1991020
BLN enabled, optimized&stable kernel, jelly bean look
Whoa! Zombie thread!
Dude: the ROM you linked was published over a year after my original post in this thread. I'm pretty sure there was NO CM7 build available for the Gio back then. That's what I was trying to work on, but got beat to the punch by Maclaw and a couple others. (Hard-bricking my Gio and having a sluggish laptop to build on didn't help.)
Besides, I got rid of my Gio a long time ago. I enjoy my Note 2 and keep my Nexus S as backup.

[Q] Compiling Kernel From Source

Hi everyone, I am looking for a point in the right direction or any advice.
My device is Samsung Galaxy Note 3 SM-N9005. I know there is a forum for that device but I feel I need help from experienced kernel devs and I am unsure where to ask for help
I have downloaded the source files from Samsung for this device (it has kernel and platform archives).
I have a linux dev environment setup in virtual machine. I successfully compiled the kernel zImage. I managed to unpack the current boot.img and replace the zImage and repack and the phone boots. So that is a success for a first time hey?
However, WIFI does not work. I have read that I have to compile the wifi module for it, but I am clueless.
Do I, or don't I, need the Android 4.3 source code from Google?
Do I have to run "make menuconfig" and enable modules (currently not enabled)?
Do I have to somehow compile a wifi module?
Any help will be massively appreciated!!!
Thanks
Dan

[Q] Where to start for Android Kernel Development?

Hello Guys,
I see a lot of threads for starting with android rom development, but can anyone give me pointers for kernel development? I would like to start kernel development and do not know where to start. I am not interested in rom development at the moment, but that is because I assume that the android rom is like a user space app over the kernel. Please correct me if I am wrong. It would be great if you guys could point me to some beginner friendly kernel development tutorials. I am looking through Linux Device Drivers (LDD) book but am having a hard time comparing that with android. I have cloned mediatek 6589 source from android repository. I am submitting partial url cos I am not allowed to submit full url yet. URL(android.googlesource.com/kernel/mediatek/+/android-5.1.0_r0.2) since I am running a mtk6589 device (Walton X1/ Gionee Dream D1) and would like to understand where to start coding kernels for android. Any help would be greatly appreciated.
Oh and I would like mediatek specific help if possible. I have gone through some of the general kernel building and overclocking tutorials. I want to do some more enhancements if possible. Since mediatek seems to be the mysterious one with bare minimum source availability, I would like to take up that challenge
Thanks.
I don't have a tutorial for you but a small checklist. You need:
* Kernel source tree
* A config for your device (e.g. arch/arm/configs/*defconfig*)
* A cross compiler toolchain to generate ARM code (you can use the precompiled one from the Android source tree)
* A way to package your kernel into a boot image for your device - usually an Android boot image contains a compiled kernel (zImage), a compressed ramdisk for the root filesystem, and probably a device tree binary (dtb). Mediatek may do things differently.
* A way to install that boot image on your device - this requires an unlocked bootloader that allows custom boot images to be installed and started. Most devices use the fastboot tool for this.
Your first step should be to build a working kernel from unmodified sources. When you got that working, you can think about starting actual coding.
Thanks for the Pointer Mate
_that said:
I don't have a tutorial for you but a small checklist. You need:
* Kernel source tree
* A config for your device (e.g. arch/arm/configs/*defconfig*)
* A cross compiler toolchain to generate ARM code (you can use the precompiled one from the Android source tree)
* A way to package your kernel into a boot image for your device - usually an Android boot image contains a compiled kernel (zImage), a compressed ramdisk for the root filesystem, and probably a device tree binary (dtb). Mediatek may do things differently.
* A way to install that boot image on your device - this requires an unlocked bootloader that allows custom boot images to be installed and started. Most devices use the fastboot tool for this.
Your first step should be to build a working kernel from unmodified sources. When you got that working, you can think about starting actual coding.
Click to expand...
Click to collapse
Thanks man. Really appreciate the pointers. I do have some of the checklists done. Like
* Kernel source tree
** A cross compiler toolchain to generate ARM code (using the precompiled one)
* A way to install that boot image on your device
Now the problem is, my device still does not have its source code available. I got the general source tree from google which is not my device's so I dont have the defconfig. Is there a way to rip it out from a compiled kernel? Like using some sort of a decompiler? Also I will look around for zimage packaging tools. Thanks mate. Mediatek is apparently one hell of a problem child XD
syko_kickass said:
Now the problem is, my device still does not have its source code available. I got the general source tree from google which is not my device's so I dont have the defconfig. Is there a way to rip it out from a compiled kernel? Like using some sort of a decompiler? Also I will look around for zimage packaging tools.
Click to expand...
Click to collapse
If you're lucky, your existing kernel exposes its config in the file /proc/config.gz. If not, I don't know how to get a matching config - best is to avoid buying anything from GPL violators.

Categories

Resources