Skip to content

Add Raspberry Pi (arm64) raspbian distro with its own bake target#1

Draft
dseif0x with Copilot wants to merge 2 commits into
mainfrom
copilot/add-raspbian-arm64-support
Draft

Add Raspberry Pi (arm64) raspbian distro with its own bake target#1
dseif0x with Copilot wants to merge 2 commits into
mainfrom
copilot/add-raspbian-arm64-support

Conversation

Copilot AI commented Mar 22, 2026

Copy link
Copy Markdown

Adds a new raspbian distro targeting linux/arm64 only, using traditional Raspberry Pi firmware boot instead of GRUB EFI.

New files

  • raspbian/Dockerfiledebian:bookworm-slim base; adds the RPi Foundation apt repo to pull raspberrypi-bootloader (GPU firmware: start4.elf, fixup4.dat, overlays, etc.); installs linux-image-arm64 + systemd networking

docker-bake.hcl

  • New standalone target "rootfs-raspbian" and target "disk-image-raspbian"linux/arm64 only, EFI_SIZE=256M (to fit firmware + kernel + initrd)
  • Intentionally excluded from default group to avoid conflicts with the CI matrix *.platform override

Dockerfile.disk-image

  • ARG DISTRO moved before the package install RUN so the GRUB condition works
  • GRUB packages (grub-efi-*-bin, grub2-common) skipped when DISTRO=raspbian

build-image.sh

  • BOOT_MNT variable replaces the hardcoded /boot/efi path — set to /boot/firmware for raspbian, /boot/efi otherwise; propagated through cleanup, mount, unmount, and fstab
  • RPi boot path (triggered when DISTRO=raspbian): copies vmlinuz-*kernel8.img and initrd.img-*initrd.img onto the FAT32 partition, then writes:
    • config.txtarm_64bit=1, kernel/initramfs pointers
    • cmdline.txtPARTUUID-based root, serial console, rootwait
# Build the Raspberry Pi disk image
docker buildx bake disk-image-raspbian --allow=security.insecure
# → ./output/raspbian/disk.img

⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.

Copilot AI changed the title [WIP] Add Raspberry Pi arm64 support as a new Raspbian target Add Raspberry Pi (arm64) raspbian distro with its own bake target Mar 22, 2026
Copilot AI requested a review from dseif0x March 22, 2026 20:28
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.

2 participants