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

Commit

Permalink
driver: add support for LTS branches back to 4.4
Browse files Browse the repository at this point in the history
Still need to pick some configs in travis.yml.
  • Loading branch information
nickdesaulniers committed Nov 10, 2018
1 parent 94efebf commit bc06b9c
Showing 1 changed file with 39 additions and 10 deletions.
49 changes: 39 additions & 10 deletions driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ setup_variables() {
echo " LD:"
echo " If no LD value is specified, \${CROSS_COMPILE}-ld is used. arm64 only."
echo " REPO:"
echo " linux (default) or linux-next, to specify which tree to clone and build."
echo " Nicknames for trees:"
echo " linux (default)"
echo " linux-next"
echo " 4.18"
echo " 4.14"
echo " 4.9"
echo " 4.4"
echo
echo " Optional parameters:"
echo " -c | --clean:"
Expand Down Expand Up @@ -79,9 +85,32 @@ setup_variables() {

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

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

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

git show -s | cat
Expand All @@ -138,7 +167,7 @@ build_linux() {
[[ $ARCH != "x86_64" ]] && cat ../configs/tt.config >> .config
mako_reactor olddefconfig &>/dev/null
fi
mako_reactor ${image_name}
mako_reactor

cd "${OLDPWD}"
}
Expand Down

0 comments on commit bc06b9c

Please sign in to comment.