Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ARCH=armv7l version of iso #108

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

afbjorklund
Copy link
Contributor

The Ubuntu image for armv7 is over 1G, so make a smaller image for emulation.

It is slow, but it boots.

Welcome to Alpine Linux 3.18
Kernel 6.1.34-3-virt on an armv7l (/dev/ttyAMA0)

Not every dependency, such as nerdctl-full, is available for arm-v7. But most are...

Signed-off-by: Anders F Björklund <[email protected]>
Signed-off-by: Anders F Björklund <[email protected]>
.

.PHONY: iso
iso: nerdctl-$(NERDCTL_VERSION)-$(ARCH) qemu-$(QEMU_VERSION)-copying cri-dockerd-$(CRI_DOCKERD_VERSION)-$(ARCH)
ALPINE_VERSION=$(ALPINE_VERSION) NERDCTL_VERSION=$(NERDCTL_VERSION) QEMU_VERSION=$(QEMU_VERSION) CRI_DOCKERD_VERSION=$(CRI_DOCKERD_VERSION) REPO_VERSION=$(REPO_VERSION) EDITION=$(EDITION) BUILD_ID=$(BUILD_ID) ARCH=$(ARCH) ARCH_ALIAS=$(ARCH_ALIAS) ./build.sh
ALPINE_VERSION=$(ALPINE_VERSION) NERDCTL_VERSION=$(NERDCTL_VERSION) QEMU_VERSION=$(QEMU_VERSION) CRI_DOCKERD_VERSION=$(CRI_DOCKERD_VERSION) REPO_VERSION=$(REPO_VERSION) EDITION=$(EDITION) BUILD_ID=$(BUILD_ID) ARCH=$(ARCH) ARCH_ALIAS=$(ARCH_ALIAS) ALPINE_ARCH=$(ALPINE_ARCH) DOCKER_ARCH=$(DOCKER_ARCH) ./build.sh
Copy link
Member

Choose a reason for hiding this comment

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

ARCH_ALIAS doesn't seem to be used by build.sh anymore:

Suggested change
ALPINE_VERSION=$(ALPINE_VERSION) NERDCTL_VERSION=$(NERDCTL_VERSION) QEMU_VERSION=$(QEMU_VERSION) CRI_DOCKERD_VERSION=$(CRI_DOCKERD_VERSION) REPO_VERSION=$(REPO_VERSION) EDITION=$(EDITION) BUILD_ID=$(BUILD_ID) ARCH=$(ARCH) ARCH_ALIAS=$(ARCH_ALIAS) ALPINE_ARCH=$(ALPINE_ARCH) DOCKER_ARCH=$(DOCKER_ARCH) ./build.sh
ALPINE_VERSION=$(ALPINE_VERSION) NERDCTL_VERSION=$(NERDCTL_VERSION) QEMU_VERSION=$(QEMU_VERSION) CRI_DOCKERD_VERSION=$(CRI_DOCKERD_VERSION) REPO_VERSION=$(REPO_VERSION) EDITION=$(EDITION) BUILD_ID=$(BUILD_ID) ARCH=$(ARCH) ALPINE_ARCH=$(ALPINE_ARCH) DOCKER_ARCH=$(DOCKER_ARCH) ./build.sh

Comment on lines +8 to +11
case "${ARCH}" in
x86_64) bios=true;;
*) bios=false;;
esac
Copy link
Member

Choose a reason for hiding this comment

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

I think we can drop setting legacyBIOS: true for all platforms now; it is no longer needed and has already been removed from the examples/alpine.yaml template in the lima.git repo.

Comment on lines -226 to +236
ARCH=amd64
if [ "$(uname -m)" == "x86_64" ]; then
ARCH=amd64
fi
if [ "$(uname -m)" == "aarch64" ]; then
ARCH=arm64
fi
if [ "$(uname -m)" == "armv7l" ]; then
ARCH=armv7
fi
Copy link
Member

Choose a reason for hiding this comment

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

Why do we set ARCH here at all? It isn't being used anymore at all. It seems to be vestigial code from the time when this block ended with:

    mkdir -p "${tmp}/usr/libexec/cni"
    ln -s "flannel-${ARCH}" "${tmp}/usr/libexec/cni/flannel"

But that has since been removed because the cni-plugin-flannel package has since been fixed. So we can drop all the ARCH setting here.

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

Successfully merging this pull request may close these issues.

None yet

2 participants