Saturday, April 23, 2016

[HELP] Can't compile Android Kernel (Fedora)

The README says:

Quote:

HOW TO BUILD KERNEL FOR SM-G900F_SWA_MM_DD

1. How to Build
- get Toolchain
From android git server , codesourcery and etc ..
- arm-linux-androideabi-4.9

- edit Makefile
edit "CROSS_COMPILE" to right toolchain path(You downloaded).
EX) export CROSS_COMPILE= $(android platform directory you download)/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-
Ex) export CROSS_COMPILE=/usr/local/toolchain/arm-eabi-4.9/bin/arm-eabi- // check the location of toolchain
$ export CROSS_COMPILE=(compiler path)
$ export ARCH=arm
$ mkdir output
$ make -C $(pwd) O=output msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974pro_sec_klte_eur_defconfi g SELINUX_DEFCONFIG=selinux_defconfig
$ make -C $(pwd) O=output
$ cp output/arch/arm/boot/zImage arch/arm/boot/zImage

2. Output filesS
- Kernel : output/arch/arm/boot/zImage
- module : output/drivers/*/*.ko

3. How to Clean
$ cd output
$ make clean

4. How to make .tar binary for downloading into target.
- change current directory to Kernel/arch/arm/boot
- type following command
$ tar cvf SM-G900F_SWA_MM_DD.tar zImage

Upon trying I got:

Quote:

Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /home/user/Kernel/kernel/timeconst.pl line 373.
/home/user/Kernel/kernel/Makefile:129: recipe for target 'kernel/timeconst.h' failed
make[2]: *** [kernel/timeconst.h] Error 255
/home/user/Kernel/Makefile:959: recipe for target 'kernel' failed
make[1]: *** [kernel] Error 2
Makefile:130: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
make: Leaving directory '/home/user/Kernel'


via xda-developers http://ift.tt/1YMoR6W

IFTTT

Put the internet to work for you.

Turn off or edit this Recipe

No comments:

Post a Comment