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 12, 2018
1 parent 3daf1fa commit cca4f7a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
25 changes: 16 additions & 9 deletions driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,16 @@ 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 ;;
"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 @@ -106,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 @@ -138,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 cca4f7a

Please sign in to comment.