[HELP] Compile error with GCC 4.7 - Nexus S Q&A, Help & Troubleshooting

Hi everybody.
I use Linaro toolchain 2012.05 GCC 4.7 on my Archlinux x86_64 and when I compile Nexus S stock kernel, I have some errors like these:
Code:
[[email protected] samsung]$ make
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: «include/generated/mach-types.h» è aggiornato.
CC kernel/bounds.s
gcc: error: unrecognized command line option ‘-mlittle-endian’
gcc: error: unrecognized command line option ‘-mapcs’
gcc: error: unrecognized command line option ‘-mno-sched-prolog’
gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
gcc: error: unrecognized command line option ‘-mno-thumb-interwork’
make[1]: *** [kernel/bounds.s] Errore 1
make: *** [prepare0] Errore 2
With GCC 4.6 I have another errors. I want to use GCC 4.7 like Thalamus.
Can you help me?
PS:
Code:
export ARCH=arm
export CROSS_COMPILE=
export PATH=$PATH:~/android-toolchain-eabi/arm-eabi/bin/

Q&A Section would be the right place for this.
http://forum.xda-developers.com/forumdisplay.php?f=927

MattScherbatsky said:
PS:
Code:
export ARCH=arm
export CROSS_COMPILE=
export PATH=$PATH:~/android-toolchain-eabi/arm-eabi/bin/
Click to expand...
Click to collapse
Code:
export ARCH=arm
export CROSS_COMPILE=:~/android-toolchain-eabi/arm-eabi/bin/arm-linux-gnueabihf-

Thank you! Now I have some errors.
LD vmlinux.o
MODPOST vmlinux.o
WARNING: vmlinux.o(.data+0x3c64): Section mismatch in reference from the variable s5pv210_driver to the function .init.text:s5pv210_cpu_init()
The variable s5pv210_driver references
the function __init s5pv210_cpu_init()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
WARNING: vmlinux.o(.data+0x3c90): Section mismatch in reference from the variable s5pv210_cpufreq_drv to the function .init.text:s5pv210_cpufreq_probe()
The variable s5pv210_cpufreq_drv references
the function __init s5pv210_cpufreq_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
WARNING: vmlinux.o(.data+0x9118): Section mismatch in reference from the variable herring_device_rfkill to the function .init.text:herring_rfkill_probe()
The variable herring_device_rfkill references
the function __init herring_rfkill_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
WARNING: vmlinux.o(.data+0xcb98): Section mismatch in reference from the variable s5p_systimer to the function .init.text:s5p_timer_init()
The variable s5p_systimer references
the function __init s5p_timer_init()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
KSYM .tmp_kallsyms1.S
AS .tmp_kallsyms1.o
LD .tmp_vmlinux2
KSYM .tmp_kallsyms2.S
AS .tmp_kallsyms2.o
LD vmlinux
SYSMAP System.map
SYSMAP .tmp_System.map
OBJCOPY arch/arm/boot/Image
Kernel: arch/arm/boot/Image is ready
LZMA arch/arm/boot/compressed/piggy.lzma
AS arch/arm/boot/compressed/piggy.lzma.o
CC arch/arm/boot/compressed/misc.o
In file included from arch/arm/plat-samsung/include/plat/uncompress.h:30:0,
from arch/arm/mach-s5pv210/include/mach/uncompress.h:17,
from arch/arm/boot/compressed/misc.c:33:
arch/arm/plat-samsung/include/plat/regs-serial.h:284:27: warning: 'struct uart_port' declared inside parameter list [enabled by default]
arch/arm/plat-samsung/include/plat/regs-serial.h:284:27: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
CC arch/arm/boot/compressed/decompress.o
SHIPPED arch/arm/boot/compressed/lib1funcs.S
AS arch/arm/boot/compressed/lib1funcs.o
LD arch/arm/boot/compressed/vmlinux
arm-eabi-ld: error: DIV usage mismatch between arch/arm/boot/compressed/misc.o and output
arm-eabi-ld: error: DIV usage mismatch between arch/arm/boot/compressed/lib1funcs.o and output
make[2]: *** [arch/arm/boot/compressed/vmlinux] Errore 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Errore 2
make: *** [zImage] Errore 2
Click to expand...
Click to collapse
Can I risolve it?

Those are warnings, read up on building kernels more.

I use this guide: http://source.android.com/source/building-kernels.html

You'll really get more help if you post this in the correct section. That's what the Q&A section is for - Questions and Answers.

MattScherbatsky said:
I use this guide: http://source.android.com/source/building-kernels.html
Click to expand...
Click to collapse
Try to use the bfd linker, which is also provided at the linaro prebuild toolchain package. For details look at:
http://forum.xda-developers.com/showpost.php?p=27427105&postcount=8

Related

[Q][KERNEL] Errors while compiling with GCC 4.7

I use Linaro 2012.05 GCC 4.7 (arm-eabi) and when I compile stock Nexus S kernel I have these errors:
LD vmlinux.o
MODPOST vmlinux.o
WARNING: modpost: Found 4 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
KSYM .tmp_kallsyms1.S
AS .tmp_kallsyms1.o
LD .tmp_vmlinux2
KSYM .tmp_kallsyms2.S
AS .tmp_kallsyms2.o
LD vmlinux
SYSMAP System.map
SYSMAP .tmp_System.map
OBJCOPY arch/arm/boot/Image
Kernel: arch/arm/boot/Image is ready
AS arch/arm/boot/compressed/head.o
GZIP arch/arm/boot/compressed/piggy.gzip
AS arch/arm/boot/compressed/piggy.gzip.o
CC arch/arm/boot/compressed/misc.o
In file included from arch/arm/plat-samsung/include/plat/uncompress.h:30:0,
from arch/arm/mach-s5pv210/include/mach/uncompress.h:17,
from arch/arm/boot/compressed/misc.c:33:
arch/arm/plat-samsung/include/plat/regs-serial.h:284:27: warning: 'struct uart_port' declared inside parameter list [enabled by default]
arch/arm/plat-samsung/include/plat/regs-serial.h:284:27: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
CC arch/arm/boot/compressed/decompress.o
SHIPPED arch/arm/boot/compressed/lib1funcs.S
AS arch/arm/boot/compressed/lib1funcs.o
LD arch/arm/boot/compressed/vmlinux
arm-eabi-ld: error: DIV usage mismatch between arch/arm/boot/compressed/misc.o and output
arm-eabi-ld: error: DIV usage mismatch between arch/arm/boot/compressed/lib1funcs.o and output
make[2]: *** [arch/arm/boot/compressed/vmlinux] Errore 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Errore 2
make: *** [zImage] Errore 2
Click to expand...
Click to collapse
Can someone help me?
PS:
export ARCH=arm
export CROSS_COMPILE=arm-eabi-
export PATH=$PATH:~/android-toolchain-eabi/bin
Click to expand...
Click to collapse
div usage mismatch fix
See a potential solution here.

[Q] [SOLVED] Stock Kernel Build Problems

Hello,
Just for the fun (and to learn something) I'm trying to rebuild the stock nexus5 kernel. However I'm miserably failing.
I've found some guides for nexus4 but none for the nexus5, so far.
Host(s): Ubuntu 12.04 x86_64, Ubuntu 13.10 x86_64, Ubuntu 13.10 x86
Kernel source: https://android.googlesource.com/kernel/msm
Toolchain: Android NDK legacy version GCC 4.7
The process I'm following is:
NDK toolchain
From an adb shell I get the GCC version used to compile the kernel "dmesg | grep -i gcc", which is 4.7
Download the legacy NDK which has GCC 4.7 (for x86_64 in my case): https://dl.google.com/android/ndk/android-ndk-r9b-linux-x86_64-legacy-toolchains.tar.bz2
Kernel source
Download: git clone https://android.googlesource.com/kernel/msm
Select device: git checkout remotes/origin/android-msm-hammerhead-3.4-kk-r1
Select commit: git checkout 9eb14ba
Building kernel
export PATH=$PATH:<NDK_PATH>/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-linux-androideabi-
make hammerhead_defconfig
make -j2
However the build process fails with:
Code:
[...]
LD vmlinux.o
MODPOST vmlinux.o
ERROR: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
make[1]: *** [vmlinux.o] Error 1
make: *** [vmlinux.o] Error 2
I've also tried to build with CONFIG_DEBUG_SECTION_MISMATCH=y, but as expected fails (although with more information)
Code:
[...]
CC kernel/kallsyms.o
WARNING: arch/arm/mach-msm/built-in.o(.data+0x679c): Section mismatch in reference from the variable msm_mpm_debug_mask to the funct
ion .init.text:mpm_irq_domain_linear_size()
The variable msm_mpm_debug_mask references
the function __init mpm_irq_domain_linear_size()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
WARNING: arch/arm/mach-msm/built-in.o(.data+0x67b4): Section mismatch in reference from the variable msm_mpm_debug_mask to the funct
ion .init.text:mpm_irq_domain_legacy_size()
The variable msm_mpm_debug_mask references
the function __init mpm_irq_domain_legacy_size()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
[...]
LD vmlinux.o
MODPOST vmlinux.o
WARNING: vmlinux.o(.data+0x74d4): Section mismatch in reference from the variable msm_mpm_debug_mask to the function .init.text:mpm_irq_domain_linear_size()
The variable msm_mpm_debug_mask references
the function __init mpm_irq_domain_linear_size()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
WARNING: vmlinux.o(.data+0x74ec): Section mismatch in reference from the variable msm_mpm_debug_mask to the function .init.text:mpm_irq_domain_legacy_size()
The variable msm_mpm_debug_mask references
the function __init mpm_irq_domain_legacy_size()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
make[1]: *** [vmlinux.o] Error 1
make: *** [vmlinux.o] Error 2
Although it also states that building with CONFIG_NO_ERROR_ON_MISMATCH=y is not recommend I've also tried with this flag. It generated the zImage but I'm not confident with the result.
So the question is what am I doing wrong and how do I compile the android nexus5 kernel?
Wrong kernel?
Wrong commit?
Wrong toolchain? --> use arm-eabi-4.7
Yeah I was having the same error. Using the arm-eabi-4.7 toolchain seems to work fine.
mohit1234 said:
Yeah I was having the same error. Using the arm-eabi-4.7 toolchain seems to work fine.
Click to expand...
Click to collapse
Thanks. That did the trick :good:
Re: [Q] Stock Kernel Build Problems
Interestingly enough I had to do:
make zImage-dtb
to create the zImage that I then encapsulate in the boot.img for Nexus5, using the tools provided in AOSP 4.4_r1.
out/host/linux-x86/bin/mkbootimg --kernel out/target/product/hammerhead/kernel --ramdisk out/target/product/hammerhead/ramdisk.img --cmdline "console=ttyHSL0,115200,n8 androidboot.hardware=hammerhead user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1" --base 0x00000000 --pagesize 2048 --ramdisk_offset 0x02900000 --tags_offset 0x02700000 --output out/target/product/hammerhead/boot.img
out/target/product/hammerhead/boot.img maxsize=23519232 blocksize=135168 total=8826880 reserve=270336
Makefile Changes for Easy Kernel Builds
boy3dfx said:
Interestingly enough I had to do:
make zImage-dtb
to create the zImage that I then encapsulate in the boot.img for Nexus5, using the tools provided in AOSP 4.4_r1.
out/host/linux-x86/bin/mkbootimg --kernel out/target/product/hammerhead/kernel --ramdisk out/target/product/hammerhead/ramdisk.img --cmdline "console=ttyHSL0,115200,n8 androidboot.hardware=hammerhead user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1" --base 0x00000000 --pagesize 2048 --ramdisk_offset 0x02900000 --tags_offset 0x02700000 --output out/target/product/hammerhead/boot.img
out/target/product/hammerhead/boot.img maxsize=23519232 blocksize=135168 total=8826880 reserve=270336
Click to expand...
Click to collapse
Hey thanks for the zip @boy3dfx . Using this I was able to adapt the build system a little bit so you can just "make updatepackage" or "make bootimage". It requires changes to kernel/AndroidKernel.mk and device/lge/hammerhead . Hopefully though it saves a bit of time in the long run and is less error prone that typing out the whole mkbootimg line each time.
Changes are detailed here: http://nosemaj.org/howto-build-android-kitkat-nexus-5 under "Including the Kernel Sources."
Best,
Jameson
jhwilliams said:
Changes are detailed here: http://nosemaj.org/howto-build-android-kitkat-nexus-5 under "Including the Kernel Sources."
Click to expand...
Click to collapse
Excelent guide, thanks!! :good:
Same error..how to fix

Compiling Kernel

I keep getting kernel compilation error when trying to compile CM kernel from sources.
Code:
/tmp/cc0DKVco.s: Assembler messages:
/tmp/cc0DKVco.s:172: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cc0DKVco.s:199: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
CC arch/arm/mach-msm/smd_private.o
CC arch/arm/mach-msm/smem.o
CC arch/arm/kernel/pmu.o
CC kernel/resource.o
CC arch/arm/kernel/perf_event.o
CC arch/arm/mach-msm/smd_init_dt.o
CC kernel/sysctl.o
arch/arm/mach-msm/smd_init_dt.c:24:25: fatal error: smd_private.h: No such file or directory
#include <smd_private.h>
^
compilation terminated.
make[1]: *** [arch/arm/mach-msm/smd_init_dt.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
make: *** Waiting for unfinished jobs....
No mods or tweaks has been added, just compiling with A7 optimized (linaro) toolchain on Ubuntu 13.10. I'm pretty sure I have installed all the necessary files and set-up the build environment. I'm new to this so could a dev help me?
bu,p
Same for me, where is the problem? can anyone help?
here is my output:
Code:
arch/arm/mach-msm/smd_init_dt.c:24:25: error: smd_private.h: No such file or directory
arch/arm/mach-msm/smd_init_dt.c: In function 'msm_smsm_probe':
arch/arm/mach-msm/smd_init_dt.c:66: error: 'disable_smsm_reset_handshake' undeclared (first use in this function)
arch/arm/mach-msm/smd_init_dt.c:66: error: (Each undeclared identifier is reported only once
arch/arm/mach-msm/smd_init_dt.c:66: error: for each function it appears in.)
arch/arm/mach-msm/smd_init_dt.c:88: error: 'msm_smd_debug_mask' undeclared (first use in this function)
arch/arm/mach-msm/smd_init_dt.c:88: error: 'MSM_SMSM_DEBUG' undeclared (first use in this function)
arch/arm/mach-msm/smd_init_dt.c:88: error: 'smd_log_ctx' undeclared (first use in this function)
arch/arm/mach-msm/smd_init_dt.c:114: error: implicit declaration of function 'smd_get_intr_config'
arch/arm/mach-msm/smd_init_dt.c:114: warning: assignment makes pointer from integer without a cast
error, forbidden warning: smd_init_dt.c:114
make[1]: *** [arch/arm/mach-msm/smd_init_dt.o] Errore 1
make: *** [arch/arm/mach-msm] Errore 2
make: *** Attesa per i processi non terminati....
CC arch/arm/kernel/pmu.o
LD arch/arm/perfmon/built-in.o
CC arch/arm/kernel/perf_event.o
arch/arm/kernel/bootinfo.c: In function 'bootinfo_bck_buf_check':
arch/arm/kernel/bootinfo.c:277: warning: integer constant is too large for 'long' type
error, forbidden warning: bootinfo.c:277
EDIT: I solved the smd_privae.h not found simply by copying it from mach-msm into mach-msm/include/mach and replacing
Code:
#include <smd_private.h>
with
Code:
#include <mach/smd_private.h>
But i still have this problem: in bootinfo.c the value BOOTINFO_BCK_MAGIC (defined as #define BOOTINFO_BCK_MAGIC 0x626f6f74696e666f) is an integer costant which is too large for 'long' type (at line 277 in the expression if (bck->magic != BOOTINFO_BCK_MAGIC))
Any help?
EDIT2: solved it thanks to google and stackoverflow, just replace 0x626F6F74696E666F with 0x626F6F74696E666FULL (where ULL = Unsigned Long Long, not sure about the meaning, still a complete noob at C++ (not even sure it is C++) :silly:

[Q] Kernel compilation weird errors

I've been trying for two days now to compile AGNi Kernel with Kexec-hardboot enabled under menuconfig>boot options and every damn time i get this error. If @psndna88 could help me it'd be nice.
here is the terminal
Code:
[email protected]:~/android/kernel$ make -j2 ARCH=arm
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
HOSTCC scripts/genksyms/genksyms.o
Generating include/generated/mach-types.h
CC kernel/bounds.s
GEN include/generated/bounds.h
CC arch/arm/kernel/asm-offsets.s
GEN include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
SHIPPED scripts/genksyms/lex.c
SHIPPED scripts/genksyms/parse.h
CC scripts/mod/empty.o
SHIPPED scripts/genksyms/keywords.c
SHIPPED scripts/genksyms/parse.c
HOSTCC scripts/genksyms/lex.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/genksyms/parse.o
HOSTCC scripts/mod/modpost.o
HOSTLD scripts/genksyms/genksyms
HOSTCC scripts/selinux/genheaders/genheaders
HOSTCC scripts/selinux/mdp/mdp
HOSTCC scripts/kallsyms
HOSTCC scripts/conmakehash
HOSTCC scripts/mod/sumversion.o
HOSTCC scripts/bin2c
HOSTLD scripts/mod/modpost
CC init/main.o
HOSTCC usr/gen_init_cpio
GEN usr/initramfs_data.cpio
AS usr/initramfs_data.o
LD usr/built-in.o
CC arch/arm/vfp/vfpmodule.o
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/do_mounts.o
AS arch/arm/vfp/entry.o
AS arch/arm/vfp/vfphw.o
CC arch/arm/vfp/vfpsingle.o
CC init/do_mounts_rd.o
CC arch/arm/vfp/vfpdouble.o
CC init/do_mounts_initrd.o
LD arch/arm/vfp/vfp.o
LD arch/arm/vfp/built-in.o
CC init/initramfs.o
LD arch/arm/mvp/commkm/built-in.o
CC [M] arch/arm/mvp/commkm/check_kconfig.o
CC [M] arch/arm/mvp/commkm/comm_ev_kernel.o
CC [M] arch/arm/mvp/commkm/comm.o
CC init/calibrate.o
CC init/version.o
/tmp/ccdjofq2.s: Assembler messages:
/tmp/ccdjofq2.s:194: Error: garbage following instruction -- `dmb ish'
/tmp/ccdjofq2.s:208: Error: garbage following instruction -- `dmb ish'
/tmp/ccdjofq2.s:2328: Error: garbage following instruction -- `dmb ish'
/tmp/ccdjofq2.s:2342: Error: garbage following instruction -- `dmb ish'
/tmp/ccdjofq2.s:2366: Error: garbage following instruction -- `dmb ish'
/tmp/ccdjofq2.s:2380: Error: garbage following instruction -- `dmb ish'
/tmp/ccdjofq2.s:2443: Error: garbage following instruction -- `dmb ish'
/tmp/ccdjofq2.s:2457: Error: garbage following instruction -- `dmb ish'
/tmp/ccdjofq2.s:2624: Error: garbage following instruction -- `dmb ish'
/tmp/ccdjofq2.s:2638: Error: garbage following instruction -- `dmb ish'
/tmp/ccdjofq2.s:2778: Error: garbage following instruction -- `dmb ish'
/tmp/ccdjofq2.s:2792: Error: garbage following instruction -- `dmb ish'
/tmp/ccdjofq2.s:2808: Error: garbage following instruction -- `dmb ish'
/tmp/ccdjofq2.s:2822: Error: garbage following instruction -- `dmb ish'
scripts/Makefile.build:305: recipe for target 'arch/arm/mvp/commkm/comm.o' failed
make[2]: *** [arch/arm/mvp/commkm/comm.o] Error 1
scripts/Makefile.build:441: recipe for target 'arch/arm/mvp/commkm' failed
make[1]: *** [arch/arm/mvp/commkm] Error 2
Makefile:955: recipe for target 'arch/arm/mvp' failed
make: *** [arch/arm/mvp] Error 2
make: *** Waiting for unfinished jobs....
LD init/mounts.o
LD init/built-in.o
[email protected]:~/android/kernel$
I am trying to compile this kernel because this thread.
Solved that one, but now one annoying one pops up
/home/lanimereala/android/omni/kernel/samsung/i9305/arm-cortex_a9-linux-gnueabihf-linaro_4.9.4/bin/arm-eabi-nm: 'arch/arm/boot/compressed/vmlinux': No such file
OBJCOPY arch/arm/boot/zImage
/home/lanimereala/android/omni/kernel/samsung/i9305/arm-cortex_a9-linux-gnueabihf-linaro_4.9.4/bin/arm-eabi-objcopy: 'arch/arm/boot/compressed/vmlinux': No such file
/home/lanimereala/android/omni/kernel/samsung/i9305/arch/arm/boot/Makefile:58: recipe for target 'arch/arm/boot/zImage' failed
make[1]: *** [arch/arm/boot/zImage] Error 1
/home/lanimereala/android/omni/kernel/samsung/i9305/arch/arm/Makefile:283: recipe for target 'zImage' failed
make: *** [zImage] Error 2
Solved that one, but now one annoying one pops up
/home/lanimereala/android/omni/kernel/samsung/i9305/arm-cortex_a9-linux-gnueabihf-linaro_4.9.4/bin/arm-eabi-nm: 'arch/arm/boot/compressed/vmlinux': No such file
OBJCOPY arch/arm/boot/zImage
/home/lanimereala/android/omni/kernel/samsung/i9305/arm-cortex_a9-linux-gnueabihf-linaro_4.9.4/bin/arm-eabi-objcopy: 'arch/arm/boot/compressed/vmlinux': No such file
/home/lanimereala/android/omni/kernel/samsung/i9305/arch/arm/boot/Makefile:58: recipe for target 'arch/arm/boot/zImage' failed
make[1]: *** [arch/arm/boot/zImage] Error 1
/home/lanimereala/android/omni/kernel/samsung/i9305/arch/arm/Makefile:283: recipe for target 'zImage' failed
make: *** [zImage] Error 2

Getting irq/irqdesc.o error while kernel compilation

I am trying to compile kernel for Realme 3 (new device) , but I am getting irq/irqdesc.o error, Maybe it's because the source are not complete.
Here is the link to kernel sources: https://github.com/realme-kernel-opensource/Realme3-kernel-source
Any help will be much appreciated
Code:
LD kernel/events/built-in.o
CC kernel/irq/irqdesc.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md
In file included from include/linux/kernel.h:13:0,
from include/linux/list.h:8,
from include/linux/smp.h:11,
from include/linux/irq.h:12,
from kernel/irq/irqdesc.c:10:
kernel/irq/irqdesc.c: In function '__handle_domain_irq':
kernel/irq/irqdesc.c:421:11: error: 'desc' undeclared (first use in this function)
irq, (desc && desc->action && desc->action->name) ?
^
include/linux/printk.h:428:51: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG KLOG_MODNAME pr_fmt(fmt), ##VA_ARGS)
^
kernel/irq/irqdesc.c:421:11: note: each undeclared identifier is reported only once for each function it appears in
irq, (desc && desc->action && desc->action->name) ?
^
include/linux/printk.h:428:51: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG KLOG_MODNAME pr_fmt(fmt), ##VA_ARGS)
^
make[2]: *** [scripts/Makefile.build:278: kernel/irq/irqdesc.o] Error 1
make[1]: *** [scripts/Makefile.build:484: kernel/irq] Error 2
make: *** [Makefile:1054: kernel] Error 2
fawazahmed0 said:
I am trying to compile kernel for Realme 3 (new device) , but I am getting irq/irqdesc.o error, Maybe it's because the source are not complete.
Here is the link to kernel sources: https://github.com/realme-kernel-opensource/Realme3-kernel-source
Any help will be much appreciated
Code:
LD kernel/events/built-in.o
CC kernel/irq/irqdesc.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md
In file included from include/linux/kernel.h:13:0,
from include/linux/list.h:8,
from include/linux/smp.h:11,
from include/linux/irq.h:12,
from kernel/irq/irqdesc.c:10:
kernel/irq/irqdesc.c: In function '__handle_domain_irq':
kernel/irq/irqdesc.c:421:11: error: 'desc' undeclared (first use in this function)
irq, (desc && desc->action && desc->action->name) ?
^
include/linux/printk.h:428:51: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG KLOG_MODNAME pr_fmt(fmt), ##VA_ARGS)
^
kernel/irq/irqdesc.c:421:11: note: each undeclared identifier is reported only once for each function it appears in
irq, (desc && desc->action && desc->action->name) ?
^
include/linux/printk.h:428:51: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG KLOG_MODNAME pr_fmt(fmt), ##VA_ARGS)
^
make[2]: *** [scripts/Makefile.build:278: kernel/irq/irqdesc.o] Error 1
make[1]: *** [scripts/Makefile.build:484: kernel/irq] Error 2
make: *** [Makefile:1054: kernel] Error 2
Click to expand...
Click to collapse
Now works perfectly, followed this guide:
https://forum.xda-developers.com/an...erence-how-to-compile-android-kernel-t3627297

Categories

Resources