• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[Guide]Building 64 Bit Kernel/64 Bit devices

Search This thread

HridayHS

Senior Member
Jun 14, 2014
501
983
Delhi
Hi Guys I am going to tell you how to compile/build kernel for 64 bit devices.
New devices are coming with 64 bit architecture and there is no guide for compiling 64 bit Kernel.
So let's start

Part 1

System Requirements
Code:
[CENTER]
* Ubuntu
* Internet Connections
* At least 2GB Ram
[/CENTER]

Install Packages
Code:
* sudo apt-get update
* sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 libqt3-headers libqt3-mt-dev wget libncurses5 git-core nautilus-open-terminal
Restart your pc.

Downloads Kernel Source Code (64 bit)
From github you can downloads by ZIP that can compress kernel source in zip and save data and lot's of time.
YTHlBsJ.png

or
You can clone by GIT.
Code:
git clone <clone url>
[HIDE][IMG]http://i.imgur.com/T6hICCS.png[/IMG][/HIDE]

Download Toolchain
Uber Toolchain - https://bitbucket.org/UBERTC/aarch64-linux-android-4.9-kernel/downloads
Sabermod Toolchain - http://sabermod.com/Toolchains%20%28DEV%20ONLY%29/aarch64/aarch64-kernel/

Part 2

Setup the things
Code:
* sudo gedit .bashrc
Now edit the Toolchain Path
#Android Toolchain PATH
export ARCH=arm64
export CCOMPILE=$CROSS_COMPILE
export CROSS_COMPILE=
export PATH=$PATH:

Rename The Kernel Folder name to kernel that you have at HOME .

Part 3
Building/Compiling The 64 Bit Kernel

* Go to kernel/arch/arm64/configs and find and copy the name of the defconfig of you 64 bit device.
* Open a terminal
Code:
* cd kernel
* make ARCH=arm64 device_defconfig
This will create .config at kernel folder.

Code:
* make menuconfig
This command will show graphic interface of features that you can enable or disable.

Code:
make -j#
Replace the # with your CPU cores and now this will create Image at kernel/arch/arm64/boot

Rename Image to zImage.
Kernel is compiled now you can enjoy.
 

ManthanRB

Senior Member
Mar 23, 2012
912
101
London
Moto X Play.

Could you tell if this same method would work for the following processor:

Chipset: Qualcomm MSM8939 Snapdragon 615
CPU: Octa-core (4x1.7 GHz Cortex-A53 & 4x1.0 GHz Cortex-A53)
GPU: Adreno 405

Do let me know.
Please & Thank you!
 
Last edited:

sumit17

Member
May 18, 2015
48
12
i am facing this error and can not resolve the problem.



property '#gpio-cells' in node /soc/msm_cdc_pinctrl_us_euro_sw or bad phandle (referred from /soc/sound:qcom,cdc-us-eu-gpios[0])
arch/arm64/boot/dts/qcom/msm8953-pmi8937.dtb: Warning (gpios_property): Missing property '#gpio-cells' in node /soc/cdc_comp_pinctrl or bad phandle (referred from /soc/sound:qcom,cdc-comp-gpios[0])
arch/arm64/boot/dts/qcom/msm8953-pmi8937.dtb: Warning (gpios_property): Missing property '#gpio-cells' in node /soc/msm_cdc_pinctrl_pri or bad phandle (referred from /soc/sound:qcom,pri-mi2s-gpios[0])
arch/arm64/boot/dts/qcom/msm8953-pmi8937.dtb: Warning (gpios_property): Missing property '#gpio-cells' in node /soc/msm_cdc_pinctrl_quin or bad phandle (referred from /soc/sound:qcom,quin-mi2s-gpios[0])
arch/arm64/boot/dts/qcom/msm8953-pmi8937.dtb: Warning (gpios_property): Missing property '#gpio-cells' in node /soc/msm_cdc_pinctrl_us_euro_sw or bad phandle (referred from /soc/sound-9335:qcom,cdc-us-eu-gpios[0])
arch/arm64/boot/dts/qcom/msm8953-pmi8937.dtb: Warning (gpios_property): Missing property '#gpio-cells' in node /soc/msm_cdc_pinctrl_quin or bad phandle (referred from /soc/sound-9335:qcom,quin-mi2s-gpios[0])
arch/arm64/boot/dts/qcom/msm8953-pmi8937.dtb: Warning (interrupts_property): interrupts size is (12), expected multiple of 8 in /soc/[email protected]
CC lib/mpi/generic_mpih-lshift.o
DTC arch/arm64/boot/dts/qcom/msm8953-ext-codec-rcm-overlay.dtbo
Error: ../arch/arm64/boot/dts/qcom/msm8953-audio-cdp.dtsi:14.1-11 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.dtbo:24: recipe for target 'arch/arm64/boot/dts/qcom/msm8953-ext-codec-rcm-overlay.dtbo' failed
make[3]: *** [arch/arm64/boot/dts/qcom/msm8953-ext-codec-rcm-overlay.dtbo] Error 1
../scripts/Makefile.build:653: recipe for target 'arch/arm64/boot/dts/qcom' failed
make[2]: *** [arch/arm64/boot/dts/qcom] Error 2
arch/arm64/Makefile:194: recipe for target 'dtbs' failed
make[1]: *** [dtbs] Error 2
make[1]: *** Waiting for unfinished jobs..
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Hi Guys I am going to tell you how to compile/build kernel for 64 bit devices.
    New devices are coming with 64 bit architecture and there is no guide for compiling 64 bit Kernel.
    So let's start

    Part 1

    System Requirements
    Code:
    [CENTER]
    * Ubuntu
    * Internet Connections
    * At least 2GB Ram
    [/CENTER]

    Install Packages
    Code:
    * sudo apt-get update
    * sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 libqt3-headers libqt3-mt-dev wget libncurses5 git-core nautilus-open-terminal
    Restart your pc.

    Downloads Kernel Source Code (64 bit)
    From github you can downloads by ZIP that can compress kernel source in zip and save data and lot's of time.
    YTHlBsJ.png

    or
    You can clone by GIT.
    Code:
    git clone <clone url>
    [HIDE][IMG]http://i.imgur.com/T6hICCS.png[/IMG][/HIDE]

    Download Toolchain
    Uber Toolchain - https://bitbucket.org/UBERTC/aarch64-linux-android-4.9-kernel/downloads
    Sabermod Toolchain - http://sabermod.com/Toolchains%20%28DEV%20ONLY%29/aarch64/aarch64-kernel/

    Part 2

    Setup the things
    Code:
    * sudo gedit .bashrc
    Now edit the Toolchain Path
    #Android Toolchain PATH
    export ARCH=arm64
    export CCOMPILE=$CROSS_COMPILE
    export CROSS_COMPILE=
    export PATH=$PATH:

    Rename The Kernel Folder name to kernel that you have at HOME .

    Part 3
    Building/Compiling The 64 Bit Kernel

    * Go to kernel/arch/arm64/configs and find and copy the name of the defconfig of you 64 bit device.
    * Open a terminal
    Code:
    * cd kernel
    * make ARCH=arm64 device_defconfig
    This will create .config at kernel folder.

    Code:
    * make menuconfig
    This command will show graphic interface of features that you can enable or disable.

    Code:
    make -j#
    Replace the # with your CPU cores and now this will create Image at kernel/arch/arm64/boot

    Rename Image to zImage.
    Kernel is compiled now you can enjoy.
    1
    Works on MTK devices?

    No only for snapdragon.
    1
    Could you tell if this same method would work for the following processor:

    Chipset: Qualcomm MSM8939 Snapdragon 615
    CPU: Octa-core (4x1.7 GHz Cortex-A53 & 4x1.0 GHz Cortex-A53)
    GPU: Adreno 405

    Do let me know.
    Please & Thank you!

    It should work .

    Sent from my OnePlus3 using XDA Labs