Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #https://usmile.at/blog/how-to-build-android-kernel
- #https://gist.github.com/tangabc/a7767b5b22d2b44062e1b9636ba9f711
- sudo apt install gcc-arm-linux-gnueabi build-essential git make libncurses5 libncurses5-dev python2 libssl-dev gcc-aarch64-linux-gnu bc
- #sudo dpkg --add-architecture i386
- #sudo apt install libc6:i386 libncurses5:i386 libstdc++6:i386 libz-dev:i386
- mkdir kernel
- cd kernel
- #get moto x4 kernel source
- wget "https://github.com/MotorolaMobilityLLC/kernel-msm/archive/MMI-PPVS29.266-45-6.tar.gz"
- tar xzvf MMI-PPVS29.266-45-6.tar.gz
- #get toolchain
- #git clone https://android.googlesource.com/platform/prebuilt
- git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8
- #set compile vars
- export ARCH=arm64
- export SUBARCH=arm64
- # export CROSS_COMPILE=<path to toolchain from googlesource>/toolchains/arm-eabi-4.4.3/bin/arm-eabi-
- #export CROSS_COMPILE=$PWD/prebuilt/linux-x86/toolchains/arm-eabi-4.4.3/bin/arm-eabi-
- #export CROSS_COMPILE=/usr/bin/aarch64-linux-gnu-
- export CROSS_COMPILE=/root/kernel/aarch64-linux-android-4.8/bin/aarch64-linux-android-
- cd kernel-msm-MMI-PPVS29.266-45-6
- make defconfig
- //optional for configuration of the kernel
- # make menuconfig
- make -j4 #number of cpu cores
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement