Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

Add ARM64 support #2758

Merged
merged 19 commits into from Jun 29, 2016
Merged

Add ARM64 support #2758

merged 19 commits into from Jun 29, 2016

Conversation

glevand
Copy link
Contributor

@glevand glevand commented Jun 7, 2016

This series adds arm64 support to rkt. It also includes some minor build enhancements. I can split the series into multiple PRs if it would make review easier.

I tested cross building stage1 flavors 'coreos' and 'fly'. The rkt binary and ACI images generated can run successfully on CoreOS running on qemu-system-aarch64.

On my system (ubuntu 15.10), cross building stage1 flavor 'kvm' failed: configure: error: ** No development headers for openssl found. I'll look into getting and environment with the needed cross build dependencies.

This PR includes the gimme script submitted upstream at travis-ci/gimme#45. If that is merged we can remove the gimme.local here.

cc: @crawford

@glevand
Copy link
Contributor Author

glevand commented Jun 8, 2016

Pushed out updates to fix some test errors.

@alban
Copy link
Member

alban commented Jun 8, 2016

Thanks for the work on arm64!

This has a lot of Godeps changes but Godeps/Godeps.json is not modified by this PR. How did you update it? We use this documentation for updating dependencies:
https://github.com/coreos/rkt/blob/master/Documentation/hacking.md#managing-dependencies
Although this might change with @s-urbaniak's work on Glide (#2735)

Since it is a lot of changes and GitHub is not able to display the diff, maybe you could write a PR for just Godeps first and get the rest of the changes in a second PR?

@glevand
Copy link
Contributor Author

glevand commented Jun 8, 2016

@alban For the Godeps, I just replaced the files from upstream. I'll split that into a separate PR and follow the prescribed procedure.

Also, How can I find out why Jenkins is failing? I seem to need CoreOS login credentials.

@glevand
Copy link
Contributor Author

glevand commented Jun 8, 2016

Rebased to latest, removed patch 'Godeps: Update sys/unix to get arm64 support'.

@glevand
Copy link
Contributor Author

glevand commented Jun 8, 2016

Depends on #2764 Godeps: Update sys/unix to get arm64 support.

@s-urbaniak
Copy link
Contributor

@glevand looks great, can't wait to try it out.

Regarding the jenkins failure, this is the relevant failure, but I don't see how it is related to your PR:

17:08:15 === RUN   TestResumedFetch
17:08:15 2016/06/08 17:08:15 http: panic serving 127.0.0.1:46179: send on closed channel
17:08:15 goroutine 211 [running]:
17:08:15 net/http.(*conn).serve.func1(0xc820087880)
17:08:15    /usr/lib/go/src/net/http/server.go:1389 +0xc1
17:08:15 panic(0x9f8820, 0xc820128950)
17:08:15    /usr/lib/go/src/runtime/panic.go:426 +0x4e9
17:08:15 github.com/coreos/rkt/tests.testInterruptingServerHandler.func1(0x7f64610c8258, 0xc82033dba0, 0xc82009c540)
17:08:15    /home/admin/workspace/rkt-matrix/dummy/dummy1/label/debian-8-flavor-coreos/builds/build-rkt-coreos/build-rkt-1.7.0+git/gopath/src/github.com/coreos/rkt/tests/rkt_fetch_test.go:388 +0xced
17:08:15 github.com/coreos/rkt/tests.testServerHandler.func1(0x7f64610c8258, 0xc82033dba0, 0xc82009c540)
17:08:15    /home/admin/workspace/rkt-matrix/dummy/dummy1/label/debian-8-flavor-coreos/builds/build-rkt-coreos/build-rkt-1.7.0+git/gopath/src/github.com/coreos/rkt/tests/rkt_fetch_test.go:313 +0x63
17:08:15 net/http.HandlerFunc.ServeHTTP(0xc82035c0a0, 0x7f64610c8258, 0xc82033dba0, 0xc82009c540)
17:08:15    /usr/lib/go/src/net/http/server.go:1618 +0x3a
17:08:15 net/http.serverHandler.ServeHTTP(0xc8200b8100, 0x7f64610c8258, 0xc82033dba0, 0xc82009c540)
17:08:15    /usr/lib/go/src/net/http/server.go:2081 +0x19e
17:08:15 net/http.(*conn).serve(0xc820087880)
17:08:15    /usr/lib/go/src/net/http/server.go:1472 +0xf2e
17:08:15 created by net/http.(*Server).Serve
17:08:15    /usr/lib/go/src/net/http/server.go:2137 +0x44e
17:08:15 --- FAIL: TestResumedFetch (0.34s)

@iaguis
Copy link
Member

iaguis commented Jun 9, 2016

It's not related, Jenkins is not reliable yet. Working on it in #2762

@s-urbaniak
Copy link
Contributor

Regarding the Godeps bumps/changes: I went through all commits I think can catch up with this in case it lands first and factor it in my glide PR.

@glevand
Copy link
Contributor Author

glevand commented Jun 13, 2016

Rebased to latest, which includes #2764 Godeps: Update sys/unix to get arm64 support.

@glevand
Copy link
Contributor Author

glevand commented Jun 17, 2016

Rebased to latest.

@jonboulle jonboulle added this to the v1.9.0 milestone Jun 17, 2016
CCN_IMG_RELEASE := 1032.0.0
endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General concern: I'm not sure we want to venture into this path of having different arch-specific versions.

Copy link
Contributor Author

@glevand glevand Jun 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucab So you prefer a patch that bumps x86 to 1053.2.0 or later?
Our options are here: https://alpha.release.core-os.net/arm64-usr/

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd opt-in for a single version too. But that would need testing if nothing breaks in amd64 too.

Copy link
Member

@lucab lucab Jun 21, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update to 1068.0.0 then, which is also the current base for the beta channel. I'm testing a bump to it right now for amd64, if everything is fine I'll ping back here with the PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR up at #2821. @glevand: it shouldn't break arm64 related stuff, but please double-check.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucab 1068.0.0 builds OK on arm64. I'll try running it and adjust my stage1 manifest files if needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucab Tested 1068.0.0 based arm64 stage1-coreos.aci and stage1-fly.aci and they seem to run OK.

@tmrts
Copy link
Contributor

tmrts commented Jun 21, 2016

@coreos/rkt-maintainers PTAL for 1.9.0

@@ -724,7 +735,8 @@ RKT_IF_HAS_FLAVOR([${RKT_STAGE1_FLAVORS}], [coreos,kvm],
coreos/kvm flavor specific build parameters

local CoreOS PXE image path: '${RKT_LOCAL_COREOS_PXE_IMAGE_PATH}'
local CoreOS PXE image systemd version: '${RKT_LOCAL_COREOS_PXE_IMAGE_SYSTEMD_VER}'])])
local CoreOS PXE image systemd version: '${RKT_LOCAL_COREOS_PXE_IMAGE_SYSTEMD_VER}'
stage1 CoreOS board: '${RKT_STAGE1_COREOS_BOARD}'])])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just asking: why it is named "CoreOS board"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@krnowak 'board' is the terminology used by coreos for the build target. Currently we have amd64-usr and arm64-usr.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specifically inherited from ChromeOS where each image type literally is targeting a specific piece of physical hardware. Our image types are more general purpose so it makes less sense but the term is used so extensively it wouldn't really be worth changing.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, thanks for info!

@krnowak
Copy link
Collaborator

krnowak commented Jun 21, 2016

There are some changes in the builddir layout that probably require some change log entry too, as the built rkt and stage1 images are now in a different directory.

@krnowak
Copy link
Collaborator

krnowak commented Jun 21, 2016

CCing myself, @krnowak

@glevand
Copy link
Contributor Author

glevand commented Jun 21, 2016

Rebased to latest, addressed all comments so far.

The makefile variable MAKETOOLSDIR is unused, so remove it.

Signed-off-by: Geoff Levand <geoff@infradead.org>
To aid in debugging go build problems, add go verbosity flags when the
make variable V is set.

Signed-off-by: Geoff Levand <geoff@infradead.org>
To allow for cross compile builds, output CC and CXX to the
makefile.

Signed-off-by: Geoff Levand <geoff@infradead.org>
To allow the build system to target multiple architectures, add the
new arch related makefile variables GOARCH, RKT_ACI_ARCH, and
RKT_STAGE1_COREOS_BOARD.

Signed-off-by: Geoff Levand <geoff@infradead.org>
To allow GO_ENV to be the default environment, and for
BGB_ADDITIONAL_GO_ENV to override that default when needed,
switch the order of the two on the go invocation.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
The generated actool is a host tool, so move it to the TOOLSDIR.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Create new makfile variables TARGET_BINDIR and TARGET_TOOLSDIR to hold
files for use within the target image.  Files intended to be used on
the host at build time will continue to be located in TOOLSDIR.

Signed-off-by: Geoff Levand <geoff@infradead.org>
To allow building rkt from multiple CoreOS board images move
the manifest files to board specific directories.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
Set the arch value of the ACI manifest based on the RKT_ACI_ARCH
variable.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Set the arch value of the ACI manifest based on the RKT_ACI_ARCH
variable.

Signed-off-by: Geoff Levand <geoff@infradead.org>
The interpreter binary is arch specific, so split the interpBin definition
off into the arch specific file init_linux_amd64.go, and add a new one,
init_linux_arm64.go.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
Use the travis apt packages addon to simplify installing packages.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Add a local gimme script that knows how to provide a go compiler with
arm64 cgo support.

This change can be reverted once travis PR #45 is merged.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
@glevand
Copy link
Contributor Author

glevand commented Jun 27, 2016

Rebased to latest.

@krnowak
Copy link
Collaborator

krnowak commented Jun 29, 2016

LFAD.

@krnowak krnowak merged commit a9f90d3 into rkt:master Jun 29, 2016
@jonboulle
Copy link
Contributor

@glevand thanks for the awesome work and your patience!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants