Google Android Development - Touch Dual, MDA Touch Plus ROM Development

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...

Related

I wish to become a developer for our O1's!

Hi guys, I would like to ask you what IDE's and other software I need to make and modify android roms. I am particularly looking at helping with ICS production. I know java and some C++ if this helps, I am unsure of what to use whether that be eclipse or some other IDE/SDk. Also there are a few file types I am unfamiliar with and want to know how to edit those such as .so's and other files. Thanks P500 community you guys are awesome D
If you haven't already, I'd highly reccomend setting up a build environment and trying to sync the cm repos. Once you have the code, you can play around and see what you need from there, in terms of an IDE.
Sent from my LG-P500 using XDA
Fantastic, I shall get onto that right away.
May the force be with you, bro!
Sent from my LG-P500 using Tapatalk 2
gymfreak7855 said:
Hi guys, I would like to ask you what IDE's and other software I need to make and modify android roms. I am particularly looking at helping with ICS production. I know java and some C++ if this helps, I am unsure of what to use whether that be eclipse or some other IDE/SDk. Also there are a few file types I am unfamiliar with and want to know how to edit those such as .so's and other files. Thanks P500 community you guys are awesome D
Click to expand...
Click to collapse
gymfreak7855 said:
Hi guys, I would like to ask you what IDE's and other software I need to make and modify android roms. I am particularly looking at helping with ICS production. I know java and some C++ if this helps, I am unsure of what to use whether that be eclipse or some other IDE/SDk. Also there are a few file types I am unfamiliar with and want to know how to edit those such as .so's and other files. Thanks P500 community you guys are awesome D
Click to expand...
Click to collapse
Read some android books.you already know c++ and Java so you will become good dev.
For playing with code you need.
Ubuntu.
Notepad.
sdk & adb.
And this "good luck!"
Yeah! Actually even i am interested in learning.
I know c/c++. No java yet
I'll be finishing my exams on the 3rd of may and would have around 2 months of vacations to learn
So guidance would really be appreciated. Do we need a separate sdk for linux based os? I have sdk on windows, isnt that enough?
What is the advantage of using linux for android development? I have backtrack(ubuntu based) on vmware. Will it do?
Essential Software:
Ubuntu 11.10 (dual boot not virtual machine, it's too slow)
Eclipse IDE with the Android plugins
Meld (for easy directory compares)
Mastery of the terminal especially git / repo commands
Github account
CyanogenMod gerrit account
Google Plus account
I'm assuming you're coming from Windows since you don't know what a .so file is (like I did when starting). .so files are android's versions of .dll files. 'executables' don't have a file extension. Kernel modules use the .ko extension.
(I think .so means shared object, .ko means kernel object. Makes sense to me anyway )
The worst thing about starting is simply the sheer size of the project, it is a whole operating system we are dealing with here!
Start simple and easy, follow the instructions on how to make your own build and flash it. (and feel proud you have your own build string in about phone!) Then do it again without the instructions. (harder than it sounds )
The programming side may not be such a problem for you if you already know it. I didn't know anything. reading library files written in c++ ain't so bad, but getting used to how an android app is written in java was a huge mindf**k for me at first.It still is actually
I'm really just your average code hacker, I just hack based on educated guesses but I have taken copious notes on what I do and how things work. Seriously, I have two A5 notebooks full of lists, commands, file locations, diagrams and other tips I've found over the past 6 months.
Prepare to read a lot, be confused a lot, say WTF?!?!?! a lot, delighted when you make your first changes and they work, a ton of waiting for builds to finish and perhaps a bit nervous when you are ready to submit your first commit to CyanogenMod...
Can't we practice on something less taxing than the the whole cyanogenmod, like maybe some prebuilt system apps?
I have allocated 2.9gb of ram and enough cpu to my vm for it to run smoothly so speed isn't really an issue here
Will backtrack do or would ubuntu be better(backtrack is a network security related os based on ubuntu only)
And how important is java. I have two months of almost pure vacations(just have to make a project) so time wont be much of an issue and i'll anyway be doing java in a year or two at college so starting now wont be any harm.
BTW just curious why is g+ account an essentiality here?
Edit
Oh and yeah ill be switching from win to linux and that IS going to be a pretty big problem :/
I don't even properly know what a kernel is and what it does.
Edit2
Iv added you to my circles adfad please add me.
These guides could help!
http://forum.xda-developers.com/showthread.php?t=1272270
http://forum.xda-developers.com/showthread.php?t=667298
I'm starting learning too. I already know the android framework and java.
I have some problems when I try to compile for a device.
Code:
[email protected]:~/WORKING_DIRECTORY$ source build/envsetup.sh
including device/moto/wingray/vendorsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/samsung/toro/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including vendor/cm/vendorsetup.sh
including sdk/bash_completion/adb.bash
It doesn't include device/cm_device_lge_p500/vendorsetup.sh (I'm using androidmeda's sources) and if I run "lunch":
Code:
[email protected]:~/WORKING_DIRECTORY$ lunch
You're building on Linux
Lunch menu... pick a combo:
1. full-eng
2. full_x86-eng
3. vbox_x86-eng
4. full_maguro-userdebug
5. full_toro-userdebug
6. full_panda-eng
7. cm_anzu-userdebug
8. cm_captivatemtd-userdebug
9. cm_coconut-userdebug
10. cm_crespo-userdebug
11. cm_crespo4g-userdebug
12. cm_epicmtd-userdebug
13. cm_galaxysbmtd-userdebug
14. cm_galaxysmtd-userdebug
15. cm_galaxys2-userdebug
16. cm_haida-userdebug
17. cm_hallon-userdebug
18. cm_i777-userdebug
19. cm_iyokan-userdebug
20. cm_mango-userdebug
21. cm_maguro-userdebug
22. cm_p1-userdebug
23. cm_p1c-userdebug
24. cm_p3-userdebug
25. cm_p4-userdebug
26. cm_p4tmo-userdebug
27. cm_p4vzw-userdebug
28. cm_p4wifi-userdebug
29. cm_p5-userdebug
30. cm_p5wifi-userdebug
31. cm_p920-userdebug
32. cm_p970-userdebug
33. cm_p990-userdebug
34. cm_p999-userdebug
35. cm_pyramid-userdebug
36. cm_satsuma-userdebug
37. cm_shooter-userdebug
38. cm_shooteru-userdebug
39. cm_smb_a1011-userdebug
40. cm_smultron-userdebug
41. cm_tenderloin-userdebug
42. cm_tf101-userdebug
43. cm_tf201-userdebug
44. cm_toro-userdebug
45. cm_urushi-userdebug
46. cm_vibrantmtd-userdebug
47. cm_wingray-userdebug
48. cm_zeus-userdebug
Which would you like? [full-eng]
There isn't our phone.
I think it can't know I've added another device. Does anybody know how to solve this problem? I'm sure it's something pretty stupid...
P.S. I'm using Ubuntu 11.10
EDIT: Ok, I think I've done something wrong syncing androidmeda sources.
What I've done is:
Code:
[email protected]:~$ cd WORKING_DIRECTORY
[email protected]:~/WORKING_DIRECTORY$ repo init -u git://github.com/androidmeda/cm_device_lge_p500.git
repo initialized in /home/francesco/WORKING_DIRECTORY
[email protected]:~/WORKING_DIRECTORY$ repo sync
Fetching projects: 100% (248/248), done.
Syncing work tree: 100% (248/248), done.
I've done this for git://github.com/androidmeda/cm_vendor_lge_p500.git and git://github.com/androidmeda/lge-kernel-msm7x27.git too. I can't see them though.
Solved the problem. Cloned androidmeda's device folder into device/lge/p500
EDIT2: FINALLY COMPILING!
EDIT3:
Code:
make: *** Nessuna regola per generare l'obiettivo "device/lge/p500/init.p500.usb.rc
It's 'No rule to make target'. I don't know what to do, I can't even find that file, but I've got a file called init.thunderg.usb.rc
Solved renaming init.thunderg.usb.rc to init.p500.usb.rc. It's compiling now
adfad666 said:
Essential Software:
Ubuntu 11.10 (dual boot not virtual machine, it's too slow)
Eclipse IDE with the Android plugins
Meld (for easy directory compares)
Mastery of the terminal especially git / repo commands
Github account
CyanogenMod gerrit account
Google Plus account
I'm assuming you're coming from Windows since you don't know what a .so file is (like I did when starting). .so files are android's versions of .dll files. 'executables' don't have a file extension. Kernel modules use the .ko extension.
(I think .so means shared object, .ko means kernel object. Makes sense to me anyway )
The worst thing about starting is simply the sheer size of the project, it is a whole operating system we are dealing with here!
Start simple and easy, follow the instructions on how to make your own build and flash it. (and feel proud you have your own build string in about phone!) Then do it again without the instructions. (harder than it sounds )
The programming side may not be such a problem for you if you already know it. I didn't know anything. reading library files written in c++ ain't so bad, but getting used to how an android app is written in java was a huge mindf**k for me at first.It still is actually
I'm really just your average code hacker, I just hack based on educated guesses but I have taken copious notes on what I do and how things work. Seriously, I have two A5 notebooks full of lists, commands, file locations, diagrams and other tips I've found over the past 6 months.
Prepare to read a lot, be confused a lot, say WTF?!?!?! a lot, delighted when you make your first changes and they work, a ton of waiting for builds to finish and perhaps a bit nervous when you are ready to submit your first commit to CyanogenMod...
Click to expand...
Click to collapse
Thanks man Your work has really inspired me and yes haha I am moving from windows all though I have had some experience with ubuntu before. It makes sense about the extensions. Thanks for your advice Will ask questions if I need to
I'm having problems compiling using make -j4
Code:
make -C kernel/lge/p500 O=/home/francesco/WORKING_DIRECTORY/out/target/product/p500/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=/home/francesco/WORKING_DIRECTORY/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- cyanogenmod_p500_defconfig
make[1]: ingresso nella directory "/home/francesco/WORKING_DIRECTORY/kernel/lge/p500"
make[1]: *** Nessuna regola per generare l'obiettivo "cyanogenmod_p500_defconfig". Arresto.
make[1]: uscita dalla directory "/home/francesco/WORKING_DIRECTORY/kernel/lge/p500"
make: *** [/home/francesco/WORKING_DIRECTORY/out/target/product/p500/obj/KERNEL_OBJ/.config] Errore 2
make: *** Attesa per i processi non terminati....
'No rule to make target "cyanogenmod_p500_defconfig". Stop'
Any idea?
When I've used make -i I haven't had this problem
EDIT: Solved moving cyanogenmod_p500_defconfig in p500 folder
Ok, I'm trying to tidy up everything a bit. I've noticed there is a new github. I've seen this:
Code:
LG P500 ICS Setup
Copy/paste it WORKING_DIR/.repo/local_manifest.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/lge/p500" name="p500/cm_device_lge_p500" remote="github" revision="master" />
<project path="vendor/lge/p500" name="p500/cm_vendor_lge_p500" remote="github" revision="master" />
<project path="kernel/lge/p500" name="p500/lge-kernel-msm7x27" remote="github" revision="android-ics-msm-2.6.35" />
</manifest>
I have no local_manifest.xml. Do I have to create it? Or do I have to add these three lines to manifest.xml (which is in .repo folder)? And do I have to add toolchain too?
Question: if installing Ubuntu with wubi on Windows XP, will it show the dual-boot screen on every boot?(or else what shortcut?)
And does it need to defragment, or is it safe just like that?
vlt96 said:
Question: if installing Ubuntu with wubi on Windows XP, will it show the dual-boot screen on every boot?(or else what shortcut?)
And does it need to defragment, or is it safe just like that?
Click to expand...
Click to collapse
No idea, never tried.
If you understand anything:
http://en.wikipedia.org/wiki/Wubi_(Ubuntu)
Why dont you use vmware instead?
Now someone help me with this:
Whenever i try to recompile the framework-res.apk(pasquale test)(even without editing) i get this error:
What can i do about it?
rishabh22 said:
No idea, never tried.
If you understand anything:
http://en.wikipedia.org/wiki/Wubi_(Ubuntu)
Why dont you use vmware instead?
Now someone help me with this:
Whenever i try to recompile the framework-res.apk(pasquale test)(even without editing) i get this error:
What can i do about it?
Click to expand...
Click to collapse
VM got me an error when installing saying it is incompatible with win xp (I could install, but didn't wanna risk, windows is harder to recover than Android)
try using virtual box.
https://www.virtualbox.org/
rishabh22 said:
try using virtual box.
https://www.virtualbox.org/
Click to expand...
Click to collapse
yea I did that... but did anyone try it on XP, it says it failed incompatibility tests or something (same error I got when trying to install windows 7 video drivers on xp) and I don't wanna risk, anyone?
I don't think it's good to install ubuntu to compile android in a virtual machine, I think the compilation would be too slow. I'm sorry I can't help you, I've installed ubuntu from a Live CD and I didn't have many problems with the installation process.
BTW, added the three lines to manifest.xml synced repo. It's compiling well using make -j4
vlt96 said:
yea I did that... but did anyone try it on XP, it says it failed incompatibility tests or something (same error I got when trying to install windows 7 video drivers on xp) and I don't wanna risk, anyone?
Click to expand...
Click to collapse
huh? both vmware and virtual box arn't compatible with xp
why the heck were u trying to install win7 video drivers on xp
And why dont you dual boot?
---------- Post added at 08:37 PM ---------- Previous post was at 08:34 PM ----------
ZatBaloo said:
I don't think it's good to install ubuntu to compile android in a virtual machine, I think the compilation would be too slow. I'm sorry I can't help you, I've installed ubuntu from a Live CD and I didn't have many problems with the installation process.
BTW, added the three lines to manifest.xml synced repo. It's compiling well using make -j4
Click to expand...
Click to collapse
if you have enough ram and a good enough processor there shouldnt be any problem in using a virtual machine. i use backtrack with 2.9/4gb ram and am able to use both windows7 and backtrack simultaneously without any problems/lag
I have an i5 2.3-2.9GHz
Sure it depends on what you want to compile. It was just a suggestion to compile faster. You probably won't notice lag, but it will take more to compile everything.

[Tutorial] Building Your First Kernel

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.

[TUTORIAL][WIP] Working with GIT and GITHUB for Android Source

Working with GIT and GITHUB
for Android Source
I want to start by saying that I am no EXPERT on GIT, but I believe the best way to learn is through trial and error. Through my trials and errors, this is what I have found that works when working with Android Source Code (AOSP).
I started my Android Development basically porting and hacking Android Operating Systems for the HTC Thunderbolt. In my opinion I learned the basics plus some, and was able to create stable builds, which most users found enjoyable to operate. In my quest to further improve my Android development skills, I moved on the next step in Android Operating System development, build a custom AOSP ROM from source. I soon started browsing other developers GITHUB repositories and tried my best to figure out what was going on behind the scenes, in order to share my code with others and visa versa. This lead me to setting up a development platform, downloading the latest (at the time ICS) source and then compiling everything, to obtain, a fresh updated ROM. Obviously, the next step was editing the code to my liking and then trying to figure out how to update my code (push) to Github for version tracking and also hosting purposes. I shopped around on the net for GIT tutorials, and for the life of me, I could not figure out how to make things work the way they should. After doing research on the REPO command (which I came to find was basically the same as GIT but updated to work better with Android) I became more confused. I never found an article or tutorial which explained step-by-step the processes in which I am about to explain, which is why I decided to take the time to compose this tutorial.
Finally, through many hours of research and frustration, I came up with the answers I was so diligently seeking. Here are my findings:
The following Tutorial is for an INITIAL COMMIT of your source to GITHUB. Once you accomplish sending the initial data over, sending only changes thereafter, is very similar, but doesn't require as many steps.
Prerequisites:
(1) Create an account on GITHUB.com
(2) Download the Android Source into a working directory (in my case "android").
(3) Generate your Private SSH Keys for GITHUB (this will allow you to push files without logging in every time) You will find easy to understand directions HERE
For this example I will be working with the following variables:
My default Android directory: ~/android
For this tutorial I will editing the Setting.apk source code in order to add "XYZ" functionality
The source code for the Settings.apk is located in ~/android/packages/apps/Settings
So lets BEGIN!
First Step: You want to go into the directory where you are editing the source.
Code:
cd ~/android/packages/apps/Settings
Second Step: Initialize the Settings source folder and create a git repository
(which will track all changes)
Code:
git init
Third Step: Now you want to log-in to GITHUB and create a repository for your updated Settings source to go. In my case I created a folder on GUTHUB called android_packages_apps_Settings
Forth Step: After you have created your repository on GITHUB, from your Settings source folder, you need to tell git where to push the changes you have made. When you do the initial push, it is actually going to push all of the files in the Settings source folder including the changes you have made. Do this by typing the following command:
Code:
git remote add github [email protected]:yourusername/android_packages_apps_Settings.git
Obviously, you are going to change "yourusername" to whatever username you created on GITHUB.
Fifth Step: Add the entire Settings directory to git so that it starts tracking your additions, deletions, changes, etc for the entire directory.
Code:
git add -A
Sixth Step: Commit the changes that you made to the files in order to push to GITHUB. Now for this example, I want to commit changes to ALL files in the Settings folder.
Code:
git commit -a
If I wanted to just commit changes to one specific file, I would use "git commit whateverfile.java". After you commit, a text editor is going to pop-up. This is where you add the description for the change(s) you have made. If you have detailed change-log of each file you changed, you will not want to use the "git -a" command because the description you enter there is going to be the description for all of the files you edited.
Seventh Step: Now you want to change to the branch you plan on using to push your content. In my case its "jellybean".
Code:
git branch jellybean
Eighth Step: Finally you will now push your initial Settings commit to github. In order to do this, type:
Code:
git push github jellybean
This is going to push github ("github" is the name you gave the REMOTE when you executed the "git remote add" above) to a branch on GITHUB.com called "jellybean". You can name the branch whatever you like, but obviously naming it to the current Android release name is the easiest to remember for you and others.
You should now see that your computer sent files to GUTHUB.com and if you check online, you should see that your changes have been implemented and copied for the world to access.
I hope this helps people out with Android based git commands. I wish I found somthing like this months ago and maybe I would have a few extra hairs on my head. Let me know if you have any additional questions or would like me to add to this tutorial in any fashion. I will be doing a video shortly which I will post to this thread when complete.
Saved for Questions and Answers . . .
Create repository on github called packages_apps_Settings
Clone it
Code:
git clone https://github.com/lithid/packages_apps_Settings.git
cd packages_apps_Settings
Find the aosp settings and pull that repo so all proper history is still entact. Then merge it.
Code:
git pull https://android.googlesource.com/platform/packages/apps/Settings refs/tags/android-4.1.1_r6
Save it
Now add it all and push to your local repo.
Code:
git push
Hello, how do you create a device tree because I want to build from source but my phone does not yet have one. Thanks
itzdarockz said:
Hello, how do you create a device tree because I want to build from source but my phone does not yet have one. Thanks
Click to expand...
Click to collapse
When you say "a device tree" are you referring to the propriety device drivers and such for a particular device?
MyComputerDoctor said:
When you say "a device tree" are you referring to the propriety device drivers and such for a particular device?
Click to expand...
Click to collapse
I mean to build from source and when picking your lunch such as crespo and crespo 4G i want to add my phone into that. Is that necessary to build from source though?
itzdarockz said:
I mean to build from source and when picking your lunch such as crespo and crespo 4G i want to add my phone into that. Is that necessary to build from source though?
Click to expand...
Click to collapse
Let me know if this helps: http://www.netmite.com/android/mydr...build_new_device.html#androidBuildNewFileTree
Thanks for this tut! I've been wanting to push out sources to my github for a while...but couldn't really find a good tut/didn't have the time to do all the research...this seems like it should get me going with my github and I will definatly be using this tut soon
Sent from my SGH-I997 using Tapatalk 2
question, Let's say I want to merge a commit from CyanogenMod's GitHub ..... I use AOKP's Source, is there a command using git that I can use to facilitate this ??
johnhany97 said:
question, Let's say I want to merge a commit from CyanogenMod's GitHub ..... I use AOKP's Source, is there a command using git that I can use to facilitate this ??
Click to expand...
Click to collapse
Use git cherry-pick but first you need to add the repo
So for example you want a commit from settings first you add CM's settings as a repo with git remote add <name> <url> ....Name can be anything
So it will be $ git add remote cm https://github.com/CyanogenMod/android_packages_apps_Settings
then you can either git fetch cm which will sync all the branches out you can just sync a single branch $ git fetch cm cm-10.1
Now you can use git cherry-pick to cherry-pick the commit from CM settings
$ git cherry-pick <sha1>
e.g
$ git cherry-pick 64c377
Now you will probably need to resolve some conflicts which is hard to explain how to resolve as it varies between has been added where cherry-picked.
can some one ell me how i merge the halo from PA ?
thanks
MyComputerDoctor said:
Working with GIT and GITHUB
for Android Source
I want to start by saying that I am no EXPERT on GIT, but I believe the best way to learn is through trial and error. Through my trials and errors, this is what I have found that works when working with Android Source Code (AOSP).
I started my Android Development basically porting and hacking Android Operating Systems for the HTC Thunderbolt. In my opinion I learned the basics plus some, and was able to create stable builds, which most users found enjoyable to operate. In my quest to further improve my Android development skills, I moved on the next step in Android Operating System development, build a custom AOSP ROM from source. I soon started browsing other developers GITHUB repositories and tried my best to figure out what was going on behind the scenes, in order to share my code with others and visa versa. This lead me to setting up a development platform, downloading the latest (at the time ICS) source and then compiling everything, to obtain, a fresh updated ROM. Obviously, the next step was editing the code to my liking and then trying to figure out how to update my code (push) to Github for version tracking and also hosting purposes. I shopped around on the net for GIT tutorials, and for the life of me, I could not figure out how to make things work the way they should. After doing research on the REPO command (which I came to find was basically the same as GIT but updated to work better with Android) I became more confused. I never found an article or tutorial which explained step-by-step the processes in which I am about to explain, which is why I decided to take the time to compose this tutorial.
Finally, through many hours of research and frustration, I came up with the answers I was so diligently seeking. Here are my findings:
The following Tutorial is for an INITIAL COMMIT of your source to GITHUB. Once you accomplish sending the initial data over, sending only changes thereafter, is very similar, but doesn't require as many steps.
Prerequisites:
(1) Create an account on GITHUB.com
(2) Download the Android Source into a working directory (in my case "android").
(3) Generate your Private SSH Keys for GITHUB (this will allow you to push files without logging in every time) You will find easy to understand directions HERE
For this example I will be working with the following variables:
My default Android directory: ~/android
For this tutorial I will editing the Setting.apk source code in order to add "XYZ" functionality
The source code for the Settings.apk is located in ~/android/packages/apps/Settings
So lets BEGIN!
First Step: You want to go into the directory where you are editing the source.
Code:
cd ~/android/packages/apps/Settings
Second Step: Initialize the Settings source folder and create a git repository
(which will track all changes)
Code:
git init
Third Step: Now you want to log-in to GITHUB and create a repository for your updated Settings source to go. In my case I created a folder on GUTHUB called android_packages_apps_Settings
Forth Step: After you have created your repository on GITHUB, from your Settings source folder, you need to tell git where to push the changes you have made. When you do the initial push, it is actually going to push all of the files in the Settings source folder including the changes you have made. Do this by typing the following command:
Code:
git remote add github [email protected]:yourusername/android_packages_apps_Settings.git
Obviously, you are going to change "yourusername" to whatever username you created on GITHUB.
Fifth Step: Add the entire Settings directory to git so that it starts tracking your additions, deletions, changes, etc for the entire directory.
Code:
git add -A
Sixth Step: Commit the changes that you made to the files in order to push to GITHUB. Now for this example, I want to commit changes to ALL files in the Settings folder.
Code:
git commit -a
If I wanted to just commit changes to one specific file, I would use "git commit whateverfile.java". After you commit, a text editor is going to pop-up. This is where you add the description for the change(s) you have made. If you have detailed change-log of each file you changed, you will not want to use the "git -a" command because the description you enter there is going to be the description for all of the files you edited.
Seventh Step: Now you want to change to the branch you plan on using to push your content. In my case its "jellybean".
Code:
git branch jellybean
Eighth Step: Finally you will now push your initial Settings commit to github. In order to do this, type:
Code:
git push github jellybean
This is going to push github ("github" is the name you gave the REMOTE when you executed the "git remote add" above) to a branch on GITHUB.com called "jellybean". You can name the branch whatever you like, but obviously naming it to the current Android release name is the easiest to remember for you and others.
You should now see that your computer sent files to GUTHUB.com and if you check online, you should see that your changes have been implemented and copied for the world to access.
I hope this helps people out with Android based git commands. I wish I found somthing like this months ago and maybe I would have a few extra hairs on my head. Let me know if you have any additional questions or would like me to add to this tutorial in any fashion. I will be doing a video shortly which I will post to this thread when complete.
Click to expand...
Click to collapse
Did you finish the video tutorial?
Sent from my LG-LS970 using Tapatalk 4 Beta
sooo?
Does anyone have further information on how you would sync back to a master? That is, if I sync from AOSP today, make my own changes, and then a few weeks from now I want to resync to an updated AOSP, how do I do this?

[PATCH CENTRAL] The How-To and Help Thread for kernel patches

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 ~/

[WIP] Enhanced kernel for CherryTrail devices (tablets/convertibles) - 4.14

Hi, there!
Now that we can use Project Croissant to get ChromeOS running or non-Chromebook devices, what is missing is a better kernel for improved compatibility.
Thanks to the threads by @nabil2000 I was able to successfully build a chromeos-4.14 kernel that boots on my test device (Lenovo MIIX320-10ICR - Z8350 processor) using a CONFIG from FydeOS 5.31 with most hardware enabled (WiFi, Bluetooth, sound), but it has the same issue as latest ATB builds: it freezes after a while. This doesn't happen with latest FydeOS or CloudReady builds (CloudReady bought FlintOS so I guess they are using some of their code now), so my guess if that their kernels have some patches that aren't included in the Chromium git. FydeOS is open-sourced only for RaspberryPi and TinkerBoard, there are no sources available for the PC or VMWare versions (PC version is not open source as many say, so be aware).
I already have some ideas to make the trackpad as well as the battery meter and brightness work, but it is not useful if the kernel isn't as stable as FydeOS (virtually no freezes or crashes once booted). I have already checked, and the issue is not the intel_idle.max_cstate issue that plagued most BayTrail/CherryTrail devices in the past (using value 1 doesn't change anything).
So any ideas how to get FydeOS kernel source? Patches to make the current chromeos-4.14 kernel stable?
UPDATE: As @nabil2000 reported, it seems that FydeOS is not willing to release their kernel source. But it is possible to get kernel config from v5.31 using configs.ko module, which is missing in the next version (v6.0). Using FydeOS v5.31 as base it is possible to build a very stable kernel for CherryTrail devices.
Thanks
Installation v71/v72 - kernel 4.14
FydeOS has the best support for the MIIX320-10ICR, with some caveats:
It will boot to a black screen, but you just need to wait until it finishes loading the hit Ctrl+Alt+Fn+F2, the screen will blink and then hit Ctrl+Alt+Fn+F1 to go back to ChromeOS (for some reason, the developer shell is blank in 5.31 but it seems to work fine on 6.0). Use Ctrl+Shift+Fn+F3 to rotate the screen manually;
WiFi works out of the box, Bluetooth is detected but audio does not work (Chromium misses a library for audio over Bluetooth);
Sound works too, but you need to install some UCM files (more about this later);
Camera does not work, and the trackpad works very well, with gestures, but does NOT click (tap to click work with a custom conf file, see below - the trackpad actually sends two events when clicking the physical button, as some Windows devices do, and this doesn't work with cmt driver).
First I tried to build the ChromeOS file using the chromium.img from FydeOS v5.31. It booted fine and I was amazed to see the ChromeOS logo and Google enrollment, but PlayStore setup didn't finish (low space?) and there was no way to install it to another driver: many GPT errors and the installer failed...
Then I tried to do everything on place:
Booted to FydeOS on USB drive;
As I could not get to the dev shell in v5.31, I had to login then use crosh and shell, then installed it on a second external disk (120GB SATA on USB, /dev/sdb):
PS: your device may be a different one, check the correct device name using "lsblk" or "fdisk -l" and be aware that this installation erases the whole disk!
Code:
sudo chromeos-install --dst /dev/sdb
After installing, I have used option 2A from GitHub page (very detailed, thanks!) with the script, soraka (or pyro) and caroline recoveries (both versions 11151.113 = v71) on another disk:
PS: FydOS v5.31 kernel does not have support to VTPM_PROXY, while v6.0 does, it means you cannot use swtpm.jar with FydeOS v5.31 and chromefy. For nocturne or Android Pie ARC, you must use FydeOS v6.0, otherwise ARC won't work.
Code:
sudo bash ./chromefy.sh /dev/sdb recovery.bin caroline.bin
Answered YES to use the local installation, YES to resize partitions and NO in the end to keep SELinux as enforced (it may work fine if you keep it to enforced with nocturne recovery tho when using FydeOS v6.0);
Rebooted using the final installation, logged in and everything seemed fine, but then Play Store would not show installed apps even after a reboot, so I tried a powerwash and it seems it fixed the issue, now it seems to be working fine.
Original post: https://forum.xda-developers.com/showpost.php?p=78891386&postcount=729
Post installation fixes v71/v72 - kernel 4.14
1. Sound
You need to install UCM files using linuxium-install-UCM-files.sh script after remounting rootfs as RW.
Code:
sudo remount -o rw,remount /
sudo bash ./linuxium-install-UCM-files.sh
2. Headphone jack
You must send this quirk to the rt5645 module when loading it, so while rootfs is still RW, as root add a file named "miix320.conf" to /etc/modprobe.d with this line:
Code:
options snd_soc_rt5645 quirk=0x1030
PS: if you have used the correct UCM files then the audio should change between speakers and headphones, but not mic. To enable internal mic:
Code:
sudo alsaucm -c chtrt5645 set _verb HiFi set _enadev DMic
and to enable mic from headset:
Code:
sudo alsaucm -c chtrt5645 set _verb HiFi set _enadev HSMic
3. Tap to click with trackpad
While rootfs is still RW, as root add a file named "50-mixx320.conf" to /etc/gestures:
Code:
Section "InputClass"
Identifier "MIIX320 conf"
MatchUSBID "048d:*"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Option "Tap Minimum Pressure" "1"
EndSection
PS: for this to work, make sure "tap-to-click" is enabled in trackpad section of system Settings. If you have another device, use "dmesg | grep input:" with "lsusb" to find your device USB id instead of "048d:*".
Still needing fixes:
- chrome://flags is blank for some reason, so any special flags should be added manually to "chrome_dev.conf" instead;
- Trackpad physical button click;
- Brightness control;
- Battery meter;
- Rotation;
- Automatic change between tablet/desktop modes;
- Cameras (hardly they will work as they rely on ATOMISP, which was abandoned and does not work even on newest kernels).
Original post: https://forum.xda-developers.com/showpost.php?p=78978577&postcount=757
reserved
Good news! With chromeos-4.19 it is possible to fix most problems:
- trackpad button click;
- battery meter;
- accelerometer sensor module is loaded, it needs to be tested;
- possibly brightness can be fixed too.
Using FydeOS v5.31 kernel config as base I could get a very stable build, but it broke loading ARC somehow, and I have no idea why. Maybe it's a permissions/signatures issue? I will try to run chromefy again, with the new kernel already in place to see if it works.
lfom said:
Good news! With chrome-4.19 it is possible to fix most problems:
- trackpad button click;
- battery meter;
- accelerometer sensor module is loaded, it needs to be tested;
- possibly brightness can be fixed too.
Using FydeOS v5.31 kernel config as base I could get a very stable build, but it broke loading ARC somehow, and I have no idea why. Maybe it's a permissions/signatures issue? I will try to run chromefy again, with the new kernel already in place to see if it works.
Click to expand...
Click to collapse
Nice to see you do some kernel work.
Care to share link to Chromium OS Kernel 4.19 source code, I would like to get a crack at using menuconfig to add drivers..
nabil2000 said:
Nice to see you do some kernel work.
Care to share link to Chromium OS Kernel 4.19 source code, I would like to get a crack at using menuconfig to add drivers..
Click to expand...
Click to collapse
Sure. I should post a full guide as soon as I get ARC working without issues, the new kernel is awesome.
I have used the same base procedure as you did:
https://github.com/dnschneid/crouton/wiki/Build-chrome-os-kernel-and-kernel-modules
I then cloned (duplicated) the kernel source (chromeos-4.14) so I could then checkout the newer version while keeping the old one:
Code:
$ cd ~/kernel_new
$ git reset --hard origin/chromeos-4.19
PS: I am building on Xenial (not chroot), so I had to install libssl-dev in order to successfully build it.
lfom said:
Sure. I should post a full guide as soon as I get ARC working without issues, the new kernel is awesome.
I have used the same base procedure as you did:
https://github.com/dnschneid/crouton/wiki/Build-chrome-os-kernel-and-kernel-modules
I then cloned (duplicated) the kernel source (chromeos-4.14) so I could then checkout the newer version while keeping the old one:
Code:
$ cd ~/kernel_new
$ git reset --hard origin/chromeos-4.19
PS: I am building on Xenial (not chroot), so I had to install libssl-devel in order to successfully build it.
Click to expand...
Click to collapse
I am a lazy billy - thanks - I like copy & paste, & think as little as I can afford
Could you help me patching it on my GPD pocket?
it uses cherry tail
https://forum.xda-developers.com/ha...gpd-pocket-t3928828/post79496417#post79496417
thank you

Categories

Resources