forked from Sakurajima07/kernel_builder
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathenv
More file actions
executable file
·46 lines (34 loc) · 1.42 KB
/
Copy pathenv
File metadata and controls
executable file
·46 lines (34 loc) · 1.42 KB
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
#!/bin/bash
#
# config and common vars
export maindir="$(pwd)"
export outside="${maindir}/.."
#
export ARCH="arm64"
export SUBARCH="arm64"
export KBUILD_BUILD_USER="MrGadget84"
export KBUILD_BUILD_HOST="github"
export defconfig="a32_lineage_defconfig"
if [[ -z "$zipper_repo" ]]; then
export zipper_repo="https://github.com/MrGadget84/AnyKernel3_samsung"
fi
if [[ -z "$zipper_branch" ]]; then
export zipper_branch=a325f
fi
export out_image="${maindir}/out/arch/${ARCH}/boot/Image.gz"
export out_dtb="${maindir}/out/arch/${ARCH}/boot/dtb"
export out_dtbo="${maindir}/out/arch/${ARCH}/boot/dtbo.img"
export zipper="${outside}/zipper"
#
export defconfig_file="${maindir}/arch/${ARCH}/configs/${defconfig}"
if [ ! -f "${defconfig_file}" ]; then
if [ -f "${maindir}/arch/${ARCH}/configs/mt6768-unifiedk414_lineage_defconfig" ]; then
echo "New modular Kbuild detected! Adjusting vars for branch Infinity..."
cat "${maindir}/arch/${ARCH}/configs/mt6768-unifiedk414_lineage_defconfig" "${maindir}/arch/${ARCH}/configs/a32.config" > "${maindir}/arch/${ARCH}/configs/a32_lineage_defconfig"
fi
fi
export kernel_head="$(git log --pretty=format:'%h' -1)"
export kernel_name=$(cat "${defconfig_file}" | grep "CONFIG_LOCALVERSION=" | sed 's/CONFIG_LOCALVERSION="-*//g' | sed 's/"*//g' )
export kernel_ver="$(make kernelversion)"
export TIME=$(date +"%y%m%d-%H%M")
export zip_name="${maindir}/${kernel_name}${SUFFIX}-${TIME}-${kernel_head}.zip"