-
Notifications
You must be signed in to change notification settings - Fork 18
/
MMI-S3SQ32.16-16-28
115 lines (60 loc) · 15.1 KB
/
MMI-S3SQ32.16-16-28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
MMI-S3SQ32.16-16-28 For Moto Edge 30 Ultra
Kernel Modules:
---------------
top_dir=$PWD
mkdir -vp $top_dir/kernel
cd $top_dir/kernel
git clone https://android.googlesource.com/kernel/build
mkdir -vp $top_dir/prebuilts/clang/host/
cd $top_dir/prebuilts/clang/host/
git clone https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86
mkdir -vp $top_dir/prebuilts/gas/
cd $top_dir/prebuilts/gas/
git clone https://android.googlesource.com/platform/prebuilts/gas/linux-x86
cd $top_dir/prebuilts/
git clone https://android.googlesource.com/platform/prebuilts/build-tools
mkdir -vp $top_dir/prebuilts/gcc/linux-x86/host
cd $top_dir/prebuilts/gcc/linux-x86/host
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8
mkdir $top_dir/kernel_platform
cd $top_dir/kernel_platform
git clone https://android.googlesource.com/kernel/common
Download kernel source code. Rename kernel-msm folder to $top_dir/kernel_platform/msm-kernel
my_top_dir=$PWD/kernel_platform
export PATH="$my_top_dir/build/build-tools/path/linux-x86:$my_top_dir/prebuilts-master/clang/host/linux-x86/clang-r416183b/bin:$my_top_dir/prebuilts/gas/linux-x86:$my_top_dir/prebuilts/build-tools/linux-x86/bin/make:$my_top_dir/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/bin:$PATH"
export CLANG_TRIPLE= CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_COMPAT=arm-linux-gnueabi- CROSS_COMPILE_ARM32= ARCH=arm64 SUBARCH= MAKE_GOALS= KCPPFLAGS="-ffile-prefix-map=$my_top_dir/msm-kernel/= -ffile-prefix-map=$my_top_dir=" sysroot_flags="--sysroot=$my_top_dir/build/build-tools/sysroot" cflags="-I$my_top_dir/prebuilts/kernel-build-tools/linux-x86/include" ldflags="-Wl,-rpath,$my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -L $my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -fuse-ld=lld --rtlib=compiler-rt" HOSTCFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -I$my_top_dir/prebuilts/kernel-build-tools/linux-x86/include" HOSTLDFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -Wl,-rpath,$my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -L $my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -fuse-ld=lld --rtlib=compiler-rt"
mkdir -p $my_top_dir/out/msm-waipio-waipio-gki/kernel_uapi_headers/usr
mkdir -p $my_top_dir/out/msm-waipio-waipio-gki/msm-kernel $my_top_dir/out/msm-waipio-waipio-gki/dist
mkdir -p $my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/common $my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/dist
cd $my_top_dir/external/dtc
make all install CC=clang AR=llvm-ar LDFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -Wl,-rpath,$my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -L $my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -fuse-ld=lld --rtlib=compiler-rt -fuse-ld=lld --rtlib=compiler-rt" EXTRA_CFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -I$my_top_dir/prebuilts/kernel-build-tools/linux-x86/include" PKG_CONFIG=false NO_PYTHON=1 PREFIX=$my_top_dir/out/msm-waipio-waipio-gki/host
export DTC=$my_top_dir/out/msm-waipio-waipio-gki/host/bin/dtc
cd $my_top_dir/common
make -j48 CROSS_COMPILE=aarch64-linux-gnu- CLANG_TRIPLE=aarch64-linux-gnu- ARCH=arm64 HOSTCC=clang HOSTCXX=clang++ CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump READELF=llvm-readelf OBJSIZE=llvm-size STRIP=llvm-strip HOSTCFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -I$my_top_dir/prebuilts/kernel-build-tools/linux-x86/include" HOSTLDFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -Wl,-rpath,$my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -L $my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -fuse-ld=lld --rtlib=compiler-rt" LLVM=1 LLVM_IAS=1 DEPMOD=depmod DTC=$my_top_dir/out/msm-waipio-waipio-gki/host/bin/dtc O=$my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/common gki_defconfig
make -j48 CROSS_COMPILE=aarch64-linux-gnu- CLANG_TRIPLE=aarch64-linux-gnu- ARCH=arm64 HOSTCC=clang HOSTCXX=clang++ CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm HOSTAR=x86_64-linux-ar HOSTLD=x86_64-linux-ld HOSTCFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -I$my_top_dir/prebuilts/kernel-build-tools/linux-x86/include" HOSTLDFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -Wl,-rpath,$my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -L $my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -fuse-ld=lld --rtlib=compiler-rt" O=$my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/common LLVM=1 LLVM_IAS=1 DEPMOD=depmod DTC=$my_top_dir/out/msm-waipio-waipio-gki/host/bin/dtc olddefconfig
make -j48 CROSS_COMPILE=aarch64-linux-gnu- CLANG_TRIPLE=aarch64-linux-gnu- ARCH=arm64 HOSTCC=clang HOSTCXX=clang++ CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm HOSTAR=x86_64-linux-ar HOSTLD=x86_64-linux-ld HOSTCFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -I$my_top_dir/prebuilts/kernel-build-tools/linux-x86/include" HOSTLDFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -Wl,-rpath,$my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -L $my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -fuse-ld=lld --rtlib=compiler-rt" O=$my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/common LLVM=1 LLVM_IAS=1 DEPMOD=depmod DTC=$my_top_dir/out/msm-waipio-waipio-gki/host/bin/dtc
make -j48 CROSS_COMPILE=aarch64-linux-gnu- CLANG_TRIPLE=aarch64-linux-gnu- ARCH=arm64 HOSTCC=clang HOSTCXX=clang++ CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm HOSTAR=x86_64-linux-ar HOSTLD=x86_64-linux-ld HOSTCFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -I$my_top_dir/prebuilts/kernel-build-tools/linux-x86/include" HOSTLDFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -Wl,-rpath,$my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -L $my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -fuse-ld=lld --rtlib=compiler-rt" O=$my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/common LLVM=1 LLVM_IAS=1 DEPMOD=depmod DTC=$my_top_dir/out/msm-waipio-waipio-gki/host/bin/dtc INSTALL_MOD_PATH=$my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/staging modules_install
cp -p $my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/common/System.map $my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/dist/
cp -p $my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/common/arch/arm64/boot/Image $my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/dist/
cp -p $my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/common/arch/arm64/boot/Image.gz $my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/dist/
cp -p $my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/common/modules.builtin $my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/dist/
cp -p $my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/common/modules.builtin.modinfo $my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/dist/
cp -p $my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/common/vmlinux $my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/dist/
cp -p $my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/common/vmlinux.symvers $my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/dist/
cd $my_top_dir
KCONFIG_CONFIG=./msm-kernel/arch/arm64/configs/vendor/waipio-gki_defconfig ./msm-kernel/scripts/kconfig/merge_config.sh -m -r -y ./msm-kernel/arch/arm64/configs/gki_defconfig ./msm-kernel/arch/arm64/configs/vendor/waipio_GKI.config ./msm-kernel/arch/arm64/configs/vendor/ext_config/moto-waipio.config ./msm-kernel/arch/arm64/configs/vendor/ext_config/moto-waipio-eqs.config ./msm-kernel/arch/arm64/configs/vendor/ext_config/moto-waipio-gki.config
cd $my_top_dir/msm-kernel
make -j48 CROSS_COMPILE=aarch64-linux-gnu- CLANG_TRIPLE=aarch64-linux-gnu- ARCH=arm64 HOSTCC=clang HOSTCXX=clang++ CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm HOSTAR=x86_64-linux-ar HOSTLD=x86_64-linux-ld HOSTCFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -I$my_top_dir/prebuilts/kernel-build-tools/linux-x86/include" HOSTLDFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -Wl,-rpath,$my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -L $my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -fuse-ld=lld --rtlib=compiler-rt" LLVM=1 LLVM_IAS=1 DEPMOD=depmod DTC=$my_top_dir/out/msm-waipio-waipio-gki/host/bin/dtc O=$my_top_dir/out/msm-waipio-waipio-gki/msm-kernel KBUILD_MIXED_TREE=$my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/dist vendor/waipio-gki_defconfig
make -j48 CROSS_COMPILE=aarch64-linux-gnu- CLANG_TRIPLE=aarch64-linux-gnu- ARCH=arm64 HOSTCC=clang HOSTCXX=clang++ CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm HOSTAR=x86_64-linux-ar HOSTLD=x86_64-linux-ld HOSTCFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -I$my_top_dir/prebuilts/kernel-build-tools/linux-x86/include" HOSTLDFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -Wl,-rpath,$my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -L $my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -fuse-ld=lld --rtlib=compiler-rt" LLVM=1 LLVM_IAS=1 DEPMOD=depmod DTC=$my_top_dir/out/msm-waipio-waipio-gki/host/bin/dtc O=$my_top_dir/out/msm-waipio-waipio-gki/msm-kernel KBUILD_MIXED_TREE=$my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/dist
make -j48 CROSS_COMPILE=aarch64-linux-gnu- CLANG_TRIPLE=aarch64-linux-gnu- ARCH=arm64 HOSTCC=clang HOSTCXX=clang++ CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm HOSTAR=x86_64-linux-ar HOSTLD=x86_64-linux-ld HOSTCFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -I$my_top_dir/prebuilts/kernel-build-tools/linux-x86/include" HOSTLDFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -Wl,-rpath,$my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -L $my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -fuse-ld=lld --rtlib=compiler-rt" O=$my_top_dir/out/msm-waipio-waipio-gki/msm-kernel LLVM=1 LLVM_IAS=1 DEPMOD=depmod DTC=$my_top_dir/out/msm-waipio-waipio-gki/host/bin/dtc KBUILD_MIXED_TREE=$my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/dist modules dtbs
make -j48 CROSS_COMPILE=aarch64-linux-gnu- CLANG_TRIPLE=aarch64-linux-gnu- ARCH=arm64 HOSTCC=clang HOSTCXX=clang++ CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm HOSTAR=x86_64-linux-ar HOSTLD=x86_64-linux-ld HOSTCFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -I$my_top_dir/prebuilts/kernel-build-tools/linux-x86/include" HOSTLDFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -Wl,-rpath,$my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -L $my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -fuse-ld=lld --rtlib=compiler-rt" O=$my_top_dir/out/msm-waipio-waipio-gki/msm-kernel LLVM=1 LLVM_IAS=1 DEPMOD=depmod DTC=$my_top_dir/out/msm-waipio-waipio-gki/host/bin/dtc INSTALL_MOD_PATH=$my_top_dir/out/msm-waipio-waipio-gki/staging KBUILD_MIXED_TREE=$my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/dist modules_install
make -j48 -C $my_top_dir/out/msm-waipio-waipio-gki/msm-kernel CROSS_COMPILE=aarch64-linux-gnu- CLANG_TRIPLE=aarch64-linux-gnu- ARCH=arm64 HOSTCC=clang HOSTCXX=clang++ CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm HOSTAR=x86_64-linux-ar HOSTLD=x86_64-linux-ld HOSTCFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -I$my_top_dir/prebuilts/kernel-build-tools/linux-x86/include" HOSTLDFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -Wl,-rpath,$my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -L $my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -fuse-ld=lld --rtlib=compiler-rt" O=$my_top_dir/out/msm-waipio-waipio-gki/msm-kernel LLVM=1 LLVM_IAS=1 DEPMOD=depmod DTC=$my_top_dir/out/msm-waipio-waipio-gki/host/bin/dtc INSTALL_HDR_PATH=$my_top_dir/out/msm-waipio-waipio-gki/kernel_uapi_headers/usr KBUILD_MIXED_TREE=$my_top_dir/out/msm-waipio-waipio-gki/gki_kernel/dist headers_install
WLAN Driver:
---------------
cd $my_top_dir
echo '[ -z "${VARIANT}" ] && VARIANT=gki KERNEL_DIR=./msm-kernel . ./msm-kernel/build.config.msm.waipio' > build.config
WLAN_BLD_DIR=$my_top_dir/../vendor/qcom/opensource/wlan
WLAN_ROOT=$WLAN_BLD_DIR/qcacld-3.0
make -j48 -C ../vendor/qcom/opensource/wlan/qcacld-3.0/.qca6750 M=../../vendor/qcom/opensource/wlan/qcacld-3.0/.qca6750 KERNEL_SRC=$my_top_dir/./msm-kernel O=$my_top_dir/out/msm-waipio-waipio-gki/msm-kernel LLVM=1 LLVM_IAS=1 DEPMOD=depmod DTC=dtc WLAN_ROOT=vendor/qcom/opensource/wlan/qcacld-3.0/.qca6750 WLAN_COMMON_ROOT=cmn WLAN_COMMON_INC=vendor/qcom/opensource/wlan/qcacld-3.0/cmn WLAN_FW_API=vendor/qcom/opensource/wlan/fw-api WLAN_PROFILE=qca6750 DYNAMIC_SINGLE_CHIP= MODNAME=qca6750 DEVNAME=qca6750 BOARD_PLATFORM=taro CONFIG_QCA_CLD_WLAN=m WLAN_CTRL_NAME=wlan ANDROID_BUILD_TOP=$my_top_dir/../ KBUILD_MIXED_TREE=$my_top_dir/out/msm-waipio-waipio-gki/msm-kernel/ CROSS_COMPILE=aarch64-linux-gnu- CLANG_TRIPLE=aarch64-linux-gnu- ARCH=arm64 HOSTCC=clang HOSTCXX=clang++ CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm HOSTAR=x86_64-linux-ar HOSTLD=x86_64-linux-ld HOSTCFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -I$my_top_dir/prebuilts/kernel-build-tools/linux-x86/include" HOSTLDFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -Wl,-rpath,$my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -L $my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -fuse-ld=lld --rtlib=compiler-rt"
make -j48 -C ../vendor/qcom/opensource/wlan/qcacld-3.0/.qca6490 M=../../vendor/qcom/opensource/wlan/qcacld-3.0/.qca6490 KERNEL_SRC=$my_top_dir/./msm-kernel O=$my_top_dir/out/msm-waipio-waipio-gki/msm-kernel LLVM=1 LLVM_IAS=1 DEPMOD=depmod DTC=dtc WLAN_ROOT=vendor/qcom/opensource/wlan/qcacld-3.0/.qca6490 WLAN_COMMON_ROOT=cmn WLAN_COMMON_INC=vendor/qcom/opensource/wlan/qcacld-3.0/cmn WLAN_FW_API=vendor/qcom/opensource/wlan/fw-api WLAN_PROFILE=qca6490 DYNAMIC_SINGLE_CHIP= MODNAME=qca6490 DEVNAME=qca6490 BOARD_PLATFORM=taro CONFIG_QCA_CLD_WLAN=m WLAN_CTRL_NAME=wlan CONFIG_CNSS_QCA6490=y ANDROID_BUILD_TOP=$my_top_dir/../ KBUILD_MIXED_TREE=$my_top_dir/out/msm-waipio-waipio-gki/msm-kernel/ CROSS_COMPILE=aarch64-linux-gnu- CLANG_TRIPLE=aarch64-linux-gnu- ARCH=arm64 HOSTCC=clang HOSTCXX=clang++ CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm HOSTAR=x86_64-linux-ar HOSTLD=x86_64-linux-ld HOSTCFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -I$my_top_dir/prebuilts/kernel-build-tools/linux-x86/include" HOSTLDFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -Wl,-rpath,$my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -L $my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -fuse-ld=lld --rtlib=compiler-rt"
make -j48 -C ../vendor/qcom/opensource/wlan/qcacld-3.0/.kiwi M=../../vendor/qcom/opensource/wlan/qcacld-3.0/.kiwi KERNEL_SRC=$my_top_dir/./msm-kernel O=$my_top_dir/out/msm-waipio-waipio-gki/msm-kernel LLVM=1 LLVM_IAS=1 DEPMOD=depmod DTC=dtc WLAN_ROOT=vendor/qcom/opensource/wlan/qcacld-3.0/.kiwi WLAN_COMMON_ROOT=cmn WLAN_COMMON_INC=vendor/qcom/opensource/wlan/qcacld-3.0/cmn WLAN_FW_API=vendor/qcom/opensource/wlan/fw-api WLAN_PROFILE=kiwi DYNAMIC_SINGLE_CHIP= MODNAME=kiwi DEVNAME=kiwi BOARD_PLATFORM=taro CONFIG_QCA_CLD_WLAN=m WLAN_CTRL_NAME=wlan ANDROID_BUILD_TOP=$my_top_dir/../ KBUILD_MIXED_TREE=$my_top_dir/out/msm-waipio-waipio-gki/msm-kernel/ CROSS_COMPILE=aarch64-linux-gnu- CLANG_TRIPLE=aarch64-linux-gnu- ARCH=arm64 HOSTCC=clang HOSTCXX=clang++ CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm HOSTAR=x86_64-linux-ar HOSTLD=x86_64-linux-ld HOSTCFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -I$my_top_dir/prebuilts/kernel-build-tools/linux-x86/include" HOSTLDFLAGS="--sysroot=$my_top_dir/build/build-tools/sysroot -Wl,-rpath,$my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -L $my_top_dir/prebuilts/kernel-build-tools/linux-x86/lib64 -fuse-ld=lld --rtlib=compiler-rt"