ElementalX-N5 icon indicating copy to clipboard operation
ElementalX-N5 copied to clipboard

Can't build this kernel on Arch Linux

Open andrea993 opened this issue 9 years ago • 6 comments

I've downloaded this repository with git clone and next the prebuilt toolchain from https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6 Next I've added the ...arm-eabi-4.6/bin on PATH. Then I've tried to build the kernel:

export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
make hammerhead_defconfig

Up to here no error

make -j8

The output is here: http://pastebin.com/LVZ4huyB It seems to have ended without errors but there is not a zimage in arch/arm/boot/ where is the kernel?

[andrearch@archlinux ElementalX-N5]$ ls arch/arm/boot
bootp  compressed  dts  install.sh  Makefile

Thanks

Regards, Andrea993

andrea993 avatar Jan 21 '16 15:01 andrea993

Try arm-eabi-4.8. My bet is this kernel only builds with 4.8 or above. 4.6 was never used to build a kernel on hammerhead. Google started with 4.7 back in KitKat days for this device. 4.6 hasn't been used since Android Jellybean.

Cl3Kener avatar Jan 21 '16 15:01 Cl3Kener

I've tried with 4.8, it does the same. But how can I detect where the compiled kernel files was sotored?

andrea993 avatar Jan 21 '16 15:01 andrea993

Location of compiled kernel is arch/arm/boot/zImage-dtb all intermediates to that are stored as *.o files.

BTW, you are using the incorrect defconfig. The defconfig name is elementalx_defconfig not hammerhead_defconfig. If it doesn't build correctly with 4.8 you'll have to try the aosp arm-linux-androideabi-4.9 since there is no arm-eabi-4.9 or you could try a custom 4.9 toolchain like https://bitbucket.org/UBERTC/arm-eabi-4.9 for example.

Also you'll probably need https://github.com/UBERMALLOW/kernel_lge_hammerhead/commit/337c6f28ce9a677260c690509fa23c89f610b108 to overcome your perl error which seems to be part of your compile issue as well.

Cl3Kener avatar Jan 21 '16 17:01 Cl3Kener

Editing the perl script it works. Can someone correct the code? Thanks

andrea993 avatar Jan 21 '16 18:01 andrea993

@andrea993 If I were you I'd pull request the change that way it would take @flar2 only a second to merge. Otherwise it will take him more time and he'll be less likely to do it. Just my thoughts on the matter.

Cl3Kener avatar Jan 21 '16 18:01 Cl3Kener

Ok I will do the request. You are right!

andrea993 avatar Jan 22 '16 00:01 andrea993