diff options
-rwxr-xr-x | build-arm64-go.sh | 32 | ||||
-rw-r--r-- | dist7.patch | 70 | ||||
-rw-r--r-- | dummy-ssh-job.yaml | 5 | ||||
-rw-r--r-- | full-deploy-job.yaml | 5 | ||||
-rwxr-xr-x | install-prerequisites.sh | 3 | ||||
-rw-r--r-- | lavatest.yaml | 5 |
6 files changed, 15 insertions, 105 deletions
diff --git a/build-arm64-go.sh b/build-arm64-go.sh index 95603be..74adc75 100755 --- a/build-arm64-go.sh +++ b/build-arm64-go.sh @@ -2,37 +2,23 @@ set -eu -: ${LAVA_USE_PREBUILT_BOOTSTRAP_COMPILER:="no"} -: ${LAVA_URL_PREBUILT_BOOTSTRAP_COMPILER:="http://people.linaro.org/~andrew.mcdermott/go-armhf/go1.4.tar.bz2"} +: ${PREBUILT_BOOTSTRAP_COMPILER_URL:="http://people.linaro.org/~andrew.mcdermott/go-arm64/go-linux-arm64-bootstrap.tbz"} -if [ "${LAVA_USE_PREBUILT_BOOTSTRAP_COMPILER}" = "yes" ]; then - : ${LAVA_URL_PREBUILT_BOOTSTRAP_COMPILER:?"No URL for bootstrap compiler"} - echo "Using existing boostrap compiler from: ${LAVA_URL_PREBUILT_BOOTSTRAP_COMPILER}" - wget -q -O go1.4.tar.bz2 ${LAVA_URL_PREBUILT_BOOTSTRAP_COMPILER} - rm -rf go1.4 - tar xf go1.4.tar.bz2 -else - basedir=$PWD - echo "Building bootstrap compiler" - rm -rf go1.4 - git clone http://github.com/golang/go go1.4 - pushd go1.4 - git checkout 36f456c789da341df496f161672df618b7410d58 - git apply $basedir/dist7.patch - pushd src - CC='arm-linux-gnueabihf-gcc -static' GO_DISTFLAGS=-s GOHOSTARCH=arm GOARM=7 CGO_ENABLED=0 ./make.bash - popd - popd +if [ ! -d go-linux-arm64-bootstrap ]; then + echo "Downloading existing bootstrap compiler from: ${PREBUILT_BOOTSTRAP_COMPILER_URL}" + wget -q ${PREBUILT_BOOTSTRAP_COMPILER_URL} + rm -rf go-linux-arm64-bootstrap + tar xf go-linux-arm64-bootstrap.tbz fi rm -rf go -git clone --depth=1 http://github.com/golang/go -b ${LAVA_GO_BRANCH:-master} +git clone --depth=1 http://github.com/golang/go -b ${BRANCH:-master} -export GOROOT_BOOTSTRAP=$PWD/go1.4 +export GOROOT_BOOTSTRAP=$PWD/go-linux-arm64-bootstrap export GOROOT_FINAL=/usr/local/go pushd $PWD -cd go/src && ./all.bash +cd go/src && ./make.bash popd tar -acf go.tar.gz go/{bin,src,test,api,pkg} diff --git a/dist7.patch b/dist7.patch deleted file mode 100644 index 43c9cd0..0000000 --- a/dist7.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff --git a/src/cmd/dist/build.c b/src/cmd/dist/build.c -index e4b8b58..04bf6cf 100644 ---- a/src/cmd/dist/build.c -+++ b/src/cmd/dist/build.c -@@ -39,7 +39,7 @@ static void dopack(char*, char*, char**, int); - static char *findgoversion(void); - - // The known architecture letters. --static char *gochars = "566899"; -+static char *gochars = "5667899"; - - // The known architectures. - static char *okgoarch[] = { -@@ -47,6 +47,7 @@ static char *okgoarch[] = { - "arm", - "amd64", - "amd64p32", -+ "arm64", - "386", - "ppc64", - "ppc64le", -diff --git a/src/cmd/dist/buildgc.c b/src/cmd/dist/buildgc.c -index 64434d5..c0302eb 100644 ---- a/src/cmd/dist/buildgc.c -+++ b/src/cmd/dist/buildgc.c -@@ -73,7 +73,7 @@ xatoi(char *s, char **end) - return val; - } - --// mkanames reads [5689].out.h and writes anames[5689].c -+// mkanames reads [56789].out.h and writes anames[56789].c - // The format is much the same as the Go opcodes above. - // It also writes out cnames array for C_* constants and the dnames - // array for D_* constants. -diff --git a/src/cmd/dist/unix.c b/src/cmd/dist/unix.c -index 0fd17c1..6b2e675 100644 ---- a/src/cmd/dist/unix.c -+++ b/src/cmd/dist/unix.c -@@ -708,6 +708,8 @@ main(int argc, char **argv) - gohostarch = "386"; - else if(contains(u.machine, "arm")) - gohostarch = "arm"; -+ else if(contains(u.machine, "aarch64")) -+ gohostarch = "arm64"; - else if(contains(u.machine, "ppc64le")) - gohostarch = "ppc64le"; - else if(contains(u.machine, "ppc64")) -diff --git a/src/go/build/build.go b/src/go/build/build.go -index 12c20e5..c62425a 100644 ---- a/src/go/build/build.go -+++ b/src/go/build/build.go -@@ -1386,6 +1386,8 @@ func ArchChar(goarch string) (string, error) { - return "6", nil - case "arm": - return "5", nil -+ case "arm64": -+ return "7", nil - case "ppc64", "ppc64le": - return "9", nil - } -diff --git a/src/go/build/syslist.go b/src/go/build/syslist.go -index 9246cbf..e84a066 100644 ---- a/src/go/build/syslist.go -+++ b/src/go/build/syslist.go -@@ -5,4 +5,4 @@ - package build - - const goosList = "android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows " --const goarchList = "386 amd64 amd64p32 arm ppc64 ppc64le " -+const goarchList = "386 amd64 amd64p32 arm arm64 ppc64 ppc64le " diff --git a/dummy-ssh-job.yaml b/dummy-ssh-job.yaml index 6e0ca40..d2036cf 100644 --- a/dummy-ssh-job.yaml +++ b/dummy-ssh-job.yaml @@ -12,10 +12,9 @@ actions: testdef_repos: - git-repo: http://git.linaro.org/people/andrew.mcdermott/lava-go-arm64.git parameters: + PREBUILT_BOOTSTRAP_COMPILER_URL: 'http://people.linaro.org/~andrew.mcdermott/go-arm64/go-linux-arm64-bootstrap.tbz' + BRANCH: 'master' LAVA_SLEEP_FOR_ACCESS: 0 - LAVA_USE_PREBUILT_BOOTSTRAP_COMPILER: 'no' - LAVA_URL_PREBUILT_BOOTSTRAP_COMPILER: 'http://people.linaro.org/~andrew.mcdermott/go-armhf/go1.4.tar.bz2' - LAVA_GO_BRANCH: 'master' timeout: 1800 - command: submit_results diff --git a/full-deploy-job.yaml b/full-deploy-job.yaml index 0488a87..391ea07 100644 --- a/full-deploy-job.yaml +++ b/full-deploy-job.yaml @@ -69,9 +69,8 @@ actions: - git-repo: http://git.linaro.org/people/andrew.mcdermott/lava-go-arm64.git parameters: LAVA_SLEEP_FOR_ACCESS: 0 - LAVA_USE_PREBUILT_BOOTSTRAP_COMPILER: 'no' - LAVA_URL_PREBUILT_BOOTSTRAP_COMPILER: 'http://people.linaro.org/~andrew.mcdermott/go-armhf/go1.4.tar.bz2' - LAVA_GO_BRANCH: 'master' + PREBUILT_BOOTSTRAP_COMPILER_URL: 'http://people.linaro.org/~andrew.mcdermott/go-arm64/go-linux-arm64-bootstrap.tbz' + BRANCH: 'master' timeout: 1800 - command: submit_results diff --git a/install-prerequisites.sh b/install-prerequisites.sh index 2f23b6b..c312700 100755 --- a/install-prerequisites.sh +++ b/install-prerequisites.sh @@ -2,9 +2,6 @@ set -e -sudo dpkg --add-architecture armhf sudo apt-get update -qq -sudo apt-get install -qqy build-essential type -p git || sudo apt-get install -y git type -p pkg-config || sudo apt-get install -y pkg-config -type -p arm-linux-gnueabihf-gcc || sudo apt-get install -y gcc-arm-linux-gnueabihf libc6-dev-armhf-cross diff --git a/lavatest.yaml b/lavatest.yaml index f06b11e..36c0c74 100644 --- a/lavatest.yaml +++ b/lavatest.yaml @@ -13,10 +13,9 @@ run: steps: - 'resolvconf -u' - './install-prerequisites.sh' - - 'export LAVA_USE_PREBUILT_BOOTSTRAP_COMPILER' - - 'export LAVA_URL_PREBUILT_BOOTSTRAP_COMPILER' + - 'export PREBUILT_BOOTSTRAP_COMPILER_URL' - 'export LAVA_SLEEP_FOR_ACCESS' - - 'export LAVA_GO_BRANCH' + - 'export BRANCH' - 'env' - './build-arm64-go.sh' - 'lava-test-run-attach go.tar.gz' |