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

Commit

Permalink
Merge pull request #40 from ClangBuiltLinux/config
Browse files Browse the repository at this point in the history
add arm64 LTS targets
  • Loading branch information
nickdesaulniers authored Nov 13, 2018
2 parents 5210f55 + bb98314 commit 6058374
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 10 deletions.
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ matrix:
- name: "ARCH=x86_64 REPO=linux-next"
env: ARCH=x86_64 REPO=linux-next
if: type = cron
# stable
# TODO: re-enable once green
#- name: "ARCH=arm64 REPO=4.19"
#env: ARCH=arm64 REPO=4.19
#if: type = cron
- name: "ARCH=arm64 REPO=4.14"
env: ARCH=arm64 REPO=4.14
if: type = cron
#- name: "ARCH=arm64 REPO=4.9"
#env: ARCH=arm64 REPO=4.9
#if: type = cron
#- name: "ARCH=arm64 REPO=4.4"
#env: ARCH=arm64 REPO=4.4
#if: type = cron
compiler: gcc
os: linux
dist: trusty
Expand Down
26 changes: 17 additions & 9 deletions driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,20 @@ setup_variables() {
echo "Unknown ARCH specified!"
exit 1 ;;
esac
export ARCH=${ARCH}

# torvalds/linux is the default repo if nothing is specified
case ${REPO:=linux} in
"linux") owner=torvalds ;;
"linux-next") owner=next ;;
"linux")
owner=torvalds ;;
"linux-next")
owner=next
tree=linux-next ;;
"4.4"|"4.9"|"4.14"|"4.19")
owner=stable
branch=linux-${REPO}.y ;;
esac
url=git://git.kernel.org/pub/scm/linux/kernel/git/${owner}/${tree:=linux}.git
}

check_dependencies() {
Expand Down Expand Up @@ -105,13 +113,13 @@ mako_reactor() {
build_linux() {
CC="$(command -v ccache) $(command -v clang-8)"

if [[ -d ${REPO} ]]; then
cd ${REPO}
git fetch --depth=1 origin master
git reset --hard origin/master
if [[ -d ${tree} ]]; then
cd ${tree}
git fetch --depth=1 ${url} ${branch:=master}
git reset --hard FETCH_HEAD
else
git clone --depth=1 git://git.kernel.org/pub/scm/linux/kernel/git/${owner}/${REPO}.git
cd ${REPO}
git clone --depth=1 -b ${branch:=master} --single-branch ${url}
cd ${tree}
fi

git show -s | cat
Expand All @@ -137,7 +145,7 @@ build_linux() {
}

boot_qemu() {
local kernel_image=${REPO}/arch/${ARCH}/boot/${image_name}
local kernel_image=${tree}/arch/${ARCH}/boot/${image_name}
# for the rest of the script, particularly qemu
set -e
test -e ${kernel_image}
Expand Down
8 changes: 7 additions & 1 deletion usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ Environment variables:
LD:
If no LD value is specified, ${CROSS_COMPILE}-ld is used. arm64 only.
REPO:
linux (default) or linux-next, to specify which tree to clone and build.
Nicknames for trees:
linux (default)
linux-next
4.19
4.14
4.9
4.4

Optional parameters:
-c | --clean:
Expand Down

0 comments on commit 6058374

Please sign in to comment.