-
Notifications
You must be signed in to change notification settings - Fork 2
/
create_kernel.sh
executable file
·41 lines (32 loc) · 1.11 KB
/
create_kernel.sh
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
#!/bin/bash
function usage() {
echo "Usage : create_kernel [option]";
echo " -b --branch Branch of imx linux kernel.";
echo " -j --job [N] Local mount point.";
echo " -h --help Print this message.";
exit 0;
}
branch="mx_4.9.123_imx8mm_ga"
job="16"
while [ "$1" != "" ]; do
case "$1" in
-b | --branch ) branch="$2"; shift;;
-j | --job ) job="$2"; shift;;
-h | --help ) usage exit;; # quit and show usage
* ) args+=("$1") # if no match, add it to the positional args
esac
shift # move to next kv pair
done
echo "Clone linux kernel source code..."
git clone https://source.codeaurora.org/external/imx/linux-imx
mv linux-imx linux
cd ./linux
git checkout $branch
echo "Now in branch $branch"
export KERNEL_SRC=$PWD
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
make distclean
make defconfig
make -j 16 dtbs modules Image
make INSTALL_MOD_PATH=./modules modules_install