Skip to content
Closed
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
59 changes: 59 additions & 0 deletions CI/Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
FROM ubuntu:24.04

ARG USER_ID
ARG GROUP_ID
ARG USER_NAME

RUN if [ -n "$USER_ID" ] && [ -n "$GROUP_ID" ] && [ -n "$USER_NAME" ]; then \
groupadd -g "$GROUP_ID" "$USER_NAME" && \
useradd -m -u "$USER_ID" -g "$GROUP_ID" -d / "$USER_NAME" ; \
fi

ENV ARCH=arm64
ENV CROSS_COMPILE=aarch64-linux-gnu-

COPY generate_boot_bins.sh /usr/bin/
COPY build.sh /usr/bin/
COPY make_fitimage.sh /usr/bin/

RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
binutils \
python3 \
locales \
kmod \
rsync \
systemd-ukify \
dosfstools \
mtools \
cpio \
; \
rm -rf /var/lib/apt/lists/*; \
locale-gen en_US.UTF-8; \
update-locale LANG=en_US.UTF-8; \
\
curl "https://android.googlesource.com/platform/system/tools/mkbootimg/+/refs/heads/android12-release/mkbootimg.py?format=TEXT" \
| base64 --decode > /usr/bin/mkbootimg; \
chmod +x /usr/bin/mkbootimg; \
chmod 755 /usr/bin/generate_boot_bins.sh /usr/bin/build.sh /usr/bin/make_fitimage.sh; \
\
command -v ukify; \
command -v mkfs.vfat; \
command -v mcopy; \
command -v rsync

# Fetch & unpack systemd-boot .deb
ARG SYSTEMD_BOOT_DEB_URL="http://ports.ubuntu.com/pool/universe/s/systemd/systemd-boot-efi_255.4-1ubuntu8_arm64.deb"
RUN set -eux; \
mkdir -p /artifacts/systemd; \
echo "Downloading systemd-boot from: ${SYSTEMD_BOOT_DEB_URL}"; \
curl -fsSL "${SYSTEMD_BOOT_DEB_URL}" -o /artifacts/systemd-boot-efi.deb; \
dpkg-deb -xv /artifacts/systemd-boot-efi.deb /artifacts/systemd; \
test -d /artifacts/systemd/usr/lib/systemd/boot/efi

ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
26 changes: 26 additions & 0 deletions CI/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# CI Docker Image

This directory contains a Dockerfile used to build a reproducible CI image for generating ARM64 boot images.

## Base Image
- Ubuntu 24.04

## Features
- ARM64 cross-compilation support
- Systemd ukify tooling
- mkbootimg utility
- FAT filesystem utilities
- Required scripts pre-installed:
- generate_boot_bins.sh
- build.sh
- make_fitimage.sh

## Build the Docker Image

```bash
docker build \
--build-arg USER_ID=$(id -u) \
--build-arg GROUP_ID=$(id -g) \
--build-arg USER_NAME=$(whoami) \
-t make-image-ci \
.
Loading