This module is not for end-users. It's only valuable for kernel developers.
Intro
I wrote this module for the purpose of extracting kernel config from our running kernel 2.6.29 in my X8 (an educational purpose).
Instruction
Everyone who wants to try:
Download the module below (only for X8 with latest kernel + baseband 015)
Extract
Push to /system/lib/modules
From adb shell
Code:
insmod /system/lib/modules/x8kconfig.ko
gunzip -c /proc/config.gz > /mnt/sdcard/x8config.txt
Mount USB, open x8config.txt from your sdcard with wordpad
You will see these in some first line:
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.29
# Tue Jan 18 23:38:24 2011
#
Click to expand...
Click to collapse
Source was pushed to github: https://github.com/doixanh/X8Features
Licence violation will be discussed later
SE is treating it's end users like s*it as we all can see....
This will pass,only we need to spread the news.
News:Sony is hiding latest open source kernel,does sony afraid or newest source can unlock bootloader.
Because of user rights when qouastion will asked we can only guess whay they will say nothing or they can go to jail.
Sent from my X8 using XDA Premium App
Why don't you take the boot.img from the latest se rom and extract it so you can get the origenal kernel ..
then build a costom one debending on it
That's insane... I've just forwarded it to Polish android board, everyone should know this.
me using your module I obtain it:
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.29
# Sun Jan 30 20:24:17 2011
#
hmm, why cant we use the older kernel to unlock the bootloader?
just asking.
doixanh, are you going to contact http://gpl-violations.org/ those guys?
does the kernel tree compile with the config extracted from the device?
I think the different build dates are not really a good proof that the published archive is not the real one because they probably did multiple builds with different configs. I know that when I tried compiling kconfig support into the previous kernel/baseband it turned out to be useless and had a bunch of undefined config flags compared to the published kernel tree.
Because the configuration is newer you assume changes to source? That's pretty far fetched... Releasing updates on this big scale you don't do last minute changes to code... Gpl said release changes to code. What code is missing / changed?
Sent from my E15i using XDA Premium App
lol i posted this to SE's facebook page and it got deleted in under 5 minutes
http://www.facebook.com/sonyericsson
chewdaniel said:
lol i posted this to SE's facebook page and it got deleted in under 5 minutes
http://www.facebook.com/sonyericsson
Click to expand...
Click to collapse
what did you post? i mean the exact words.
well i said something about them abandoning us X8/10mini customers and making us stuck at 2.1 and that since they don't care about us the community will and asked them to release their code so the devs can work better
it wasn't rude or anything maybe SE just didn't like the idea of ppl developing the software for their phones
I posted this on polish sony ericsson on fb , bcause I have been blocked on english site
Sent from my Arc-X8 using Tapatalk
This is f*cking unbelievable! They were playing with us since they released 2010 products and now we see another thing.
doixanh many thanks to YOU!
They surely should be reported gpl site http://gpl-violations.org but who will do this? I don't want to be rude but YOU know what to say so why don't you do that?
Sent from my E15i using XDA Premium App
chewdaniel said:
lol i posted this to SE's facebook page and it got deleted in under 5 minutes
http://www.facebook.com/sonyericsson
Click to expand...
Click to collapse
I´ve posted similar threads there aswell and the threads got deleted.
I was starting to look at kernel stuff today for my X10 Mini Pro = and also couldn't find the latest kernel on the site.
However I downloaded the x10_x10mini_x8_eclair_2.1.A.0.390 file anyway to have a look - and according to the makefile for this it's
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 29
EXTRAVERSION =
NAME = Temporary Tasmanian Devil
So has the kernel actually changed since this release - as this looks like a 2.6.29 to me?
cyttsp_i2c_init: Cypress TrueTouch(R) Standard Product I2C Touchscreen Driver (Built Jan 18 2011 @ 23:43:30) returned 0
got the same text too
Code:
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.29
# Tue Jan 18 23:38:24 2011
oisteink said:
Because the configuration is newer you assume changes to source? That's pretty far fetched... Releasing updates on this big scale you don't do last minute changes to code... Gpl said release changes to code. What code is missing / changed?
Sent from my E15i using XDA Premium App
Click to expand...
Click to collapse
It's entirely far fetched, as OP is trying to correlate something that isn't the cause.
The only thing he's proven is someone typed make oldconfig or make menuconfig, there is usually no indication of source code changes in the .config, outside of new kernel config options that may be in the running kernel vs provided defconfig (did you even check? no). The fact that you didn't even mention looking at the actual kernel build timestamp in /proc/version tells me you don't really know what you're doing, it's not in the .config...
Are there any modules that exist on stock but aren't available for compilation from source? Are there any kernel modules that are exporting tainted symbols? (i.e. is /proc/sys/kernel/tainted 0?) That would rule out any use of proprietary or missing modules. Do any of the stock modules export newer versions or kmsg info that isn't in the source? I highly doubt you looked through the source this extensively.
Most production kernel development cycles I've been a part of involve a period of code freeze before the final release. Usually during this period only absolutely show-stopping bugs are fixed and things like debugging and factory/test hardware modules are removed. It is likely that this is what happens at SE.
Do you really think they put relatively untested code in the kernel during that 5 day period from source finalization and production build? Any changes, especially the security measure you speculate were put in, would require extensive testing. Judging by the contributions that SE has provided in AOSP, they test their software and hardware for compliance more than the average vendor. It's illogical to me to assume they've snuck some code in when they spend countless man-hours doing testing and QA.
This type of speculative witch-hunt makes the community look bad, not SE. You need to provide factual evidence of a license violation, not .config file changes.
Related
TIME TO MOVE ON
i wil be on xperia section
i am happy that i could help this section
Best Regards, Happy Cookling and Programing!
Hy all
I started this tread because the interest to android is growing
I invite all people with linux knowledge or C programing skills to join
If you know some hardware programing is better
We need
- developpers
- testers
i will not post an guide how to setup the compiler and set variables
if you dont know this stuff please stick to Google Android thread and dont post here stupid questions as IT IS READY / WHEN WILL IT BE READY
WE DO THIS IN OUR SPARE TIME AND WE HAVE FAMILY AND LIFE
So shell we invite the penguin to our phones?
WIKI Page
(Thanks Bikor_gj)
http://wiki.xda-developers.com/index.php?pagename=Niki_Android
GIT Trees
Vogue
http://git.linuxtogo.org/?p=groups/mobile-linux/kernel.git;a=shortlog;h=refs/heads/htc-vogue
MSM
http://git.linuxtogo.org/?p=groups/mobile-linux/kernel.git;a=shortlog;h=refs/heads/htc-msm-2.6.25
Reserved For Messages
Build Instructions for the ones that want to help
- Create working dir:
Code:
mkdir ~/android-kernel
- Go to the dir:
Code:
cd ~/android-kernel
- Clone the Linuxtogo GIT:
Code:
git clone git://git.linuxtogo.org/home/groups/mobile-linux/kernel.git
- Go into newly created dir:
Code:
cd ~/android-kernel/kernel
- Create a new branch, call it htc-msm and link it to the official htc-msm development branch:
Code:
- Descend into the "main" android dir:
Code:
cd ~/android-kernel
- Get toolchain:
Code:
wget http://www.codesourcery.com/gnu_too...-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
- maybe you need to rename the just downloaded file (because after .tar.bz2 wget has added ?lite=arm). (HINT FOR LINUX-NEWBIES: USE TAB TO COMPLETE KNOWN FILENAMES!! - In this case type: mv arm(TAB) arm(TAB) -> backspace till 'bz2' is the last word)
Code:
mv arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2\?lite\=arm arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
- unpack the toolchain:
Code:
tar -xjf arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
- ascend again into the 'kernel' directory:
Code:
cd ~/android-kernel/kernel
- make the kernel:
Code:
git checkout -b htc-vogue origin/htc-vogue
You also have to use
Code:
make vogue_defconfig ARCH=arm
- export path so the newly downloaded toolchain will be used instead of your default compiler (which would compile for your computer instead of your phone):
Code:
export PATH=~/android-kernel/arm-2008q1/bin:$PATH
- make the zImage-file:
Code:
make zImage ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
Now the zImage file is created inside the directory kernel/arch/arm/boot.
When uploading this to your phone, remember that you only have to replace the zImage after each kernel build - the Linux environment on top of the kernel can just stay the same, so initrd (which is the ramdisk filesystem) can stay the same.
BR
Reserved For Kernel Status
Kernel status
no more power button //thanks biktor_gj
nike mtype added
audio working
call working
data working
sms unknown //due to keyboard and ts
keyboard screwed // somethings not right needs investigation
OnSreenKeyboard working
Touch screwed // SOLVED
when this kernel probelms will be solved i will release the new kernel
I have knowledge of both C and linux so I vollunteer
hi,
i can be a tester... also i have some little linux knowledge...
I have limited knowledge of both c and linux, so I possibly could help.
It seems useful however to setup an SVN or something, so even 'non-registered' developers can write patches and submit them for review. You can set up such an SVN for free at assembla.com, together with a wiki, TRAC and more. They even say you can ask for more storage space and stuff if your project is an open-source project.
If you have such an SVN developers like me can help without making any false promises of some sort.
I hope you know what I mean, it sounded better in my head
i know linux and i can do beta tester. i'm studying engineering too.
i also know linux and a bit of C...i can do testing too.
as you already know, I'm in too for development...
i will try the new kernel asap...
I tried this kernel and indeed, the keypad works on mine!
(touched the TS though, just because you said I wasn't allowed ) It froze, so reboot...
awesome! keys work all good! numbers work and also dpad and enter works!
(by the way: how will you make it possible to enter text? android is coded to enter numbers...
the_fish said:
awesome! keys work all good! numbers work and also dpad and enter works!
(by the way: how will you make it possible to enter text? android is coded to enter numbers...
Click to expand...
Click to collapse
I believe by the end of this year or somewhere in the beginning of 2009 Google is making a system for creating software input methods, which would theoretically allow us to write an application that would reroute direct hardware input. I think. We'll have to see what the future will (or the talented developers here) bring.
man, awesome!!! good job, jerpelea. keys work great!!
graey said:
I believe by the end of this year or somewhere in the beginning of 2009 Google is making a system for creating software input methods, which would theoretically allow us to write an application that would reroute direct hardware input. I think. We'll have to see what the future will (or the talented developers here) bring.
Click to expand...
Click to collapse
ok... the onscreen keyboard would be ok for the time we have to wait
Jerpelea: Why do you want Ubuntu as dev os? I'm using OpenSuSE and am able to build the kernel.
I am thinking (since 2 weeks) to try Ubuntu again (used to use it), but may take while before I get to it...
Boylen said:
Jerpelea: Why do you want Ubuntu as dev os? I'm using OpenSuSE and am able to build the kernel.
I am thinking (since 2 weeks) to try Ubuntu again (used to use it), but may take while before I get to it...
Click to expand...
Click to collapse
I think he is just saying that because it's easier for people to use??
works fine for me on vanilla debian
new kernel works fine screen still too responsive keys work calls work
it works! but after few minutes my nike is auto-turned off :O
garsim said:
it works! but after few minutes my nike is auto-turned off :O
Click to expand...
Click to collapse
i guess we have turn the auto turn off in wm to unlimited or run it on usb plug...
Since We have such a fantastic tutorial on how to build your own CM9, I thought I'd add one for building a kernel.
Edit: updated kernel sources for jellybean
First off:
You NEED Linux. DO NOT TRY THIS ON WINDOWS, IT WON'T WORK.
Sources: https://github.com/CyanogenMod/semc-kernel-msm7x30
https://github.com/DarkforestGroup/sony-kernel-msm7x30-ics
https://github.com/DooMLoRD/Xperia-2011-Kernel-2.6.32.9
http://forum.xda-developers.com/showthread.php?t=1556971
http://forum.xda-developers.com/showthread.php?t=1477845
http://developer.sonymobile.com/wp/2011/05/06/how-to-build-a-linux-kernel/
DooMLoRD, KeiranFTW & Atarii.
Prepping:
1) Grab the toolchain I have here (Android NDK R5b), it's the only one I've been able to use that doesn't throw errors when compiling (stock based kernels): http://db.tt/hE3TmJJi Doom has provided a better toolchain https://github.com/DooMLoRD/android_prebuilt_toolchains[/QUOTE] you can get it using
Code:
git clone https://github.com/DooMLoRD/android_prebuilt_toolchains.git -b master <optional_folder_name_you_choose>
(thanks Doom!!)
Building a kernel from fxp sources
1) Terminal for any commands, file explorer for finding stuff & gedit for changes.
2) open up terminal, mkdir <name_you_want> (no spaces)
3) cd <name_you_want>
4) git clone https://github.com/freexperia/semc-kernel-msm-7x30-ics -b ics <optional_name_you_want_the_folder_to_be> (no spaces)
5) cd <optional_name_you_want_the_folder_to_be>/semc-kernel-msm-7x30-ics (if you didn't rename it)
6) (If this is after the first time, and lets say a week has past do this step, otherwise ignore) git pull (automatically updates any files)
7) First important step: Find the defconfig that fxp uses. They are located in arch/arm/config. fxp_zeus_defconfig is the name of theirs
8) copy fxp_zeus_defconfig & rename to <what_you_want_it_named>_zeus_defconfig (for example, mine will be pax_zeus_defconfig)
9) open up your defconfig & put it into another workspace, we'll mess with it later
10) Hop onto DooMLoRD's github, his we'll use for references.
11) Adding governors: https://github.com/DooMLoRD/Xperia-...mmit/bec19001ded34077d7776639834a1229b69e5f87
A1) Well, as I look into this, fxp has a ton of governors not used... (located in <name_of_kernel_folder>/drivers/cpufreq/
A2) Check the Kconfig file to see that they're all in there (they must just not be in the defconfig file)
A3) Edit the deconfig file you created in lines 467-474 removing "#" from any you want to add (and add in any you might've added by adding the line CONFIG_CPU_FREQ_GOV_<NAME_OF_GOVERNOR>=y
A4) If you want to add more governors, check out the Commits from DooMLoRD's build to add in when needed (anytime you see a "+" that means line added, "-" means line deleted)
12) Adding IO Schedulers: https://github.com/DooMLoRD/Xperia-...mmit/0ae625f7561c559d4933284f489733bf5eb66e96
B1) Navigate to <name_of_kernel>/block folder
B2) Once again, FXP has a ton of IO Schedulers added, but not used in Play kernel:
B3) Open up Kconfig.ioshced to make sure they're in there (and add any you want)
B4) Edit the defconfig file you created (lines 121-137) & fix it to your liking (same as above)
B5) If you want to add more, see Doom's commits to add 'em
13) Turning off ALS
C1) Navigate to <name_of_kernel>/arch/arm/mach-msm
C2) Open up board-semc_zeus.c
C3) Search for .als_connected (it on line 1349)
C4) Change the variable from 1 to 0
14) Overclocking
D1) open up arch/arm/mach-msm/acpuclock-7x30.c
D2) Lines 96 - 144 contain the PLL2 table, which is used to set clock speeds, note FXP can go all the way up to 2ghz, they just stop it short.
Continued in post 2 because all of this in one post 20% more awesome than XDA can handle
Pax
Cont'd from post 1
15) Building the Kernel
E1) Save your defconfig file, you'll need it now.
E2) naviage to <name_of_kernel> folder (in terminal)
E3) Type in "ARCH=arm CROSS_COMPILE=<path_to_cross_compiler_i'll_use_min e_for_example>/home/paxchristos/Android_Source/doom_ndk/arm-eabi-4.4.3//bin/arm-eabi- make <what_you_put_here>_zeus_defconfig
E4) Type in "ARCH=arm CROSS_COMPILE=<path_to_cross_compiler_from_above>/arm-eabi- make
E5) Sit back and relax (assuming it doesn't throw any errors, if it does, post here & I'll try to help you through them)
16) Getting the ramdisk
F1) Download a working copy of FXP's kernel (either through my zips or fxp zips)
F2) Goto here: http://forum.xda-developers.com/showthread.php?t=1477845, download the xperiaboottools.zip that's attached.
F3) Now what I did (you don't have to) is chmod 755 mkbootimg & split_bootimg.pl & (sudo) cp to /bin for easy calling.
F4) Navagiate in terminal to where you downloaded fxp kernel
F5) mkdir <working_folder>
F6) cp <fxp_kernel> <working_folder>
F7) cd <working folder>
F8) split_bootimg.pl <fxp_kernel>
F9) mkdir ramdisk
F10) cd ramdisk
F11) gzip -dc ../<fxp_kernel>.img-ramdisk.gz | cpio -i
F12) Now you have the ramdisk, let's futz with it.
F13) First (easiest step) is to goto default.prop & change ro.secure=1 to ro.secure=0
F14) That's mainly what we want to do with it, if you want to change the boot image, go here: http://forum.xda-developers.com/showthread.php?t=1494076 for how to do it manually, or here: http://forum.xda-developers.com/showthread.php?t=1513146 for the automatic way.
F15) now that we're done with the ramdisk, we'll go back to terminal
F16) find . | cpio -o -H newc | gzip > ../ramdisk.img
F17) cd ../
17) Putting the ramdisk & kernel together
G1) By now (hopefully) the kernel is done compiling. (time for terminal, you should still be in folder you were above)
G2) cp ~/<folder_you_put_the_kernel_source_in>/arch/arm/boot/zImage ./
G3) mkbootimg --base 0x00200000 --kernel zImage --ramdisk ramdisk.img -o <what_you_want_to_name_your_kernel>.img
18) Flashing it for testing.
H1) Keep your copy of FXP's kernel around, just in case any issues happen
H2) fastboot boot <your_kernel>.img
H3) If it boots & works, SUCCESS!! you modified your own custom kernel!
H4) If it doesn't boot (at all, just a vibrate & blank screen for 10-20 seconds) there's a problem with the ramdisk, sometimes it's bad, sometimes is needs filler, overall, it's just a pain in the butt to figure out.
H5) If it boots & bootloops the splash screen, well, that's an issue with the ramdisk again, that possibly, your ramdisk does not match you rom. Recovery, reflash rom & try again.
Courtesy of Atarii reminding me
19) Adding your wifi modules (they get built when you build the kernel) into the ramdisk
I1) Let's pretend that you haven't gotten through step F16, we're gonna add the wifi modules in.
I2) The wifi modules are located in <name_of_kernel_source_folder>/drivers/net/wireless/
I3) Copy bcm4329.ko to ~/ramdisk/working/modules/
I4) Add in the following lines to init.semc.rc
Code:
#load bcm4329 module
insmod /modules/bcm4329.ko
I5) Now your modules will autoload on boot!
Pax
Excellent guide
It may be because I'm both skeptical of us R800x users ever getting a real ICS, and the fact that going back to gingerbread sounds really tempting, but do you know / could you list the differences for compiling a gingerbread kernel for, say, CM7?
Kieran just told me to go to Sony's site. Thanks!
Sent from my R800x using XDA
Now I've read over this but I'd like to know exactly what a new Linux kernal can do for us? Does it allow us to do more stuff with any custom rom we create?
lightningdude said:
It may be because I'm both skeptical of us R800x users ever getting a real ICS, and the fact that going back to gingerbread sounds really tempting, but do you know / could you list the differences for compiling a gingerbread kernel for, say, CM7?
Click to expand...
Click to collapse
Do this in place of #4 (in the guide)
4) git clone https://github.com/freexperia/semc-kernel-msm7x30 -b master <optional_name_you_want_the_folder_to_be>
& You'll get their sources for GB instead of ics
Alternatively, if you wanna do it from SEMC kernel sources,
Download them from: http://developer.sonymobile.com/cws/devworld/technology/opensource un-tar/bzip them & work from kernel/
Phryxus said:
Now I've read over this but I'd like to know exactly what a new Linux kernal can do for us? Does it allow us to do more stuff with any custom rom we create?
Click to expand...
Click to collapse
Here's a better explanation than I can do
bassmadrigal said:
/cut/
The kernel is kinda like the nervous system of the body. It directly interacts with the hardware (which is how it is able to adjust CPU speed) and it is what allows the ROM to function.
The ROM is the rest of the body. Every other aspect of the phone. In fact, most ROMs include custom kernels. Various ROMs give you various features/enhancements/bugfixes. You will probably notice the biggest change in your phone if you load a custom ROM. Most people load the custom kernels to help with battery life as a lot of them allow you to lower the phones minimum processing speed from 245Mhz to 128MHz.
The ROM can change so many different aspects of how the phone works. There is CyanogenMod which is based off of stock Android with a lot of tweaks, bugfixes, and new features added. There is also MIUI, which is similar to the iOS style (not the same, but much closer than stock Android), and then there are a ton others out there.
Click to expand...
Click to collapse
This is an awesome guide, definitely recommend to all, if you're interested in getting into kernel development.
The only thing maybe worth mentioning is where to copy the compiled wifi drivers and modules (governors etc) from, after the kernel has compiled
I'm having a problem at the "Building the Kernel" step. I ran the command, albeit slightly different than you wrote, and got this error:
"make: *** No rule to make target `mjolnir_zeus_defconfig'. Stop."
Do I not have my NDK installed properly, or what?
Edit: Nevermind, was hit by a confusion spell. It's cured, and all is well. At least, for now.
btw, in the future you will want to clone: https://github.com/CyanogenMod/semc-kernel-msm7x30.git
ics branch
But FXP haven't updated kernel in a while, so you could use my CM9 kernel sources if you like: https://github.com/DarkforestGroup/sony-kernel-msm7x30-ics
master branch
Difference is, mine is made from pure Sony PLAY beta sources, while FXP use arc beta sources
I have successfully compiled a kernel for CM7. Thanks, pax, for this tut, and all other developers for their contributions!
Sent from my R800x using XDA
the NDK toolchain isnt good...
i have test them and they throw un-necessary errors...
best use gcc-4.4.3 toolchain from CM repo... it works with almost all device kernels i develop for...
u can also try gcc-4.6.2 toolchain (linaro)...
a working copy of both can be found at my git repo:
https://github.com/DooMLoRD/android_prebuilt_toolchains
DooMLoRD said:
the NDK toolchain isnt good...
i have test them and they throw un-necessary errors...
best use gcc-4.4.3 toolchain from CM repo... it works with almost all device kernels i develop for...
u can also try gcc-4.6.2 toolchain (linaro)...
a working copy of both can be found at my git repo:
https://github.com/DooMLoRD/android_prebuilt_toolchains
Click to expand...
Click to collapse
+1 to that, I use your arm-eabi-4.4.3 prebuilt
lightningdude said:
I have successfully compiled a kernel for CM7. Thanks, pax, for this tut, and all other developers for their contributions!
Sent from my R800x using XDA
Click to expand...
Click to collapse
Apparently I was a little premature in my findings. Having a hell of a time with the fxp sources for CM7. For some reason, I just can't get my cpu frequencies to come down from Max. DooMLoRD, what am I missing?
Sent from my R800x using XDA
It's been a while since I gave an update here, but my ics kernel is doing fine. I just gave up on gingerbread. My new question: How would I go about changing recovery and such? I prefer DooMLoRD's recovery over Keiran's, but since I'm using Keiran's sources, I don't know what to do to get a different recovery.
Sent from my R800x using XDA
lightningdude said:
It's been a while since I gave an update here, but my ics kernel is doing fine. I just gave up on gingerbread. My new question: How would I go about changing recovery and such? I prefer DooMLoRD's recovery over Keiran's, but since I'm using Keiran's sources, I don't know what to do to get a different recovery.
Sent from my R800x using XDA
Click to expand...
Click to collapse
Try replacing the recovery executable in /sbin/ with DooMLoRDs
Sent from my Xperia Play using Tapatalk 2
KeiranFTW said:
Try replacing the recovery executable in /sbin/ with DooMLoRDs
Sent from my Xperia Play using Tapatalk 2
Click to expand...
Click to collapse
I'm at work right now, but I'll try when I get home. I plan on doing some digging for the sake of learning, but that's going to wait for the weekend.
Sent from my R800x using XDA
Edit: Thanks Keiran, that worked. Like I said, I'll be poking around some more this weekend, just to see what I can mess with. Too bad I never got this far on my older phones...
looks good! so gonna try this tomorrow to build a cifs.ko module from latest Se source
watching a movies on phone, here I come
Hi great tutorial, but I'm having a problem with the wifi I have tried taking my bcm4329.ko from drivers/net/wireless and flashing it via CWM also tried moving it to system/lib/modules manually on my phone but still can't get it to work. Any idea how to fix this, its the only thing keeping me from using my own kernel
Sent from my Xperia Play using xda premium
Preface
OK a lot of people have been asking about building kernels, so here is my best shot at a tutorial. I want to preface this all by saying I AM NOT A DEVELOPER. I am a hacker and modder at best, I like doing my own thing, fiddling, and learning what I can, but I don't claim to know/understand everything about the process of building a kernel. You guys shouldn't expect my little walk through here plus another person’s source to make you a "developer", all it will prove is that you can copy/paste. Also if you follow this guide, I am not responsible for anything that you may do that results in destruction, death, or other negative side-affects. You really shouldn't be messing with this stuff unless you know what you are doing, or doing a LOT of research along the way.
However please use this guide as a springboard for knowledge, to give you some key terms to google, to turn on those lightbulbs in your head and get those gears churning.
Note: This is not a newbie's guide to Linux. Before you post your question please look at it. If it involves the syntax of the command/what a command does you need to do your own research elsewhere before attempting to continue with this guide.
Step 1. Build Environment
A. Install Ubuntu 12.04(Not holding your hand here, if you can't do this you shouldn't be messing with kernels)
B. Required packages: git-core, gnupg, flex, bison, gperf, libsdl-dev, libesd0-dev, libwxgtk2.6-dev, build-essential, zip, curl, libncurses5-dev, zlib1g-dev, ia32-libs, lib32z1-dev, lib32ncurses5-dev, gcc-multilib, g++-multilib, and Adb.
C. Open a terminal
D. Type "mkdir android"
E. Type "cd android"
G.Type "mkdir kernel"
The above steps explained:
A. Installing a linux distro. You could really install any Linux distro(Arch = epicness ) however Ubuntu in my eyes is the easy to use and install, and widely supported.
B. Installing needed packages. I believe are these are needed(I'm sure someone will correct if they aren't), these are just the one's I was told I needed the first time I built CyanogenMod. No I can't tell you what every single package does, it is your job to research and figure that out.
C. Ummm...duh?
D-G. Building a directory structure that will help keep us organized. The "mkdir" command creates a directory, and the "cd" command moves you into that directory. You could also combine these steps using the command "mkdir -p android/kernel", however I left it broken apart up there to enforce the typing bit of this. The more you type these commands the more familiar you will become with them.
Step 2. Your Source
A. Open your Terminal Prompt
B. Type "cd android/kernel"
C. Type "git clone git://github.com/DooMLoRD/android_prebuilt_toolchains.git toolchains"
D. Now comes the tricky part, you need to have some-type of source for your kernel. Check the following two sites for your device as appropriate. Once you have it download it is extracted/cloned into a folder in your kernel directory.
http://www.htcdev.com/
http://opensource.samsung.com/
http://developer.sonymobile.com/wportal/devworld/search-downloads/opensource
http://www.lg.com/global/support/opensource/opensource.jsp
The above steps explained: Ok all we are doing here is grabbing some tool chains and the kernel source.
A. Ok...you got this one!
B. Moving into our working directory
C. Grabbing DooMLoRD's very handy pre-built toolchains. What is a toolchain? Check this out http://en.wikipedia.org/wiki/GNU_toolchain. These toolchains are unstable, and as such they aren't completely endorsed yet. They are the versions I use though, and if you would like to use the stable version(4.5.3 as of 07/06/12) you can find links with Google.
D. I typically put my kernel in a directory like "~/android/kernel/<devicename>_<androidversion>_kernel" but that's just me.
Step 3. Modifications
This is the part people are curious about, they want to make modifications to the kernel to make it "special". Start all these from the root directory of your kernel source.
Mod 1. Applying a patch
A. Download the patch you wish to apply, in this case this one should work.
B. Save that file as "kernelPatch" in your kernel directory.
C. Open a Terminal
D. Move into the root directory of the kernel you wish to patch.
E. Type "patch -p1 < ../kernelPatch"
The above steps explained:
A. Pretty simple, I mean we need a patch. The patch itself is quite simply a diff between the original kernel source tree and the source tree containing the changes. I'll post a quick tutorial on how to create a patch in the third post. The patch above contains multiple governors to be added to your kernel.
B. Self-explanatory
C. Self-explanatory
D. Self-explanatory
E. Basically we run the patch command on our source using the patch we downloaded previously. The "patch" portion is the binary itself, the "-p1" option allows you to control the number of forward slashes to remove from file paths(You'll need to look at this option more if you are using weird directory structures or applying the patches from a odd location). The "<" operator directs the content of our "../kernelPatch" file into the command. Mod 2. Adding a Governor Alone
A. Open "drivers/cpufreq/Kconfig"
B. Add the following lines in appropriate spot amongst the other govenor's
Code:
config CPU_FREQ_DEFAULT_GOV_SMARTASS
bool "smartass"
select CPU_FREQ_GOV_SMARTASS
select CPU_FREQ_GOV_PERFORMANCE
help
Use the CPUFreq governor 'smartass' as default.
Code:
config CPU_FREQ_GOV_SMARTASS
tristate "'smartass' cpufreq governor"
depends on CPU_FREQ
help
smartass' - a "smart" optimized governor!
If in doubt, say N.
C. Open "drivers/cpufreq/Makefile"
D. Add the following line in the appropriate spot.
Code:
obj-$(CONFIG_CPU_FREQ_GOV_SMARTASS) += cpufreq_smartass.o
E. Create a file called "drivers/cpufreq/cpufreq_smartass.c"
F. Put the following code in that file.
http://pastebin.com/f0Bk9kVZ
G. open "include/linux/cpufreq.h"
H. Under the "Cpufreq Default" section add
Code:
#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_SMARTASS)
extern struct cpufreq_governor cpufreq_gov_smartass;
#define CPUFREQ_DEFAULT_GOVERNOR (&cpufreq_gov_smartass)
Ok there is a governor added, do the exact same steps for any other one's you would like to add.
The above steps explained:
A. Just opening a file, you guys have this. The Kconfig ties into our "make menuconfig" command later, making our mod a selectable option.
B. Adding the appropriate code for our governor to get it in our .config file. The first chunk would allow us to set our governor as the default one for our kernel, the other allows us to totally remove or add it to the build as we wish.
C-D. This step tells the linker to tie our module in with the rest of the code.
E-F. Creating the actually governor itself, don't skip this step. I would suggest reading through this and trying to understand how it works, it's some pretty awesome stuff.
G-H. Open a file and add the code needed to tie our module into the rest of the source. Without this we would not be able to compile due to the rest of the source not knowing our module exists.
Step 4. Getting a Config file
Option A. Pulling a config file from a kernel.
A. Hook up a device that is using a kernel similar to one you are using as your base.
B. Open a terminal
C. Change to your root kernel directory
D. Type "adb pull /proc/config.gz"
E. Type "gunzip config.gz"
F. Type "mv config arch/arm/configs/<your_config_name>_defconfig"
The above steps explained:
A. This will allow us to pull a base configuration file from a known working kernel. It makes it a lot easier to start out and let's us take baby steps through the whole process. As a note though not all kernel's support this, so you may have to try a few different one's to get it working. If that doesn't work, see option B.
B. Hehe, you are getting good at this step
C. Navigate to the uppermost directory of your kernel source.
D. Use adb to pull a copy of a working config file to use as your source.
E. Unzipping the config file.
F. Moving the configuration file you pulled to the config directory so we can reference it later. Option B. Using the manufacturers config.
Unfortunately as stated above, not all kernels support the "/proc/config.gz" method. You can typically find a manufacturer's configuration file in "arch/arm/configs". I believe the one for my HTC Flyer was called "flyer_hc_defconfig", so look for a layout similar to that one. Also read the README to get a better idea of how to modify it. I would personally make a copy of it called "<your_config_name>_defconfig" and use that as my base.Step 5. Building
Time to start the real "build" section of this tutorial.
Part A. Pre-build Steps
A. Open terminal and change to the root of your kernel directory
B. Type "export ARCH=arm"
C. Type "export CROSS_COMPILE=~/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-"
Part B. The First Build
A. Type "make <your_config_name>_defconfig"
B. Type "make menuconfig" and make the required changes to use any modules you added or similar changes.
C. Type "make -j<maximum number of jobs>"
Part C. Re-Builds
A. Type "make clean"
B. Type "make oldconfig"
C. Type "make -j<maximum number of jobs>"
Part D. Building Modules
You have two options:
A. Type "make modules"
B. Type "make path/to/your/module.ko"
The above steps explained:Part A.(These steps are required every time you close your terminal and re-open it to build again.)
A. Ok shouldn’t need to explain this.
B. This command sets your target architecture.
C. Defines the path to the toolchain we are going to use to compile our kernel. You can change this to point towards whatever toolchain you have downloaded or feel like using, the way it is currently configured it will use the Linaro toolchain that we downloaded above.
Part B.(These only need to be run the first time you build a kernel.)
A. Load's your configuration file from earlier.
B. Open up a menu to configure your kernel. It will use the config file you loaded in the previous step as a base.
C. Viola start the build. I typically allow 1 job per core, so on my quad core machine I put "make -j4". Just raising that number will not make your build faster, your processor needs to be able to support the number of jobs you are assigning it.
Part C. (Use the command's when you are building any-time outside of the first)
A. This command gets rid of any old/outdated binaries or modules you compiled before, and let's start fresh. I like to run it every I build unless my changes are really small and localized.
B. A very awesome command, it parses through what has changed and only prompts you about new options.
C. See the explanation for the above "Part C.".
Part D.(Use these for just building kernel modules.)
A. This will re-build all modules.
B. Will rebuild just the module you need. Very useful when you need to rebuild a WiFi module.
Step 6. Now what
Ok we have now started our build and we are waiting for it to finish, so there are two possible outcomes:
Outcome A. Build Succeds
W00t!! You have a kernel built by your self from source. There are a couple things you need in-order to use this kernel on your device any ".ko" modules and the zImage binary. If you pay attention to the output of your compiler then you will see the location of those objects. However the following commands will make your life a bit easier(Thanks Recognized Developer Hacre):
A. Open a terminal
B. Change to your root kernel directory
C. Type "mkdir ../<your_kernel>_output"
D. Type "cp arch/arm/boot/zImage ../<your_kernel>_output/zImage"
E. Type "find . -name "*.ko" -exec cp {} ../<your_kernel>_output \;"
The above steps explained:
A-C. Self-Explanatory
D. Move our kernel binary into our output folder
E. This handy bit of magic finds all ".ko" modules and also copies them into your output file.
You will also need to assemble a kernel image containing a initramfs for your device, along with the kernel binary and such. That however is beyond the scope of this tutorial. To get started though try searching the following phrases.
Code:
building android kernel image
xda build kernel image
xda unpack boot.img
Outcome B. Build Fails
Oh dear. It failed. Well guess what...this is going to happen..a LOT. Get used to it, and get used to googling and experimenting with different solutions. The following are some tips that will help you with debugging your issues.
Running a "Clean" build
A. Backup your config file(Type "cp .config ../backupConfig")
B. Re-run the build process using just your defconfig from earlier.
Limiting Output(Thanks Hacre.)
A. Another good tip is to run "make -j1" to get the error, as it will limit the amount of text you need to scroll through.Credits
Hacre-Feedback
cdesai-Feedback
Leedroid-Being willing to answer a noob's question's
Doomlord- Having such handy Git repo's
Enjoy. That's all it takes to build a kernel, it's actually rather simple. I will try to answer what questions I can in this thread, and continue to add to it.
Please Read. The GPL is VERY important.
The Rules as they apply on XDA
As XDA has no legal power to uphold the GPL (and frankly we want to stay as far away from doing so as possible), we can’t force any of our users to abide by the GPL. However it is in XDA’s interests as well as the interests of our developer-base to ensure all GPL-derived materials hosted or linked on XDA comply fully with the GPL.
GPL-derived materials that do not come with the complete sources used to compile the GPL components are considered warez, and will be treated as such under forum rule 6 and 9.
If you use GPL components, but do not make any modifications to them whatsoever, you should provide a link to the original source of your GPL code.
Sources accompanying a release should be complete, and contain all the necessary source code for any modules, scripts or definition files. Complete sources will be defined as those which compile correctly and completely against the platform for which the software is distributed, and which contain any and all modifications made to the released General Public Licenced code. The source code supplied should be the exact version for which the source code is being requested, complete with all modifications.
EXAMPLE: Here’s a bit of code that could be used as a template to post your releases
<Kernel Or Author Name> <Kernel Nr>:
<Source>|<ReadMe>|<Credits>|<Other>
The Very Quick Summary of General Public License (GPL)
The text of the GPL Licence itself will be used to reach any final conclusion regarding any disputes over GPL Licenced materials. The above is a summary of what XDA expects of members using GPL code, and the complete text can be read at the GNU website.
The GPL states that anyone who modifies GPL licenced code is required to make available the sources used to compile it. This is to further improve and encourage collaborative work, as well as to ensure that the best code possible is produced, and to encourage peer-review of all work. This benefits both developers and end users in numerous ways, including:
Allowing anyone to verify the code they are trusting with their data, and its authenticity
Encouraging community collaboration to produce faster fixes and updates, and better code
Helping bring new developments from other devices and fields to your own, letting you benefit from new code that wouldn’t have been available without this sharing.
The GPL imparts great freedom for GPL end users. It ensures innovation is never stifled and no project is dependent upon any single developer.
It is in everyone’s interest for the GPL to be adhered to, as it gives us all better ROMs, better transparency, and a better atmosphere for developers to work together to make great code.
Click to expand...
Click to collapse
Grabbing this on the off chance that this thread takes off.
Tutorial coming on how to make a patch when I have time.(Hopefully later tonight.)
Would you mind if I use this tut to automate Build Kernel in the future for use in my tool StudioAndroid?
Credits will be given!
Sent from my Galaxy Nexus using Tapatalk 2
Go for it, let me know if you have any problems with it.
Sent from my SCH-R760 using Tapatalk 2
Would there be any interest in a tutorial on common Linux CLI tools?
thewadegeek said:
Would there be any interest in a tutorial on common Linux CLI tools?
Click to expand...
Click to collapse
Like what/
Sent from my Galaxy Nexus using Tapatalk 2
Oh find, grep, and sed are all one's I use on a regular basis, we could add a quick walk through on repo/git, maybe vi. And come to think of it talking about shell scripting would probably help out as well, it's pretty commonly used for tweaking around here.
thewadegeek said:
Oh find, grep, and sed are all one's I use on a regular basis, we could add a quick walk through on repo/git, maybe vi. And come to think of it talking about shell scripting would probably help out as well, it's pretty commonly used for tweaking around here.
Click to expand...
Click to collapse
A while ago I wanted to add a BASH guide. I think that it will be greatly appreciated if you create a guide for it.
If you need any help, just PM me
Remember to post 8 "reserved" posts if you create a guide for feature expanding
Sent from my Galaxy Nexus using Tapatalk 2
Hmm I'll start rolling with that then. And as to the 8 posts, I prefer to keep them separated by topic so that I can assume the questions in each thread can pertain to the topic at hand.
definatly want to do this!
one question though how can i get source from lets say FXP's github? i keep getting stuck there
like what directory do i need? staright to the kernel file the have or what/? if thats a yes what directory is it?
this is the git hub https://github.com/freexperia
ur help would be greatly appreciated
Well what type of device do you have? He has multiple kernels there so we need to make sure we grab the right one.
sorry it was arc or "anzu"
it is cm9 kernel im looking to make
or i could use the one from cyanogen mod if thats easier since it has the RC1 kernel
Either would work, just make sure it's for your device. Do you have a ready link to the CM9 one?
thewadegeek said:
Either would work, just make sure it's for your device. Do you have a ready link to the CM9 one?
Click to expand...
Click to collapse
i cant tell which it is cause none of them have arc or anzu in them so i dont know which its for
https://github.com/freexperia/semc-kernel-msm7x30-ics.git maybe
idk cause the have all sony devices on this github..... is it just a couple of files that wil be replaced that are device specific?
Ok...I do not see a kernel in there with Qualcomm MSM8255 support. Is this http://www.gsmarena.com/sony_ericsson_xperia_arc-3619.php your phone?
thewadegeek said:
Ok...I do not see a kernel in there with Qualcomm MSM8255 support. Is this http://www.gsmarena.com/sony_ericsson_xperia_arc-3619.php your phone?
Click to expand...
Click to collapse
yes but its ok i got everything workin i just dont understand step 3 part c....
Open that file, and then add that line. However I'm guessing this kernel has all the Govenor's you'll need for this. Also pay attention to the bit about the GPL, and make sure you ask the original creator's permission.
thewadegeek said:
Open that file, and then add that line. However I'm guessing this kernel has all the Govenor's you'll need for this. Also pay attention to the bit about the GPL, and make sure you ask the original creator's permission.
Click to expand...
Click to collapse
oh sorry i meamnt the next part 3 (seems u have 2) about im talking about getting config file part C
Ah good catch, updated. Ok so you know you created a "android/kernel" folder? In your terminal type "cd ~/android/kernel" and press enter. Then type "ls" and press enter again. Tell me what it says.
Hi guys,
My Atrix -> Xoom kernel port is complete. This is the nvodm version.
Right now I am trying to make a build of CM 9 based on my kernel and running into lots of hiccups
Yeap I am a noob so please bear with me. I am following the steps from http://wiki.cyanogenmod.org/w/Build_for_olympus, and got stuck at the step "Prepare the device-specific code"
Code:
$ breakfast olympus
including vendor/cm/vendorsetup.sh
build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/olympus/cm.mk]]: "device/*/olympus/cm.mk" does not exist. Stop.
Device olympus not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Found repository: android_device_motorola_olympus
CyanogenMod/android_device_motorola_olympus already exists
Syncing repository to retrieve project.
warning: local_manifest.xml is deprecated; put local manifests in local_manifests instead
Fetching projects: 100% (1/1), done.
warning: local_manifest.xml is deprecated; put local manifests in local_manifests instead
Repository synced!
Looking for dependencies
Dependencies file not found, bailing out.
Done
build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/olympus/cm.mk]]: "device/*/olympus/cm.mk" does not exist. Stop.
** Don't have a product spec for: 'cm_olympus'
** Do you have the right repo manifest?
I figure that the script is reaching out to the wrong repo at https://github.com/CyanogenMod/android_device_motorola_olympus
It should probably go to https://github.com/Atrix-Dev-Team/android_device_motorola_olympus
Am I right?
How to I correct this problem?
Thanks in advance..
Follow This
http://forum.xda-developers.com/showpost.php?p=21499412&postcount=1
I think that the best way to solve this problem is pm someone that already build a rom from source as you wanna do.
Try to reach MMontuori or EPinter (both really kind and will help for sure) by pm, just a tip hehe.
Hope you can build it, best of luck.
Sorry but this mean that we have a new kernel to get full cm9/10/10.1 roms? W/o All the bugs like the videocam...?
Thanks for the hard work!
from the (M)ATRIX...
Ask epinter, he is such a great guy and he have helped other devs,
Sent from my MB860
Your kernel is booting?
Its a full port from Xoom or you are using the leaked Kernel?
Able to retrieve logs from USB?
Whats your status?
This is very important, because there is another porting project running (http://forum.xda-developers.com/showthread.php?t=2016837) and maybe your kernel source is better to keep up than the one they are trying to port.
Please... communicate!
Thanks!
matbarni said:
Your kernel is booting?
Its a full port from Xoom or you are using the leaked Kernel?
Able to retrieve logs from USB?
Whats your status?
This is very important, because there is another porting project running (http://forum.xda-developers.com/showthread.php?t=2016837) and maybe your kernel source is better to keep up than the one they are trying to port.
Please... communicate!
Thanks!
Click to expand...
Click to collapse
Hey matbarni; take it easy and read the first post, not only the title.
It's not a matter of communication; If you can see the thread of the porting, you'll see some posts from user toyota86, which said he was working but in other branch because he has his reasons for it.
Please don't jump into conclussions and try to help, we all are struggling for an usable kernel; and EVERY help is welcome.
I'm sure any of the developers have contacted him by now or he tried to contact the developers, but he wants to see if anyone can give him a quick tip.
Enough. I'll shut my mouth off
Sorry guys. My mind was hazy when I posted that late last night.
What I meant by "complete" was that it simply built. That's it
Some early sanity testing of my kernel with CM7 resulted in a hang. Yes, I agree with most of you that the next logical thing to do is to flash That ROM and fastboot with my kernel. This can be a quick test. But I am a little suspicious the Bionic libraries may need to be rebuilt as well.
I have already sought advice from our Guru mmontuori and he has told me Kernel modules need to be rebuilt.
SO... lets build the whole she-bang
Raafat said:
Follow This
http://forum.xda-developers.com/showpost.php?p=21499412&postcount=1
Click to expand...
Click to collapse
Thanks!
you will need a build without the errata hack in board config, like the cm10 based on the leak. or build using my jb-olympus-new branch.
you can remove all the kernel modules if your defconfig follows android standard...
jhonnyx said:
Hey matbarni; take it easy and read the first post, not only the title.
It's not a matter of communication; If you can see the thread of the porting, you'll see some posts from user toyota86, which said he was working but in other branch because he has his reasons for it.
Please don't jump into conclussions and try to help, we all are struggling for an usable kernel; and EVERY help is welcome.
I'm sure any of the developers have contacted him by now or he tried to contact the developers, but he wants to see if anyone can give him a quick tip.
Enough. I'll shut my mouth off
Click to expand...
Click to collapse
I did not jump into conclusions.
As you can see, all I posted was questions. And yes, I read what toyota86 posted.
Like "Right now I am trying to make a build of CM 9 based on my kernel and running into lots of hiccups".
The way I am helping is to try to clarify to all users what this post is about.
Thanks for all the support guys
As much as I don't want you guys to be dissapointed, but dont put too much hope as to the outcome of my effort.
Now I have lots on my plate. I will update as I make progress.
thank you
Glad you have been working on this.I tried but abandoned due to insufficient knowledge. atrix was the best buy I've made in years.had it for 3 yes now and thanks to you and others it will live on. Im a trigger happy tester i try every ROM I see and can't wait to try yours.
epinter said:
you will need a build without the errata hack in board config
Click to expand...
Click to collapse
Thank you sir. One question though..
Which errata hack were you referring to? Errata 657451 in the motorola's version of the bionic library? Eg...
In motorola's bionic, we see workarounds like this:
Code:
/* BEGIN MOT GB UPMERGE, a5705c, 12/21/2010 */
# ifdef HAVE_TEGRA_ERRATA_657451
# define __munge_tls(_v) ( ((_v)&~((1ul<<20)|1ul)) | (((_v)&0x1)<<20) )
# else
# define __munge_tls(_v) (_v)
#endif
/* END MOT GB UPMERGE */
Description of this errata:
Code:
config TEGRA_ERRATA_657451
bool "Store bit 20 of CP15 TLS register c13,3 in bit 0"
depends on ARCH_TEGRA_2x_SOC && HAS_TLS_REG
default y
help
This option enables a workaround for the 657451 Tegra 2 errata
which causes unreliable reads from bit 20 of the thread storage
register c13, 3 (used by the __set_tls system call). It stores the
value intended for bit 20 into bit 0 instead; in most user-space
environments, the value saved by __set_tls is an aligned address,
so repurposing bit 0 will not cause ill effects.
In my noob'ish understanding, there is a hardware related bug in our Atrix Tegra 2 SOC that causing data corruption in Thread Local Storage (TLS). Researching this on the net, some ppl were talking about a possibility of a buggy version of this hardware in Atrix. It is also worth noting that this workaround however is NOT present in Stingray's kernel & bionic.
I don't think I remember seeing this workaround in CM's bionic, which is one of my initial concerns..I will look further at home tonight..
Errrrm... Isn't the Bionic a TI OMAP device?
can you post your kernel so others can test it? i have minimal knowledge but would love to help with testing
(Deleted)
quetzalcoatl2435 said:
Errrrm. Isn't the Bionic a TI OMAP device?
Click to expand...
Click to collapse
Bionic is Android's standard C library. Don't worry
toyota86 said:
Hi guys,
My Atrix -> Xoom kernel port is complete. This is the nvodm version.
Right now I am trying to make a build of CM 9 based on my kernel and running into lots of hiccups
Yeap I am a noob so please bear with me. I am following the steps from http://wiki.cyanogenmod.org/w/Build_for_olympus, and got stuck at the step "Prepare the device-specific code"
Code:
$ breakfast olympus
including vendor/cm/vendorsetup.sh
build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/olympus/cm.mk]]: "device/*/olympus/cm.mk" does not exist. Stop.
Device olympus not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Found repository: android_device_motorola_olympus
CyanogenMod/android_device_motorola_olympus already exists
Syncing repository to retrieve project.
warning: local_manifest.xml is deprecated; put local manifests in local_manifests instead
Fetching projects: 100% (1/1), done.
warning: local_manifest.xml is deprecated; put local manifests in local_manifests instead
Repository synced!
Looking for dependencies
Dependencies file not found, bailing out.
Done
build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/olympus/cm.mk]]: "device/*/olympus/cm.mk" does not exist. Stop.
** Don't have a product spec for: 'cm_olympus'
** Do you have the right repo manifest?
I figure that the script is reaching out to the wrong repo at https://github.com/CyanogenMod/android_device_motorola_olympus
It should probably go to https://github.com/Atrix-Dev-Team/android_device_motorola_olympus
Am I right?
How to I correct this problem?
Thanks in advance..
Click to expand...
Click to collapse
How did you solve this? I am trying to build for coconut (SE Live With Walkman) and stuck at breakfast.
Hi guys, a couple days ago, i spent hours sifting through pages of google searches to find the EASIEST stuff about kernel patches. This guide will be updated slowly, be patient! I welcome the help and input from the community, please feel free to pm me (to make sure i get the message ). Let me start off by saying that I will not be able to fix all the problems that you get from patching, but i have no doubt that someone in this awesome community can. So enjoy!
Patching your linux kernel!
Alright guys, i am gonna cover INCREMENTAL patches, these are fairly easy and won't take much of your time. If you plan on doing a more major update, i.e. 2.x --> 3.x, i suggest you go elsewhere because this guide WILL NOT help you.
Another important note, all 3.x updates are incrimental, you cannot skip a patch. Meaning, if i want to patch a 3.0.58 kernel to 3.0.60, i have to patch .58->.59 and then .59->.60. That took me a while to figure out which is why i brought it up early .
LETS GET STARTED!
First, get a nice kernel, one that you know compiles correctly and works, for the most part. Check the makefile, it should be in the root of the directory. Open up the makefile, in my kernel, i see this:
Code:
VERSION = 3
PATCHLEVEL = 0
SUBLEVEL = 63
Ok, it looks like we have a kernel source that's on 3.0.63. Awesome, this should be simple enough. We need 2 patches, one to go up to .64 and the next to .65.
Go HERE and download the .bz2 of what you need. In this case, i am going to download patch-3.0.63-64.bz2 and patch-3.0.64-65.bz2. You'll need to "save link as" to download the files or you can you the lftp command in terminal if you know how to use that. Anyway.
Here is where the terminal fun starts, lets unpack those files so we have the patches. CD into wherever you downloaded the files and run
Code:
bzip2 -dv insertpatchname.bz2
Obviously, you change insertpatchname to your file name. You run that for as many patches you need to do.
Good, now we have the patches. Linux loves us and made it really simple to apply those patches. All you have to do is
Code:
patch -p1 > ~/path/to/the/patch
If you did it right, give you a wall of text telling you that its patching files. NICELY DONE. If you want to confirm that the patch was sucessful, go back to you makefile, you should see that your sublevel is higher. For each additional patch, just repeat the last two steps!
As always, i can't guarantee that these patches won't break compatibility but thats when the fun starts, right?
Wow, nice, you just patched your very own kernel! In the next post, we'll learn how to do the same thing, but instead, we'll cherry-pick those commits from github. PM and Post for any comments, questions, blah, blah. As always, donations are not required but they'll be paying for a new processor to replace my 1.6ghz single core crap. Thanks are appreciated!
Reserved for Github Stuff
I want this one!
Nice, just what I was looking for! Tnx
wantowan2 said:
Nice, just what I was looking for! Tnx
Click to expand...
Click to collapse
No problem, i am happy it was helpful!
Ques:
Say I put the patch in the top of the kernel dir and I cd to the kernel dir, should this work?
Code:
patch -p1 > ~/patch-3.0.49-50
That will work as long as the patch is in ~/