compile CM9 from source - LG Nitro HD

Hello,i tried to compile a custom kernel from the CM9 source for 6200(downloaded from here
HTML:
https://github.com/CyanogenMod/lge-kernel-iproj
). i installed the toolchain and configured it. then i issued the make command and the compilation finished a few minutes later. but i didn't get a zImage under /arch/arm/boot/ after.i really need your help! any input would be appreciated!

there seems to be no error as the last bits of log show
/home/dell/android/arm-2011.03/bin/arm-none-eabi-ld -EL -r -o kernel/built-in.o kernel/sched.o kernel/fork.o kernel/exec_domain.o kernel/panic.o kernel/printk.o kernel/cpu.o kernel/exit.o kernel/itimer.o kernel/time.o kernel/softirq.o kernel/resource.o kernel/sysctl.o kernel/sysctl_binary.o kernel/capability.o kernel/ptrace.o kernel/timer.o kernel/user.o kernel/signal.o kernel/sys.o kernel/kmod.o kernel/workqueue.o kernel/pid.o kernel/rcupdate.o kernel/extable.o kernel/params.o kernel/posix-timers.o kernel/kthread.o kernel/wait.o kernel/kfifo.o kernel/sys_ni.o kernel/posix-cpu-timers.o kernel/mutex.o kernel/hrtimer.o kernel/rwsem.o kernel/nsproxy.o kernel/srcu.o kernel/semaphore.o kernel/notifier.o kernel/ksysfs.o kernel/pm_qos_params.o kernel/sched_clock.o kernel/cred.o kernel/async.o kernel/range.o kernel/groups.o kernel/freezer.o kernel/profile.o kernel/time/built-in.o kernel/futex.o kernel/rtmutex.o kernel/smp.o kernel/spinlock.o kernel/uid16.o kernel/module.o kernel/kallsyms.o kernel/power/built-in.o kernel/cgroup.o kernel/cgroup_freezer.o kernel/configs.o kernel/res_counter.o kernel/stop_machine.o kernel/irq/built-in.o kernel/rcutree.o kernel/relay.o kernel/utsname_sysctl.o kernel/elfcore.o kernel/trace/built-in.o kernel/sched_cpupri.o kernel/slow-work.o kernel/perf_event.o

I'm trying to the CM9 compile, and I hope good luck!

I have tried to the CM9 kernel compiled for 6200, but failed...
As follows:
1、make distclean
2、export ARCH=MSM8X60
3、export TARGET_PRODUCT=msm8660-perf
4、make msm8660-perf_defconfig
5、make -j4
Compiled in the target error: lge/debug/dummy.o
Help me!
---------- Post added at 07:49 AM ---------- Previous post was at 07:48 AM ----------
freefall12,how do you build?

jxxhwy said:
I have tried to the CM9 kernel compiled for 6200, but failed...
As follows:
1、make distclean
2、export ARCH=MSM8X60
3、export TARGET_PRODUCT=msm8660-perf
4、make msm8660-perf_defconfig
5、make -j4
Compiled in the target error: lge/debug/dummy.o
Help me!
---------- Post added at 07:49 AM ---------- Previous post was at 07:48 AM ----------
freefall12,how do you build?
Click to expand...
Click to collapse
have you installed the toolchain and set all the environment variables before proceeding to compile it? i was unable to build a kernel image from the above source or the official source. but i can successfully build a zimage from source for other devices using exactly the same procedure. there may be additional steps required to build kernel for this specific device.

good luck!
good luck!

i'm sure toolchain and environment variables setting is correct, you compile steps is?

You should use cyanogenmod_iprj_defconfig

HONO!Thanks for your reply.
to ensure the compiler success, i tried from P930 source project
\Kernel\lge\debug\dummy.C
\kernel\lge\lge_board\i_atnt\platform_i_atnt_mmc.C
\kernel\lge\lge_board\i_atnt\platform_i_atnt_input.C
\kernel\lge\lge_board\i_atnt\platform_i_atnt_mmc.C
Copied to the corresponding directory, but i have a error.
CC drivers/gpu/MSM/kgsl_iommu
Drivers/gpu/MSM/kgsl_iommu. C: In function 'kgsl_iommu_unmap' :
Drivers/gpu/MSM/kgsl_iommu. C: 241: error: the implicit declaration of function 'iommu_unmap_range'
Drivers/gpu/MSM/kgsl_iommu. C: In function 'kgsl_iommu_map' :
Drivers/gpu/MSM/kgsl_iommu. C: 264: error: the implicit declaration of function 'iommu_map_range'
Make [3] : * * * [drivers/gpu/MSM/kgsl_iommu. O]
Compile statements as follows:
Make cyanogenmod_iprj_defconfig ARCH = arm
Make ARCH = arm CROSS_COMPILE = ~/Android/source/prebuilt/Linux-x86/ toolchain/arm-eabi-4.4.3/bin/arm-eabi-

Where can i find the cm9 source on github? I want to mess around and patch pdroid then compile it.
Is this what i would use? https://github.com/CyanogenMod/android_device_lge_p930
Is that the full cm9 source for lg nitro hd p930? I'm trying to get into building a rom, but it being only ~6mb doesn't make me to sure that i'm at the right spot.

delete
sorry I mistook the place to post.

Related

Xoom with ICS 4.0.3 AOSP how to

Now that the code is out, let's start hacking the Xoom.
These instructions are for Linux 64-bit Ubuntu 11.10 / Mint 12, with latest updates.
follow directions on source.android.com to set up your environment
then move to next page to set up the repo and download the code
make sure you use Sun/Oracle Java Development Kit 1.6.x. It WILL NOT work with OpenJDK, which comes with Ubuntu 11.10/Mint 12. (best is remove OpenJDK to avoid hard to track errors)
downloading the code takes ages (a good 2h even with a good connection) and requires at least 2GB of hard disk space. But for compilation, I'd recommend to have 20GB at least.
download proprietary drivers at: http://tinyurl.com/6rfu8rn
extract the drivers from Broadcom and NVidia, this will gives you 2 .sh files
just run these 2 .sh files and copy the created vendor/ directory into the root of your Google code repo.
There are 2 kinds of Xoom
Xoom Verizon LTE, codename stingray
Xoom wifi, codename wingray
Make some corrections in the code for GCC 4.6
external/mesa3d/src/glsl/linker.cpp: l.70 add: #include <cstddef>
To build the code:
. ./build/envsetup.sh
lunch full_stingray-userdebug or full_wingray-userdebug
make -j5
This can take 2h to compile on an average machine like my MacBook Pro with 8GB RAM (very important to have more than 4GB!!!), or even more. And having a quad-core machine (or even more cores), really saves you tons of time!
Once compilation is done, it's time to flash:
go to out/target/product/wingray (or stingray)
put your Xoom in fastboot mode: power off, then volume down + power on
fastboot erase cache
fastboot erase userdata
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot reboot
Note: you don't need to flash recovery.img, you should instead flash ClockworkMod recovery (http://download.clockworkmod.com/recoveries/recovery-clockwork-4.0.0.4-stingray.img)
And voila, you have a Xoom with WiFi working and all goodies from AOSP. This means no Google apps like Market...
To install Google Apps:
download this zip file [http://www.mediafire.com/?1l4ravroiwt4ybw[/url]
unzip it and go inside the folder
boot your device normally
rm system/app/Nfc*
adb push system /system
adb reboot
There are some errors with exchange service but Market, GMail, Maps work correctly. From there, go update your apps from Market
Enjoy!
Update 1: Android 4.0.1 issues back in 4.0.3?
Some people noted some compilation errors I didn't get on 4.0.3 but on 4.0.1. Here are solutions for 4.0.1 (emulator) that may work for you:
build/core/combo/HOST_linux-x86.mk:61 HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
build/core/combo/javac.mk:15 COMMON_JAVAC := javac -J-Xmx512M -target 1.5 -source 1.5 -Xmaxerrs 9999999
frameworks/base/libs/util/Android.mk: 63 LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
libcore/luni/src/main/java/java/lang/Enum.java: 128 return ordinal - o.ordinal ();
external/gtest/include/gtest/internal/gtest-param-util.h:40 #include <cstddef> (after #include <vector>)
How much space just to tinker with ICS/gingerbread?
I have a 1.5 mbps DSL connection and 200gb would take me 8 day/24 hour of downloading and I cant do that.
Kippui said:
How much space just to tinker with ICS/gingerbread?
I have a 1.5 mbps DSL connection and 200gb would take me 8 day/24 hour of downloading and I cant do that.
Click to expand...
Click to collapse
I do my building in a VM and the virtual disk image that has ubuntu and AOSP has grown to 45 GB after a compile.
Also, question for OP... why don't we see people using "make -j otapackage" to create CWM compatible ROMs? Just make sure it doesn't have a recovery in it (or it will torch your existing recovery). I torched my recovery the first time I did it, but I think I fixed it (haven't reflashed to find out).
It builds just fine with 3 GB of RAM in my VM here. Takes around 1 hour for me, with 6 CPU threads assigned to the VM, and using -j6. I just wish I could make sure it doesn't waste time compiling the various demos and tests.
I'm also using ccache to speed up (re)building. Google has instructions on how to set it up (it's really easy). Copied from their page (http://source.android.com/source/initializing.html):
You can optionally tell the build to use the ccache compilation tool. Ccache acts as a compiler cache that can be used to speed-up rebuilds. This works very well if you do "make clean" often, or if you frequently switch between different build products.
Put the following in your .bashrc or equivalent.
export USE_CCACHE=1
By default the cache will be stored in ~/.ccache. If your home directory is on NFS or some other non-local filesystem, you will want to specify the directory in your .bashrc as well.
export CCACHE_DIR=<path-to-your-cache-directory>
The suggested cache size is 50-100GB. You will need to run the following command once you have downloaded the source code.
prebuilt/linux-x86/ccache/ccache -M 50G
This setting is stored in the CCACHE_DIR and is persistent.
Click to expand...
Click to collapse
I have it set to only 10 GB here, but if you intend to do a lot of rebuilding, 20-40 GB might be a better idea.
The full AOSP tree + out directory takes 24G on my machine using du -sh.
The OTA package is 90MB, including the recovery, which you probably want to remove.
Indeed, I forgot to mention using USE_CCACHE, it really speeds up your builds. Make sure your cache dir is the top of your AOSP tree, it's even better.
Hi,
Huge thanks for those usefull instructions.
Just a hint for Gentoo builders (and maybe others distrib), if you're having this error after the "lunch" command :
Code:
AOSP> lunch full_wingray-userdebug
build/core/config.mk:268: *** Error: could not find jdk tools.jar, please install JDK6, which you can download from java.sun.com. Stop.
** Don't have a product spec for: 'full_wingray'
** Do you have the right repo manifest?
just export env ANDROID_JAVA_HOME with full jdk path :
Code:
export ANDROID_JAVA_HOME=/opt/sun-jdk-1.6.0.29/
winglord said:
There are 2 kinds of Xoom
Xoom Verizon LTE, codename stingray
Xoom wifi, codename wingray
Click to expand...
Click to collapse
There's three kinds of Xoom, the GSM MZ601 as well (Moto's codename everest). This is not supported by Google, but hopefully the hardware is close enough to stingray that the port shouldn't be overly difficult. At worst, the port to everest might have issues with vendor_ril?
please post your finished from.
Sent from my Full Android on Wingray using Tapatalk
Does someone know if there is a way to run builded images into the sdk emulator ?
Not sure what I am doing wrong:
Code:
/ICS_SOURCE# make -j4 otapackage
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.3
TARGET_PRODUCT=full_wingray
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IML74K
============================================
build/core/main.mk:324: implicitly installing apns-conf_sdk.xml
No private recovery resources for TARGET_DEVICE wingray
host C++: llvm-rs-cc <= frameworks/compile/slang/llvm-rs-cc.cpp
host C++: llvm-rs-cc <= frameworks/compile/slang/slang_rs.cpp
host C++: llvm-rs-cc <= frameworks/compile/slang/slang_rs_ast_replace.cpp
host C++: llvm-rs-cc <= frameworks/compile/slang/slang_rs_context.cpp
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>:0:0: note: this is the location of the previous definition
<built-in>:0:0: note: this is the location of the previous definition
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>:0:0: note: this is the location of the previous definition
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>:0:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/llvm-rs-cc.o] Error 1
make: *** Waiting for unfinished jobs....
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs_ast_replace.o] Error 1
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs_context.o] Error 1
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs.o] Error 1
[email protected]:~/ICS_SOURCE#
Im using this guide as it has more details: http://www.freeyourandroid.com/guide/compile-ics
Any guidance someone could offer would be great.
Are you in ubuntu 11.10? I was having issues also. Check out this site...
http://www.android-dev.ro/2011/12/13/building-android-4-0-on-ubuntu-11-10/
aceman118 said:
Are you in ubuntu 11.10? I was having issues also. Check out this site...
http://www.android-dev.ro/2011/12/13/building-android-4-0-on-ubuntu-11-10/
Click to expand...
Click to collapse
Thanks, I am useing 11.10 so ill read through this and try again.
EDIT: got my first build completed! Thanks
you can use wingray or stingray on everest. Of course, if you use wingray on everest, you won't have phone app and other phone only features.
aceman118 said:
Are you in ubuntu 11.10? I was having issues also. Check out this site...
http://www.android-dev.ro/2011/12/13/building-android-4-0-on-ubuntu-11-10/
Click to expand...
Click to collapse
I'm using Ubuntu 11.10 64bit and GCC 4.6.
Keep in mind to add '#include <cstddef>' in headers where you have compile errors like indexOf() not found.
popokrew said:
Not sure what I am doing wrong:
Code:
/ICS_SOURCE# make -j4 otapackage
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.3
TARGET_PRODUCT=full_wingray
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IML74K
============================================
build/core/main.mk:324: implicitly installing apns-conf_sdk.xml
No private recovery resources for TARGET_DEVICE wingray
host C++: llvm-rs-cc <= frameworks/compile/slang/llvm-rs-cc.cpp
host C++: llvm-rs-cc <= frameworks/compile/slang/slang_rs.cpp
host C++: llvm-rs-cc <= frameworks/compile/slang/slang_rs_ast_replace.cpp
host C++: llvm-rs-cc <= frameworks/compile/slang/slang_rs_context.cpp
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>:0:0: note: this is the location of the previous definition
<built-in>:0:0: note: this is the location of the previous definition
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>:0:0: note: this is the location of the previous definition
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>:0:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/llvm-rs-cc.o] Error 1
make: *** Waiting for unfinished jobs....
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs_ast_replace.o] Error 1
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs_context.o] Error 1
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs.o] Error 1
[email protected]:~/ICS_SOURCE#
Im using this guide as it has more details: http://www.freeyourandroid.com/guide/compile-ics
Any guidance someone could offer would be great.
Click to expand...
Click to collapse
You are not doing anything wrong, this is a GCC 4.6 restriction.
Weird I didn't see it with ics 4.0.3 but with 4.0.1 before.
Here is what you need to do for 4.0.1:
build/core/combo/HOST_linux-x86.mk:61 HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
build/core/combo/javac.mk:15 COMMON_JAVAC := javac -J-Xmx512M -target 1.5 -source 1.5 -Xmaxerrs 9999999
frameworks/base/libs/util/Android.mk: 63 LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
libcore/luni/src/main/java/java/lang/Enum.java: 128 return ordinal - o.ordinal ();
external/gtest/include/gtest/internal/gtest-param-util.h:40 #include <cstddef> (after #include <vector>)
winglord said:
You are not doing anything wrong, this is a GCC 4.6 restriction.
Weird I didn't see it with ics 4.0.3 but with 4.0.1 before.
Here is what you need to do for 4.0.1:
build/core/combo/HOST_linux-x86.mk:61 HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
build/core/combo/javac.mk:15 COMMON_JAVAC := javac -J-Xmx512M -target 1.5 -source 1.5 -Xmaxerrs 9999999
frameworks/base/libs/util/Android.mk: 63 LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
libcore/luni/src/main/java/java/lang/Enum.java: 128 return ordinal - o.ordinal ();
external/gtest/include/gtest/internal/gtest-param-util.h:40 #include <cstddef> (after #include <vector>)
Click to expand...
Click to collapse
winglord, I was able to get it to build with the guide aceman posted. I believe its because of the modified make: make CC=gcc-4.4 CXX=g++-4.4
Where would I find a log for the entire build? A lot of stuff scrolls by while building.
Now I just need to get the recovery image out (guessing just delete it out of the ota .zip?) and try it out. My Xoom isnt with me right now.
AlEsC said:
Does someone know if there is a way to run builded images into the sdk emulator ?
Click to expand...
Click to collapse
When running lunch you have to chose one of the emulator builds (full_eng if my memory's right). You can't run a build compiled for a specific device.
RMerlin said:
When running lunch you have to chose one of the emulator builds (full_eng if my memory's right). You can't run a build compiled for a specific device.
Click to expand...
Click to collapse
Thanks
This means I'll have to rebuild all !!
Another question, I've made a successfully build, then I've made some modification in the sources, so I've deleted all *.img thinking that "make" will rebuild them... but "make" only rebuild "system.img", "ramdisk.img" and "userdata.img".
Is there a "make boot" or something like that ? (real question is how do I rebuild my boot.img )
Thanks
winglord said:
I'm using Ubuntu 11.10 64bit and GCC 4.6.
Keep in mind to add '#include <cstddef>' in headers where you have compile errors like indexOf() not found.
Click to expand...
Click to collapse
I tried that and it didn't seem to work for me. Once I used GCC 4.4 it worked. I couldn't tell you why, though.
So I finally got a build up and running - is there something special that has to be done with the vendor binaries? I know I have seen this in other builds too but the kernel is still showing 2.x and the camera, mic and gps are not working. Is that because work needs to be done to the kernel before it is 100% with ICS? This is my first time messing with an android build so forgive me if this is a dumb question.
AlEsC said:
Thanks
This means I'll have to rebuild all !!
Another question, I've made a successfully build, then I've made some modification in the sources, so I've deleted all *.img thinking that "make" will rebuild them... but "make" only rebuild "system.img", "ramdisk.img" and "userdata.img".
Is there a "make boot" or something like that ? (real question is how do I rebuild my boot.img )
Thanks
Click to expand...
Click to collapse
Make is usually smart enough to know when something you changed will not result in a different output. It is possible that the changes you made would result in an identical boot.img, therefore it is not rebuilding it.

How to Dev for P930

Hi!
i will try to put here everything i found important for dev in this tread.
This is gonna be a work in progress...
First we can change many value in kernel with sysctl.conf in system/etc folder when you have init.d folder support.
This View attachment tunable.txt is a list of thing you can play with.
Magic number you need for View attachment mkbootimg.zip to recompile a new boot.img
This is for P930 and SU640
Code:
./mkbootimg --kernel zImage --ramdisk newramdisk.cpio.gz --cmdline "vmalloc=450M,console=ttyDCC0,115200,n8 androidboot.hardware=qcom" --base 0x40200000 --pagesize 2048 --ramdiskaddr 0x41a00000 -o newboot.img
This is for LU6200
Code:
./mkbootimg --kernel zImage --ramdisk newramdisk.cpio.gz --cmdline "vmalloc=450M, console=ttyDCC0,115200,n8 androidboot.hardware=qcom" --base 0x40200000 --pagesize 2048 --ramdiskaddr 0x41300000 -o newboot.img
many more to come with more detail for sure....
Hi,i tried to customize the boot.img without success. as a test i just unpack and repack it without any changes to the content but it didn't boot. can you give me some advice? Thanks
---------- Post added at 02:48 AM ---------- Previous post was at 02:40 AM ----------
I've been trying to build a kernel from p930's source following tutorial written for other devices. but the generic method seems not working with LG kernel build. can you tell how you've built your kernel, as i see you've already compiled a overclocked kernel for lu6200.
freefall12 said:
Hi,i tried to customize the boot.img without success. as a test i just unpack and repack it without any changes to the content but it didn't boot. can you give me some advice? Thanks
---------- Post added at 02:48 AM ---------- Previous post was at 02:40 AM ----------
I've been trying to build a kernel from p930's source following tutorial written for other devices. but the generic method seems not working with LG kernel build. can you tell how you've built your kernel, as i see you've already compiled a overclocked kernel for lu6200.
Click to expand...
Click to collapse
LU6200 use a special ramdisk address
Will post later at home
Sent from my LG-P930 using xda premium
Just add a bit more in first post
HO!NO! said:
Just add a bit more in first post
Click to expand...
Click to collapse
Hi, i tried your mkbootimg but it can't be executed as a binary.
[email protected]:~/cm-930/141$ export PATH=~/cm-930/141/:$PATH
[email protected]:~/cm-930/141$ ls -alh
total 25M
drwxrwxr-x 3 dell dell 4.0K Apr 6 09:19 .
drwx------ 12 dell dell 4.0K Apr 4 12:40 ..
-rw-r--r-- 1 dell dell 10M Apr 3 21:25 141boot.img
-rw-rw-r-- 1 dell dell 8.5M Apr 4 21:06 141ramdisk.cpio.gz
-rw-rw-r-- 1 dell dell 216 Apr 4 21:10 6200bootimg.cfg
-rw-rw-r-- 1 dell dell 2.1M Apr 4 21:10 initrd.img
-rwxrwxrwx 1 dell dell 18K Mar 20 09:20 mkbootimg
-rw-rw-r-- 1 dell dell 0 Apr 4 21:10 new141boot.img
drwxrwxr-x 10 dell dell 4.0K Apr 4 21:08 ramdisk
-rw-rw-r-- 1 dell dell 4.4M Apr 4 21:10 zImage
[email protected]:~/cm-930/141$ mkbootimg --kernel zImage --ramdisk 141ramdisk.cpio.gz --cmdline "vmalloc=450M, console=ttyDCC0,115200,n8 androidboot.hardware=qcom" --base 0x40200000 --pagesize 2048 --ramdiskaddr 0x41300000 -o newboot.img
bash: /home/dell/cm-930/141/mkbootimg: cannot execute binary file
[email protected]:~/cm-930/141$ ./mkbootimg --kernel zImage --ramdisk newramdisk.cpio.gz --cmdline "vmalloc=450M, console=ttyDCC0,115200,n8 androidboot.hardware=qcom" --base 0x40200000 --pagesize 2048 --ramdiskaddr 0x41300000 -o newboot.img
bash: ./mkbootimg: cannot execute binary file
Those commands are most likely intended to be run on a linux box.
Malnilion said:
Those commands are most likely intended to be run on a linux box.
Click to expand...
Click to collapse
sure!i tried this on ubuntu 12.04
@freefall12,
LOL, I'm a dumbass, for some reason I thought you were trying to run that from a Windows prompt. You might just need to make it an executable file:
Code:
chmod +x mkbootimg
Malnilion said:
@freefall12,
LOL, I'm a dumbass, for some reason I thought you were trying to run that from a Windows prompt. You might just need to make it an executable file:
Code:
chmod +x mkbootimg
Click to expand...
Click to collapse
yes,i did gave execution permission to it but it didn't work. other version of mkbootimg run fine except that they failed to produce bootable boot.img.that's why i want to try this one !
What about sh mkbootimg?
I try to UNPACK and REPACK, and success. Link...
http://bbs.fengbao.com/thread-914738-1-2.html
---------- Post added at 09:44 AM ---------- Previous post was at 09:30 AM ----------
How to compile CM9 source and the kernel project?
I try to git from https://github.com/CyanogenMod/lge-kernel-iproj.
but make failed.
As follows:
1、make distclean
2、export ARCH=MSM8X60
3、export TARGET_PRODUCT=msm8660-perf
4、make msm8660-perf_defconfig
5、make -j4
HONO!Two problems:
1、how to compile cm9 kernel?
2、how to get the CM9 for P930 source project ?
THANKS!!!
HONO!Thanks for your reply.
to ensure the compiler success, i tried from P930 source project
\Kernel\lge\debug\dummy.C
\kernel\lge\lge_board\i_atnt\platform_i_atnt_mmc.C
\kernel\lge\lge_board\i_atnt\platform_i_atnt_input .C
\kernel\lge\lge_board\i_atnt\platform_i_atnt_mmc.C
Copied to the corresponding directory, but i have a error.
CC drivers/gpu/MSM/kgsl_iommu
Drivers/gpu/MSM/kgsl_iommu. C: In function 'kgsl_iommu_unmap' :
Drivers/gpu/MSM/kgsl_iommu. C: 241: error: the implicit declaration of function 'iommu_unmap_range'
Drivers/gpu/MSM/kgsl_iommu. C: In function 'kgsl_iommu_map' :
Drivers/gpu/MSM/kgsl_iommu. C: 264: error: the implicit declaration of function 'iommu_map_range'
Make [3] : * * * [drivers/gpu/MSM/kgsl_iommu. O]
Compile statements as follows:
Make cyanogenmod_iprj_defconfig ARCH = arm
Make ARCH = arm CROSS_COMPILE = ~/Android/source/prebuilt/Linux-x86/ toolchain/arm-eabi-4.4.3/bin/arm-eabi-
kernel has compiled success, but compiled cm9 file system failure, may be lost vendor part of the file.
ramdisk has compile successfully, but full build got some errors.
i guess maybe lacking some vendor files.
HO!NO!, can you reply with instructions on how to make a ROM? I've been trying for years but can never get complete instructions. The closest i've gotten is getting the development environment setup on my linux install and downloading all of the Cyanogenmod files, but i couldnt find those files, and i didnt know what was what, and couldnt find that information anywhere! I really want to start from stock and completely make my own with custom graphics and all because im good at photoshop, but i just cant find the information!
PMad said:
HO!NO!, can you reply with instructions on how to make a ROM? I've been trying for years but can never get complete instructions. The closest i've gotten is getting the development environment setup on my linux install and downloading all of the Cyanogenmod files, but i couldnt find those files, and i didnt know what was what, and couldnt find that information anywhere! I really want to start from stock and completely make my own with custom graphics and all because im good at photoshop, but i just cant find the information!
Click to expand...
Click to collapse
So you want to compile your how cm9?
I need more info on where you are now and what is not working.
I will not do a complete guide on this since so many are all ready there Google it.
Sent from my LG-P930 using xda premium
HO!NO!,
Do you know any method to decompile .kdz files?
I tried to do this with the method and decompile tools for LG P540, but it didn't work.
Machzelet said:
HO!NO!,
Do you know any method to decompile .kdz files?
I tried to do this with the method and decompile tools for LG P540, but it didn't work.
Click to expand...
Click to collapse
Right now there is no tool to unpack kdz for p930,p935,p936,su640,lu6200.
All end at .tot file
Sent from my LG-P930 using xda premium
Just to clarify, you can unpack the KDZ file by using LGExtract tool here: http://forum.xda-developers.com/showthread.php?t=1566532 . This will leave you with a few miscellaneous files, with the main one being the WDB file. You can extract that with the LGExtract tool as well. However, that just leaves you with a TOT file which, as HO!NO! explained, there doesn't seem to be a method to extract yet.

[Guide] Compiling CyanogenMod 9/10 for Galaxy Nexus (GSM)

I know there's another thread about this, but that was kind of outdated, so I decided to do another one. Here we goo~
Requirements :-
Ubuntu 11.10 64bit (this is what I'm using, I won't make a guide for others)
Decent Internet connection
At least 50GB of hard disc space
4GBs of ram
Dual Core processor
and patience.
First off, we need to download and install some stuff.. Type in each line one by one.
Code:
sudo -i
add-apt-repository ppa:ferramroberto/java
apt-get update
apt-get install sun-java6-jdk sun-java6-jre sun-java6-plugin
apt-get install python
apt get install git-core
Now that your Java is downloaded, we need to get some extra files.
Code:
apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils
Note that liv32readline5-dev might not be available anymore, if that's the case, remove that from the code, run it and run an extra line after you've done the one on top
Code:
apt-get install lib32readline-gplv2-dev
then this
Code:
ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
Now we get to setup directories for your source and repo !
Code:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
If you noticed, everytime you start your ubuntu you need to type in "PATH=~/bin:$PATH" again before you can repo. To fix this :
Code:
sudo gedit ~/.bashrc
then add in
Code:
export = PATH=~/bin:$PATH"
Now we make a directory for your source, you can use any name you want, in this case I'm using CMSOURCE (this IS case sensitive, btw.)
Code:
mkdir CMSOURCE
cd CMSOURCE
Now we can initialize repo
Code:
repo init -u git://github.com/CyanogenMod/android.git -b ics
If you want Jelly Bean
Code:
repo init -u git://github.com/CyanogenMod/android.git -b jellybean-stable
then
Code:
repo sync
or
Code:
repo sync -j1
or
Code:
repo sync -j16
I suggest only to try the -j1 and -j16 ONLY IF there is problem by using the normal repo sync. Honestly I don't know what this does but from my experience, j1 is slower but apparently more stable. j16 is faster but chances of corrupting is higher. but I've only ran this once so I'm not really sure. Don't take my word on this.
This WILL take awhile, go watch a movie, feed your pet, skydive, drink coffee, drink beer or something.
After that's done, you need to get some files for your Cyanogen build, eg Rom Manager. Without these files it wont compile correctly.
Code:
cd CMSOURCE/vendor/cm
./get-prebuilts
Now we've got to get some files from the phone, but I'm using the one from google, rather than extracting from the phone.
http://code.google.com/android/nexus/drivers.html
Go there, click Maguro , download the files, extract it anywhere, and run it inside a terminal. (just drag the file into the terminal, press enter and choose run. follow the instructions on screen. you need all of them. )
ALRIGHTY! If you've done all these steps without any problem, it's time to compile!
Code:
cd
cd CMSOURCE
source build/envsetup.sh
brunch
and choose your device
This takes about 3 and a half hours on my friends alienware m15x.
On my desktop it takes about 1 and a half hour. Just over night it to be safe.
Before re-compiling, clean your work folder first.
Code:
make clobber
To update your sources,
Code:
repo sync
I'm new at this compiling thing, so if anything is wrong please tell. I just wrote this to help if someone is running into problems like I did.
optional/old/useless
we need to add a line to specify where our kernel is before we can build, so do this.
Code:
sudo -i
nautilus
go to
CMSOURCE/device/samsung/maguro
Open BoardConfig.mk
add
Code:
TARGET_KERNEL_CONFIG := cyanogenmod_maguro_defconfig
TARGET_PREBUILT_KERNEL := device/samsung/tuna/kernel
save, close.
Cherry Picking
WILL UPDATE.
Do you then use this for you're own personal use or do you upload this to a server so others can download it as a nightly?
Sent from my Galaxy Nexus using Tapatalk 2 Beta-5
SupWiz17 said:
Do you then use this for you're own personal use or do you upload this to a server so others can download it as a nightly?
Sent from my Galaxy Nexus using Tapatalk 2 Beta-5
Click to expand...
Click to collapse
Right now I'm using it myself first. I'm planning on making a rom but that's a long time from now. I can upload it to a server but I don't have one. Not gonna buy one just to upload
Anyways there's someone compiling and uploading builds already. Check out this link
JunyuT. said:
Right now I'm using it myself first. I'm planning on making a rom but that's a long time from now. I can upload it to a server but I don't have one. Not gonna buy one just to upload
Anyways there's someone compiling and uploading builds already. Check out this link
Click to expand...
Click to collapse
I got it now. I'm going to give this a try and will let you know how it goes. This is really cool how you can build your own operating system for your phone.
Sent from my Galaxy Nexus using Tapatalk 2 Beta-5
Although I really like the fact that more guides appear, I recently wrote one myself (and it really isn't outdated at all ): http://forum.xda-developers.com/showthread.php?t=1566224
Edit:
also, read my guide. There are some differences. For instance, when you use the brunch command, you shouldn't have to use the make command. And, if you use the make command, you can change the number behind j. That'll make your build go faster. And last, in the future you don't have to specify your kernel, there will be a commit soon that fixes this issue.
mbroeders said:
Although I really like the fact that more guides appear, I recently wrote one myself (and it really isn't outdated at all ): http://forum.xda-developers.com/showthread.php?t=1566224
Edit:
also, read my guide. There are some differences. For instance, when you use the brunch command, you shouldn't have to use the make command. And, if you use the make command, you can change the number behind j. That'll make your build go faster. And last, in the future you don't have to specify your kernel, there will be a commit soon that fixes this issue.
Click to expand...
Click to collapse
ah yeah! My bad. I constantly change from brunch to lunch so sometimes I get mixed up. Thanks for the heads up Guide is fixed.
I used your guide, but I got stuck at the kernel part. Couldn't find a fix for it and no one updated their guide and that's why I wrote mine. This is what I meant by outdated
Nice guide I will definitely use both of these as I try to compile cm9.
Sent from my Galaxy Nexus using Tapatalk 2 Beta-5
JunyuT. said:
ah yeah! My bad. I constantly change from brunch to lunch so sometimes I get mixed up. Thanks for the heads up Guide is fixed.
I used your guide, but I got stuck at the kernel part. Couldn't find a fix for it and no one updated their guide and that's why I wrote mine. This is what I meant by outdated
Click to expand...
Click to collapse
No worries, great effort Hopefully the kernel part will be fixed soon.
Edit:
Just checked, adding kernel to boardconfig is def not necessary anymore (http://review.cyanogenmod.com/#/c/14792/)
mbroeders said:
No worries, great effort Hopefully the kernel part will be fixed soon.
Edit:
Just checked, adding kernel to boardconfig is def not necessary anymore (http://review.cyanogenmod.com/#/c/14792/)
Click to expand...
Click to collapse
Just checked, yeap its not necessary anymore! But they seem to recommend it though..
Sent from my Galaxy Nexus using xda premium
when i compile this i get a warning
Code:
build/core/tasks/kernel.mk:26: ***************************************************************
build/core/tasks/kernel.mk:27: * Using prebuilt kernel binary instead of source *
build/core/tasks/kernel.mk:28: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED *
build/core/tasks/kernel.mk:29: * Please configure your device to download the kernel *
build/core/tasks/kernel.mk:30: * source repository to kernel/samsung/tuna
build/core/tasks/kernel.mk:31: * See http://wiki.cyanogenmod.com/wiki/Integrated_kernel_building
build/core/tasks/kernel.mk:32: * for more information *
build/core/tasks/kernel.mk:33: ***************************************************************
do i need to download the kernel repo on top of the ics one? it compiles through though but i get an awful greenish tint and the camera is not working. any hints on how to integrate the real kernel would be appreciated. i read the wiki page and its says "The minimal requirement is that the kernel's source tree for that device be present at kernel/vendor-name/device-name." but that to me is cryptic, as i have little experience.
and two questions,
1. can i specify how many threads i'd like to use to compile with brunch? it justs starts to build and it does for hoouuurrrsss. i tried lunch and i could call make -jN afterwards, but it created odex files which i dont want.
2. any tipps on how to use the emulator? i call it but the window stays blank. i got it to work once with a lunch 1 full-eng build but then i get some weird looking interface without launcher. is it even possible to emulate a nexus with software buttons and all? this would be perfect as i intent to make some changes to the code.
the rom i made with these tipps be found here, if anyone wanna help or team up, that would be super!
thanks so much for this helpful post!
molesarecoming said:
when i compile this i get a warning
Code:
build/core/tasks/kernel.mk:26: ***************************************************************
build/core/tasks/kernel.mk:27: * Using prebuilt kernel binary instead of source *
build/core/tasks/kernel.mk:28: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED *
build/core/tasks/kernel.mk:29: * Please configure your device to download the kernel *
build/core/tasks/kernel.mk:30: * source repository to kernel/samsung/tuna
build/core/tasks/kernel.mk:31: * See http://wiki.cyanogenmod.com/wiki/Integrated_kernel_building
build/core/tasks/kernel.mk:32: * for more information *
build/core/tasks/kernel.mk:33: ***************************************************************
do i need to download the kernel repo on top of the ics one? it compiles through though but i get an awful greenish tint and the camera is not working. any hints on how to integrate the real kernel would be appreciated. i read the wiki page and its says "The minimal requirement is that the kernel's source tree for that device be present at kernel/vendor-name/device-name." but that to me is cryptic, as i have little experience.
and two questions,
1. can i specify how many threads i'd like to use to compile with brunch? it justs starts to build and it does for hoouuurrrsss. i tried lunch and i could call make -jN afterwards, but it created odex files which i dont want.
2. any tipps on how to use the emulator? i call it but the window stays blank. i got it to work once with a lunch 1 full-eng build but then i get some weird looking interface without launcher. is it even possible to emulate a nexus with software buttons and all? this would be perfect as i intent to make some changes to the code.
the rom i made with these tipps be found here, if anyone wanna help or team up, that would be super!
thanks so much for this helpful post!
Click to expand...
Click to collapse
Team up? Sure! You have a PM about this
The camera is not working due to wrong sources. I don't know why CM hasn't fixed this or this is faulty on my part, but I fixed it and forgot to update the guide. Basically you need props from koush. Here's the link
Code:
https://github.com/koush/proprietary_vendor_samsung
https://github.com/koush/proprietary_vendor_imgtec
What I did was just download it as a zip and paste it in the directory, I know this isn't the correct way but I have no idea how to merge them together.
I don't know about the kernel though, will experiment more
Finally got it going last night. Im still working on getting a successful run but thanks for the great guide.
---------- Post added at 02:08 PM ---------- Previous post was at 01:19 PM ----------
I keep getting the same error as its building. I have tried it three times now and get the same error every time. Does anyone have a fix for this?
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/mark/CM9/kernel/samsung/tuna'
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....
SupWiz17 said:
Finally got it going last night. Im still working on getting a successful run but thanks for the great guide.
---------- Post added at 02:08 PM ---------- Previous post was at 01:19 PM ----------
I keep getting the same error as its building. I have tried it three times now and get the same error every time. Does anyone have a fix for this?
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/mark/CM9/kernel/samsung/tuna'
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....
Click to expand...
Click to collapse
Did you add the pre built kernel line? Anyways give me some time. I just upgraded to 12.04 and it ****ed everything up. Now I've got to do everything over again.
Sent from my Galaxy Nexus using xda premium
JunyuT. said:
Did you add the pre built kernel line? Anyways give me some time. I just upgraded to 12.04 and it ****ed everything up. Now I've got to do everything over again.
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
I added the pre built kernel today to try something new but now I get
***
*** Can't find default configuration "arch/arm/configs/cyanogenmod_maguro_defconfig"!
***
make[3]: *** [cyanogenmod_maguro_defconfig] Error 1
make[2]: *** [cyanogenmod_maguro_defconfig] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/mark/CM9/kernel/samsung/tuna'
make: *** [/home/mark/CM9/out/target/product/maguro/obj/KERNEL_OBJ/.config] Error 2
make: *** Waiting for unfinished jobs....
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.
I feel like Im missing some drivers or something important like that but I have followed a few different guides now and cant get it to work. I stayed with 11.10 for that reason I couldnt get java to work lol
---------- Post added at 09:14 PM ---------- Previous post was at 09:09 PM ----------
I have been reading about needing an older version of gcc to compile with 11.10. I notice that is not in your guide but in others. Is that part of the reason I am not able to compile properly?
SupWiz17 said:
I added the pre built kernel today to try something new but now I get
***
*** Can't find default configuration "arch/arm/configs/cyanogenmod_maguro_defconfig"!
***
make[3]: *** [cyanogenmod_maguro_defconfig] Error 1
make[2]: *** [cyanogenmod_maguro_defconfig] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/mark/CM9/kernel/samsung/tuna'
make: *** [/home/mark/CM9/out/target/product/maguro/obj/KERNEL_OBJ/.config] Error 2
make: *** Waiting for unfinished jobs....
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.
I feel like Im missing some drivers or something important like that but I have followed a few different guides now and cant get it to work. I stayed with 11.10 for that reason I couldnt get java to work lol
---------- Post added at 09:14 PM ---------- Previous post was at 09:09 PM ----------
I have been reading about needing an older version of gcc to compile with 11.10. I notice that is not in your guide but in others. Is that part of the reason I am not able to compile properly?
Click to expand...
Click to collapse
I doubt it, I just did a full format and recompiled everything with this guide.
Did you install 12.04 or 11.10? So you dont install any other programs then what is in your guide? From what I am reading I am having a problem with having the right compiler for some reason. I will re format though and try it again and see if that makes any sort of difference.
---------- Post added at 10:48 PM ---------- Previous post was at 10:41 PM ----------
If I tried the way you get the files from the phone by downloading the three files and running them in terminal and tried the way I read it in another thread but running a script could that be the cause for it not being able to compile properly? Does it make sense that they could be interfering with eachother?
---------- Post added at 10:52 PM ---------- Previous post was at 10:48 PM ----------
I tried one last time before the reformat just to see and got new errors I was never getting before. I am just going to start all over and see what happens.
*** Can't find default configuration "arch/arm/configs/cyanogenmod_maguro_defconfig"!
***
target thumb C: libc_common <= bionic/libc/netbsd/net/getservent.c
target thumb C: libc_common <= bionic/libc/netbsd/net/base64.c
bionic/libc/netbsd/net/getnameinfo.c: In function 'android_gethostbyaddr_proxy':
bionic/libc/netbsd/net/getnameinfo.c:186: warning: passing argument 3 of 'inet_ntop' from incompatible pointer type
bionic/libc/include/arpa/inet.h:45: note: expected 'char *' but argument is of type 'char (*)[46]'
bionic/libc/netbsd/net/getaddrinfo.c: In function 'android_getaddrinfo_proxy':
bionic/libc/netbsd/net/getaddrinfo.c:455: warning: dereferencing type-punned pointer might break strict-aliasing rules
bionic/libc/netbsd/net/getaddrinfo.c:455: warning: dereferencing type-punned pointer might break strict-aliasing rules
target thumb C: libc_common <= bionic/libc/netbsd/net/getservbyport.c
make[3]: *** [cyanogenmod_maguro_defconfig] Error 1
make[2]: *** [cyanogenmod_maguro_defconfig] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/mark/CM9/kernel/samsung/tuna'
make: *** [/home/mark/CM9/out/target/product/maguro/obj/KERNEL_OBJ/.config] Error 2
make: *** Waiting for unfinished jobs....
SupWiz17 said:
Did you install 12.04 or 11.10? So you dont install any other programs then what is in your guide? From what I am reading I am having a problem with having the right compiler for some reason. I will re format though and try it again and see if that makes any sort of difference.
---------- Post added at 10:48 PM ---------- Previous post was at 10:41 PM ----------
If I tried the way you get the files from the phone by downloading the three files and running them in terminal and tried the way I read it in another thread but running a script could that be the cause for it not being able to compile properly? Does it make sense that they could be interfering with eachother?
---------- Post added at 10:52 PM ---------- Previous post was at 10:48 PM ----------
I tried one last time before the reformat just to see and got new errors I was never getting before. I am just going to start all over and see what happens.
*** Can't find default configuration "arch/arm/configs/cyanogenmod_maguro_defconfig"!
***
target thumb C: libc_common <= bionic/libc/netbsd/net/getservent.c
target thumb C: libc_common <= bionic/libc/netbsd/net/base64.c
bionic/libc/netbsd/net/getnameinfo.c: In function 'android_gethostbyaddr_proxy':
bionic/libc/netbsd/net/getnameinfo.c:186: warning: passing argument 3 of 'inet_ntop' from incompatible pointer type
bionic/libc/include/arpa/inet.h:45: note: expected 'char *' but argument is of type 'char (*)[46]'
bionic/libc/netbsd/net/getaddrinfo.c: In function 'android_getaddrinfo_proxy':
bionic/libc/netbsd/net/getaddrinfo.c:455: warning: dereferencing type-punned pointer might break strict-aliasing rules
bionic/libc/netbsd/net/getaddrinfo.c:455: warning: dereferencing type-punned pointer might break strict-aliasing rules
target thumb C: libc_common <= bionic/libc/netbsd/net/getservbyport.c
make[3]: *** [cyanogenmod_maguro_defconfig] Error 1
make[2]: *** [cyanogenmod_maguro_defconfig] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/mark/CM9/kernel/samsung/tuna'
make: *** [/home/mark/CM9/out/target/product/maguro/obj/KERNEL_OBJ/.config] Error 2
make: *** Waiting for unfinished jobs....
Click to expand...
Click to collapse
11.10 and 12.04, but I prefer 11.10. Easier. you need a lot of extra work with 12.04.
Nope, clean ubuntu.
Nope, shouldn't. Even if it does, it should compile properly but things might not work.
I compiled with the prop files from google and my camera, youtube and some other stuff wouldn't work. but it compiled nicely, all I had to do to fix it was get the prop files from koush and recompiled and everything worked.
Have you tried cleaning the build directory before rebuilding? Old broken projects might be the cause.
Code:
make clobber
I did a full reformat and was able to compile a successful .zip. The only program I had to add was schedtool. I used the files from google like you did and it compiled but I have not flashed it yet. I will and if it doesnt work I will use the script from the other thread and hopefully will have the same success that you did. Thanks again for the great guide.
Thank you very much for your guide!
After a little bit of problems because of Ubuntu 12 (installing jdk etc) I finally got it to compile - let's see if it finishes without errors
Abomb said:
Thank you very much for your guide!
After a little bit of problems because of Ubuntu 12 (installing jdk etc) I finally got it to compile - let's see if it finishes without errors
Click to expand...
Click to collapse
Haha! I never got to compiling. It said I have Java7 and I needed 6..
Sent from my Galaxy Nexus using xda premium

[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!

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