Skip to content

Commit 089944c

Browse files
committed
Add support for 4.19 and HiKey
1 parent 89e744c commit 089944c

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

hikey-kernel-builder.sh

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33

44
usage()
55
{
6-
echo "usage: -i [-s] -v=[4.4|4.9|4.14]"
7-
echo "-i = interactive mode"
6+
echo "usage: [-s] -v=[4.4|4.9|4.14] -a={AOSP|P|O-MR1} -t=clang-4679922"
87
echo "-s = skip download"
98
echo "-v = kernel version"
9+
echo "-a = android version"
10+
echo "-t = toolchain to use from prebuilts"
1011
}
1112

1213

@@ -54,6 +55,7 @@ elif [ "$VERSION" = "4.14" ]; then
5455
elif [ "$VERSION" = "4.19" ]; then
5556
export KERNEL_BRANCH=android-hikey-linaro-4.19
5657
export ANDROID_KERNEL_CONFIG_DIR="android-4.19"
58+
export TOOLCHAIN="clang-r346389"
5759
elif [ "$VERSION" = "4.4" ]; then
5860
export KERNEL_BRANCH=android-hikey-linaro-4.4
5961
export ANDROID_KERNEL_CONFIG_DIR="android-4.4"
@@ -130,6 +132,14 @@ if [ "$skipdownloads" = "1" ]; then
130132
git checkout "$KERNEL_BRANCH"
131133
git pull
132134

135+
else
136+
137+
if [ "$VERSION" = "4.19" ]; then
138+
git clone https://git.linaro.org/people/john.stultz/android-dev.git
139+
mv android-dev hikey-linaro
140+
cd "$KERNEL_DIR"
141+
git checkout -b experimental/android-hikey-linaro-4.19 origin/experimental/android-hikey-linaro-4.19
142+
133143
else
134144
git clone https://android.googlesource.com/kernel/hikey-linaro
135145
cd "$KERNEL_DIR"
@@ -145,6 +155,8 @@ else
145155
git revert --no-edit d0455063e17c07841eb40b8e755f4c9241506de5
146156
fi
147157
fi
158+
159+
fi
148160
fi
149161
cd ..
150162

@@ -170,7 +182,15 @@ else
170182
fi
171183

172184
cp .config ../defconfig
185+
186+
if [ "$VERSION" = "4.19" ]; then
187+
make ARCH=arm64 CC=clang HOSTCC=clang -j$(nproc) Image
188+
make ARCH=arm64 CC=clang HOSTCC=clang -j$(nproc) dtbs
189+
cat arch/arm64/boot/Image arch/arm64/boot/dts/hisilicon/hi6220-hikey.dtb > arch/arm64/boot/Image-dtb
190+
191+
else
173192
make ARCH=arm64 CC=clang HOSTCC=clang -j$(nproc) Image-dtb
193+
fi
174194

175195
cd ..
176196
if [ "$skipdownloads" != "1" ]; then

0 commit comments

Comments
 (0)