Skip to content

Commit b84aab9

Browse files
committed
couple of fixes to enable -m mirror support, this option
builds a blend of the hikey kernel support with the latest android common so typically building a version or two newer of LTS.
1 parent 8aac728 commit b84aab9

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

hikey-kernel-builder.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,26 +53,26 @@ if [ "$VERSION" = "4.9" ]; then
5353
export KERNEL_BRANCH=android-hikey-linaro-4.9
5454
export ANDROID_KERNEL_CONFIG_DIR="android-4.9"
5555
if [ "$mirrorbuild" == "1" ]; then
56-
export KERNEL_BRANCH=mirror-android-4.9
56+
export UPSTREAM_KERNEL_BRANCH=mirror-android-4.9
5757
fi
5858
elif [ "$VERSION" = "4.14" ]; then
5959
export KERNEL_BRANCH=android-hikey-linaro-4.14
6060
export ANDROID_KERNEL_CONFIG_DIR="android-4.14"
6161
if [ "$mirrorbuild" == "1" ]; then
62-
export KERNEL_BRANCH=mirror-android-4.14
62+
export UPSTREAM_KERNEL_BRANCH=mirror-android-4.14
6363
fi
6464
elif [ "$VERSION" = "4.19" ]; then
6565
export KERNEL_BRANCH=android-hikey-linaro-4.19
6666
export ANDROID_KERNEL_CONFIG_DIR="android-4.19"
6767
export TOOLCHAIN="clang-r346389b"
6868
if [ "$mirrorbuild" == "1" ]; then
69-
export KERNEL_BRANCH=mirror-android-4.19
69+
export UPSTREAM_KERNEL_BRANCH=mirror-android-4.19
7070
fi
7171
elif [ "$VERSION" = "4.4" ]; then
7272
export KERNEL_BRANCH=android-hikey-linaro-4.4
7373
export ANDROID_KERNEL_CONFIG_DIR="android-4.4"
7474
if [ "$mirrorbuild" == "1" ]; then
75-
export KERNEL_BRANCH=mirror-android-4.4
75+
export UPSTREAM_KERNEL_BRANCH=mirror-android-4.4
7676
fi
7777
fi
7878

@@ -107,10 +107,6 @@ if [ "$skipdownloads" != "1" ]; then
107107
cd ..
108108
fi
109109

110-
if echo "${JOB_NAME}" | grep premerge; then
111-
git merge --no-edit remotes/origin/${UPSTREAM_KERNEL_BRANCH}
112-
fi
113-
114110
if [ "$skipdownloads" = "1" ]; then
115111
cd configs
116112
git pull
@@ -147,6 +143,9 @@ fi
147143

148144
if [ "$skipdownloads" = "1" ]; then
149145
cd "$KERNEL_DIR"
146+
if [ "$mirrorbuild" == "1" ]; then
147+
git merge --no-edit remotes/origin/${UPSTREAM_KERNEL_BRANCH}
148+
fi
150149
make mrproper
151150
git checkout master
152151
git clean -fd
@@ -166,6 +165,9 @@ else
166165
git clone https://android.googlesource.com/kernel/hikey-linaro
167166
cd "$KERNEL_DIR"
168167
git checkout -b "$KERNEL_BRANCH" origin/"$KERNEL_BRANCH"
168+
if [ "$mirrorbuild" == "1" ]; then
169+
git merge --no-edit remotes/origin/${UPSTREAM_KERNEL_BRANCH}
170+
fi
169171
if [ "$VERSION" = "4.9" ]; then
170172
if [ "$ANDROID_VERSION" = "O-MR1" ]; then
171173
git revert --no-edit bbab5cb8a5bd598af247d9eaf5a3033e7d12104e

0 commit comments

Comments
 (0)