Related
Are you guys rolling your own or using binaries?
Huh? You can download the source and compile your own arm-eabi- tools if thats what you want to do.
I use the prebuilts from the android source code repo.
Sent from my VEGAn-TAB-v1.0.0B5.1 using Tapatalk
I know I can compile my own, but even with crosstools getting gcc a libc, binutils and all that working is a pain if there are premade binaries. I'll check out the ones you mentioned rcgabriel.
Hey, I just got a quick question
When compiling a CM7 kernel for the NS4g, do i use samsung-kernel-crespo or is there a samsung-kernel-crespo4g? thats all i need to know =]
Crespo4g
Sent from my HTC Sensation 4G using XDA App
mathkid95 said:
Crespo4g
Sent from my HTC Sensation 4G using XDA App
Click to expand...
Click to collapse
ok, thanks =]
PS. Not seeing Crespo4G in the CM github? and git is still down right? where can i get a clean source? (lol, i gues i have one other question XP)
Well on the gingy source I do
lunch
Then select crespo.but for u its 4g haha
Sent from my HTC Sensation 4G using XDA App
mathkid95 said:
Well on the gingy source I do
lunch
Then select crespo.but for u its 4g haha
Sent from my HTC Sensation 4G using XDA App
Click to expand...
Click to collapse
ok, so its done similar to building the CM7 rom then? Havent worked with CM source in a while, been using the Samsung sources for my vibrant =P
I have never built cm7 in my life lol
I do know its "bacon"
But just look up building cm7 on Google and the wiki page it comes up with rocks
Sent from my HTC Sensation 4G using XDA App
For cm I do
. build/envsetup.sh && brunch crespo4g
snandlal said:
For cm I do
. build/envsetup.sh && brunch crespo4g
Click to expand...
Click to collapse
Ok, I was under the impression that was how to build CM7 itself. For the kernel is it the same? Or do I need to search for a copy of the source from before git got hacked....with the vibrant I could just DL the source from supercurio or Samsung {when I first started working on it}, with NS4g Idk... I'm assuming crespo kernel source won't work, but then again I haven't worked with the nexus phones ever so idk.
Sent from my SGH-T959 using Tapatalk
This is the correct kernel source for nexus s and 4g. It produces the zImage. zImage + Ramdisk = boot.img
https://github.com/CyanogenMod/samsung-kernel-crespo
The commands are:
export PATH=$PATH:/home/YOUR LINUX USERNAME/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/ (You can put this command in bash.rc so you don't have to type it everytime you compile)
make ARCH=arm herring_defconfig (This command writes the herring_defconfig in configs)
make -j4 ARCH=arm CROSS_COMPILE=arm-eabi- (This command actually produces the zImage)
snandlal said:
This is the correct kernel source for nexus s and 4g. It produces the zImage. zImage + Ramdisk = boot.img
https://github.com/CyanogenMod/samsung-kernel-crespo
The commands are:
export PATH=$PATH:/home/YOUR LINUX USERNAME/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/ (You can put this command in bash.rc so you don't have to type it everytime you compile)
make ARCH=arm herring_defconfig (This command writes the herring_defconfig in configs)
make -j4 ARCH=arm CROSS_COMPILE=arm-eabi- (This command actually produces the zImage)
Click to expand...
Click to collapse
thanks =] I just needed the source and i wasnt sure if that was for both (i know how to compile it ^^)
PS. to anyone who comes across this thread, you can just edit the makefile so you dont have to type all that =]
ok...well I'm at a loss here....compiled the kernel like normal and installed using the anykernel script and i cant get the kernel I compile to boot. Even if I just compile the kernel source with no changes it doesnt boot.....any ideas? =/ i cant find any reason for it to not boot. Its got no changes from the CM keel source and all i did was compile it and merge it into he boot.img
(never had problems on SGS kernels =3)
EDIT: may also be tat my keyboard isnt working properly.....typos can cause a few problems =3...will check
I've built it like I've always built my 2.3 kernel and I cant even get a stock kernel I compile to boot
you guys think it might be my CC? I've been using Sourcery G++ Lite 2011.03-42 for ARM EABI for a year almost and hasnt had any problems
I'm using supercurios kernel source also btw
any ideas?
ECOTOX said:
I've built it like I've always built my 2.3 kernel and I cant even get a stock kernel I compile to boot
you guys think it might be my CC? I've been using Sourcery G++ Lite 2011.03-42 for ARM EABI for a year almost and hasnt had any problems
I'm using supercurios kernel source also btw
any ideas?
Click to expand...
Click to collapse
"adb shell cat /proc/kmsg" output while it's trying to boot may be helpful.
I don't even get to that point, stops at Google logo and gives me nothing
PS I'm building for ICS (forgot to mention that)
Sent from my Nexus S 4G using Tapatalk
I'm not really sure. I have built from supercurio's source so I know it's not that.
Are you using this source (https://github.com/project-voodoo/linux_samsung)
Are you on the correct branch?
Have you made any changes?
Are you fastbooting the boot.img or using the anykernel script?
Hostile89 said:
I'm not really sure. I have built from supercurio's source so I know it's not that.
Are you using this source (https://github.com/project-voodoo/linux_samsung)
Are you on the correct branch?
Have you made any changes?
Are you fastbooting the boot.img or using the anykernel script?
Click to expand...
Click to collapse
No changes
Same source
Correct branch
Any kernel script
Only thing I haven't changed is CC =\
Sent from my Nexus S 4G using Tapatalk
ECOTOX said:
No changes
Same source
Correct branch
Any kernel script
Only thing I haven't changed is CC =\
Sent from my Nexus S 4G using Tapatalk
Click to expand...
Click to collapse
I have only ever used the one google supplies so I would say try that. It's the only thing I can think of
Hostile89 said:
I have only ever used the one google supplies so I would say try that. It's the only thing I can think of
Click to expand...
Click to collapse
Me too...I'll give a diff CC a try
Sent from my Nexus S 4G using Tapatalk
Solution
it was the CC, i used the default one and it worked.
apparently according to Ezekeel you need to add -mno-unalligned-access to the kbuild flags for the newer TC from CS
so if your using code sourcery add that to the build flags or just use the default toolchain
All,
Since we are working as a DEV team now I wanted to share a PM I had with another DEV on the board about our Kernel. I hope this can assist some others that have more experience with the Kernel like b_randon
g60madman said:
subpsyke,
I would love to upgrade our kernel for the Motorola Triumph. How did you go about figuring which Code Aurora vanilla kernel to start with? I took over development for CM7 from Whyzor and would be interested in your methodology.
Thanks in advance,
g60
Click to expand...
Click to collapse
subpsyke said:
1. I unpacked the original Huawei source to one directory, and downloaded the CodeAurora kernel to another.
2. I used the release tags as a reference: https://www.codeaurora.org/xwiki/bin/QAEP/froyo_almond
https://www.codeaurora.org/xwiki/bin/QAEP/froyo
https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm.git;a=tags
3. I reverted the codeaurora repository to tag releases (e.g.: git reset --hard M76XXTSNCJNLYA6010) and compared the result via "diff urN" and meld. I knew I was getting closer when you get a smaller diff in the patch size, and used meld to see if the differences were likely to be Huawei's additions vs. CodeAurora's changes. It was only after going forward and backwards between tags was I sure of the proper baseline.
I performed the same discovery process with the Samsung kernel for my GT-I5500, which used M76XXTSNCJNLYA6040 as a baseline.
Click to expand...
Click to collapse
g60madman said:
Sweet thanks! I will check it out and see what I can do
Click to expand...
Click to collapse
subpsyke said:
No problem
I forgot to mention the last steps:
4. Once you establish the baseline, create a new branch: git checkout -b newbranch
5. Overlay the changes from the vendor to a new commit*:
cp ~/blah/vendorkernel/ . ; git add . ; git commit -m "Initial import of vendor changes".
6. Once you've commited the vendor changes, you can use "git merge origin/froyo_almond" to move from the baseline to a newer revision. The froyo_almond branch is most suitable, as it's locked at 2.6.32, and the development focus seems to be on the msm7k chipset series. You could try updating to the android-msm-2.6.32 kernel, but it has more significant changes that will require adaptations of the board file, and may not be worthwhile, as development focus seems to be on newer chipsets.
7. Inevitably you'll get merge conflicts, as more than likely some vendor commits may interfere with upstream changes. For this, you'll need to use your own discretion in fixing up the code. I use the "git mergetool", with meld configured as my default editor, and manually checked all the conflicts.
Good luck!
*You may also want to fix up permissions etc., if your vendor source comes from a zip tarball. But it's purely cosmetic.
Click to expand...
Click to collapse
g60madman said:
So is almond the best flavor to start with. I have been using MSM/QSD for a while and in when TickerGuy originally created our device files for cm7 he listed in the readme
CAF information:
Branch: froyo_pumpkin
Tag: M7630AABBQMLZA2030
Didn't know if I should start with pumpkin or use almond. Let me know what you think?
Thanks again for the info!
Click to expand...
Click to collapse
subpsyke said:
Hmm... if your phone really has a msm7630 chipset, then yes, you should probably go for the froyo_pumpkin branch. The froyo_almond branch is only for the msm7627 and qsd8650 chipsets.
Click to expand...
Click to collapse
g60madman said:
Well thats the stupid thing, since the beginning we have used always used msm7x30 for our board config, But our stock ROM from Virgin Mobile the config was msm7k in the build.prop. However if you hit the Motorola Dev our pone clearly states Qualcomm MSM8655. I am leaning towards using the almond branch would that be correct?
Click to expand...
Click to collapse
subpsyke said:
According to wikipedia, it's MSM8655.
Look at the table here: https://www.codeaurora.org/xwiki/bin/QAEP/
The froyo_almond supports qsd8650, and froyo_pumpkin supports qsd8650a_st1x. I honestly have no idea what the difference is, but it's within the realm of possibility that your phone's chipset is that odd revision on the pumpkin branch.
If your kernel is using a pumpkin baseline, then you should continue along the same branch.
Click to expand...
Click to collapse
g60madman said:
I will download pumpkin and compare the kernel. I am not sure why TickerGuy started with pumpkin. That maybe what our build is based off of but I am not 100%.
Click to expand...
Click to collapse
subpsyke said:
Ok. When you clone the codeaurora git repository, you'll have all the branches included anyway.
Click to expand...
Click to collapse
....sympathy post...
Sent from my SPH-D700 using xda premium
(The froyo_almond supports qsd8650, and froyo_pumpkin supports qsd8650a_st1x.) Is this the difference between the Photon 4G which has a WiMax radio in it, and the Triumph which does not include a 4G radio? <--- nvm when they came out I had heard they were the same phone except 4G, apparently the Photon is a Tegra 2 device.
Okay so after looking into code Aurora more, as soon as I get my Ubuntu back up I am going to work on a vanilla froyo 2.6.32.9 kernel by using the froyo_pumpkin branch on the tag Karl gave us. Once I do that and have a commit that adds in Motorola changes, I am going to use the gingerbread_rel branch to try to get a 2.6.35 kernel booting on the phone, then use the ics_chocolate_rb7 branch to hopefully get the 3.x kernel.booting. those branches all seem to have the best support for msm7630 chipsets which I believe is the closest to the msm8655 chip only that it is clocked at 800mhz instead of 1ghz. If anyone else can lend any advice or help it would be swell!!
Sent from my Triumph using Tapatalk
b_randon14 said:
Okay so after looking into code Aurora more, as soon as I get my Ubuntu back up I am going to work on a vanilla froyo 2.6.32.9 kernel by using the froyo_pumpkin branch on the tag Karl gave us. Once I do that and have a commit that adds in Motorola changes, I am going to use the gingerbread_rel branch to try to get a 2.6.35 kernel booting on the phone, then use the ics_chocolate_rb7 branch to hopefully get the 3.x kernel.booting. those branches all seem to have the best support for msm7630 chipsets which I believe is the closest to the msm8655 chip only that it is clocked at 800mhz instead of 1ghz. If anyone else can lend any advice or help it would be swell!!
Sent from my Triumph using Tapatalk
Click to expand...
Click to collapse
Swell, I love that word. Here is an email I got from TickerGuy on the Kernel a fe months back
g60madman said:
TickerGuy,
I know you have moved on from the MT. Currently I have taken over development for CM7 from Whyzor and had a question for you.
When you designed the original device files you listed in the readme:
Branch: froyo_pumpkin
Tag: M7630AABBQMLZA2030
Is that really our branch from MSM/QSD? I know the phone has the MSM8655 chip. So I'm just trying to figure out why we use msm7x30 for the board configuration and not say msm7k or qsd8k?
Thanks in advance for any help you can offer
Click to expand...
Click to collapse
TickerGuy said:
I think the reason had to do with some of the peripheral chips -- it was a lot of fun getting this phone to work as it has a number of very odd things about it, especially in the GPS area.
Click to expand...
Click to collapse
So I think it's safe to say the route you are taking the right route. Also when building the Kernel do not forget to merge in the Wyzor fixes for the Video as I am using the new Andreno drivers. Just an FYI.
Yeah I will on the cm7 kernel. As of right now I'm gonna try to get a stock froyo kernel booting off code Aurora sources then go ffrom there.
Sent from my Triumph using Tapatalk
I've got my Linux mint 13 up and running so I'm going to try to get my build environment setup to build kernels either tonight or tomorrow and start pulling in source.
By the way, Linux mint 13 is pretty nice distro so far. I like it alot better than Ubuntu!
Sent from my Triumph using Tapatalk
b_randon14 said:
I've got my Linux mint 13 up and running so I'm going to try to get my build environment setup to build kernels either tonight or tomorrow and start pulling in source.
By the way, Linux mint 13 is pretty nice distro so far. I like it alot better than Ubuntu!
Sent from my Triumph using Tapatalk
Click to expand...
Click to collapse
Also you don't need to download the pumpkin branch simple download the kernel
git clone git://codeaurora.org/kernel/msm.git
git reset --hard M7630AABBQMLZA2030
The M7630AABBQMLZA2030 is the pumpkin branch and that should take us back to the vanilla kernel
Here is the pastebin link for the warning I was getting from the linker during the build of the code Aurora kernel.
http://pastebin.com/GLMBSz26
You can look at the kernel source on my github. Its the froyo pumpkin kernel repo.
The warnings cone from the gcc linker saying that it's trying to link a non executible section in built-in.o
I'm not sure where to start looking for the issue at. If anyone can lend any insight I would be grateful!
Sent from my Triumph using Tapatalk
I switched to the gcc 4.3.1 toolchain included with the cm7 source and it booted up. Worked just as good as the stock kernel. I'm gonna have to see why the newer toolchains are not compiling it right. I use linaro 4.6 on bKernel froyo which is based off motos source. So I don't see why it wont build this code right. But at least I got one to boot! !!
Sent from my Triumph using Tapatalk
b_randon14 said:
I switched to the gcc 4.3.1 toolchain included with the cm7 source and it booted up. Worked just as good as the stock kernel. I'm gonna have to see why the newer toolchains are not compiling it right. I use linaro 4.6 on bKernel froyo which is based off motos source. So I don't see why it wont build this code right. But at least I got one to boot! !!
Sent from my Triumph using Tapatalk
Click to expand...
Click to collapse
Good work brother!
Thanks. Now lets try to move on up to 2.6.35. My idea is to make a different patch between 2.6.32.9 and 2.6.35.7 and maybe that will simplify updating it. I'm not sure which gingerbread branch I'm gonna use for the 2.6.35 kernel!
Sent from my Triumph using Tapatalk
I would think the gingerbread branch, and use the M7630AABBQMLZA404025I.xml version. That is where I snagged the keyboard updates.
g60madman said:
I would think the gingerbread branch, and use the M7630AABBQMLZA404025I.xml version.
Click to expand...
Click to collapse
you can use source kernal .35 for device fih-fbo..we are the same drive only need to change touch driver..
Yeah I would use the fih kernels but we has issues with them rebooting on us.
Sent from my Triumph using Tapatalk
b_randon14 said:
Yeah I would use the fih kernels but we has issues with them rebooting on us.
Sent from my Triumph using Tapatalk
Click to expand...
Click to collapse
yes you need get a logcat and new baseband for this kernal...I have a file to solve the rendom reboot..but I can't help to get you for the baseband...
The kernel shouldn't have nothing to do with the baseband. Which file is it?
Sent from my Triumph using Tapatalk
b_randon14 said:
The kernel shouldn't have nothing to do with the baseband. Which file is it?
Sent from my Triumph using Tapatalk
Click to expand...
Click to collapse
yes I know,I mean in rom library need these file,I will give you file when I go back home
Anyone got any ideas to fix the issues with newer toolchains when building from the code Aurora source?
Sent from my Triumph using Tapatalk 2
Have you tried downloading one of the gingerbread repo's from code Aurora? I am not sure if they have a different version of the tool chain or not?
As many of you might have already heard about it: That using the Linaro toolchain to compile a ROM increases performance. But making stock kernel sources compatible to be compiled with Linaro is no easy task. But, the steps are similar.
When it is compatible to be compiled with GCC 4.3.3, why shouldn't it compile with GCC 4.7?
The problem lies in the code. The transition from GCC 4.3.3 to GCC 4.6, lot of things changed. GCC decided that people should start writing "cleaner code". So, new errors occur when compiling with GCC 4.6+. Example: "unused-but-set-variable". This was not an error in GCC 4.3.3, but GCC 4.7 made it a big issue :crying:
As I said before, GCC 4.3 can compile it, while GCC 4.7 can't. So, I decided to use certain __attribute__'s, and #pragmas, to ignore the errors that one might encounter when trying to compile with GCC 4.7.
Mainly the lines used were:
Code:
__attribute__((__unused__))
and,
Code:
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
Steps:
1. Download the GCC 4.7 toolchain using the following command, and place it inside your android-toolchains folder:
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7
2. Download the kernel source compatible with GCC 4.7 from here
Code:
git clone git://github.com/vineethraj49/pico_kernel_stock.git
Edit the Makefile to correspond to the path of the GCC 4.7 toolchain :fingers-crossed:
Then, its simple,
Code:
make msm7627a_defconfig
and
Code:
make -jX
The code is compatible to be compiled with GCC 4.7 AS IS! You make modifications to code, you should & you WILL run into errors. Usually you can overcome errors by editing the required code, using #pragmas and __attribute__'s. If you ain't ready to work hard, please notify in the thread with the changes that you made to "msm7627a_defconfig", and the possibly a log, with the errors I will add the necessary __attribute__'s, and #pragmas :silly:
As for: Why didn't you make it compatible with Linaro toolchain?
The answer is that @Rishik999 is already working on making it compatible with Linaro, and I don't want to steal his idea
Credits:
Rishik999 for his idea about compiling with Linaro, and expect his kernel sources compatible with Linaro toolchain soon
http://gcc.gnu.org/gcc-4.6/porting_to.html
http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
http://gcc.gnu.org/onlinedocs/gcc-4.6.0/gcc/Diagnostic-Pragmas.html
Google
Some IBM docs, which helped.
http://web.mst.edu/~cpp/common/common_errors.html
Linus and the 2000+ people who contributed to the first Linux kernel.
Source: https://github.com/vineethraj49/pico_kernel_stock
Disclaimer: Everybody can use my work without asking permission, all my stuff comes with a "sharing is caring" xda philosophy licence... just credits would be nice
Reserved
Remember, kernel compilable without errors AS IS!
I will add some steps about how to ignore errors in this post, maybe. So that I don't have to edit a 100+ files again :silly:
Great work
Great work ! :good:
Why posted on general ?
All is well, but i doubt linaro toolchain makes a lot of difference while compiling kernels.
+ i dont think anyone uses stock kernel (2.3.5 android htc sense)
Yes
everyone is on kernel 3
Hpsgill said:
Yes
everyone is on kernel 3
Click to expand...
Click to collapse
im still on gingerbread..
ohh
a gb lover
only few users using gb
everyone is on ics,jb or sense 4
Hpsgill said:
ohh
a gb lover
only few users using gb
everyone is on ics,jb or sense 4
Click to expand...
Click to collapse
yes i love gingerbread IMO the most stable android version for our phone
how i wish cm7 will be complete and also im waiting for the sense 4.1 by cute prince to be stable enough like gb and waiting your sense ex build 6 too