forked from samveen/mt7902-dkms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
31 lines (25 loc) · 764 Bytes
/
build.sh
File metadata and controls
31 lines (25 loc) · 764 Bytes
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
#!/bin/bash -x
echo -n "Build env: "; uname -a
echo "===params==="; echo "'" "$@" "'" ; echo "==========="
echo "===OSInfo==="; cat /etc/os-release ; echo "============"
echo "===ENV==="; env ; echo "========="
# Get and parse options
OPTIONS=$(getopt -o k: --long kver: -n "$0" -- "$@")
# Note the quotes around `$OPTIONS': they are essential!
eval set -- "$OPTIONS"
while true ; do
case "$1" in
-k|--kver) kernelver=$2 ; shift 2 ;;
--) shift ; break ;;
*) echo "Internal error!" ; exit 1 ;;
esac
done
if [[ -z ${kernelver} ]]; then
kernelver=$(uname -r)
echo "No kernel version. Using current ver by default($kernelver)"
else
echo "Building for kernel version '$kernelver'"
fi
export kernelver
# build
make -C mt76/mt7902 V=1 VERBOSE=1