Help on Kernel 2.6.35.10 Compilation Error - GT540 Optimus General

I encounter the following error when compiling the kernel 2.6.35.10.
drivers/mmc/host/msm_sdcc.c: In function 'msmsdcc_request_end':
drivers/mmc/host/msm_sdcc.c:208: error: 'struct msmsdcc_host' has no member named 'req_tout_timer'
drivers/mmc/host/msm_sdcc.c: In function 'msmsdcc_dma_complete_tlet':
drivers/mmc/host/msm_sdcc.c:350: error: 'struct msmsdcc_host' has no member named 'req_tout_timer'
drivers/mmc/host/msm_sdcc.c: In function 'msmsdcc_start_command_deferred':
drivers/mmc/host/msm_sdcc.c:560: error: 'struct msmsdcc_host' has no member named 'req_tout_timer'
drivers/mmc/host/msm_sdcc.c:561: error: 'MSM_MMC_REQ_TIMEOUT' undeclared (first use in this function)
drivers/mmc/host/msm_sdcc.c:561: error: (Each undeclared identifier is reported only once
drivers/mmc/host/msm_sdcc.c:561: error: for each function it appears in.)
drivers/mmc/host/msm_sdcc.c: In function 'msmsdcc_probe':
drivers/mmc/host/msm_sdcc.c:1897: error: 'struct msmsdcc_host' has no member named 'req_tout_timer'
drivers/mmc/host/msm_sdcc.c:1948: error: 'struct msmsdcc_host' has no member named 'req_tout_timer'
drivers/mmc/host/msm_sdcc.c: In function 'msmsdcc_remove':
drivers/mmc/host/msm_sdcc.c:2010: error: 'struct msmsdcc_host' has no member named 'req_tout_timer'
make[3]: *** [drivers/mmc/host/msm_sdcc.o] Error 1
make[2]: *** [drivers/mmc/host] Error 2
make[1]: *** [drivers/mmc] Error 2
make: *** [drivers] Error 2
My compliation steps are as follows
1. download kernel 2.6.35.10 is from microslav_mm's git webpage:
$ cd /home/username/android/
$ git clone git://github.com/mmxtrem/android_kernel_swift.git
$ cd cm-kernel after a little rename
2. pull out the /proc/config.gz from my GT540 phone (SDSL 2.1) for kernel configuration.
$ adb pull /proc/config.gz .
$ cat config.gz | gunzip > .config
$ make ARCH=arm CROSS_COMPILE=$CCOMPILER oldconfig
3. configure the cross-compiler and trigger the compilation
$ export CCOMPILER=/home/username/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
$ make ARCH=arm CROSS_COMPILE=$CCOMPILER -j`grep 'processor' /proc/cpuinfo | wc -l`
How can I fix this compilation error? Any suggestions will be appreciated.
Shawn

csqjxiao said:
I encounter the following error when compiling the kernel 2.6.35.10.
drivers/mmc/host/msm_sdcc.c: In function 'msmsdcc_request_end':
drivers/mmc/host/msm_sdcc.c:208: error: 'struct msmsdcc_host' has no member named 'req_tout_timer'
drivers/mmc/host/msm_sdcc.c: In function 'msmsdcc_dma_complete_tlet':
drivers/mmc/host/msm_sdcc.c:350: error: 'struct msmsdcc_host' has no member named 'req_tout_timer'
drivers/mmc/host/msm_sdcc.c: In function 'msmsdcc_start_command_deferred':
drivers/mmc/host/msm_sdcc.c:560: error: 'struct msmsdcc_host' has no member named 'req_tout_timer'
drivers/mmc/host/msm_sdcc.c:561: error: 'MSM_MMC_REQ_TIMEOUT' undeclared (first use in this function)
drivers/mmc/host/msm_sdcc.c:561: error: (Each undeclared identifier is reported only once
drivers/mmc/host/msm_sdcc.c:561: error: for each function it appears in.)
drivers/mmc/host/msm_sdcc.c: In function 'msmsdcc_probe':
drivers/mmc/host/msm_sdcc.c:1897: error: 'struct msmsdcc_host' has no member named 'req_tout_timer'
drivers/mmc/host/msm_sdcc.c:1948: error: 'struct msmsdcc_host' has no member named 'req_tout_timer'
drivers/mmc/host/msm_sdcc.c: In function 'msmsdcc_remove':
drivers/mmc/host/msm_sdcc.c:2010: error: 'struct msmsdcc_host' has no member named 'req_tout_timer'
make[3]: *** [drivers/mmc/host/msm_sdcc.o] Error 1
make[2]: *** [drivers/mmc/host] Error 2
make[1]: *** [drivers/mmc] Error 2
make: *** [drivers] Error 2
My compliation steps are as follows
1. download kernel 2.6.35.10 is from microslav_mm's git webpage:
$ cd /home/username/android/
$ git clone git://github.com/mmxtrem/android_kernel_swift.git
$ cd cm-kernel after a little rename
2. pull out the /proc/config.gz from my GT540 phone (SDSL 2.1) for kernel configuration.
$ adb pull /proc/config.gz .
$ cat config.gz | gunzip > .config
$ make ARCH=arm CROSS_COMPILE=$CCOMPILER oldconfig
3. configure the cross-compiler and trigger the compilation
$ export CCOMPILER=/home/username/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
$ make ARCH=arm CROSS_COMPILE=$CCOMPILER -j`grep 'processor' /proc/cpuinfo | wc -l`
How can I fix this compilation error? Any suggestions will be appreciated.
Shawn
Click to expand...
Click to collapse
Same here. Any ideas?

Can you guys put the errors in a code tag? not so messy

These errors comes with arm-eabi-linaro-4.6.2
Compiling with arm-eabi-4.4.3 also print this error but compilation of kernel continues to the end. But. Where can I find kernel image? I suppose it should be in arch/arm/boot/ but it isn't. Or where I have to looking for the Image file?
Code:
[email protected] ~/android/kernel/$ ls -l arch/arm/boot/
razem 16
drwxr-xr-x 2 smogf smogf 4096 04-01 23:27 bootp
drwxr-xr-x 2 smogf smogf 4096 04-01 23:27 compressed
-rw-r--r-- 1 smogf smogf 1274 04-01 23:27 install.sh
-rw-r--r-- 1 smogf smogf 3118 04-01 23:27 Makefile
[email protected] ~/android/kernel/mmxtrem-android_kernel_swift-6010f54
I've tried once again with make zImage and compilation fails with the same error as before. I have no idea. Any help will be useful.

smogf said:
These errors comes with arm-eabi-linaro-4.6.2
Compiling with arm-eabi-4.4.3 also print this error but compilation of kernel continues to the end. But. Where can I find kernel image? I suppose it should be in arch/arm/boot/ but it isn't. Or where I have to looking for the Image file?
Code:
[email protected] ~/android/kernel/$ ls -l arch/arm/boot/
razem 16
drwxr-xr-x 2 smogf smogf 4096 04-01 23:27 bootp
drwxr-xr-x 2 smogf smogf 4096 04-01 23:27 compressed
-rw-r--r-- 1 smogf smogf 1274 04-01 23:27 install.sh
-rw-r--r-- 1 smogf smogf 3118 04-01 23:27 Makefile
[email protected] ~/android/kernel/mmxtrem-android_kernel_swift-6010f54
I've tried once again with make zImage and compilation fails with the same error as before. I have no idea. Any help will be useful.
Click to expand...
Click to collapse
It seems bootp, Compressed, install.sh and Makefile is in the folder your looking at...
Otherwise I think the image name starts with initrd
Sent using the LG GT540 Polishblood PreRC CM9 4.0 using XDA Premium

Related

Trying to build the stock kernel from source [SOLVED]

edit: The stock kernel can be built following this thread.
I'm trying to build the stock kernel from source (the one from huaweidevice). I'm running Ubuntu 10.10 64-bit.
I've gotten this far:
- I've extracted config from phone /proc/config.gz and copied it to kernel/.config
- I went through this guide: source.android.com source initializing.html
- I created some symbolic links to get rid of file not found errors when compiling:
kernel-2.6.32-U8800-Froyo/kernel/net/netfilter$ ln -s xt_connmark.c xt_CONNMARK.c
kernel-2.6.32-U8800-Froyo/kernel/net/netfilter$ ln -s xt_HL.c xt_hl.c
kernel-2.6.32-U8800-Froyo/kernel/net/netfilter$ ln -s xt_MARK.c xt_mark.c
kernel-2.6.32-U8800-Froyo/kernel/net/ipv4/netfilter$ ln -s ipt_ECN.c ipt_ecn.c
kernel-2.6.32-U8800-Froyo/kernel/include/linux/netfilter$ ln -s xt_mark.h xt_MARK.h
kernel-2.6.32-U8800-Froyo/kernel/include/linux/netfilter_ipv4$ ln -s ipt_ecn.h ipt_ECN.h
kernel-2.6.32-U8800-Froyo/kernel/include/linux/netfilter$ ln -s xt_DSCP.h xt_dscp.h
kernel-2.6.32-U8800-Froyo/kernel/include/linux/netfilter_ipv4$ ln -s ipt_ttl.h ipt_TTL.h
kernel-2.6.32-U8800-Froyo/kernel/include/linux/netfilter_ipv6$ ln -s ip6t_hl.h ip6t_HL.h
Now for the cross compilation I've tried 3 different toolchains:
- The ones from developer.android.com sdk ndk index.html
- and codesourcery.com sgpp lite arm portal package8734/public/arm-none-eabi/arm-2011.03-42-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
then I've tried compiling with:
make -j8 ARCH=arm CROSS_COMPILE=.../android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-
and
make -j8 ARCH=arm CROSS_COMPILE=.../android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi-
and
make -j8 ARCH=arm CROSS_COMPILE=.../arm-2011.03/bin/arm-none-eabi-
they all give me output similar to this (this is with the 4.4.0 toolchain):
Code:
CHK include/linux/version.h
SYMLINK include/asm -> include/asm-arm
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/linux/compile.h
CC net/netfilter/xt_MARK.o
CC net/ipv4/netfilter/ipt_ecn.o
CC net/netfilter/xt_NFQUEUE.o
CC net/ipv4/netfilter/ipt_NETMAP.o
CC net/netfilter/xt_comment.o
CC net/netfilter/xt_connlimit.o
net/netfilter/xt_MARK.c: In function 'mark_tg':
net/netfilter/xt_MARK.c:32: error: dereferencing pointer to incomplete type
net/netfilter/xt_MARK.c:32: error: dereferencing pointer to incomplete type
net/netfilter/xt_MARK.c: At top level:
net/netfilter/xt_MARK.c:41: error: invalid application of 'sizeof' to incomplete type 'struct xt_mark_tginfo2'
make[2]: *** [net/netfilter/xt_MARK.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CC net/ipv4/netfilter/ipt_REDIRECT.o
CC net/ipv4/netfilter/ipt_REJECT.o
cc1: warnings being treated as errors
net/ipv4/netfilter/ipt_ecn.c:29: error: 'struct ipt_ECN_info' declared inside parameter list
net/ipv4/netfilter/ipt_ecn.c:29: error: its scope is only this definition or declaration, which is probably not what you want
net/ipv4/netfilter/ipt_ecn.c: In function 'set_ect_ip':
net/ipv4/netfilter/ipt_ecn.c:33: error: 'XT_DSCP_MASK' undeclared (first use in this function)
net/ipv4/netfilter/ipt_ecn.c:33: error: (Each undeclared identifier is reported only once
net/ipv4/netfilter/ipt_ecn.c:33: error: for each function it appears in.)
net/ipv4/netfilter/ipt_ecn.c:33: error: dereferencing pointer to incomplete type
net/ipv4/netfilter/ipt_ecn.c:40: error: dereferencing pointer to incomplete type
net/ipv4/netfilter/ipt_ecn.c: At top level:
net/ipv4/netfilter/ipt_ecn.c:48: error: 'struct ipt_ECN_info' declared inside parameter list
net/ipv4/netfilter/ipt_ecn.c: In function 'set_ect_tcp':
net/ipv4/netfilter/ipt_ecn.c:58: error: dereferencing pointer to incomplete type
net/ipv4/netfilter/ipt_ecn.c:58: error: 'IPT_ECN_OP_SET_ECE' undeclared (first use in this function)
net/ipv4/netfilter/ipt_ecn.c:59: error: dereferencing pointer to incomplete type
net/ipv4/netfilter/ipt_ecn.c:60: error: dereferencing pointer to incomplete type
net/ipv4/netfilter/ipt_ecn.c:60: error: 'IPT_ECN_OP_SET_CWR' undeclared (first use in this function)
net/ipv4/netfilter/ipt_ecn.c:61: error: dereferencing pointer to incomplete type
net/ipv4/netfilter/ipt_ecn.c:69: error: dereferencing pointer to incomplete type
net/ipv4/netfilter/ipt_ecn.c:70: error: dereferencing pointer to incomplete type
net/ipv4/netfilter/ipt_ecn.c:71: error: dereferencing pointer to incomplete type
net/ipv4/netfilter/ipt_ecn.c:72: error: dereferencing pointer to incomplete type
net/ipv4/netfilter/ipt_ecn.c: In function 'ecn_tg':
net/ipv4/netfilter/ipt_ecn.c:84: error: dereferencing pointer to incomplete type
net/ipv4/netfilter/ipt_ecn.c:84: error: 'IPT_ECN_OP_SET_IP' undeclared (first use in this function)
net/ipv4/netfilter/ipt_ecn.c:85: error: passing argument 2 of 'set_ect_ip' from incompatible pointer type
net/ipv4/netfilter/ipt_ecn.c:29: note: expected 'const struct ipt_ECN_info *' but argument is of type 'const struct ipt_ECN_info *'
net/ipv4/netfilter/ipt_ecn.c:88: error: dereferencing pointer to incomplete type
net/ipv4/netfilter/ipt_ecn.c:88: error: 'IPT_ECN_OP_SET_ECE' undeclared (first use in this function)
net/ipv4/netfilter/ipt_ecn.c:88: error: 'IPT_ECN_OP_SET_CWR' undeclared (first use in this function)
net/ipv4/netfilter/ipt_ecn.c:90: error: passing argument 2 of 'set_ect_tcp' from incompatible pointer type
net/ipv4/netfilter/ipt_ecn.c:48: note: expected 'const struct ipt_ECN_info *' but argument is of type 'const struct ipt_ECN_info *'
net/ipv4/netfilter/ipt_ecn.c: In function 'ecn_tg_check':
net/ipv4/netfilter/ipt_ecn.c:101: error: dereferencing pointer to incomplete type
net/ipv4/netfilter/ipt_ecn.c:101: error: 'IPT_ECN_OP_MASK' undeclared (first use in this function)
net/ipv4/netfilter/ipt_ecn.c:103: error: dereferencing pointer to incomplete type
net/ipv4/netfilter/ipt_ecn.c:106: error: dereferencing pointer to incomplete type
net/ipv4/netfilter/ipt_ecn.c:106: error: 'XT_DSCP_MASK' undeclared (first use in this function)
net/ipv4/netfilter/ipt_ecn.c:108: error: dereferencing pointer to incomplete type
net/ipv4/netfilter/ipt_ecn.c:111: error: dereferencing pointer to incomplete type
net/ipv4/netfilter/ipt_ecn.c:111: error: 'IPT_ECN_OP_SET_ECE' undeclared (first use in this function)
net/ipv4/netfilter/ipt_ecn.c:111: error: 'IPT_ECN_OP_SET_CWR' undeclared (first use in this function)
net/ipv4/netfilter/ipt_ecn.c: At top level:
net/ipv4/netfilter/ipt_ecn.c:124: error: invalid application of 'sizeof' to incomplete type 'struct ipt_ECN_info'
make[3]: *** [net/ipv4/netfilter/ipt_ecn.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[1]: *** [net/netfilter] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [net/ipv4/netfilter] Error 2
make[1]: *** [net/ipv4] Error 2
make: *** [net] Error 2
sorry for the messed up links, I'm not allowed to post links (yet).
Any ideas how to get forward?
The reason I'm doing this is that I want to fix the bug that the internal mic is disabled when a stereo headphone / or a 3.5mm jack - 2xrca cable is plugged in. I think I can fix it from kernel-2.6.32-U8800-Froyo/kernel/arch/arm/mach-msm/rpc_server_handset.c, but first I have to get my build environment working
copy missing files instead of link
xt_MARK.c and xt_mark.c are not the same, at least in my source
try copy the missing file from android source
http://android.git.kernel.org/?p=kernel/msm.git;a=tree
wmi543 said:
xt_MARK.c and xt_mark.c are not the same, at least in my source
try copy the missing file from android source
Click to expand...
Click to collapse
It worked I copied all the files from the git instead of ln -s.
"Kernel: arch/arm/boot/zImage is ready"
Thanks for the quick reply.
Then I had to remove comment out CONFIG_FB_MSM_MDDI_NT35582_WVGA=y line from .config and answer no to two questions when running make.
I used the 4.4.0 toolchain
Now I have the zImage but don't know how it'll work because the CONFIG_FB_MSM_MDDI_NT35582_WVGA probably has something to do with the display type.
BTW I've taken a backup with genokolar's recovery img. When I try this new kernel and if I can't boot, I should be able to get it to boot again by doing a restore from the earlier backup?
Now I'll start looking into packing the kernel to an .img (android-dls.com wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images#Structure_of_boot_and_recovery_images)..
OK. I copied the boot.img from the phone in bootloader mode, unpacked it with unpack-bootimg.pl. Then I bsdiffed (binary diff) the resulting boot.img-kernel.gz with the Image file I built, the patch file is only 389K so looks like they are quite similar. The only differences may be because of the display thing I changed in the Makefile.
Might try tomorrow to replace the unpacked kernel with the Image file and see if it works. What is the worst case scenario? I should always be able to restore from the old backup if it doesn't boot?
Maybe I'll also try to get the display thing to build right before trying it on the phone
edit: I read somewhere the .gz extension in the unpacked kernel file is a bug with the unpacking script, so "boot.img-kernel.gz" is actually the unpacked kernel file (so it should be the same as compiled Image) ?
Looks like the unpack-bootimg.pl and repack-bootimg.pl are not working right for the U8800 boot.img. I just tried to unpack the original boot.img and repack it, I got a blue screen when trying to boot. I could restore the original just by going to bootloader mode and copying back the original.
Any ideas how to unpack and repack the boot.img of the U8800?
You can repack the boot/recovery images with the following:
Code:
./mkbootfs RAMDISK DIRECTORY | ./minigzip > ramdisk-boot.img
./mkbootimg --kernel KERNEL --ramdisk ramdisk-boot.img --base 0x00200000 --pagesize 4096 --cmdline 'console=ttyDCC0 androidboot.hardware=huawei' -o boot.img
I just modified the repack perl script accordingly and added lines so that it will mount cust_backup and transfer the image across for me. Saves heaps of time.
stockwell said:
You can repack the boot/recovery images with the following:
Code:
./mkbootfs RAMDISK DIRECTORY | ./minigzip > ramdisk-boot.img
./mkbootimg --kernel KERNEL --ramdisk ramdisk-boot.img --base 0x00200000 --pagesize 4096 --cmdline 'console=ttyDCC0 androidboot.hardware=huawei' -o boot.img
I just modified the repack perl script accordingly and added lines so that it will mount cust_backup and transfer the image across for me. Saves heaps of time.
Click to expand...
Click to collapse
I used the unpack script from http://forum.xda-developers.com/showthread.php?t=891333 then modified the line "#$bootimg = substr($bootimg,2048);" to "$bootimg = substr($bootimg,4096);". There's still a difference of 215 bytes with the repacked img, but it works.
Now I can test the kernel I built myself. Thank you for the help.
edit: Looks like the built kernel doesn't work, now I can start tackling that
CONFIG_FB_MSM_MDDI_NT35582_WVGA=y
if you see only blue screen when you boot your own kernel, refer to my experience, edit .config, change 2 lines as below instead of comment out CONFIG_FB_MSM_MDDI_NT35582_WVGA=y should fix it
CONFIG_FB_MSM_MDDI_AUTO_DETECT=y
CONFIG_FB_MSM_TRY_MDDI_CATCH_LCDC_PRISM=y
BTW, there is a tool "abootimg" which is quite handy for packing the kernel
http://gitorious.org/ac100/abootimg
wmi543 said:
if you see only blue screen when you boot your own kernel, refer to my experience, edit .config, change 2 lines as below instead of comment out CONFIG_FB_MSM_MDDI_NT35582_WVGA=y should fix it
CONFIG_FB_MSM_MDDI_AUTO_DETECT=y
CONFIG_FB_MSM_TRY_MDDI_CATCH_LCDC_PRISM=y
BTW, there is a tool "abootimg" which is quite handy for packing the kernel
http://gitorious.org/ac100/abootimg
Click to expand...
Click to collapse
Works! great! Thanks for the help. Hopefully soon I can release my fixed kernel
Sorry, I'm new to Android. What advantages are there if you get the stock kernel or whatever?
"Stock" means the kernel that comes with the phone when you buy it. I just wanted to build it so I could modify it. I created a modified kernel that allows you to use the internal mic with headphones or for example when you connect the phone to your car stereo. The modified kernel is in the other thread.
Sent from my u8800 using XDA App
So with custom kernel you can achieve more functionality just like normal linux? Good. Would be awesome.

[GUIDE] Building CyanogenMod 9 from Source with openSuSE 12.1

Introduction
If you have tried to build Android on systems other than Ubuntu (or Ubuntu based systems) you may have noticed, that there are pretty much no guides for other systems.
I finally set up my openSuSE to build CM9 successfully, and would like to share the process with you.
I will also try to adopt this guide for CM10 if i find the time.
If you find mistakes feel free to post them here or PM me.
Contents
Requirements
About this guide
Install "Oracle JDK"
Install other needed packages
Install "make 3.81"
Install "Android SDK"
Set up source directories
Set up "repo"
Set up repositories
Update source code
Update device specific source code
Copy proprietary files
Download prebuilts
Build CyanogenMod 9
Done!
Possible build errors on openSuSE
Credits
1. Requirements
openSuSE 12.1 64bit (may work on other versions too)
a good internet connection
as much RAM as possible (at least 2GB to finish a build, but that will take very, very long.)
patience
common sense
Note: I did all this in a virtual machine, but i highly recommend installing Linux on your hardware. Building Android takes a long time even on high end hardware.
2. About this guide
Lines beginning with '$' are supposed to be entered in shell (without the $ sign).
File names are bold.
This guide assumes that you set up the sources at ~/android/system/. Feel free to change that.
bacon = device name (e.g. i9300 for Samsung Galaxy SIII I9300. See CyanogenMod Homepage for other devices.)
3. Install "Oracle JDK"
Download latest jdk-6uXX-linux-x64-rpm.bin from http://www.oracle.com/technetwork/java/javase/downloads/jdk6-downloads-1637591.html
$ <downloadfolder>/jdk-6uXX-linux-x64-rpm.bin -x
Open <downloadfolder> in your file manager
Right click jdk-6uXX-linux-x64-rpm -> open with -> Install Software
YaST Software Manager will open up.
DON'T click accept yet.
Search for openJDK and check uninstall for ALL openJDK packages.
DON'T click accept yet, go to next chapter.
4. Install other needed packages
Search and install following packages with YaST
git
gnupg
flex
bison
gperf
SDL-devel
esound-devel
wxGTK-devel
zip
curl
ncurses-devel
ncurses-devel 32bit
zlib-devel
zlib-devel 32bit
gcc-c++
glibc-devel 32bit
libstdc++ 32bit
mesa libs
Now click accept.
5. Install "make 3.81"
Note: Other versions won't work.
Download source from http://ftp.gnu.org/gnu/make/make-3.81.tar.gz.
Extract downloaded file.
$ cd <extracted folder>
$ ./configure
$ make
$ make install
6. Install "Android SDK"
Note: This is pretty straightforward. I will add this section later.
7. Set up source directories
$ mkdir ~/android
$ mkdir ~/android/system
$ mkdir ~/android/cache
8. Set up "repo"
Note: "repo" is a tool by Google, created to make access to git and gerrit very, very easy.
$ mkdir ~/bin
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Open ~/.bashrc in a file editor (e.g. kwrite)
Add the following line:
PATH=~/bin:$PATH
Save and close.
Close your shell and re-open it.
9. Set up repositories
$ cd ~/android/system
$ repo init -u git://github.com/CyanogenMod/android.git -b ics
10. Update source code
$ cd ~/android/system
$ repo sync -jX
X = number of connections. Try X = 1 if there are problems downloading.
This will take a while.
11. Update device specific source code
$ cd ~/android/system
$ . build/envsetup.sh && breakfast bacon
12. Copy proprietary files
Note: This only needs to be run once. You will need CyanogenMod 9 running on the device you are building for to complete this.
Connect the phone via USB.
Install USB drivers to get ADB access.
$ cd ~/android/system/device/<manufacturer>/<devicename>
$ ./extract-files.sh
13. Download prebuilts
$ ~/android/system/vendor/cm/get-prebuilts
14. Build CyanogenMod 9
$ ~/android/system
$ . build/envsetup.sh && brunch bacon
15. Done!
You now should have a CWM-flashable .zip file ~/android/system/out/target/product/maguro/cm-9-XXXXX-UNOFFICIAL-bacon.zip.
16. Possible build errors on openSuSE
Because Ubuntu is based on Debian and openSuSE is based on Slackware, you will probable get some build errors. In post 2 is a list of errors that can occur and how to fix them.
Credits
CyanogenMod Team
CyanogenMod Wiki
The Software Rouge (http://thesoftwarerogue.blogspot.de/2011/11/building-android-ics-ice-cream-sandwich.html)
Note: I got the fixes for build errors from some page in Google Groups. I can't find it anymore. If someone finds it, please PM me.
Possible build errors on openSuSE
Note: I used kwrite as text editor. To use another, just change kwrite to whatever editor you want to use.
Note: Open shell and got to ~/android/system
Error 1
make gets killed at some point
Fix: you need more RAM to finish the build.
Error 2
Code:
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base ‘android::KeyedVector<android::String8, android::sp<AaptDir> >’ are not found by unqualified lookup
frameworks/base/include/utils/KeyedVector.h:193:31: note: use ‘this->indexOfKey’ instead
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/AaptAssets.o] Error 1
Fix:
$ kwrite frameworks/base/tools/aapt/Android.mk
Add '-fpermissive' to line 31:
LOCAL_CFLAGS += -Wno-format-y2k -fpermissive
Error 3
Code:
frameworks/base/include/utils/KeyedVector.h:193:31: error: ‘indexOfKey’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base ‘android::KeyedVector<android::String8, android::wp<android::AssetManager::SharedZip> >’ are not found by unqualified lookup
frameworks/base/include/utils/KeyedVector.h:193:31: note: use ‘this->indexOfKey’ instead
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/AssetManager.o] Error 1
Fix:
$ kwrite frameworks/base/libs/utils/Android.mk
Add '-fpermissive' to line 64:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
Error 4
Code:
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:136:11: note: use ‘this->SetState’ instead
make: *** [out/host/linux-x86/obj/EXECUTABLES/grxmlcompile_intermediates/grxmlcompile.o] Error 1
Fix:
$ cd external/srec
$ wget "https://github.com/CyanogenMod/android_external_srec/commit/4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff"
$ patch -p1 < 4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff
$ rm -f 4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff
$ cd ../..
Error 5
Code:
development/tools/emulator/opengl/host/tools/emugen/main.cpp:79:9: error: ‘optind’ was not declared in this scope
development/tools/emulator/opengl/host/tools/emugen/main.cpp:92:45: error: ‘optind’ was not declared in this scope
make: *** [out/host/linux-x86/obj/EXECUTABLES/emugen_intermediates/main.o] Error 1
Fix:
$ kwrite development/tools/emulator/opengl/host/tools/emugen/main.cpp
Add '#include <getopt.h>' to list of includes:
#include <getopt.h>
Error 6
Code:
host C++: liboprofile_pp <= external/oprofile/libpp/arrange_profiles.cpp
In file included from external/oprofile/libpp/arrange_profiles.cpp:24:0:
external/oprofile/libpp/format_output.h:94:22: error: reference ‘counts’ cannot be declared ‘mutable’ [-fpermissive]
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/liboprofile_pp_intermediates/arrange_profiles.o] Error 1
Fix:
$ kwrite external/oprofile/libpp/format_output.h
Remove 'mutable' from 'mutable counts_t & counts;' on line 94:
counts_t & counts;
Error 7
Code:
development/tools/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp:345:65: required from here
frameworks/base/include/utils/KeyedVector.h:193:31: error: ‘indexOfKey’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base ‘android::KeyedVector<unsigned int, ShaderData*>’ are not found by unqualified lookup
frameworks/base/include/utils/KeyedVector.h:193:31: note: use ‘this->indexOfKey’ instead
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libOpenglCodecCommon_intermediates/GLSharedGroup.o] Error 1
Fix:
$ kwrite development/tools/emulator/opengl/Android.mk
Add '-fpermissive' to line 25:
EMUGL_COMMON_CFLAGS := -DWITH_GLES2 -fpermissive
Error 8
Code:
/usr/bin/ld: note: 'XInitThreads' is defined in DSO /lib/libX11.so.6 so try adding it to the linker command line
/lib/libX11.so.6: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_renderer_intermediates/emulator_renderer] Error 1
Fix:
$ kwrite development/tools/emulator/opengl/host/renderer/Android.mk
Add new entry 'LOCAL_LDLIBS += -lX11' after line 6 as shown:
LOCAL_SRC_FILES := main.cpp
LOCAL_CFLAGS += -O0 -g
LOCAL_LDLIBS += -lX11
#ifeq ($(HOST_OS),windows)
#LOCAL_LDLIBS += -lws2_32
Error 9
Code:
external/llvm/include/llvm/ADT/PointerUnion.h:56:10: error: enumeral mismatch in conditional expression: ‘llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::Stmt*, const clang::Type*> >::<anonymous enum>’ vs ‘llvm::PointerLikeTypeTraits<clang::eek:bjCInterfaceDecl*>::<anonymous enum>’ [-Werror]
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs.o] Error 1
Fix:
$ kwrite frameworks/compile/slang/Android.mk
Remove '-Werror' from line 22:
local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter
Error 10
Code:
frameworks/base/libs/rs/rsFont.cpp:224:76: required from here
frameworks/base/include/utils/KeyedVector.h:193:31: error: ‘indexOfKey’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base ‘android::KeyedVector<unsigned int, android::renderscript::Font::CachedGlyphInfo*>’ are not found by unqualified lookup
frameworks/base/include/utils/KeyedVector.h:193:31: note: use ‘this->indexOfKey’ instead
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libRS_intermediates/rsFont.o] Error 1
Fix:
$ kwrite frameworks/base/libs/rs/Android.mk
Add '-fpermissive' to line 183:
LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable -fpermissive
Error 11
Code:
external/mesa3d/src/glsl/linker.cpp:1394:49: error: expected primary-expression before ‘,’ token
......
external/mesa3d/src/glsl/linker.cpp:1734:59: error: ‘offsetof’ was not declared in this scope
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libMesa_intermediates/src/glsl/linker.o] Error 1
Fix:
$ kwrite external/mesa3d/src/glsl/linker.cpp
Add '#include <stddef.h>' to list of includes as shown:
#include <climits>
#include <stddef.h>
#include <pixelflinger2/pixelflinger2_interface.h>
Error 12
Code:
external/gtest/src/../include/gtest/gtest-param-test.h:287:58: note: ‘template<class Container> testing::internal::ParamGenerator<typename Container::value_type> testing::ValuesIn(const Container&)’ declared here, later in the translation unit
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libgtest_host_intermediates/gtest-all.o] Error 1
Fix 1:
$ kwrite external/gtest/src/Android.mk
Add '-fpermissive' to lines 52 and 70 (both lines contain same info)
LOCAL_CFLAGS += -O0 -fpermissive
Fix 2:
$ kwrite external/gtest/include/gtest/internal/gtest-param-util.h
Add '#include <stddef.h>' to list of includes as shown:
#include <vector>
#include <stddef.h>
#include <gtest/internal/gtest-port.h>
Error 13
Code:
frameworks/compile/slang/slang_rs_export_foreach.cpp: In static member function ‘static slang::RSExportForEach* slang::RSExportForEach::Create(slang::RSContext*, const clang::FunctionDecl*)’:
frameworks/compile/slang/slang_rs_export_foreach.cpp:249:23: error: variable ‘ParamName’ set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs_export_foreach.o] Error 1
Fix:
$ kwrite kwrite frameworks/compile/slang/Android.mk
change
local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter -Werror
to
local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter
reserved #2
Wish somebody would build for the LG optimistic logic
Sent from my LGL35G using xda premium

[HELP]CM 12 Compiling SEpolcy ERROR!.

So i downloaded the repo of CM12 and tried to compile it for the jflte and this error related to SEpolicy appeared:
Code:
Export includes file: device/samsung/jf-common/gps/core/Android.mk -- /home/diego/cm11/out/target/product/jflte/obj/SHARED_LIBRARIES/libloc_core_intermediates/export_includes
Export includes file: device/samsung/jf-common/gps/loc_api/libloc_api_50001/Android.mk -- /home/diego/cm11/out/target/product/jflte/obj/SHARED_LIBRARIES/libloc_eng_intermediates/export_includes
Export includes file: device/samsung/jf-common/gps/loc_api/libloc_api_50001/Android.mk -- /home/diego/cm11/out/target/product/jflte/obj/SHARED_LIBRARIES/gps.msm8960_intermediates/export_includes
drivers/media/video/msm-jf/Kconfig:114:warning: choice value used outside its choice group
drivers/media/video/msm/Kconfig:108:warning: choice value used outside its choice group
drivers/media/video/msm-jf/Kconfig:119:warning: choice value used outside its choice group
drivers/media/video/msm/Kconfig:113:warning: choice value used outside its choice group
Export includes file: device/samsung/jf-common/liblights/Android.mk -- /home/diego/cm11/out/target/product/jflte/obj/SHARED_LIBRARIES/lights.msm8960_intermediates/export_includes
Notice file: device/samsung/jf-common/liblights/NOTICE -- /home/diego/cm11/out/target/product/jflte/obj/NOTICE_FILES/src//system/lib/hw/lights.msm8960.so.txt
#
# configuration written to .config
#
make[1]: Leaving directory '/home/diego/cm11/kernel/samsung/jf'
Symlink: /home/diego/cm11/out/target/product/jflte/recovery/root/sbin/fsck.exfat -> mount.exfat
Symlink: /home/diego/cm11/out/target/product/jflte/recovery/root/sbin/mkfs.exfat -> mount.exfat
APK certs list: /home/diego/cm11/out/target/product/jflte/obj/PACKAGING/apkcerts_intermediates/cm_jflte-apkcerts-1919d07bf0.txt
make -C kernel/samsung/jf O=/home/diego/cm11/out/target/product/jflte/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=" /home/diego/cm11/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-" headers_install
make[1]: Entering directory '/home/diego/cm11/kernel/samsung/jf'
target Prebuilt: fstab.qcom (/home/diego/cm11/out/target/product/jflte/obj/ETC/fstab.qcom_intermediates/fstab.qcom)
/home/diego/cm11/out/host/linux-x86/bin/checkpolicy: loading policy configuration from /home/diego/cm11/out/target/product/jflte/obj/ETC/sepolicy_intermediates/policy.conf
Import includes file: /home/diego/cm11/out/target/product/jflte/obj/EXECUTABLES/init_intermediates/import_includes
device/samsung/jf-common/sepolicy/device.te:3:ERROR 'duplicate declaration of type/attribute' at token ';' on line 11146:
type gpu_device, dev_type;
# GPU (used by most UI apps)
checkpolicy: error(s) encountered while parsing configuration
external/sepolicy/Android.mk:121: recipe for target '/home/diego/cm11/out/target/product/jflte/obj/ETC/sepolicy_intermediates/sepolicy' failed
make: *** [/home/diego/cm11/out/target/product/jflte/obj/ETC/sepolicy_intermediates/sepolicy] Error 1
make: *** Waiting for unfinished jobs....
CHK include/linux/version.h
make[1]: Leaving directory '/home/diego/cm11/kernel/samsung/jf'
# In case value of PACKAGES is empty.
What can i do to fix it?
GrStorm said:
So i downloaded the repo of CM12 and tried to compile it for the jflte and this error related to SEpolicy appeared:
Code:
Export includes file: device/samsung/jf-common/gps/core/Android.mk -- /home/diego/cm11/out/target/product/jflte/obj/SHARED_LIBRARIES/libloc_core_intermediates/export_includes
Export includes file: device/samsung/jf-common/gps/loc_api/libloc_api_50001/Android.mk -- /home/diego/cm11/out/target/product/jflte/obj/SHARED_LIBRARIES/libloc_eng_intermediates/export_includes
Export includes file: device/samsung/jf-common/gps/loc_api/libloc_api_50001/Android.mk -- /home/diego/cm11/out/target/product/jflte/obj/SHARED_LIBRARIES/gps.msm8960_intermediates/export_includes
drivers/media/video/msm-jf/Kconfig:114:warning: choice value used outside its choice group
drivers/media/video/msm/Kconfig:108:warning: choice value used outside its choice group
drivers/media/video/msm-jf/Kconfig:119:warning: choice value used outside its choice group
drivers/media/video/msm/Kconfig:113:warning: choice value used outside its choice group
Export includes file: device/samsung/jf-common/liblights/Android.mk -- /home/diego/cm11/out/target/product/jflte/obj/SHARED_LIBRARIES/lights.msm8960_intermediates/export_includes
Notice file: device/samsung/jf-common/liblights/NOTICE -- /home/diego/cm11/out/target/product/jflte/obj/NOTICE_FILES/src//system/lib/hw/lights.msm8960.so.txt
#
# configuration written to .config
#
make[1]: Leaving directory '/home/diego/cm11/kernel/samsung/jf'
Symlink: /home/diego/cm11/out/target/product/jflte/recovery/root/sbin/fsck.exfat -> mount.exfat
Symlink: /home/diego/cm11/out/target/product/jflte/recovery/root/sbin/mkfs.exfat -> mount.exfat
APK certs list: /home/diego/cm11/out/target/product/jflte/obj/PACKAGING/apkcerts_intermediates/cm_jflte-apkcerts-1919d07bf0.txt
make -C kernel/samsung/jf O=/home/diego/cm11/out/target/product/jflte/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=" /home/diego/cm11/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-" headers_install
make[1]: Entering directory '/home/diego/cm11/kernel/samsung/jf'
target Prebuilt: fstab.qcom (/home/diego/cm11/out/target/product/jflte/obj/ETC/fstab.qcom_intermediates/fstab.qcom)
/home/diego/cm11/out/host/linux-x86/bin/checkpolicy: loading policy configuration from /home/diego/cm11/out/target/product/jflte/obj/ETC/sepolicy_intermediates/policy.conf
Import includes file: /home/diego/cm11/out/target/product/jflte/obj/EXECUTABLES/init_intermediates/import_includes
device/samsung/jf-common/sepolicy/device.te:3:ERROR 'duplicate declaration of type/attribute' at token ';' on line 11146:
type gpu_device, dev_type;
# GPU (used by most UI apps)
checkpolicy: error(s) encountered while parsing configuration
external/sepolicy/Android.mk:121: recipe for target '/home/diego/cm11/out/target/product/jflte/obj/ETC/sepolicy_intermediates/sepolicy' failed
make: *** [/home/diego/cm11/out/target/product/jflte/obj/ETC/sepolicy_intermediates/sepolicy] Error 1
make: *** Waiting for unfinished jobs....
CHK include/linux/version.h
make[1]: Leaving directory '/home/diego/cm11/kernel/samsung/jf'
# In case value of PACKAGES is empty.
What can i do to fix it?
Click to expand...
Click to collapse
See this http://review.cyanogenmod.org/#/c/77008/
Will also need this once you hit the camera error
http://review.cyanogenmod.org/#/c/77026/
Thanks man, the DO NOT MERGE warning made me ignore this.
Sent from my GT-I9505 using XDA Free mobile app

OmniROM 6.0 build error for Pixel C

General information:
1. I can't found the kernel source from android.com and android source repos.
2. I was setup build environment for OmniROM, and I was tested build manta with success.
3. I was config the device repo in .repo/local_manifests/default.xml with https://android.googlesource.com/device/google/dragon/ and https://android.googlesource.com/device/google/dragon-kernel/
4. Changed all aosp_dragon to omni_dragon, add TWRP config to BoardConfig.mk, add TARGET_PREBUILT_KERNEL := device/google/dragon-kernel/Image.fit to device.mk
5. Download and extract vendor file from https://developers.google.com/android/nexus/drivers#dragon using MXC14G version.
6. Modified tools/roomservice.py for disabled check dragon online.(Make it compile)
My build step:
cmd:
cd /media/dev/source/OmniROM/
brunch dragon
Wait for complete, it report error:
Code:
Export includes file: external/tinycompress/Android.mk -- /media/dev/source/OmniROM/out/target/product/dragon/obj_arm/SHARED_LIBRARIES/libtinycompress_intermediates/export_includes
make: *** No rule to make target '/media/dev/source/OmniROM/out/target/product/dragon/obj/KERNEL_OBJ/usr', needed by '/media/dev/source/OmniROM/out/target/product/dragon/obj_arm/SHARED_LIBRARIES/libtinycompress_intermediates/compress.o'
The full log in http://pastebin.com/drM6Fe2R
I tried build the external/tinycompress package only, it return error.
cmd:
mm external/tinycompress
Report error:
Code:
No private recovery resources for TARGET_DEVICE dragon
build/core/tasks/kernel.mk:104: ***************************************************************
build/core/tasks/kernel.mk:105: * Using prebuilt kernel binary instead of source *
build/core/tasks/kernel.mk:106: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED *
build/core/tasks/kernel.mk:107: * Please configure your device to download the kernel *
build/core/tasks/kernel.mk:108: * source repository to kernel/google/dragon
build/core/tasks/kernel.mk:109: * See http://forum.xda-developers.com/wiki/ROM/Integrated_Kernel_Build
build/core/tasks/kernel.mk:110: * for more information *
build/core/tasks/kernel.mk:111: ***************************************************************
build/core/tasks/kernel.mk:271: warning: overriding recipe for target '/media/dev/source/OmniROM/out/target/product/dragon/kernel'
build/core/Makefile:72: warning: ignoring old recipe for target '/media/dev/source/OmniROM/out/target/product/dragon/kernel'
make: Nothing to be done for 'external/tinycompress'.
The full log in http://pastebin.com/DaHjPmHk
Can't you help me fix this build erro?
kendling said:
General information:
1. I can't found the kernel source from android.com and android source repos.
2. I was setup build environment for OmniROM, and I was tested build manta with success.
3. I was config the device repo in .repo/local_manifests/default.xml with https://android.googlesource.com/device/google/dragon/ and https://android.googlesource.com/device/google/dragon-kernel/
4. Changed all aosp_dragon to omni_dragon, add TWRP config to BoardConfig.mk, add TARGET_PREBUILT_KERNEL := device/google/dragon-kernel/Image.fit to device.mk
5. Download and extract vendor file from https://developers.google.com/android/nexus/drivers#dragon using MXC14G version.
6. Modified tools/roomservice.py for disabled check dragon online.(Make it compile)
My build step:
cmd:
cd /media/dev/source/OmniROM/
brunch dragon
Wait for complete, it report error:
Code:
Export includes file: external/tinycompress/Android.mk -- /media/dev/source/OmniROM/out/target/product/dragon/obj_arm/SHARED_LIBRARIES/libtinycompress_intermediates/export_includes
make: *** No rule to make target '/media/dev/source/OmniROM/out/target/product/dragon/obj/KERNEL_OBJ/usr', needed by '/media/dev/source/OmniROM/out/target/product/dragon/obj_arm/SHARED_LIBRARIES/libtinycompress_intermediates/compress.o'
The full log in http://pastebin.com/drM6Fe2R
I tried build the external/tinycompress package only, it return error.
cmd:
mm external/tinycompress
Report error:
Code:
No private recovery resources for TARGET_DEVICE dragon
build/core/tasks/kernel.mk:104: ***************************************************************
build/core/tasks/kernel.mk:105: * Using prebuilt kernel binary instead of source *
build/core/tasks/kernel.mk:106: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED *
build/core/tasks/kernel.mk:107: * Please configure your device to download the kernel *
build/core/tasks/kernel.mk:108: * source repository to kernel/google/dragon
build/core/tasks/kernel.mk:109: * See http://forum.xda-developers.com/wiki/ROM/Integrated_Kernel_Build
build/core/tasks/kernel.mk:110: * for more information *
build/core/tasks/kernel.mk:111: ***************************************************************
build/core/tasks/kernel.mk:271: warning: overriding recipe for target '/media/dev/source/OmniROM/out/target/product/dragon/kernel'
build/core/Makefile:72: warning: ignoring old recipe for target '/media/dev/source/OmniROM/out/target/product/dragon/kernel'
make: Nothing to be done for 'external/tinycompress'.
The full log in http://pastebin.com/DaHjPmHk
Can't you help me fix this build erro?
Click to expand...
Click to collapse
I'd look at one of the other Nexus device trees to see how they set up inline kernel build and properly Omni-fied it. I haven't done it in such a long time I don't really remember the exact details.
anyone can help me ?
Code:
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
make[1]: Leaving directory `/home/ibrahim/wave/kernel/samsung/aries'
make -C kernel/samsung/aries O=/home/ibrahim/wave/out/target/product/wave/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=" "/home/ibrahim/wave/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/"/arm-eabi-" dtbs
make[1]: Entering directory `/home/ibrahim/wave/kernel/samsung/aries'
make[2]: *** No rule to make target `dtbs'. Stop.
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/ibrahim/wave/kernel/samsung/aries'
make: [TARGET_KERNEL_BINARIES] Error 2 (ignored)
make -C kernel/samsung/aries O=/home/ibrahim/wave/out/target/product/wave/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=" "/home/ibrahim/wave/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/"/arm-eabi-" modules
make[1]: Entering directory `/home/ibrahim/wave/kernel/samsung/aries'
CHK include/linux/version.h
I did found the problem!!
Because I did add the lines to aosp_dragon.mk below:
Code:
# Inherit from our custom product configuration
$(call inherit-product, vendor/omni/config/common_tablet.mk)
After that, I got new errors:
1. Failed to compile mkbootimg.c
Code:
target C: utility_mkbootimg <= system/core/mkbootimg/mkbootimg.c
system/core/mkbootimg/mkbootimg.c: In function 'print_id':
system/core/mkbootimg/mkbootimg.c:82:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (unsigned i = 0; i < id_len; i++) {
^
system/core/mkbootimg/mkbootimg.c:82:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
build/core/binary.mk:801: recipe for target '/media/dev/source/OmniROM/out/target/product/dragon/obj/UTILITY_EXECUTABLES/utility_mkbootimg_intermediates/mkbootimg.o' failed
make: *** [/media/dev/source/OmniROM/out/target/product/dragon/obj/UTILITY_EXECUTABLES/utility_mkbootimg_intermediates/mkbootimg.o] Error 1
make: *** 正在等待未完成的任务....
2. Failed to compile compress.c
Code:
target thumb C: audio.usb.default_32 <= hardware/libhardware/modules/usbaudio/audio_hal.c
In file included from bionic/libc/include/signal.h:32:0,
from bionic/libc/include/sys/select.h:33,
from bionic/libc/include/unistd.h:35,
from external/tinycompress/compress.c:61:
/media/dev/source/OmniROM/out/target/product/dragon/obj/KERNEL_OBJ/usr/include/asm/sigcontext.h:53:2: error: unknown type name '__uint128_t'
__uint128_t vregs[32];
^
build/core/binary.mk:801: recipe for target '/media/dev/source/OmniROM/out/target/product/dragon/obj_arm/SHARED_LIBRARIES/libtinycompress_intermediates/compress.o' failed
make: *** [/media/dev/source/OmniROM/out/target/product/dragon/obj_arm/SHARED_LIBRARIES/libtinycompress_intermediates/compress.o] Error 1
make: *** 正在等待未完成的任务....
make: *** wait: 没有子进程。 停止。
Anyone can help me?
About __uint128_t problem, do this:
https://github.com/omnirom/android_...mmit/80349b926351ca5992973e4a0357ca649a602faa
Blue59 said:
anyone can help me ?
Code:
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
make[1]: Leaving directory `/home/ibrahim/wave/kernel/samsung/aries'
make -C kernel/samsung/aries O=/home/ibrahim/wave/out/target/product/wave/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=" "/home/ibrahim/wave/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/"/arm-eabi-" dtbs
make[1]: Entering directory `/home/ibrahim/wave/kernel/samsung/aries'
make[2]: *** No rule to make target `dtbs'. Stop.
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/ibrahim/wave/kernel/samsung/aries'
make: [TARGET_KERNEL_BINARIES] Error 2 (ignored)
make -C kernel/samsung/aries O=/home/ibrahim/wave/out/target/product/wave/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=" "/home/ibrahim/wave/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/"/arm-eabi-" modules
make[1]: Entering directory `/home/ibrahim/wave/kernel/samsung/aries'
CHK include/linux/version.h
Click to expand...
Click to collapse
@Blue59
make[2]: *** No rule to make target `dtbs'.
Click to expand...
Click to collapse
The problem is , your kernel's Makefile not have dtbs make rule.
See https://github.com/kendling/android_kernel_google_dragon/blob/m/arch/arm64/Makefile
dtbs: prepare scripts
$(Q)$(MAKE) $(build)=$(boot)/dts
dtbs_install:
$(Q)$(MAKE) $(dtbinst)=$(boot)/dts
Click to expand...
Click to collapse
Hi everybody,
I was fixed all problem and build success.
After build success, the boot.img can't bootup.
Tablet display "OS on your tablet is damaged. Need recovery."
Yes, I fixed it too.
Now my build was all success and success bootup.
I want to release the ROM later.
Thanks all!

Samsung Galaxy S5 G-900FD Kernel compilation error

I've been trying to compile kernel from samsung source for last few weeks but failed everytime.
At start everything goes fine almost. The problem is with the last step of compilation of the kernel.
Whenever I run the command:
HTML:
make -j5
it comes up with the error:
HTML:
scripts/kconfig/conf --silentoldconfig Kconfig
sound/soc/codecs/audience/Kconfig:40:warning: type of 'SND_SOC_ES_SLIM' redefined from 'boolean' to 'tristate'
sound/soc/codecs/audience/Kconfig:43:warning: type of 'SND_SOC_ES_I2C' redefined from 'boolean' to 'tristate'
boolean symbol SND_SOC_MAX98506 tested for 'm'? test forced to 'n'
sound/soc/codecs/audience/Kconfig:44:warning: choice value used outside its choice group
sound/soc/codecs/audience/Kconfig:41:warning: choice value used outside its choice group
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
CC arch/arm/kernel/asm-offsets.s
In file included from include/linux/scatterlist.h:10:0,
from include/linux/dma-mapping.h:9,
from arch/arm/kernel/asm-offsets.c:15:
/media/sf_Krnl/Kernel/arch/arm/include/asm/io.h:30:26: fatal error: mach/msm_rtb.h: No such file or directory
#include <mach/msm_rtb.h>
^
compilation terminated.
/media/sf_Krnl/Kernel/./Kbuild:81: recipe for target 'arch/arm/kernel/asm-offsets.s' failed
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
Makefile:999: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
I've tried it a lot of times by changing directories, folder and terminals but nothing worked.
Further, I've used all these toolchians I mentioned here:
Code:
UBER Toolchian 7 (arm-eabi)
UBER toolchian 4.9 (arm-eabi)
NDK 4.9 (arm-eabi)
Sabermod 4.9 (arm-eabi)
linaro 4.9 (arm-eabi)
but all failed.
Help me please.

Categories

Resources