I am trying to compile the new kernel and keep getting this error:
Code:
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/dma-mapping.h:93,
from arch/arm/kernel/asm-offsets.c:15:
/home/smokin/kernel/arch/arm/include/asm/dma-mapping.h: In function 'dma_cache_post_ops':
/home/smokin/kernel/arch/arm/include/asm/dma-mapping.h:442: error: implicit declaration of function 'arch_has_speculative_dfetch'
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
I am new to kernel dev and can't seem to track this one down. Anyone know how to fix it ?
smokin1337 said:
I am trying to compile the new kernel and keep getting this error:
Code:
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/dma-mapping.h:93,
from arch/arm/kernel/asm-offsets.c:15:
/home/smokin/kernel/arch/arm/include/asm/dma-mapping.h: In function 'dma_cache_post_ops':
/home/smokin/kernel/arch/arm/include/asm/dma-mapping.h:442: error: implicit declaration of function 'arch_has_speculative_dfetch'
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
I am new to kernel dev and can't seem to track this one down. Anyone know how to fix it ?
Click to expand...
Click to collapse
It is said here in the Forums, that the uploaded Files are corrupted and Not able to be compiled...have to wait until HTC fixes this.
Sent from my HTC EVO 3D X515m using xda premium
smokin1337 said:
I am trying to compile the new kernel and keep getting this error:
Code:
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/dma-mapping.h:93,
from arch/arm/kernel/asm-offsets.c:15:
/home/smokin/kernel/arch/arm/include/asm/dma-mapping.h: In function 'dma_cache_post_ops':
/home/smokin/kernel/arch/arm/include/asm/dma-mapping.h:442: error: implicit declaration of function 'arch_has_speculative_dfetch'
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
I am new to kernel dev and can't seem to track this one down. Anyone know how to fix it ?
Click to expand...
Click to collapse
simple answer: as posted above, if it doesn't compile properly from HTC, as the last kernel release from them also didn't, it probably won't be an *easy* fix.
warning: the technical method i suggest might only lead deeper and deeper, but it is a generally good strategy to research and resolve compiling issues.
technical research method: without having looked at this kernel source or researched the error, i would start searching for the implicit declarion of function 'arch_has_speculative_dfetch' in the dma-mapping.h file at line 442. it should be declared and setup in some file, so i'd grep through the files for it. grep -irs arch_has_speculative_dfetch /home/smokin/kernel/arch/arm/include/asm/*
depending on the results, the grep search might have to be expanded so i'd move up a level. might have a lot of results to search through but it is usually a great learning experience.
as a beginner, i would suggest watching http://github.com/toastcfh as toastcfh does a great job fixing the error laden kernel source code HTC releases. generally, toastcfh's patched kernels are used by all the popular kernel releases and will more than likely be the base kernel used by cm7.
hope that helps!
Thanks !! That helps alot, considering i wasn't sure if i had the toolchain setup right. I appreciate it.
smokin1337 said:
Thanks !! That helps alot, considering i wasn't sure if i had the toolchain setup right. I appreciate it.
Click to expand...
Click to collapse
ah, you didnt mention that before!
if you want to test your toolchain, i'd clone/fork toastcfh's repo for the previous evo 3d kernel release. it should cleanly compile, no issues. that'll be a great test for your toolchain and to give you some confidence in compiling the kernel with *proper* source code.
toastcfh worked some magic to fix htc's last borked kernel release code by pulling files from caf (code aurora forum - code contributor) and probably lots of other complicated coding/compiling tweaks.
hope that helps at least get you ready for the next proper kernel source code!
I took your advice and got toastcfh source and i got the same error with crc. I guess i'm missing something, probably a stupid dependency.
HTC jetstream error
smokin1337 said:
I took your advice and got toastcfh source and i got the same error with crc. I guess i'm missing something, probably a stupid dependency.
Click to expand...
Click to collapse
I am getting same error for htc jetstream source code and i am not able to figure out which toastcfh to use. So can you help me with the same
/puccini_lte_att_wwe_hc-32-crc-2.6.35/arch/arm/include/asm/dma-mapping.h: In function 'dma_cache_post_ops':
/puccini_lte_att_wwe_hc-32-crc-2.6.35/arch/arm/include/asm/dma-mapping.h:442: error: implicit declaration of function 'arch_has_speculative_dfetch'
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
Can you please let me know how to get the fix for this one.
-Khushboo
Related
Hello,
I want build the kernel of Xperia S but I hava this error :
Code:
arch/arm/mach-msm/qdsp6v2/audio_acdb.c: In function 'store_vocvol_cal':
/home/cemal/Bureau/Sourceicsxs/kernel/arch/arm/include/asm/atomic.h:249: error: 'asm' operand requires impossible reload
Thank you !
Solved
Solved I write in the Makefile the flag --disable-werror. Nice
Edit : BUT i have a new error
Code:
arch/arm/mach-msm/qdsp6v2/audio_acdb.c: In function 'store_vocvol_cal':
/home/cemal/Bureau/Sourceicsxs/kernel/arch/arm/include/asm/atomic.h:249: error: 'asm' operand requires impossible reload
make[2]: *** [arch/arm/mach-msm/qdsp6v2/audio_acdb.o] Erreur 1
make[1]: *** [arch/arm/mach-msm/qdsp6v2] Erreur 2
make: *** [arch/arm/mach-msm] Erreur 2
Anything Ideas ?
c3ma138 said:
Solved I write in the Makefile the flag --disable-werror. Nice
Edit : BUT i have a new error
Code:
arch/arm/mach-msm/qdsp6v2/audio_acdb.c: In function 'store_vocvol_cal':
/home/cemal/Bureau/Sourceicsxs/kernel/arch/arm/include/asm/atomic.h:249: error: 'asm' operand requires impossible reload
make[2]: *** [arch/arm/mach-msm/qdsp6v2/audio_acdb.o] Erreur 1
make[1]: *** [arch/arm/mach-msm/qdsp6v2] Erreur 2
make: *** [arch/arm/mach-msm] Erreur 2
Anything Ideas ?
Click to expand...
Click to collapse
You shouldn't have to edit the Makefile. Are you using the tool chain recommended by Sony? Make sure your path selects them before anything else. Also I would reset locale to C before compiling ("Erreur"?!), it may play some tricks.
kuisma said:
You shouldn't have to edit the Makefile. Are you using the tool chain recommended by Sony? Make sure your path selects them before anything else. Also I would reset locale to C before compiling ("Erreur"?!), it may play some tricks.
Click to expand...
Click to collapse
I use the ndk toolchain, where can I find the Sony toolchain
Edit : arm-[...].4.6
c3ma138 said:
I use the ndk toolchain, where can I find the Sony toolchain
Edit : arm-[...].4.6
Click to expand...
Click to collapse
You find the specific instructions for the Xperia S at http://developer.sonymobile.com/wp/...-archive-released-with-building-instructions/ referring to the kernel building howto at http://developer.sonymobile.com/wp/2011/05/06/how-to-build-a-linux-kernel/ recommending you to use the tool chain at https://sourcery.mentor.com/sgpp/lite/arm/portal/[email protected]=lite
Follow those instructions before start tinkering with Makefiles, tools, build environment etc and I'm sure you'll succeed.
And reset locale to C! I.e. unset the LANG and LC_* environment variables in your shell before running the build scripts.
kuisma said:
You find the specific instructions for the Xperia S at http://developer.sonymobile.com/wp/...-archive-released-with-building-instructions/ referring to the kernel building howto at http://developer.sonymobile.com/wp/2011/05/06/how-to-build-a-linux-kernel/ recommending you to use the tool chain at https://sourcery.mentor.com/sgpp/lite/arm/portal/[email protected]=lite
Follow those instructions before start tinkering with Makefiles, tools, build environment etc and I'm sure you'll succeed.
And reset locale to C! I.e. unset the LANG and LC_* environment variables in your shell before running the build scripts.
Click to expand...
Click to collapse
thank you,
But this does not work
I download: https://sourcery.mentor.com/sgpp/lite/arm/portal/release2188
then: http://developer.sonymobile.com/wportal/devworld/downloads/download/61a0452tarbz2
I unzipped all in my Desktop and in a terminal, I wrote:
- cd source/kernel
- ARCH=arm CROSS_COMPILE=/home/cemal/Bureau/arm-2012.03/bin/arm-none-eabi- make fuji_nozomi_defconfig
- ARCH=arm CROSS_COMPILE=/home/cemal/Bureau/arm-2012.03/bin/arm-none-eabi- make
c3ma138 said:
But this does not work
Click to expand...
Click to collapse
Sorry, but I'm no mind reader. "does not work" is not sufficient information for me to reply anything helpful to.
The basic is, if you don't know what you are doing, do it by the book. Still not working? Ask for help. Sony Xperia has presented quite a verbose instruction about how to compile their kernels. Try following this before choosing your own tool chain, edit Makefiles and so. When you get problems, read the instructions more carefully and/or ask the community (hi!) for help, with somewhat more detailed information about what you did and how it failed. The more verbose information you present, the more likely you are to get a useful reply.
Best of luck.
------------------
(edit)
A curious question, why do you want to compile a new kernel? I get the impression this is not your field of expertise, and maybe you are trying to achieve something somewhat more complicated than needed.
Hello,
I encounter the same kind of issue. Does anyone could help me ?
I work in an Ubuntu PC (10.04).
I have downloaded the toolchain for Linux from sourcery.mentor.com (arm-2012.03-57-arm-none-linux-gnueabi.bin)
Then the kernel source code 6.1.A.0.452 from developer.sonymobile.com/downloads/xperia-open-source-archives/open-source-archive-for-build-6-1-a-0-452-6-1-a-0-453-and-6-1-a-0-454
and I execute:
cd kernel
ARCH=arm CROSS_COMPILE=~/Toolchain/ARM_GNU_Linux/bin/arm-none-linux-gnueabi- make fuji_nozomi_defconfig
ARCH=arm CROSS_COMPILE=~/Toolchain/ARM_GNU_Linux/bin/arm-none-linux-gnueabi- make
Then I have the following error:
CC arch/arm/mm/proc-syms.o
CC arch/arm/mm/alignment.o
arch/arm/mm/alignment.c: In function 'do_alignment':
arch/arm/mm/alignment.c:298:15: warning: 'offset.un' may be used uninitialized in this function [-Wuninitialized]
error, forbidden warning: alignment.c:298
make[1]: *** [arch/arm/mm/alignment.o] Error 1
make: *** [arch/arm/mm] Error 2
Many thanks in advance for your help
zongojim said:
Hello,
I encounter the same kind of issue. Does anyone could help me ?
I work in an Ubuntu PC (10.04).
I have downloaded the toolchain for Linux from sourcery.mentor.com (arm-2012.03-57-arm-none-linux-gnueabi.bin)
Then the kernel source code 6.1.A.0.452 from developer.sonymobile.com/downloads/xperia-open-source-archives/open-source-archive-for-build-6-1-a-0-452-6-1-a-0-453-and-6-1-a-0-454
and I execute:
cd kernel
ARCH=arm CROSS_COMPILE=~/Toolchain/ARM_GNU_Linux/bin/arm-none-linux-gnueabi- make fuji_nozomi_defconfig
ARCH=arm CROSS_COMPILE=~/Toolchain/ARM_GNU_Linux/bin/arm-none-linux-gnueabi- make
Then I have the following error:
CC arch/arm/mm/proc-syms.o
CC arch/arm/mm/alignment.o
arch/arm/mm/alignment.c: In function 'do_alignment':
arch/arm/mm/alignment.c:298:15: warning: 'offset.un' may be used uninitialized in this function [-Wuninitialized]
error, forbidden warning: alignment.c:298
make[1]: *** [arch/arm/mm/alignment.o] Error 1
make: *** [arch/arm/mm] Error 2
Many thanks in advance for your help
Click to expand...
Click to collapse
You need android-ndk-r5b to compile the Xperia kernel source. I.e. you can not use the latest NDK.
Thanks a lot for your answer
Unfortunately, I didn't find android-ndk-r5b for Linux.
Could you kindly indicate me where I can get it ?
thanks !
zongojim said:
Thanks a lot for your answer
Unfortunately, I didn't find android-ndk-r5b for Linux.
Could you kindly indicate me where I can get it ?
thanks !
Click to expand...
Click to collapse
http://dl.google.com/android/ndk/android-ndk-r5b-linux-x86.tar.bz2
Thanks again, I really apreciate your support !
I have downladed and extracted android-ndk-r5b to my Ubuntu station.
it seems that is is not a built version, right ?
I have tried to navigate in the documentation, but it does not look so trivial...
Would you know how to simply compile it ?
zongojim said:
Thanks again, I really apreciate your support !
I have downladed and extracted android-ndk-r5b to my Ubuntu station.
it seems that is is not a built version, right ?
I have tried to navigate in the documentation, but it does not look so trivial...
Would you know how to simply compile it ?
Click to expand...
Click to collapse
It's compiled ready to use.
Read the documentation at http://developer.sonymobile.com/wp/2011/05/06/how-to-build-a-linux-kernel/
Replace the toolchain path with e.g. "CROSS_COMPILE=/opt/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-" and you are good to go.
ok nice.
Then I tried again and... I've got a different error !
Here is what I have done:
$ ARCH=arm CROSS_COMPILE=~/Toolchain/arm-2011.03-41-arm-none-linux-gnueabi/bin/arm-none-ARCH=arm CROSS_COMPILE=~/Toolchain/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- make fuji_nozomi_defconfig
arch/arm/mach-msm/Kconfig:2107:warning: defaults for choice values not supported
arch/arm/mach-msm/Kconfig:2113:warning: defaults for choice values not supported
#
# configuration written to .config
#
$ ARCH=arm CROSS_COMPILE=~/Toolchain/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- make clean
$ ARCH=arm CROSS_COMPILE=~/Toolchain/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- make
scripts/kconfig/conf --silentoldconfig Kconfig
arch/arm/mach-msm/Kconfig:2107:warning: defaults for choice values not supported
arch/arm/mach-msm/Kconfig:2113:warning: defaults for choice values not supported
make[1]: `include/generated/mach-types.h' is up to date.
arch/arm/kernel/return_address.c:62:2: warning: #warning "TODO: return_address should use unwind tables"
arch/arm/mach-msm/qdsp6v2/audio_acdb.c: In function 'store_vocvol_cal':
/prj/mms/smdswv/users/jmgrimaud/Xperia/6.1.A.0.452/kernel/arch/arm/include/asm/atomic.h:249: error: 'asm' operand requires impossible reload
make[2]: *** [arch/arm/mach-msm/qdsp6v2/audio_acdb.o] Error 1
make[1]: *** [arch/arm/mach-msm/qdsp6v2] Error 2
make: *** [arch/arm/mach-msm] Error 2
zongojim said:
ok nice.
Then I tried again and... I've got a different error !
Here is what I have done:
$ ARCH=arm CROSS_COMPILE=~/Toolchain/arm-2011.03-41-arm-none-linux-gnueabi/bin/arm-none-ARCH=arm CROSS_COMPILE=~/Toolchain/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- make fuji_nozomi_defconfig
arch/arm/mach-msm/Kconfig:2107:warning: defaults for choice values not supported
arch/arm/mach-msm/Kconfig:2113:warning: defaults for choice values not supported
#
# configuration written to .config
#
$ ARCH=arm CROSS_COMPILE=~/Toolchain/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- make clean
$ ARCH=arm CROSS_COMPILE=~/Toolchain/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- make
scripts/kconfig/conf --silentoldconfig Kconfig
arch/arm/mach-msm/Kconfig:2107:warning: defaults for choice values not supported
arch/arm/mach-msm/Kconfig:2113:warning: defaults for choice values not supported
make[1]: `include/generated/mach-types.h' is up to date.
arch/arm/kernel/return_address.c:62:2: warning: #warning "TODO: return_address should use unwind tables"
arch/arm/mach-msm/qdsp6v2/audio_acdb.c: In function 'store_vocvol_cal':
/prj/mms/smdswv/users/jmgrimaud/Xperia/6.1.A.0.452/kernel/arch/arm/include/asm/atomic.h:249: error: 'asm' operand requires impossible reload
make[2]: *** [arch/arm/mach-msm/qdsp6v2/audio_acdb.o] Error 1
make[1]: *** [arch/arm/mach-msm/qdsp6v2] Error 2
make: *** [arch/arm/mach-msm] Error 2
Click to expand...
Click to collapse
Only specify ONE toolchain ...
Also, I'm note quite sure if I used 4.4.0 or 4.4.3, since both are included in the same r5b distribution. You can also try;
CROSS_COMPILE=~/Toolchain//android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi-
Thank you kuisma.
Sorry it was a copy/paste error, I had for sure specified only one toolchain.
So I am making a new test with CROSS_COMPILE=~/Toolchain/android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi-
I'll keep you informed
---------- Post added at 11:51 AM ---------- Previous post was at 11:15 AM ----------
It built, thanks again for your support, kuisma !
Not sure it is still in the scope of this topic, but continuing to execute the instructions found in developer.sonymobile.com/2011/05/06/how-to-build-a-linux-kernel/, I have some questions regarding Step C, absolutly not clear for me
What should I do exactly to prepare my boot.img ? What have I to do to create a ramdisk.img file, or where can I find it ? (in fact I do not know what it the ramdisk in the picture...is it required ?)
zongojim said:
Thank you kuisma.
Sorry it was a copy/paste error, I had for sure specified only one toolchain.
So I am making a new test with CROSS_COMPILE=~/Toolchain/android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi-
I'll keep you informed
---------- Post added at 11:51 AM ---------- Previous post was at 11:15 AM ----------
It built, thanks again for your support, kuisma !
Not sure it is still in the scope of this topic, but continuing to execute the instructions found in developer.sonymobile.com/2011/05/06/how-to-build-a-linux-kernel/, I have some questions regarding Step C, absolutly not clear for me
What should I do exactly to prepare my boot.img ? What have I to do to create a ramdisk.img file, or where can I find it ? (in fact I do not know what it the ramdisk in the picture...is it required ?)
Click to expand...
Click to collapse
Start with the original root filesystem from the standard boot.img you are already running.
You'll find my tool working with boot.img here: http://whiteboard.ping.se/Android/Unmkbootimg
Also, read the links on the page my signature links to, to get more information about how to build boot images, root file systems etc.
The ramdisk contains the root filesystem, and yes, it's very much needed.
Ok understood
last point: how to retrieve the boot.img from my Xperia S phone ? (that is already unlocked)
zongojim said:
Ok understood
last point: how to retrieve the boot.img from my Xperia S phone ? (that is already unlocked)
Click to expand...
Click to collapse
Last? Ok, I'll take your word for it.
http://www.youtube.com/watch?v=bB77gWRUI_A
Remember, Google is your friend.
help me somebody please
i'm trying to build custom kernel for my xperia M dual
got sources from sony's website, doing build by guide
here is an error:
Code:
In file included from drivers/usb/gadget/android.c:51:0:
drivers/usb/gadget/f_qdss.c: In function 'qdss_bind_config':
drivers/usb/gadget/f_qdss.c:586:38: warning: argument to 'sizeof' in 'strncmp' call is the same expression as the second source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: f_qdss.c:586
make[3]: *** [drivers/usb/gadget/android.o] Error 1
make[2]: *** [drivers/usb/gadget] Error 2
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error 2
is it an NDK version issue?
I'm running:
Code:
make -j8 ARCH=arm CROSS_COMPILE=/home/dev/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/arm-none-linux-gnueabi-
thanks
Hi guys,
I've really been having a hard time trying to compile a kernel for the Droid DNA. I've downloaded the kernel source from the HTC dev site, and within the download there is a readme which suggests to download this toolchain "git clone https://android.googlesource.com/platform/prebuilt." I have tried the toolchains included in this, but they never finish the compiling process. It's weird because it looks like it is processing nicely, and even runs for several minutes, but it just stops abrubtly and does not produce the zimage. I have also tried toolchains from the official Android NDK and even a custom one I found, with no luck. Most of the other toolchains just crap out with a bunch of errors, which looks like it is missing some library files, so I don't know what to do there.
Do you actually need to install the toolchain somehow, or can you just do an export CROSS_COMPILE=~/toolchain/bin/arm-linux-androideabi- to handle this? I would be more than greatful to get any sort of assistance with this, as it is starting to drive me nuts! lol. I also uploaded some of the errors and final output from my last compile.
stevedub40 said:
Hi guys,
I've really been having a hard time trying to compile a kernel for the Droid DNA. I've downloaded the kernel source from the HTC dev site, and within the download there is a readme which suggests to download this toolchain "git clone https://android.googlesource.com/platform/prebuilt." I have tried the toolchains included in this, but they never finish the compiling process. It's weird because it looks like it is processing nicely, and even runs for several minutes, but it just stops abrubtly and does not produce the zimage. I have also tried toolchains from the official Android NDK and even a custom one I found, with no luck. Most of the other toolchains just crap out with a bunch of errors, which looks like it is missing some library files, so I don't know what to do there.
Do you actually need to install the toolchain somehow, or can you just do an export CROSS_COMPILE=~/toolchain/bin/arm-linux-androideabi- to handle this? I would be more than greatful to get any sort of assistance with this, as it is starting to drive me nuts! lol. I also uploaded some of the errors and final output from my last compile.
Click to expand...
Click to collapse
Hmm, it doesn't look like my file uploaded. Here it is in code tags:
Code:
net/netfilter/xt_mark.c:16:37: error: linux/netfilter/xt_mark.h: No such file or directory
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: In function 'mark_mt':
net/netfilter/xt_mark.c:41: error: dereferencing pointer to incomplete type
net/netfilter/xt_mark.c:41: error: dereferencing pointer to incomplete type
net/netfilter/xt_mark.c:41: error: dereferencing pointer to incomplete type
net/netfilter/xt_mark.c: At top level:
net/netfilter/xt_mark.c:49: error: invalid application of 'sizeof' to incomplete type 'struct xt_mark_tginfo2'
net/netfilter/xt_mark.c:58: error: invalid application of 'sizeof' to incomplete type 'struct xt_mark_mtinfo1'
make[2]: *** [net/netfilter/xt_mark.o] Error 1
make[1]: *** [net/netfilter] Error 2
make[1]: *** Waiting for unfinished jobs....
drivers/mfd/pm8921-core.c:211: error: resources_pwrkey causes a section type conflict
drivers/mfd/pm8921-core.c:211: error: resources_pwrkey causes a section type conflict
drivers/mfd/pm8921-core.c:165: error: adc_cell_resources causes a section type conflict
drivers/mfd/pm8921-core.c:165: error: adc_cell_resources causes a section type conflict
make[2]: *** [drivers/mfd/pm8921-core.o] Error 1
make[1]: *** [drivers/mfd] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [net] Error 2
make: *** Waiting for unfinished jobs....
CC drivers/media/video/msm/wfd/enc-subdev.o
CC drivers/media/video/msm/sensors/imx175_v4l2.o
CC drivers/media/video/msm/sensors/ov8838_v4l2.o
CC drivers/media/video/msm/sensors/s5k3h2yx_v4l2.o
CC drivers/media/video/msm/rawchip/Yushan_Platform_Specific.o
CC drivers/media/video/msm/wfd/vsg-subdev.o
CC drivers/media/video/msm/msm_gesture.o
CC drivers/media/video/msm/rawchip/Yushan_HTC_Functions.o
CC drivers/media/video/msm/sensors/ar0260_v4l2.o
CC drivers/media/video/msm/wfd/wfd-ioctl.o
CC drivers/media/video/msm/msm_axi_qos.o
CC drivers/media/video/msm/sensors/s5k3l1yx.o
CC drivers/media/video/msm/flash.o
CC drivers/media/video/msm/sensors/ov2722_v4l2.o
CC drivers/media/video/msm/wfd/wfd-util.o
CC drivers/media/video/msm/msm_io_8960.o
LD drivers/media/video/msm/sensors/built-in.o
CC drivers/media/video/msm/msm_vfe32.o
CC drivers/media/video/msm/rawchip/yushan_reg.o
LD drivers/media/video/msm/wfd/built-in.o
CC drivers/media/video/msm/msm_vpe.o
CC drivers/media/video/msm/rawchip/yushan_u_code_r2.o
CC drivers/media/video/msm/rawchip/yushan_u_code_r3.o
CC drivers/media/video/msm/rawchip/yushan_reg_s5k3h2yx.o
CC drivers/media/video/msm/rawchip/yushan_reg_imx175.o
CC drivers/media/video/msm/rawchip/yushan_reg_ov8838.o
CC drivers/media/video/msm/rawchip/yushan_reg_ar0260.o
CC drivers/media/video/msm/rawchip/yushan_reg_ov2722.o
LD drivers/media/video/msm/rawchip/built-in.o
LD drivers/media/video/msm/built-in.o
LD drivers/media/video/videodev.o
LD drivers/media/video/built-in.o
LD drivers/media/built-in.o
make: *** [drivers] Error 2
[email protected] ~/android/kernel/linux $
Talk to DSB9938 or Elkay, they work on kernels for our phone.
orangechoochoo said:
Talk to DSB9938 or Elkay, they work on kernels for our phone.
Click to expand...
Click to collapse
Will do. Thanks for the reply.
Alright, I have discovered my problem. It looks like I was in fact missing the xt_mark.h file. For some reason, the HTC kernel source only includes xt_MARK.h. I downloaded the kernel source for the Nexus 4 and pulled the necessary header files. I was missing a couple others, which I don't recall off hand. What has me baffled is that I seem to be the only one with this issue. I downloaded the HTC source again just to make sure, and just as I suspected it was missing some header files. Has anyone else experienced this?
EDIT: I just tested with a couple different toolchains and they all compile perfectly now. That is so strange that my problem this whole time has been missing header files from HTC.
Code:
CC net/netfilter/xt_qtaguid.o
CC net/netfilter/xt_quota.o
CC net/netfilter/xt_quota2.o
CC net/netfilter/xt_socket.o
In file included from include/linux/kernel.h:23:0,
from include/linux/cache.h:4,
from include/linux/time.h:7,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from net/netfilter/xt_socket.c:13:
net/netfilter/xt_socket.c: In function 'xt_socket_get4_sk':
include/linux/dynamic_debug.h:75:21: warning: 'protocol' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning: dynamic_debug.h:75
make[2]: *** [net/netfilter/xt_socket.o] Error 1
make[1]: *** [net/netfilter] Error 2
make: *** [net] Error 2
[email protected]:~/kernel$
Original file here.
I'm using ndk gcc 4.8. This error is present also on gcc 4.7. The only way to get rid of this error is to use toolchain 4.6. I need to compile it using a newer toolchain, that's why I request your help.
Any ideas?
Kernel Compilation
srsdani said:
Code:
CC net/netfilter/xt_qtaguid.o
CC net/netfilter/xt_quota.o
CC net/netfilter/xt_quota2.o
CC net/netfilter/xt_socket.o
In file included from include/linux/kernel.h:23:0,
from include/linux/cache.h:4,
from include/linux/time.h:7,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from net/netfilter/xt_socket.c:13:
net/netfilter/xt_socket.c: In function 'xt_socket_get4_sk':
include/linux/dynamic_debug.h:75:21: warning: 'protocol' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning: dynamic_debug.h:75
make[2]: *** [net/netfilter/xt_socket.o] Error 1
make[1]: *** [net/netfilter] Error 2
make: *** [net] Error 2
[email protected]:~/kernel$
Original file here.
I'm using ndk gcc 4.8. This error is present also on gcc 4.7. The only way to get rid of this error is to use toolchain 4.6. I need to compile it using a newer toolchain, that's why I request your help.
Click to expand...
Click to collapse
I guess you are looking on another file.
Code:
error, forbidden warning: dynamic_debug.h:75
I guess there is a problem in dynamic_debug.h in line 75. I guess you need to initialise something.
Here is dynamic_debug.h but I can't find the problem.
I will appreciate any opinion.
Try this method!
srsdani said:
Here is dynamic_debug.h but I can't find the problem.
Click to expand...
Click to collapse
I am not much used to kernel related development but I analysed your dynamic_debug.h and found the problem (maybe a problem):
Normally, a do-while loop syntax is this:
Code:
do
{
Statement1;
Statement2;
...
}while(condition);
But I don't see a semicolon in the end of those loops in your code. This maybe a syntax error.
Also analyse these codes:
Code:
#if defined(CONFIG_DYNAMIC_DEBUG)
extern int ddebug_remove_module(const char *mod_name);
extern __printf(2, 3)
int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...);
struct device;
extern __printf(3, 4)
int __dynamic_dev_dbg(struct _ddebug *descriptor, const struct device *dev,
const char *fmt, ...);
struct net_device;
extern __printf(3, 4)
int __dynamic_netdev_dbg(struct _ddebug *descriptor,
const struct net_device *dev,
const char *fmt, ...);
Every intialisation has 4 protocols but the first initialisation contain only 3.
Try the above things and tell me back if it works or not.
So, the problem was in Makefile and .config. I compared and added some flags from Mako (from franco) and it worked. I still have some warning/s, some breakpoints but at least now it's working. Anyway, this thread may be useful for all of us. Thanks a lot for help.
Now, another problem.
Code:
CC fs/proc/loadavg.o
CC fs/proc/meminfo.o
fs/proc/meminfo.c: In function ‘meminfo_proc_show’:
fs/proc/meminfo.c:175:1: internal compiler error: in optimize_sc, at modulo-sched.c:1069
}
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.launchpad.net/gcc-linaro> for instructions.
make[2]: *** [fs/proc/meminfo.o] Error 1
make[1]: *** [fs/proc] Error 2
make: *** [fs] Error 2
[email protected]:~/kernel2$
With linaro 4.8.3 => OK;
linaro 4.8.3 + A15 optimize=> fail, error above. meminfo.c it's exactly like the one from nexus 4.
FIX: compiler bug;
srsdani said:
Code:
CC net/netfilter/xt_qtaguid.o
CC net/netfilter/xt_quota.o
CC net/netfilter/xt_quota2.o
CC net/netfilter/xt_socket.o
In file included from include/linux/kernel.h:23:0,
from include/linux/cache.h:4,
from include/linux/time.h:7,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from net/netfilter/xt_socket.c:13:
net/netfilter/xt_socket.c: In function 'xt_socket_get4_sk':
include/linux/dynamic_debug.h:75:21: warning: 'protocol' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning: dynamic_debug.h:75
make[2]: *** [net/netfilter/xt_socket.o] Error 1
make[1]: *** [net/netfilter] Error 2
make: *** [net] Error 2
[email protected]:~/kernel$
Original file here.
I'm using ndk gcc 4.8. This error is present also on gcc 4.7. The only way to get rid of this error is to use toolchain 4.6. I need to compile it using a newer toolchain, that's why I request your help.
Click to expand...
Click to collapse
Hey sarsdani Apologies that I'm quoting you 12 month later. I am getting an identical error in the same file/address as you had when you posted this question. Im compiling stock HTC m7 Android L kernel with Google tool chain 4.8 - android 5.1 r1
You mentioned later on that you changed the Makefile and .config to fix the [-Wmaybe-uninitialized] error. Can you please detail what those changes were or point me to an example ( if you can remember ) I could just change Wmaybe in Makefile to Wno but turning the flag off altogether seems dangerous.
@Joeisgood99 there are two ways to solve this.
1. using a "hack". So, you need to add in makefile (in root folder from kernel source) at KBUILD_CFLAGS: -Wno-maybe-uninitialized \
2. Open that file with the error and asign a value to protocol.
The first option is not dangerous. Why? Because only the toolchain say this. In gcc 4.6, the reason why you don't get this error is because it assign a value automatically to that "protocol", usualy random value but not always. In gcc 4.7/4.8/4.9(or 4.10) this is threated as warning/error.
/home/austin/cm11/kernel/lge/w3c/net/ipv4/ipconfig.c:264: undefined reference to `msecs_to_jiffies'
/home/austin/cm11/kernel/lge/w3c/Makefile:877: recipe for target '.tmp_vmlinux1' failed
make[2]: *** [.tmp_vmlinux1] Error 1
Makefile:130: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/home/austin/cm11/kernel/lge/w3c'
build/core/tasks/kernel.mk:188: recipe for target 'TARGET_KERNEL_BINARIES' failed
make: *** [TARGET_KERNEL_BINARIES] Error 2
Any ideas what this could be? I'm a bit stumped i've never seen an error like this before
It's okay i retired the project as of now since trying to modify the kernel source code isn't do anything but causing more errors. I do appreciate any help when everyone has a chance
I am trying to compile a kernel for my device(kyleprods or GT-S7582 or Galaxy S duos 2) because I havent found any custom kernel out here. Im compiling from source. I tried compiling WITHOUT any tweaks or such, just plain compile after downloading the source, and it compiled successfully. I tried adding smartassv2 but I got these errors after running "make -j1" twice. Can anybody help/guide me? It is really my first time doing these things, because I'm very interested.
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
Creating rdb link for Hawaii
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
CC drivers/cpufreq/cpufreq_smartass2.o
drivers/cpufreq/cpufreq_smartass2.c:175:10: error: ‘THIS_MODULE’ undeclared here (not in a function)
.owner = THIS_MODULE,
^
drivers/cpufreq/cpufreq_smartass2.c: In function ‘cpufreq_smartass_timer’:
drivers/cpufreq/cpufreq_smartass2.c:295:1: error: implicit declaration of function ‘cputime64_sub’ [-Werror=implicit-function-declaration]
delta_idle = cputime64_sub(now_idle, this_smartass->time_in_idle);
^
drivers/cpufreq/cpufreq_smartass2.c: At top level:
drivers/cpufreq/cpufreq_smartass2.c:869:16: error: expected declaration specifiers or ‘...’ before string constant
MODULE_AUTHOR ("Erasmux");
^
drivers/cpufreq/cpufreq_smartass2.c:870:21: error: expected declaration specifiers or ‘...’ before string constant
MODULE_DESCRIPTION ("'cpufreq_smartass2' - A smart cpufreq governor");
^
drivers/cpufreq/cpufreq_smartass2.c:871:17: error: expected declaration specifiers or ‘...’ before string constant
MODULE_LICENSE ("GPL");
^
cc1: some warnings being treated as errors
make[2]: *** [drivers/cpufreq/cpufreq_smartass2.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2
SORRY I DONT KNOW WHERE TO POST.
diskie said:
I am trying to compile a kernel for my device(kyleprods or GT-S7582 or Galaxy S duos 2) because I havent found any custom kernel out here. Im compiling from source. I tried compiling WITHOUT any tweaks or such, just plain compile after downloading the source, and it compiled successfully. I tried adding smartassv2 but I got these errors after running "make -j1" twice. Can anybody help/guide me? It is really my first time doing these things, because I'm very interested.
-snip-
Click to expand...
Click to collapse
Part of the errors can be fixed by adding:
#include <linux/module.h>
at the top. I don't know about the rest, but @xpirt or @InfinityShooter once fixed this problem for the desire x, perhaps he can help? I want to know it myself as well
@diskie
https://github.com/ProtoU/neXusKERNEL/commit/8c77e8a4b1962bb6fbb41732aba5ded40007876a
Look in drivers/cpufreq/cpufreq_ondemand.c and include/linux/cpufreq.h for fix
xpirt
xpirt said:
@diskie
https://github.com/ProtoU/neXusKERNEL/commit/8c77e8a4b1962bb6fbb41732aba5ded40007876a
Look in drivers/cpufreq/cpufreq_ondemand.c and include/linux/cpufreq.h for fix
xpirt
Click to expand...
Click to collapse
Thanks a lot :good:
so ive been trying for a couple of days to build my own kernel for our lg g2 mini (d620R) devices since we just unlocked bootloader and got custom recovery. so we need a custom kernel to build custom roms.
ive been trying alot and ive gotten so far i got pass making the .config file and got into the menuconfig and saved it. now im trying to compile the new kernel
and this is what i get.
and i have no clue what to do.
hope someone can help me out.
should be realy great to have custom roms on the lg g2 mini asap
Code:
[email protected]:~/android/kernel/kernel$ make -j4 -Wsizeof-pointer-memaccess ARCH=arm CROSS_COMPILE=arm-linux-androideabi-
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
make[1]: Nothing to be done for `arch/arm/boot/dtbs'.
CHK include/generated/compile.h
CHK kernel/config_data.h
objcopy: '.ihex': No such file
/home/john/android/kernel/kernel/firmware/Makefile:328: target `/home/john/android/kernel/kernel/firmware/melfas/' given more than once in the same rule.
IHEX firmware/atmel/E2A47P1_2_04.fw
IHEX firmware/atmel/E2A47P2_2_04.fw
IHEX firmware/atmel/E4A47P1_2_04.fw
IHEX firmware/atmel/E4A47P2_2_04.fw
IHEX firmware/atmel/E4A47P2_2_05.fw
IHEX firmware/atmel/E7_0210.fw
IHEX firmware/atmel/E7_0214.fw
IHEX firmware/atmel/Jaguar01.fw
IHEX firmware/atmel/Jaguar02.fw
IHEX firmware/atmel/S0A47P1_2_05.fw
IHEX firmware/atmel/S0A47P1_2_06.fw
IHEX firmware/atmel/S0A47P1_2_07.fw
IHEX firmware/atmel/S2A47P1_2_05.fw
IHEX firmware/atmel/S2A47P1_2_06.fw
AS firmware/melfas/mms100a_core54_v01.mfsb.gen.o
AS firmware/atmel/E2A47P1_2_04.fw.gen.o
AS firmware/atmel/E2A47P2_2_04.fw.gen.o
AS firmware/atmel/E4A47P1_2_04.fw.gen.o
AS firmware/atmel/E4A47P2_2_04.fw.gen.o
AS firmware/atmel/E4A47P2_2_05.fw.gen.o
AS firmware/atmel/E7_0210.fw.gen.o
CC net/bluetooth/hci_conn.o
AS firmware/atmel/E7_0214.fw.gen.o
AS firmware/atmel/Jaguar01.fw.gen.o
AS firmware/atmel/Jaguar02.fw.gen.o
AS firmware/atmel/S0A47P1_2_05.fw.gen.o
AS firmware/atmel/S0A47P1_2_06.fw.gen.o
AS firmware/atmel/S0A47P1_2_07.fw.gen.o
AS firmware/atmel/S2A47P1_2_05.fw.gen.o
AS firmware/atmel/S2A47P1_2_06.fw.gen.o
LD firmware/built-in.o
net/bluetooth/hci_conn.c: In function 'hci_le_ltk_reply':
net/bluetooth/hci_conn.c:407:28: warning: argument to 'sizeof' in 'memcpy' call is the same pointer type '__u8 *' as the destination; expected '__u8' or an explicit length [-Wsizeof-pointer-memaccess]
error, forbidden warning: hci_conn.c:407
make[2]: *** [net/bluetooth/hci_conn.o] Error 1
make[1]: *** [net/bluetooth] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [net] Error 2
make: *** Waiting for unfinished jobs....
[email protected]:~/android/kernel/kernel$
Please copy here the line 407 from file net/bluetooth/hci_conn.c
That line does not compile because of argument -Wsizeof-pointer-memaccess in your 'make' command. Try to compile without that argument, or copy the line here, so that we see what needs to be fixed in that line.
Edit:
It seems to be a issue/change in GCC 4.8:
https://gcc.gnu.org/gcc-4.8/porting_to.html
rpul said:
Please copy here the line 407 from file net/bluetooth/hci_conn.c
That line does not compile because of argument -Wsizeof-pointer-memaccess in your 'make' command. Try to compile without that argument, or copy the line here, so that we see what needs to be fixed in that line.
Edit:
It seems to be a issue/change in GCC 4.8:
https://gcc.gnu.org/gcc-4.8/porting_to.html
Click to expand...
Click to collapse
oh thanks. got passed that error though. i use toolchain arm-linux-androideabi-4.9 to compile.
ive tried arm-none-eabi-4.8 and arm-eabi-4.7 the 4.9 seems to work best.
im compiing right at this point ill edit if i get errors again.