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

Commit ecd6685

Browse files
authored
Merge pull request #126 from nathanchance/kernel/common
Add support for kernel/common
2 parents 4ac3482 + ff2e12d commit ecd6685

File tree

3 files changed

+43
-7
lines changed

3 files changed

+43
-7
lines changed

.travis.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,25 @@ matrix:
8585
- name: "ARCH=x86_64 REPO=4.4"
8686
env: ARCH=x86_64 REPO=4.4
8787
if: type = cron
88+
# kernel/common
89+
- name: "ARCH=arm64 REPO=common-4.9"
90+
env: ARCH=arm64 REPO=common-4.9
91+
if: type = cron
92+
- name: "ARCH=arm64 REPO=common-4.14"
93+
env: ARCH=arm64 REPO=common-4.14
94+
if: type = cron
95+
- name: "ARCH=arm64 REPO=common-4.19"
96+
env: ARCH=arm64 REPO=common-4.19
97+
if: type = cron
98+
- name: "ARCH=x86_64 REPO=common-4.9"
99+
env: ARCH=x86_64 REPO=common-4.9
100+
if: type = cron
101+
- name: "ARCH=x86_64 REPO=common-4.14"
102+
env: ARCH=x86_64 REPO=common-4.14
103+
if: type = cron
104+
- name: "ARCH=x86_64 REPO=common-4.19"
105+
env: ARCH=x86_64 REPO=common-4.19
106+
if: type = cron
88107
compiler: gcc
89108
os: linux
90109
dist: trusty

driver.sh

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ setup_variables() {
2121

2222
# torvalds/linux is the default repo if nothing is specified
2323
case ${REPO:=linux} in
24+
"common-"*)
25+
branch=android-${REPO##*-}
26+
tree=common
27+
url=https://android.googlesource.com/kernel/${tree} ;;
2428
"linux")
2529
owner=torvalds
2630
tree=linux ;;
@@ -32,7 +36,7 @@ setup_variables() {
3236
branch=linux-${REPO}.y
3337
tree=linux ;;
3438
esac
35-
url=git://git.kernel.org/pub/scm/linux/kernel/git/${owner}/${tree}.git
39+
[[ -z "${url:-}" ]] && url=git://git.kernel.org/pub/scm/linux/kernel/git/${owner}/${tree}.git
3640

3741
# arm64 is the current default if nothing is specified
3842
case ${ARCH:=arm64} in
@@ -74,7 +78,10 @@ setup_variables() {
7478
export CROSS_COMPILE=arm-linux-gnueabi- ;;
7579

7680
"arm64")
77-
config=defconfig
81+
case ${REPO} in
82+
common-*) config=cuttlefish_defconfig ;;
83+
*) config=defconfig ;;
84+
esac
7885
image_name=Image.gz
7986
qemu="qemu-system-aarch64"
8087
qemu_ram=512m
@@ -85,13 +92,19 @@ setup_variables() {
8592
export CROSS_COMPILE=aarch64-linux-gnu- ;;
8693

8794
"x86_64")
88-
config=defconfig
95+
case ${REPO} in
96+
common-*)
97+
config=x86_64_cuttlefish_defconfig
98+
qemu_cmdline=( -append "console=ttyS0"
99+
-initrd "images/x86_64/rootfs.cpio" ) ;;
100+
*)
101+
config=defconfig
102+
qemu_cmdline=( -drive "file=images/x86_64/rootfs.ext4,format=raw,if=ide"
103+
-append "console=ttyS0 root=/dev/sda" ) ;;
104+
esac
89105
image_name=bzImage
90106
qemu="qemu-system-x86_64"
91-
qemu_ram=512m
92-
qemu_cmdline=( -drive "file=images/x86_64/rootfs.ext4,format=raw,if=ide"
93-
-append "console=ttyS0 root=/dev/sda" ) ;;
94-
107+
qemu_ram=512m ;;
95108
"ppc32")
96109
config=ppc44x_defconfig
97110
image_name=zImage

usage.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Environment variables:
2020
4.14
2121
4.9
2222
4.4
23+
common-4.19
24+
common-4.14
25+
common-4.9
26+
common-4.4
2327

2428
Optional parameters:
2529
-c | --clean:

0 commit comments

Comments
 (0)