Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix kernel building instructions #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions MMI-QSAS30.62-24-3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ mkdir -vp $my_top_dir/prebuilts/clang/host

cd $my_top_dir/prebuilts/clang/host

git clone https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86
git clone https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86 -b android10-release --depth=1

mkdir -vp $my_top_dir/prebuilts/gcc/linux-x86/aarch64

cd $my_top_dir/prebuilts/gcc/linux-x86/aarch64

git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 -b android10-release --depth=1

Download kernel source code. Rename kernel-* folder to $my_top_dir/kernel

Expand All @@ -27,22 +27,22 @@ kernel_obj_out_path=$my_top_dir/out/target/product/generic/obj/KERNEL_OBJ

kernel_out_path_generic=$my_top_dir/out/target/product/generic

clang=$my_top_dir/prebuilts/clang/host/linux-x86/clang-4691093/bin/clang
clang=$my_top_dir/prebuilts/clang/host/linux-x86/clang-r353983c/bin/clang

llvm_ar=$my_top_dir/prebuilts/clang/host/linux-x86/clang-4691093/bin/llvm-ar
llvm_ar=$my_top_dir/prebuilts/clang/host/linux-x86/clang-r353983c/bin/llvm-ar

llvm_dis=$my_top_dir/prebuilts/clang/host/linux-x86/clang-4691093/bin/llvm-dis
llvm_dis=$my_top_dir/prebuilts/clang/host/linux-x86/clang-r353983c/bin/llvm-dis

lto_llvm=$my_top_dir/prebuilts/clang/host/linux-x86/clang-4691093/lib64/
lto_llvm=$my_top_dir/prebuilts/clang/host/linux-x86/clang-r353983c/lib64/

cross=$my_top_dir/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-

cat kernel/exynos9610/arch/arm64/configs/erd9610_Q_defconfig kernel/exynos9610/arch/arm64/configs/exynos9610_user.cfg kernel/exynos9610/arch/arm64/configs/ext_config/moto-erd9610.config kernel/exynos9610/arch/arm64/configs/ext_config/moto-erd9610-kane.config > $kernel_out_dir/mapphone_defconfig

cp $kernel_out_dir/mapphone_defconfig $kernel_out_dir/.config

make -j8 -C kernel/exynos9610 O=$kernel_out_dir ARCH=arm64 CROSS_COMPILE=$cross defoldconfig
make -j8 -C kernel O=$kernel_out_dir ARCH=arm64 CROSS_COMPILE=$cross defoldconfig

make -j8 -C kernel/exynos9610 O=$kernel_out_dir ARCH=arm64 CROSS_COMPILE=$cross CLANG_TRIPLE=aarch64-linux-gnu- CC=$clang LLVM_AR=$llvm_ar LLVM_DIS=$llvm_dis LTO_LLVM_LIB_BASE=$lto_llvm -j8
make -j8 -C kernel O=$kernel_out_dir ARCH=arm64 CROSS_COMPILE=$cross CLANG_TRIPLE=aarch64-linux-gnu- CC=$clang LLVM_AR=$llvm_ar LLVM_DIS=$llvm_dis LTO_LLVM_LIB_BASE=$lto_llvm -j8

make -j8 -C kernel/exynos9610 ARCH=arm64 CROSS_COMPILE=$cross distclean
make -j8 -C kernel ARCH=arm64 CROSS_COMPILE=$cross distclean