Skip to content
This repository was archived by the owner on Apr 13, 2024. It is now read-only.

Commit 305279f

Browse files
committed
driver: Allow environment variables to be passed as parameters
Presubmit: https://travis-ci.com/nathanchance/continuous-integration/builds/103470578 [skip ci] Signed-off-by: Nathan Chancellor <[email protected]>
1 parent 473e1e4 commit 305279f

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

driver.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set -eu
55
setup_variables() {
66
while [[ ${#} -ge 1 ]]; do
77
case ${1} in
8+
"AR="*|"ARCH="*|"CC="*|"LD="*|"REPO="*) export "${1?}" ;;
89
"-c"|"--clean") cleanup=true ;;
910
"-j"|"--jobs") shift; jobs=$1 ;;
1011
"-j"*) jobs=${1/-j} ;;

usage.txt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,23 @@ Script description: Build a Linux kernel image with Clang and boot it
44

55
Environment variables:
66
The script can take into account specific environment variables, mostly used
7-
with Travis. They can be invoked either via 'export VAR=<value>;
8-
./driver.sh' OR 'VAR=value ./driver.sh'
7+
with Travis. They can be invoked in one of three ways:
8+
$ export VAR=<value> && ./driver.sh
9+
$ VAR=value ./driver.sh
10+
$ ./driver.sh VAR=value
911

12+
AR:
13+
If no AR value is specified, the script will attempt to set AR to
14+
llvm-ar-9, llvm-ar-8, llvm-ar-7, llvm-ar, then ${CROSS_COMPILE}ar
15+
if they are found in PATH.
1016
ARCH:
1117
If no ARCH value is specified, arm64 is the default. Currently, arm32_v7,
1218
arm32_v6, arm32_v5, arm64, ppc64le and x86_64 are supported.
19+
CC:
20+
If no CC value is specified, the script will attempt to set CC to
21+
clang-9, clang-8, clang-7, then clang if they are found in PATH.
1322
LD:
14-
If no LD value is specified, ${CROSS_COMPILE}-ld is used. arm64 only.
23+
If no LD value is specified, ${CROSS_COMPILE}ld is used. arm64 only.
1524
REPO:
1625
Nicknames for trees:
1726
linux (default)

0 commit comments

Comments
 (0)