LG Kernel Source posted - Sprint LG Optimus G

https://wws.lg.com/global/support/opensource/opensourceList?types=ALL&search=ls970
1. Android Build
- Download original android source code ( jelly bean 4.1.2 ) from http://source.android.com
- Unzip opensource packages of LS970_JB_android.zip into downloaded android source directory
- And, merge the source into the android source code
- Run following scripts to build android
a) source build/envsetup.sh
b) choosecombo 1 geehrc4g_spr_us 1
c) m -j4
- When you compile the android source code, you have to add google original prebuilt source(toolchain)
into the android folder
- After build, you can find output at out-geehrc4g_spr_us/target/product/geehrc4g
2. Kernel Build
- Untar using following command at the android folder
tar zxvf LS970_JB_kernel.tar.gz
- When you compile the kernel source code, you have to add google original prebuilt source(toolchain)
into the android folder.
- cd kernel
- make j1sp-perf_defconfig ARCH=arm
- make ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
3. After build, you can find the build image(zImage) at arch/arm/boot/

You commented on it in the General section.
http://forum.xda-developers.com/showthread.php?t=2178025
and it was posted in the Dev thread.
http://forum.xda-developers.com/showpost.php?p=38792902&postcount=44

Sorry. in the general section is was titled ROM, not source... Just trying to get the heads up out. I didn't see the dev post. You can delete this thread.

Thread Closed and Thank You.

Related

[CLK]Android 4.3.1 (CM10.2) and how to build your own version -

First you can use my source or my roms to build your own rom only say thanks in your own thread.
I like to share my way to compile Android 4.3.1 for the HTC LEO.
First thanks to mark1706, sportsstar89, evervolv team, devs that make CLK possible and tytung.
YOU CAN FIND "MY" CM-10.2 build here: DEV-HOST
Kernel soure and leo files: GITHUB
This "how to build your own Android" will work with a updated 2.6.35 kernel by mark1706. It use some parts of sportsstar89 kernel.
First setup your 64bit Linux.
I use Linux-Mint (the DEBIAN 7 based version)
You have to install Oracle Java 7: http://www.webupd8.org/2012/06/how-to-install-oracle-java-7-in-debian.html
After Java install follow this how to: https://www.techsomnia.net/2012/11/building-android-on-debian-7/
!! BUT do not install OPEN JDK (sudo apt-get install openjdk-6-jdk) !!
And stop at this point: "Now, prepare the repo:"
Next step get adb working: http://bernaerts.dyndns.org/linux/75-debian/280-debian-wheezy-android-tools-adb-fastboot-qtadb
Now we can start to sync the Android source. (based on this
To install Repo:
Make sure you have a bin/ directory in your home directory and that it is included in your path:
Code:
mkdir ~/bin
PATH=~/bin:$PATH
Download the Repo tool and ensure that it is executable:
Code:
curl [URL]http://commondatastorage.googleapis.com/git-repo-downloads/repo[/URL] > ~/bin/repo
chmod a+x ~/bin/repo
After installing Repo, set up your client to access the Android source repository:
Create an empty directory to hold your working files. If you're using MacOS, this has to be on a case-sensitive filesystem. Give it any name you like:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
Run repo init to bring down the latest version of Repo with all its most recent bug fixes. You must specify a URL for the manifest, which specifies where the various repositories included in the Android source will be placed within your working directory.
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
To pull down the Android source tree to your working directory
Code:
repo sync
We have to load the leo device tree, vendor files and the leo kernel.
Attached you find my local.xml View attachment local_manifests.zip.
Put this file at this place:
Code:
WORKING_DIRECTORY/.repo/local_manifests/...
Now sync again:
Code:
repo sync
Next you have to connect your Leo with running Android and Adb to your PC
We need to download some special files (This will fixed in future)
Go to this folder:
Code:
Working_Directory/device/htc/leo
and run the this script
Code:
sh extract_files.sh
We have to clean the kernel folder:
Go to this folder:
Code:
Working_Directory/kernel/htc/leo
and run this command
Code:
make mrproper
One step more:
Go to this folder: Working_Directory/vendor/cm
and run the this script
Code:
sh get-prebuilts
It is time to start compiling:
Make sure you are in this folder "Working_Directory"
run this commands:
Code:
. build/envsetup.sh
brunch leo
[SIZE=3]** you can use brunch leo -jX too X = numbers of cpu core (or threads) **[/SIZE]
Now wait and you will find your working Android 4.3.1 in this folder:
Working_Directory/out/target/product/leo
Problems with this Android builds:
- auto select GSM network
- mobile data not working well
- switch between wifi and mobile data
- AGPS (GPS works)
You can fix this problems by using files from tytungs NexusHD2 rom.
(AGPS, auto select GSM network)
Auto select GSM network is a telephony_common.jar framework problem.
But there are no source how it was fixed in tytungs rom. Maybe someone find a way to fix it again.
If you like to use 3.x kernel change this in local_manifest.xml:
Code:
<project path="kernel/htc/leo" name="walter79/android_kernel_htc_leo_2.6.35-mark1706-based" remote="github" revision="cm-10.2" />
to
<project path="kernel/htc/leo" name="walter79/android_kernel_htc_leo" remote="github" revision="cm-10.2" />
@walter79
- Can i use your instruction to built Slimroms for HD2??
- How to compile slimroms for HD2??
---------- Post added at 05:24 PM ---------- Previous post was at 05:17 PM ----------
walter79 said:
Auto select GSM network is a telephony_common.jar framework problem.
But there are no source how it was fixed in tytungs rom. Maybe someone find a way to fix it again.
Click to expand...
Click to collapse
You can ask Macs18max. I used telephony_common.jar of Macs18max's compile and it work great with 4.3.1!!
You can use it for slimrom but you need to edit /device/htc/leo/cm.mk. Check working devices for slimrom and you will see what changes are needed.
walter79 said:
You can use it for slimrom but you need to edit /device/htc/leo/cm.mk. Check working devices for slimrom and you will see what changes are needed.
Click to expand...
Click to collapse
Many thannks. I will try i now! I'm beginner so i will learn and learn so much more, i hope you can help me in the next time!
walter79 said:
Problems with this Android builds:
- auto select GSM network
- mobile data not working well
- switch between wifi and mobile data
- AGPS (GPS works)
You can fix this problems by using files from tytungs NexusHD2 rom.
(AGPS, auto select GSM network)
Auto select GSM network is a telephony_common.jar framework problem.
But there are no source how it was fixed in tytungs rom. Maybe someone find a way to fix it again.
If you like to use 3.x kernel change this in local_manifest.xml:
Code:
<project path="kernel/htc/leo" name="walter79/android_kernel_htc_leo_2.6.35-mark1706-based" remote="github" revision="cm-10.2" />
to
<project path="kernel/htc/leo" name="walter79/android_kernel_htc_leo" remote="github" revision="cm-10.2" />
Click to expand...
Click to collapse
I havent tried in 4.3.1 but in 4.2.2 I merge evervolvs telephony-common.jar. It was ril.java.. use meld-diff software to compare everolvs ril.java with your own. and merge required codes.. (Note I also used hardware/ril from evervolv)
big thanks. will check ril.java
Nice thread @walter79 !
I was wondering wether you ever had a similar error:
Code:
target thumb C: libhardware_legacy <= hardware/libhardware_legacy/power/power.c
target thumb C: libhardware_legacy <= hardware/libhardware_legacy/uevent/uevent.c
arm-linux-androideabi-gcc: error: ": No such file or directory
make: *** [/home/adam/android/pa43/out/target/product/leo/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates/power/power.o] Error 1
make: *** Waiting for unfinished jobs....
arm-linux-androideabi-gcc: error: ": No such file or directory
make: *** [/home/adam/android/pa43/out/target/product/leo/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates/uevent/uevent.o] Error 1
It has been bugging me for a week and I cannot find a solution... Do you have any idea about it? (I'm building PA 4.3)
Maybe this help try the carbon rom version.
/device/htc/qsd8k-common/BordConfigCommon.mk
Code:
# only for cyanogenmod
TARGET_KERNEL_CUSTOM_TOOLCHAIN := arm-eabi-4.4.3
# only for carbon rom
# TARGET_KERNEL_CUSTOM_TOOLCHAIN := arm-eabi-4.4.3/bin/arm-eabi-
walter79 said:
Maybe this help try the carbon rom version.
/device/htc/qsd8k-common/BordConfigCommon.mk
Code:
# only for cyanogenmod
TARGET_KERNEL_CUSTOM_TOOLCHAIN := arm-eabi-4.4.3
# only for carbon rom
# TARGET_KERNEL_CUSTOM_TOOLCHAIN := arm-eabi-4.4.3/bin/arm-eabi-
Click to expand...
Click to collapse
Thanks! Unfortunately, it's still the same. I tried it with nearly all possible toolchains...
NxStep said:
Nice thread @walter79 !
I was wondering wether you ever had a similar error:
Code:
target thumb C: libhardware_legacy <= hardware/libhardware_legacy/power/power.c
arm-linux-androideabi-gcc: error: ": No such file or directory
It has been bugging me for a week and I cannot find a solution... Do you have any idea about it? (I'm building PA 4.3)[/QUOTE]
i'd open hardware/libhardware_legacy/power/power.c to find out if any dependancy is unmet (any missing file). i've never compiled a rom myself (hoping soon i will) but for the error you're getting (i'm not sure if it's from toolchain or because of missing toolchain), maybe see if the toolchain path is hardcoded somewhere and try to change it:confused:
Click to expand...
Click to collapse
NxStep said:
Nice thread @walter79 !
I was wondering wether you ever had a similar error:
Code:
target thumb C: libhardware_legacy <= hardware/libhardware_legacy/power/power.c
target thumb C: libhardware_legacy <= hardware/libhardware_legacy/uevent/uevent.c
arm-linux-androideabi-gcc: error: ": No such file or directory
make: *** [/home/adam/android/pa43/out/target/product/leo/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates/power/power.o] Error 1
make: *** Waiting for unfinished jobs....
arm-linux-androideabi-gcc: error: ": No such file or directory
make: *** [/home/adam/android/pa43/out/target/product/leo/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates/uevent/uevent.o] Error 1
It has been bugging me for a week and I cannot find a solution... Do you have any idea about it? (I'm building PA 4.3)
Click to expand...
Click to collapse
Check you local.xml
I used wrong repo for toolchain. Replace it
Code:
<!-- Toolchain -->
<project path="prebuilts/gcc/linux-x86/arm" name="walter79/toolchains" remote="github" revision="master" />
I will upload later a new local.xml
mistake since two days
since yesterday i we have a compiling mistake and have no idea for this problem.
Code:
[COLOR="DarkRed"]target thumb C: wpa_supplicant <= external/wpa_supplicant_8/wpa_supplicant/src/drivers/driver_wext.c
target thumb C: wpa_supplicant <= external/wpa_supplicant_8/wpa_supplicant/src/l2_packet/l2_packet_linux.c
external/wpa_supplicant_8/wpa_supplicant/src/drivers/driver_wext.c: In function 'wpa_driver_wext_set_key_ext':
external/wpa_supplicant_8/wpa_supplicant/src/drivers/driver_wext.c:1708:14: error: 'IW_ENCODE_ALG_AES_CMAC' undeclared (first use in this function)
external/wpa_supplicant_8/wpa_supplicant/src/drivers/driver_wext.c:1708:14: note: each undeclared identifier is reported only once for each function it appears in
external/wpa_supplicant_8/wpa_supplicant/src/drivers/driver_wext.c: In function 'wpa_driver_wext_associate':
external/wpa_supplicant_8/wpa_supplicant/src/drivers/driver_wext.c:2135:11: error: 'IW_AUTH_MFP_DISABLED' undeclared (first use in this function)
external/wpa_supplicant_8/wpa_supplicant/src/drivers/driver_wext.c:2138:11: error: 'IW_AUTH_MFP_OPTIONAL' undeclared (first use in this function)
external/wpa_supplicant_8/wpa_supplicant/src/drivers/driver_wext.c:2141:11: error: 'IW_AUTH_MFP_REQUIRED' undeclared (first use in this function)
external/wpa_supplicant_8/wpa_supplicant/src/drivers/driver_wext.c:2144:42: error: 'IW_AUTH_MFP' undeclared (first use in this function)
make: *** [/home/pixelfreak/htc-leo/carbon/4.3/out/target/product/leo/obj/EXECUTABLES/wpa_supplicant_intermediates/src/drivers/driver_wext.o] Error 1
make: *** Waiting for unfinished jobs....[/COLOR]
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
target StaticLib: libc_nomalloc (/home/pixelfreak/htc-leo/carbon/4.3/out/target/product/leo/obj/STATIC_LIBRARIES/libc_nomalloc_intermediates/libc_nomalloc.a)
[email protected] ~/htc-leo/carbon/4.3 $
pixelfreak
Because now we have ION Kernel, why dont you guys compile a Rom that use ION????
re
aazzam16661 said:
Because now we have ION Kernel, why dont you guys compile a Rom that use ION????
Click to expand...
Click to collapse
the ion system not work 100%... we have test the ion and we go back to Linux kernel version: 2.6.35.14....
pixelfreak
-pixelfreak- said:
the ion system not work 100%... we have test the ion and we go back to Linux kernel version: 2.6.35.14....
pixelfreak
Click to expand...
Click to collapse
There is no ION for HD2 2.6 kernel, its only available in 3.0 kernel
and what do you mean by ion system not work 100%
re
aazzam16661 said:
There is no ION for HD2 2.6 kernel, its only available in 3.0 kernel
and what do you mean by ion system not work 100%
Click to expand...
Click to collapse
no we have test the 3.xx kernel with ion and this not work. so we go back to 2.6
pixelfreak
aazzam16661 said:
Because now we have ION Kernel, why dont you guys compile a Rom that use ION????
Click to expand...
Click to collapse
3.x kernel does not support working bluetooth yet. Display did not work with ion yet.
If you have working display for ion you can tell how to enable it.
walter79 said:
Display did not work with ion yet.
Click to expand...
Click to collapse
And how i'm i using Sense 5 Right Now on my HD2.....It Use ION man...The ION kernel for HD2 Was created for The Sense 5
And yes, the display works
OR, your taking about cm10.2 build have display not working????
walter79 said:
3.x kernel does not support working bluetooth yet. Display did not work with ion yet.
If you have working display for ion you can tell how to enable it.
Click to expand...
Click to collapse
I think more and more people use Bluetooth...but want more smooth....
so i also suggest Kernel 3.0 and it support NativeSD better!
Thanks!

[Q] Errors when compiling cm11 for ace

This may be a stupid post. I have tried to search the forum. However, I don't find any solution.
I am new to Andriod, Cm11, and git. I have background on Gcc etc.
I have installed the CM11 rom to my DHD, it works very well. So I am curious on how to build a rom from source by myself.
the ennvironment is set up. I can build the latest Andriod code without problem. BTW, the image seems quite big.
I follow the first post of this thread.
However, i encounted error with "lunch cm_ace-userdebug".
I try several different methods to retrieve DHD relevant files. but no help.
the errors are as following:
lunch cm_ace-userdebug
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[device/htc/ace/cm.mk]]: "device/htc/common/common.mk" does not exist。 停止。
Device ace not found. Attempting to retrieve device repository from CyanogenMod Github .
Found repository: android_device_htc_ace
Default revision: cm-11.0
Checking branch info
Default revision cm-11.0 not found in android_device_htc_ace. Bailing.
Branches found:
froyo
froyo-stable
gb-release-7.2
gingerbread
gingerbread-release
ics
cm-7.1.0
cm-7.0.3
cm-7.0.2.1
cm-7.0.1
cm-7.0.0
Use the ROOMSERVICE_BRANCHES environment variable to specify a list of fallback branches.
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[device/htc/ace/cm.mk]]: "device/htc/common/common.mk" does not exist。 停止。
** Don't have a product spec for: 'cm_ace'
** Do you have the right repo manifest?
How can I solve it?
thanks,
fenildf
You may want to post this in a more general development forum. You don't need to be restricted to DHDs; it'll be the same with other phones too.
Hi,
I'm just as new to building android images as you are, but, surprisingly, it worked for me just yesterday. So maybe I can help.
In the messages you posted I see only the officially supported dhd android versions. So, I guess you need to somehow enable the unofficial cm11 first. My guess is, this will do just that, but I'm not sure:
Go to the directory where your hiddden .repo directory is in (where you issued repo init), then issue this commands
Code:
mkdir .repo/local_manifests
wget https://github.com/AceEnablementProject/android/raw/cm-11.0/local_manifest.xml -O .repo/local_manifests/cm_ace.xml
The commands I did are as follows (I had some problems and actually did much more, but I think this is all that's really needed):
Code:
mkdir cm11
cd cm11
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
mkdir .repo/local_manifests
wget https://github.com/AceEnablementProject/android/raw/cm-11.0/local_manifest.xml -O .repo/local_manifests/cm_ace.xml
repo sync
cd vendor/cm/
./get-prebuilts
cd ../../
. build/envsetup.sh
lunch cm_ace-userdebug
make bacon
After that (and a loooong wait) I found this in the out directory:
Code:
out/cyanogenmod/target/product/ace/cm-11-20140505-UNOFFICIAL-ace.zip

How to built Kitkat rom for htc desire 616 ??

the update file released by htc for htc desire 616 contains a read me file showing how to use the update but i cannot understand it if someone can explain i would be so greatful
defconfig file: a3ul_defconfig (arm-eabi-4.7)
Download:
=========
If you are not already using an AOSP toolchain (included in an AOSP build tree), download the corresponding official android toolchain for the arm-eabi specified above for this device:
git clone https://android.googlesource.com/platform/prebuilt for 4.4.3
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6 for 4.6
git clone https://android.googlesource.com/platform/prebuilts/gcc/darwin-x86/arm/arm-eabi-4.7 for 4.7
(use darwin-x86 in place of linux-x86 for mac)
Build the kernel:
=================
set the following environment variables:
export TOP= [where you installed the toolchain or top of android AOSP code base]
export PATH=$TOP/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH (use corresponding arm-eabi bin path)
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
make [the defconfig file for this device above]
make clean (for subsequent builds)
make -j4 (in this example 4 is the number of processors of your build machine)
Output Binary Files:
====================
After the build process is finished, there should be a file named "zImage" found in arch/arm/boot/
If you are building a rom with this kernel ZImage, copy it into your build's output folder and rename it to "kernel".
You will also need the following kernel modules. These will eventually be installed into /system/lib/modules on the device.
kernel modules:
./driver/*.ko
If you have already built and installed a boot.img with root access you can also install the modules directly into the device using "adb remount" and "apb push [file] system/lib/modules/" for each file listed above. After installing files set permissions with "adb shell chmod 0644 system/lib/modules/*" and "adb reboot"
For additional information:
===========================
http://htcdev.com
honeyman_1989 said:
the update file released by htc for htc desire 616 contains a read me file showing how to use the update but i cannot understand it if someone can explain i would be so greatful
defconfig file: a3ul_defconfig (arm-eabi-4.7)
Download:
=========
If you are not already using an AOSP toolchain (included in an AOSP build tree), download the corresponding official android toolchain for the arm-eabi specified above for this device:
git clone https://android.googlesource.com/platform/prebuilt for 4.4.3
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6 for 4.6
git clone https://android.googlesource.com/platform/prebuilts/gcc/darwin-x86/arm/arm-eabi-4.7 for 4.7
(use darwin-x86 in place of linux-x86 for mac)
Build the kernel:
=================
set the following environment variables:
export TOP= [where you installed the toolchain or top of android AOSP code base]
export PATH=$TOP/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH (use corresponding arm-eabi bin path)
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
make [the defconfig file for this device above]
make clean (for subsequent builds)
make -j4 (in this example 4 is the number of processors of your build machine)
Output Binary Files:
====================
After the build process is finished, there should be a file named "zImage" found in arch/arm/boot/
If you are building a rom with this kernel ZImage, copy it into your build's output folder and rename it to "kernel".
You will also need the following kernel modules. These will eventually be installed into /system/lib/modules on the device.
kernel modules:
./driver/*.ko
If you have already built and installed a boot.img with root access you can also install the modules directly into the device using "adb remount" and "apb push [file] system/lib/modules/" for each file listed above. After installing files set permissions with "adb shell chmod 0644 system/lib/modules/*" and "adb reboot"
For additional information:
===========================
http://htcdev.com
Click to expand...
Click to collapse
This procedure will give you a kernel,not a ROM.
Sent from a Cool Phone stuck with crappy KingUser
checkout these links
for rom compiling
http://xda-university.com/as-a-developer/getting-started-building-android-from-source
https://source.android.com/source/building.html
http://forum.xda-developers.com/showthread.php?t=2223690
http://forum.xda-developers.com/showthread.php?t=2754145
http://forum.xda-developers.com/showthread.php?t=2320007
https://www.youtube.com/watch?v=fN0v5H0Eoe4
if still have any question feel free to ask.
or pm me
Give the full build rom from HTC 616 for kitkat

[TUTORIAL]How to compile Lollipop kernel for Zenfone 5 (x86 chip)

Good afternoon, guys, I created a tutorial how to compile Lollipop kernel for Zenfone 5 (x86 chip).
i am not expert in this but anyway....
STEP 1
Download official kernel sources from here:
http://dlcdnet.asus.com/pub/ASUS/ZenFone/A500CG/zenfone3_24_40_tar_gz.zip
STEP 2
Open folder with Android sources and unpack all stuff from archive with kernel sources to folder with Android sources.
STEP 3
Open KernelMakefile. (it will be in the root of folder with Android sources)
And find this line:
Code:
TARGET_DEVICE ?= hd
Delete it.
Add this line:
Code:
TARGET_DEVICE=hd (A500CG/A501CG/A600CG - default)
STEP 4
Open Linux Terminal.
Cd to folder with Android sources.
Run this command:
Code:
source build/envsetup.sh
lunch aosp_x86-eng
make -j4 minigzip openssl
STEP 4
Build zImage:
Code:
make -f KernelMakefile TARGET_DEVICE=hd modules_install
STEP 5
Build modules:
Code:
make -f KernelMakefile TARGET_DEVICE=hd copy_modules_to_root
STEP 6
Get modules and zImage from out/target/product/asusctp_hd/ folder.
Reboot to Windows.
STEP 7
Download AndImg Tool:
https://drive.google.com/file/d/0B-Fin8UxrD6PTFpuWlYtMTE3LVk/view
STEP 8
Unpack boot.img for CM/RR using AndImg Tool.
STEP 9
Open unpacked fodler.
Go to PARTS folder. Delete BZIMAGE file. Add your built zImage and rename it to BZIMAGE.
STEP 10
Open unpacked fodler.
Open ramdisk/lib/modules folder.
Add you compiled modules.
STEP 11
Build boot.img using AndImgTool.
THATS IT.
How to enable DT2W:​Go to linux/kernel folder.
Go here: (thx @Borets24)
drivers/input/touchscreen/synaptics_dsx_core.c
Uncomment this lines:
Code:
#define ASUS_TOUCH_PROXIMITY_NODE //<ASUS_Proximity+>
#define ASUS_TOUCH_DTP_WAKEUP //<ASUS_DTP+>
XDA:DevDB Information
How to compile Lollipop kernel for Zenfone 5 (x86 chip), Tool/Utility for the Asus Zenfone 5
Contributors
tank0412
Version Information
Status: Testing
Created 2016-02-11
Last Updated 2016-02-11
Thanks for the guide!
You also forgot that on lines
Code:
make -f KernelMakefile TARGET_DEVICE=hd modules_install
and
Code:
make -f KernelMakefile TARGET_DEVICE=hd copy_modules_to_root
you can use the -j option for faster building.
if only add DT2W, is my phone freeze, tks???
@tank0412 if I wanna build a cm 13 kernel I need a cm 13 kernel to replace the bzimg?
Nice dude. Will try it for sure. I have already had my zimage.
---------- Post added at 09:40 AM ---------- Previous post was at 09:38 AM ----------
dgadelha said:
Thanks for the guide!
You also forgot that on lines
Code:
make -f KernelMakefile TARGET_DEVICE=hd modules_install
and
Code:
make -f KernelMakefile TARGET_DEVICE=hd copy_modules_to_root
you can use the -j option for faster building.
Click to expand...
Click to collapse
Sir, i use your device tree to build the mokee lollipop. I develope it now. It gives me amazing battery backup. Thanjs for your device tree. .

Fixing stock kernel sources for H30-U10

Github repo: https://github.com/kernel-killer/android_kernel_huawei_h30u10
All changes I made since last commit are in my private repo.
Install packages (Not sure if it's right):
Code:
sudo apt-get install build-essential
Note: Please run ./mk ckeck-env to verify your build enviroment (Newer GNU MAKE will fail but the code compiles the same with new or older version)
Build:
Code:
./mk bm_new k
Testing your new kernel:
Download both attachments (KernelSwapper and BootimgRestore).
Append headers from stock kernel to zImage (which can be found at ./out/target/product/huawei82_cwet_kk/obj/KERNEL_OBJ/arch/arm/boot/zImage)
In KernelSwapper update 'kernel' with your own generated zImage rename it to 'kernel' and replace it inside zip.
In BootimgRestore replace 'boot.img' with your current ROM's boot.img in case that something goes wrong (e.g.: Phone not booting).
Copy the two new zips into phone's memory (or SD card) and flash KernelSwapper.
===== Reserved #1 =====
Thanks for the awesome work KK. I am on CM 13 3.4.67 kernel. Can i use this or do i have to be in stock rom for testing the kernal?
Sent from my Honor 3C using Tapatalk
---------- Post added at 06:12 AM ---------- Previous post was at 06:02 AM ----------
Update : Flashed the kernel, phone booted but felt laggish while using. I am still testing, will let you know what happens
Sent from my Honor 3C using Tapatalk
karkeankit said:
Thanks for the awesome work KK. I am on CM 13 3.4.67 kernel. Can i use this or do i have to be in stock rom for testing the kernal?
Sent from my Honor 3C using Tapatalk
---------- Post added at 06:12 AM ---------- Previous post was at 06:02 AM ----------
Update : Flashed the kernel, phone booted but felt laggish while using. I am still testing, will let you know what happens
Sent from my Honor 3C using Tapatalk
Click to expand...
Click to collapse
Yes, I'm sure that the kernel has multiple bugs. The phone may feel laggish because there is enabled low-level kernel debugging over UART.
Thank you for testing...
kernel.killer said:
Yes, I'm sure that the kernel has multiple bugs. The phone may feel laggish because there is enabled low-level kernel debugging over UART.
Thank you for testing...
Click to expand...
Click to collapse
You are welcome, wishint you good luck for further development
Sent from my Honor 3C using Tapatalk
Hi, tnx for The kernel
if i Update my kernel VPN bug in CM12.1 will fix?
hamadk said:
Hi, tnx for The kernel
if i Update my kernel VPN bug in CM12.1 will fix?
Click to expand...
Click to collapse
Nope, it's ROM bug not a kernel bug plus I have released only development preview version which has enabled many debugging options and it may be quite buggy.
Thanks, but can this process led to a suitable kernel for CM13?
Does this kernel fixes the video playback problem and the recording problem?(Can't play or capture 720p videos, screen recorder works fine, just the camera.)
Sent from my Huawei Honor 3C using XDA Labs
Lumpbloom7 said:
Does this kernel fixes the video playback problem and the recording problem?(Can't play or capture 720p videos, screen recorder works fine, just the camera.)
Sent from my Huawei Honor 3C using XDA Labs
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=67848925&postcount=8
mhxygh said:
Thanks, but can it this process led to a suitable kernel for CM13?
Click to expand...
Click to collapse
Aim of this project is to make stock kernel sources stable for KitKat ROMs (It is originally for KK) but somebody else may patch them for CM 13. I am not working on this nor I'll do.
Will you be adding extra CPU governors and IO schedulers along with kernel level wakeups for double tap waking?
I was wondering who else is developing kernel 3.10.XX for this device ?
Ms_Julia said:
I was wondering who else is developing kernel 3.10.XX for this device ?
Click to expand...
Click to collapse
Actually, nobody is working on 3.10.X kernel. And I'm rather focusing on LineageOS for now.
What is the defconf for our device in kernel source
imranpopz said:
What is the defconf for our device in kernel source
Click to expand...
Click to collapse
This should include most configs
Code:
/* Mediatek common */
./mediatek/config/common/autoconfig/kconfig/AEE
./mediatek/config/common/autoconfig/kconfig/USER
./mediatek/config/common/ProjectConfig.mk
/* MT6582 common */
./mediatek/config/mt6582/autoconfig/kconfig/platform
./mediatek/config/mt6582/ProjectConfig.mk
/* h30u10 device specific */
./mediatek/config/huawei82_cwet_kk/autoconfig/kconfig/project
./mediatek/config/huawei82_cwet_kk/ProjectConfig.mk
kernel.killer said:
This should include most configs
Code:
/* Mediatek common */
./mediatek/config/common/autoconfig/kconfig/AEE
./mediatek/config/common/autoconfig/kconfig/USER
./mediatek/config/common/ProjectConfig.mk
/* MT6582 common */
./mediatek/config/mt6582/autoconfig/kconfig/platform
./mediatek/config/mt6582/ProjectConfig.mk
/* h30u10 device specific */
./mediatek/config/huawei82_cwet_kk/autoconfig/kconfig/project
./mediatek/config/huawei82_cwet_kk/ProjectConfig.mk
Click to expand...
Click to collapse
Replace Device Name with the configuration file found at:
Source/arch/arm/configs
It's written in this way something_DeviceCodename_user_defconfig
I need for the above step.. ☝☝☝
imranpopz said:
Replace Device Name with the configuration file found at:
Source/arch/arm/configs
It's written in this way something_DeviceCodename_user_defconfig
I need for the above step.. ☝☝☝
Click to expand...
Click to collapse
Well... This is Mediatek, DO NOT expect the sources to look nice. The configs are scattered through ./mediatek subdirectories, *.mk files are parsed and configs are assembled during build. Unfortunatelly, even if you manually assemble .config you will NOT be able to build the kernel. It is full of dirty hacks (Mediatek) and just typing "make" won't work, build will break.
Build:
Code:
$ git clone https://github.com/kernel-killer/android_kernel_huawei_h30u10.git
$ cd android_kernel_huawei_h30u10
$ export ARCH=arm && export ARCH_MTK_PLATFORM=mt6582 && export TARGET_PRODUCT=huawei82_cwet_kk
$ export CROSS_COMPILE=/path-to-your-toolchain/.../bin/arm-linux-androideabi-
$ ./mk n k
Code:
$ ./mk -h
Usage: (makeMtk|mk) [options] project actions [modules]
Options:
-t, -tee : Print log information on the standard-out.
-o, -opt=bypass_argument_to_make
: Pass extra arguments to make.
-h, -help : Print this message and exit.
Projects:
one of available projects.
Actions:
listp, listproject
: List all available projects.
check-env : Check if build environment is ready.
check-dep : Check feature dependency.
n, new : Clean and perform a full build.
c, clean : Clean the immediate files(such as, objects, libraries etc.).
r, remake : Rebuild(target will be updated if any dependency updats).
mrproper : Remove all generated files + config + various backup files in Kbuild process.
bm_new : "new" + GNU make's "-k"(keep going when encounter error) feature.
bm_remake : "remake" + GNU make's "-k"(keep going when encounter error) feature.
mm : Build module through Android native command "mm"
mma : Build module through Android native command "mma"
emigen : Generate EMI setting source code.
nandgen : Generate supported NAND flash device list.
codegen : Generate trace DB(for META/Cather etc. tools used).
drvgen : Generate driver customization source.
custgen : Generate customization source.
javaoptgen : Generate the global java options.
ptgen : Generate partition setting header & scatter file.
bindergen : Generate binder related information
sign-image : Sign all the image generated.
encrypt-image : Encrypt all the image generated.
update-api : Android default build action
(be executed if system setting or anything removed from API).
check-modem : Check modem image consistency.
upadte-modem : Update modem image located in system.img.
modem-info : Show modem version
gen-relkey : Generate releasekey for application signing.
check-appres : Check unused application resource.
sdk : Build sdk package.
win_sdk : Build sdk package with a few Windows tools.
banyan_addon : Build MTK sdk addon.
banyan_addon_x86 :Build MTK sdk x86 addon.
cts : Build cts package.
bootimage : Build boot image(boot.img).
cacheimage : Build cache image(cache.img).
systemimage : Build system image(system.img).
snod : Build system image without dependency.
(that is, ONLY pack the system image, NOT checking its dependencies.)
recoveryimage : Build recovery image(recovery.img).
secroimage : Build secro image(secro.img).
factoryimage : Build factory image(factory.img).
userdataimage : Build userdata image(userdata.img).
userdataimage-nodeps
: Build userdata image without dependency.
(that is, ONLY pack the userdata image, NOT checking its dependencies.)
dump-products : Dump products related configuration(PRODUCT_PACKAGE,PRODUCT_NAME ect.)
target-files-package
: Build the target files package.
(A zip of the directories that map to the target filesystem.
This zip can be used to create an OTA package or filesystem image
as a post-build step.)
updatepackage : Build the update package.
dist : Build distribution package.
Modules:
pl, preloader : Specify to build preloader.
lk : Specify to build little kernel.
md32 : Specify to build DSP md32.
tz, trustzone : Specify to build trusted execution environment.
k, kernel : Specify to build kernel.
dr, android : Specify to build android.
NULL : Specify to build all components/modules in default.
k <module path>
: Specify to build kernel component/module with the source path.
dr <module name>
: Specify to build android component/module with module name.
Other tools:
prebuilts/misc/linux-x86/ccache/ccache -M 10G
: Set CCACHE pool size to 10GB
Example:
./mk -t e1k emigen
: Generate EMI setting source code.
./mk -o=TARGET_BUILD_VARIANT=user e1k n
: Start a user mode full build.
./mk listp : List all available projects.
./mk e1k bootimage
: Build bootimage for e1k project.
./mk e1k bm_new k
: Build kernel for e1k project.
./makeMtk e1k c,bm_remake pl k
: Clean & Build preloader and kernel for e1k project.
./makeMtk e1k n k kernel/xxx/xxx
: Build(full build) kernel component/module
under the path "kernel/xxx/xxx" for e1k project.
./makeMtk e1k r dr Gallery
: Rebuild android module named Gallery for e1k project.
./makeMtk e1k mm packages/apps/Settings
: Change Directory to packages/apps/Settings and execute "mm"
./makeMtk e1k mma packages/apps/Settings
: Change Directory to packages/apps/Settings and execute "mma"
Edit:
I fixed the sources, so menuconfig can be used.
Apply patch:
Code:
$ git am 0001-Fix-build-using-make-command.patch
Build:
Code:
$ cd kernel && export ARCH=arm && export ARCH_MTK_PLATFORM=mt6582 && export TARGET_PRODUCT=huawei82_cwet_kk
$ export CROSS_COMPILE=/path-to-your-toolchain/.../bin/arm-linux-androideabi-
$ make -C $(pwd) O=output h30u10_defconfig menuconfig
$ make -C $(pwd) O=output
Append MTK headers:
Code:
$ ../mediatek/build/tools/mkimage output/arch/arm/boot/zImage KERNEL > output/zImage
*Note: I recommend using AOSP arm-linux-androideabi-4.9 toolchain.
Getting cp: cannot stat 'out/target/product/huawei82_cwet_kk_kernel.log
Make [1]: [kernel ] error 1
Make: *** [remake] error 2

Categories

Resources