piCore64 v15.0.0 ships BusyBox built with ARM instructions that QEMU virt cannot emulate even under -cpu max — applets like mkdir, uname, readlink SIGILL on first invocation (el0_undef in the panic trace). mount works because piCore's busybox.suid happens to use a different code path. Fix: when building the arm64 rootfs, replace piCore's bin/busybox and bin/busybox.suid with /bin/busybox from the build host (Ubuntu's busybox-static, statically linked, built for generic ARMv8-A). Also add busybox-static to Dockerfile.builder so the Docker-based build flow has the same fallback available. Long-term: source a known-good ARM64 BusyBox build (Alpine, or our own from upstream BusyBox) so we don't depend on the build host's package manager. Tracked as future work. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
67 lines
1.4 KiB
Ruby
67 lines
1.4 KiB
Ruby
FROM --platform=linux/amd64 ubuntu:24.04
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Install build tools + kernel build dependencies
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
bash \
|
|
bc \
|
|
bison \
|
|
build-essential \
|
|
ca-certificates \
|
|
cpio \
|
|
curl \
|
|
dosfstools \
|
|
dwarves \
|
|
e2fsprogs \
|
|
fdisk \
|
|
file \
|
|
flex \
|
|
genisoimage \
|
|
grub-common \
|
|
grub-efi-amd64-bin \
|
|
grub-efi-arm64-bin \
|
|
grub-pc-bin \
|
|
grub2-common \
|
|
gzip \
|
|
isolinux \
|
|
iptables \
|
|
kmod \
|
|
libarchive-tools \
|
|
libelf-dev \
|
|
libssl-dev \
|
|
make \
|
|
parted \
|
|
squashfs-tools \
|
|
syslinux \
|
|
syslinux-common \
|
|
syslinux-utils \
|
|
apparmor \
|
|
apparmor-utils \
|
|
gcc-aarch64-linux-gnu \
|
|
binutils-aarch64-linux-gnu \
|
|
busybox-static \
|
|
git \
|
|
kpartx \
|
|
unzip \
|
|
wget \
|
|
xorriso \
|
|
xz-utils \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Go (for building cloud-init and update agent)
|
|
ARG GO_VERSION=1.25.5
|
|
RUN curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" \
|
|
| tar -C /usr/local -xzf -
|
|
ENV PATH="/usr/local/go/bin:${PATH}"
|
|
|
|
WORKDIR /build
|
|
COPY . /build
|
|
|
|
RUN chmod +x build/scripts/*.sh build/config/*.sh \
|
|
&& chmod +x hack/*.sh 2>/dev/null || true \
|
|
&& chmod +x test/qemu/*.sh test/integration/*.sh test/kernel/*.sh 2>/dev/null || true
|
|
|
|
ENTRYPOINT ["/usr/bin/make"]
|
|
CMD ["iso"]
|