Skip to content

ARM: native build support #754

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions etc/auto/config
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ if [ "$HWE_X11" = "yes" ]; then
XORG_HWE="xserver-xorg-hwe-${BASEVERSION}"
fi

case "$ARCH" in
amd64|i386)
MIRROR_BINARY_URL="http://archive.ubuntu.com/ubuntu/"
MIRROR_BINARY_SECURITY_URL="http://security.ubuntu.com/ubuntu/"
;;
arm64)
MIRROR_BINARY_URL="http://ports.ubuntu.com/ubuntu-ports/"
MIRROR_BINARY_SECURITY_URL="http://ports.ubuntu.com/ubuntu-ports/"
;;
esac

Comment on lines +17 to +27
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we may want to put these variables into terraform*.conf and remove the case sentence here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I understand your suggestion; however, MIRROR_URL currently varies across etc/terraform*.conf files (official or Azure source), while these MIRROR_BINARY_URL and MIRROR_BINARY_SECURITY_URL should use the official source and remain consistent. Moving them into etc/terraform*.conf files would introduce duplication, conflicting with the single source of truth principle.

lb config noauto \
--architectures "$ARCH" \
--mode debian \
Expand All @@ -29,12 +40,12 @@ lb config noauto \
--checksums md5 \
--mirror-bootstrap "$MIRROR_URL" \
--parent-mirror-bootstrap "$MIRROR_URL" \
--mirror-chroot-security "http://security.ubuntu.com/ubuntu/" \
--parent-mirror-chroot-security "http://security.ubuntu.com/ubuntu/" \
--mirror-binary-security "http://security.ubuntu.com/ubuntu/" \
--parent-mirror-binary-security "http://security.ubuntu.com/ubuntu/" \
--mirror-binary "http://archive.ubuntu.com/ubuntu/" \
--parent-mirror-binary "http://archive.ubuntu.com/ubuntu/" \
--mirror-chroot-security "$MIRROR_BINARY_SECURITY_URL" \
--parent-mirror-chroot-security "$MIRROR_BINARY_SECURITY_URL" \
--mirror-binary-security "$MIRROR_BINARY_SECURITY_URL" \
--parent-mirror-binary-security "$MIRROR_BINARY_SECURITY_URL" \
--mirror-binary "$MIRROR_BINARY_URL" \
--parent-mirror-binary "$MIRROR_BINARY_URL" \
--keyring-packages ubuntu-keyring \
--apt-options "--yes --option Acquire::Retries=2 --option Acquire::http::Timeout=45" \
--cache-packages false \
Expand Down
17 changes: 12 additions & 5 deletions etc/config/package-lists/pool.list.binary
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
b43-fwcutter
bcmwl-kernel-source
dkms
intel-microcode
iucode-tool
open-vm-tools-desktop
setserial
user-setup

efibootmgr
secureboot-db
shim
shim-signed

#if ARCHITECTURES amd64
bcmwl-kernel-source
intel-microcode
iucode-tool

grub-efi-amd64
grub-efi-amd64-bin
grub-efi-amd64-signed
shim
shim-signed
#endif

#if ARCHITECTURES arm64
grub-efi-arm64
grub-efi-arm64-bin
grub-efi-arm64-signed
#endif
33 changes: 33 additions & 0 deletions etc/terraform-arm64.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# target architecture - i386, amd64 or all
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we release stable arm64 images soon because it needs testing, could you rename this file to etc/terraform-daily-8.0-arm64.conf?

Copy link
Member

Choose a reason for hiding this comment

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

Also you should update the comment i386, amd64 or all in terraform*.conf.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe etc/terraform-arm64.conf (similar to etc/terraform.conf) is intended for local builds and testing. Perhaps I should add a etc/terraform-daily-8.0-arm64.conf to align with etc/terraform-daily-8.0-azure.conf?

ARCH="arm64"

# base codename
BASECODENAME="noble"

# base version
BASEVERSION="24.04"

# distribution codename
CODENAME="circe"

# distribution version
VERSION="8.0"

# distribution channel
CHANNEL="stable"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
CHANNEL="stable"
CHANNEL="daily"

Based on etc/terraform-daily-8.0-azure.conf


# distribution name
NAME="elementary OS"

# mirror to fetch packages from
MIRROR_URL="http://ports.ubuntu.com/ubuntu-ports/"

# use HWE kernel and packages?
HWE_KERNEL="yes"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
HWE_KERNEL="yes"
HWE_KERNEL="no"

Based on etc/terraform-daily-8.0-azure.conf

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm a bit confused about the configuration here. I noticed that daily builds are set with HWE_KERNEL="no", while stable builds use HWE_KERNEL="yes". Could you clarify the reasoning behind this?

For ARM64 specifically, since mainline kernel support for most hardware is still a work in progress, the HWE kernel may perform better.

HWE_X11="no"

# use appcenter ppa
INCLUDE_APPCENTER=""

# suffix for generated .iso files
OUTPUT_SUFFIX=""