其他
ndk配置内核交叉编译环境(1)
nexus5 Android7.1.2
查看cpu信息、内核版本
goldfish的内核代码主分支
https://android.googlesource.com/kernel/goldfish
https://android.googlesource.com/kernel/msm.git
git clone https://android.googlesource.com/kernel/goldfish -b android-goldfish-3.4
git clone https://aosp.tuna.tsinghua.edu.cn/kernel/goldfish -b android-goldfish-3.4 android-goldfish-3.4
git clone https://aosp.tuna.tsinghua.edu.cn/kernel/goldfish -b android-goldfish-3.10 android-goldfish-3.10
ndk下载
https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip
编译3.4内核
git clone https://aosp.tuna.tsinghua.edu.cn/kernel/goldfish -b android-goldfish-3.4 android-goldfish-3.4
sudo vim ~/.bashrc
export ARCH=x86
export PATH=$PATH:~/gyp/android-ndk-r10e/toolchains/x86-4.9/prebuilt/linux-x86_64/bin
export CROSS_COMPILE=i686-linux-android-
export ARCH=arm
export PATH=$PATH:~/gyp/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin
export CROSS_COMPILE=arm-linux-androideabi-
export ARCH=arm64
export PATH=$PATH:~/gyp/android-ndk-r10e/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin
export CROSS_COMPILE=aarch64-linux-android-
source ~/.bashrc
make goldfish_defconfig
make -j4
编译3.10内核
git clone https://aosp.tuna.tsinghua.edu.cn/kernel/goldfish -b android-goldfish-3.10 android-goldfish-3.10
sudo vim ~/.bashrc
export ARCH=x86
export PATH=$PATH:~/gyp/android-ndk-r10e/toolchains/x86-4.9/prebuilt/linux-x86_64/bin
export CROSS_COMPILE=i686-linux-android-
export ARCH=arm
export PATH=$PATH:~/gyp/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin
export CROSS_COMPILE=arm-linux-androideabi-
export ARCH=arm64
export PATH=$PATH:~/gyp/android-ndk-r10e/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin
export CROSS_COMPILE=aarch64-linux-android-
source ~/.bashrc
make i386_qemu_defconfig
make -j4
编译nexus5 hammerhead内核
oneplus内核编译成功