File tree Expand file tree Collapse file tree 2 files changed +21
-11
lines changed Expand file tree Collapse file tree 2 files changed +21
-11
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ linux_download:
180
180
ifndef VERSION
181
181
$(error VERSION environment variable is not defined)
182
182
endif
183
- $(SCRIPT_DIR)/download_linux.sh $(VERSION)
183
+ $(SCRIPT_DIR)/download_linux.sh $(VERSION) $(ACK)
184
184
185
185
.PHONY : linux_checkout
186
186
linux_checkout :
Original file line number Diff line number Diff line change 3
3
set -o errexit
4
4
5
5
VERSION=" $1 "
6
+ ACK=" ${2:- 0} "
6
7
MIN_VERSION=2
7
8
MAX_VERSION=6
8
9
10
+ LINUX_URL=https://cdn.kernel.org/pub/linux/kernel
11
+ ACK_URL=https://android.googlesource.com/kernel/common/+archive/refs/heads
12
+
9
13
if [ -z " $VERSION " ]; then
10
14
echo " usage: $0 VERSION"
11
15
exit 1
12
16
fi
13
17
14
- first_char=${VERSION: 0: 1}
18
+ if [ $ACK -eq 0 ]; then
19
+ first_char=${VERSION: 0: 1}
15
20
16
- if [ $first_char == v ]; then
17
- VERSION=${VERSION: 1}
18
- fi
21
+ if [ $first_char == v ]; then
22
+ VERSION=${VERSION: 1}
23
+ fi
19
24
20
- first_char=${VERSION: 0: 1}
25
+ first_char=${VERSION: 0: 1}
21
26
22
- if [ $first_char -ge $MIN_VERSION ] && [ $first_char -le $MAX_VERSION ]; then
23
- wget https://cdn.kernel.org/pub/linux/kernel/v${first_char} .x/linux-${VERSION} .tar.xz
24
- tar -xf linux-${VERSION} .tar.xz
27
+ if [ $first_char -ge $MIN_VERSION ] && [ $first_char -le $MAX_VERSION ]; then
28
+ wget $LINUX_URL /v${first_char} .x/linux-$VERSION .tar.xz
29
+ tar -xf linux-$VERSION .tar.xz
30
+ else
31
+ echo " $first_char is not a valid kernel major version number"
32
+ exit 1
33
+ fi
25
34
else
26
- echo " $first_char is not a valid kernel major version number"
27
- exit 1
35
+ wget $ACK_URL /$VERSION .tar.gz
36
+ mkdir -p $VERSION
37
+ tar -xf $VERSION .tar.gz -C $VERSION
28
38
fi
You can’t perform that action at this time.
0 commit comments