Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Add ARM64 kernels and images #511

Merged
merged 9 commits into from
Mar 16, 2020
Merged

Conversation

luxas
Copy link
Contributor

@luxas luxas commented Jan 28, 2020

@stealthybox @chanwit Builds on top of #506, makes us have a prebuilt kernel and Ubuntu for ARM64

@luxas luxas requested a review from twelho as a code owner January 28, 2020 07:46
@luxas luxas added this to the v0.7.0 milestone Jan 28, 2020
@stealthybox
Copy link
Contributor

Related #345

@stealthybox
Copy link
Contributor

Also see #513

@luxas
Copy link
Contributor Author

luxas commented Mar 3, 2020

This is ready to merge, ping @stealthybox

@darkowlzz
Copy link
Contributor

darkowlzz commented Mar 14, 2020

Hi, I gave this a try on a gentoo64-on-rpi-64bit machine and it worked well with docker and docker-bridge 🙂

With containerd and cni, I got the following error:

INFO[0005] Created VM with ID "d1b9bc96904c0061" and name "my-vm1" 
ERRO[0006] failed to setup network for namespace "ignite-d1b9bc96904c0061": failed to create bridge "ignite0": could not add "ignite0": operation not supported 
FATA[0006] failed to create bridge "ignite0": could not add "ignite0": operation not supported 

Need to debug and find out why it failed.

Used docker and docker-bridge and was able to create multiple VMs:

pi64 ~ # ignite run darkowlzz/ignite-ubuntu:18.04-v0.6.0-159-g858dad0-arm64 --kernel-image darkowlzz/ignite-kernel:4.19.97-arm64 --name my-vm1 --cpus 1 --ssh --runtime=docker --network-plugin=docker-bridge
INFO[0006] Created VM with ID "48197fcba7e146b9" and name "my-vm1" 
INFO[0012] Networking is handled by "docker-bridge"     
INFO[0012] Started Firecracker VM "48197fcba7e146b9" in a container with ID "720ce08ce0528c4ba8b31b29012a746a6fe996bb8b26a52f253493eaf15041e5" 

pi64 ~ # ignite run darkowlzz/ignite-ubuntu:18.04-v0.6.0-159-g858dad0-arm64 --kernel-image darkowlzz/ignite-kernel:4.19.97-arm64 --name my-vm2 --cpus 1 --ssh --runtime=docker --network-plugin=docker-bridge
INFO[0005] Created VM with ID "aabe60e7d1e6e6ed" and name "my-vm2" 
INFO[0007] Networking is handled by "docker-bridge"     
INFO[0007] Started Firecracker VM "aabe60e7d1e6e6ed" in a container with ID "c9af3ff989a485712fd7163b5f37965aae10ceefabb481f8be032a9b9fae2b02" 

pi64 ~ # ignite ps 
VM ID			IMAGE							KERNEL					SIZE	CPUS	MEMORY		CREATED		STATUS	IPS		PORTS	NAME
48197fcba7e146b9	darkowlzz/ignite-ubuntu:18.04-v0.6.0-159-g858dad0-arm64	darkowlzz/ignite-kernel:4.19.97-arm64	4.0 GB	1	512.0 MB	107s ago	Up 107s	172.17.0.2		my-vm1
aabe60e7d1e6e6ed	darkowlzz/ignite-ubuntu:18.04-v0.6.0-159-g858dad0-arm64	darkowlzz/ignite-kernel:4.19.97-arm64	4.0 GB	1	512.0 MB	7s ago		Up 7s	172.17.0.3		my-vm2

I was able to ssh into the VMs and use them.

pi64 ~ # ignite ssh my-vm1
...
root@localhost:~# uname -a
Linux localhost.localdomain 4.19.97 #1 SMP Sat Mar 14 21:47:48 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux

Built all the images (kernel, OS and sandbox) and ignite for arm64.

This is great. Thanks!

Comment on lines +85 to +86
$(MAKE) ${OP} WHAT=ubuntu RELEASE=18.04 IS_LATEST=true IS_MANIFEST_LIST=1 GOARCH=arm64
$(MAKE) ${OP} WHAT=ubuntu RELEASE=18.04 IS_LATEST=true IS_MANIFEST_LIST=1 GOARCH=amd64
Copy link
Contributor

Choose a reason for hiding this comment

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

Ack -- only adding am arm64/aarch64 userspace image for Ubuntu 18.04 starting out

Comment on lines +15 to +18
# ARCH here is KERNEL_ARCH in the Makefile. It needs to be hardcoded to ARCH for Kconfig to understand
ARG ARCH
ARG GOARCH
ARG ARCH_MAKE_PARAMS
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the comment

#!/bin/bash

if [[ $# == 0 ]]; then
echo "Usage: $0 [manifest-list] [arch0...n]"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice move breaking this non-trivial manifest list logic into something that's generally useful for both the userspace and kernel images. 👍

Copy link
Contributor

@stealthybox stealthybox left a comment

Choose a reason for hiding this comment

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

This is pretty clean build logic for all of the cross-compilation and conditional branching on ARCH these changes enabled.

Thanks for following through and supporting this change-set, @luxas.

Thanks @darkowlzz for building the artifacts and hand-testing them with a custom built OS on your RaspberryPi.
That's not trivial work at all!


We'll have to see if we can replicate the CNI issue you saw. (perhaps your CNI binaries or other downstream dependencies were the wrong arch and it was poor error reporting?)
@luxas did not report CNI issues in his experiments.

@stealthybox stealthybox merged commit 4bfb519 into weaveworks:master Mar 16, 2020
@luxas
Copy link
Contributor Author

luxas commented Mar 16, 2020

@luxas did not report CNI issues in his experiments.

@darkowlzz @stealthybox This is why I upgraded CNI to v0.8.5: #561. containernetworking/plugins#434

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

Successfully merging this pull request may close these issues.

4 participants