Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/gen-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
type: boolean
live_archs:
description: "Archs to build live ISOs for"
default: "x86_64 x86_64-musl i686 aarch64 aarch64-musl"
default: "x86_64 x86_64-musl i686 aarch64 aarch64-musl asahi asahi-musl"
required: false
type: string
live_flavors:
Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
DATECODE:=$(shell date -u "+%Y%m%d")
SHELL=/bin/bash

T_LIVE_ARCHS=i686 x86_64{,-musl} aarch64{,-musl}
T_LIVE_ARCHS=i686 x86_64{,-musl} aarch64{,-musl} asahi{,-musl}

T_PLATFORMS=rpi-{armv{6,7}l,aarch64}{,-musl} GCP{,-musl} pinebookpro{,-musl}
T_PLATFORMS=rpi-{armv{6,7}l,aarch64}{,-musl} GCP{,-musl} pinebookpro{,-musl} asahi{,-musl}
T_ARCHS=i686 x86_64{,-musl} armv{6,7}l{,-musl} aarch64{,-musl}

T_SBC_IMGS=rpi-{armv{6,7}l,aarch64}{,-musl} pinebookpro{,-musl}
Expand Down Expand Up @@ -62,7 +62,9 @@ live-iso-all-print:

void-live-%.iso: mkiso.sh
@[ -n "${CI}" ] && printf "::group::\x1b[32mBuilding $@...\x1b[0m\n" || true
$(SUDO) ./mkiso.sh -r $(REPOSITORY) -t $* -- -P "$(LIVE_PLATFORMS)"
$(if $(findstring aarch64,$*), \
$(SUDO) ./mkiso.sh -r $(REPOSITORY) -t $* -- -P $(LIVE_PLATFORMS), \
$(SUDO) ./mkiso.sh -r $(REPOSITORY) -t $*)
@[ -n "${CI}" ] && printf '::endgroup::\n' || true

rootfs-all: $(ALL_ROOTFS)
Expand Down
6 changes: 3 additions & 3 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ set_target_arch_from_platform() {
pinephone*) XBPS_TARGET_ARCH="aarch64";;
rock64*) XBPS_TARGET_ARCH="aarch64";;
rockpro64*) XBPS_TARGET_ARCH="aarch64";;
asahi*) XBPS_TARGET_ARCH="aarch64";;
*) die "$PROGNAME: Unable to compute target architecture from platform";;
esac

Expand Down
8 changes: 7 additions & 1 deletion mkimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ PLATFORM="${PLATFORM%-PLATFORMFS*}"

# Be absolutely certain the platform is supported before continuing
case "$PLATFORM" in
rpi-armv6l|rpi-armv7l|rpi-aarch64|GCP|pinebookpro|pinephone|rock64|rockpro64|*-musl);;
rpi-armv6l|rpi-armv7l|rpi-aarch64|GCP|pinebookpro|pinephone|rock64|rockpro64|asahi|*-musl);;
*) die "The $PLATFORM is not supported, exiting..."
esac

Expand Down Expand Up @@ -350,6 +350,12 @@ GCP*)
# run_cmd_chroot commands
cleanup_chroot
;;
asahi*)
mount_pseudofs
run_cmd_chroot "${ROOTFS}" "grub-install --target=arm64-efi --efi-directory=/boot --removable"
run_cmd_chroot "${ROOTFS}" "xbps-reconfigure -f linux-asahi"
cleanup_chroot
;;
esac

# Release all the mounts, deconfigure the loop device, and remove the
Expand Down
32 changes: 27 additions & 5 deletions mkiso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ usage() {
Adds void-installer and other helpful utilities to the generated images.

OPTIONS
-a <arch> Set XBPS_ARCH in the image
-a <arch> Set architecture (or platform) in the image
-b <variant> One of base, enlightenment, xfce, mate, cinnamon, gnome, kde,
lxde, or lxqt (default: base). May be specified multiple times
to build multiple variants
Expand Down Expand Up @@ -71,6 +71,12 @@ include_installer() {

setup_pipewire() {
PKGS="$PKGS pipewire alsa-pipewire"
case "$ARCH" in
asahi*)
PKGS="$PKGS asahi-audio"
SERVICES="$SERVICES speakersafetyd"
;;
esac
mkdir -p "$INCLUDEDIR"/etc/xdg/autostart
ln -sf /usr/share/applications/pipewire.desktop "$INCLUDEDIR"/etc/xdg/autostart/
mkdir -p "$INCLUDEDIR"/etc/pipewire/pipewire.conf.d
Expand All @@ -91,13 +97,28 @@ build_variant() {
# thus everyone should just do a chroot install anyways
WANT_INSTALLER=no
case "$ARCH" in
x86_64*|i686*) GRUB_PKGS="grub-i386-efi grub-x86_64-efi"; WANT_INSTALLER=yes ;;
aarch64*) GRUB_PKGS="grub-arm64-efi" ;;
x86_64*|i686*)
GRUB_PKGS="grub-i386-efi grub-x86_64-efi"
GFX_PKGS="xorg-video-drivers"
WANT_INSTALLER=yes
TARGET_ARCH="$ARCH"
;;
aarch64*)
GRUB_PKGS="grub-arm64-efi"
GFX_PKGS="xorg-video-drivers"
TARGET_ARCH="$ARCH"
;;
asahi*)
GRUB_PKGS="asahi-base asahi-scripts grub-arm64-efi"
GFX_PKGS="mesa-asahi-dri"
KERNEL_PKG="linux-asahi"
TARGET_ARCH="aarch64${ARCH#asahi}"
;;
esac

A11Y_PKGS="espeakup void-live-audio brltty"
PKGS="dialog cryptsetup lvm2 mdadm void-docs-browse xtools-minimal xmirror chrony tmux $A11Y_PKGS $GRUB_PKGS"
XORG_PKGS="xorg-minimal xorg-input-drivers xorg-video-drivers setxkbmap xauth font-misc-misc terminus-font dejavu-fonts-ttf orca"
XORG_PKGS="$GFX_PKGS xorg-minimal xorg-input-drivers setxkbmap xauth font-misc-misc terminus-font dejavu-fonts-ttf orca"
SERVICES="sshd chronyd"

LIGHTDM_SESSION=''
Expand Down Expand Up @@ -171,7 +192,8 @@ EOF
setup_pipewire
fi

./mklive.sh -a "$ARCH" -o "$IMG" -p "$PKGS" -S "$SERVICES" -I "$INCLUDEDIR" ${REPO} "$@"
./mklive.sh -a "$TARGET_ARCH" -o "$IMG" -p "$PKGS" -S "$SERVICES" -I "$INCLUDEDIR" \
${KERNEL_PKG:+-v $KERNEL_PKG} ${REPO} "$@"

cleanup
}
Expand Down
8 changes: 8 additions & 0 deletions mklive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,10 @@ case "$LINUX_VERSION" in
PACKAGE_LIST+=("$LINUX_VERSION")
LINUX_VERSION="$(XBPS_ARCH=$TARGET_ARCH $XBPS_QUERY_CMD -r "$ROOTFS" ${XBPS_REPOSITORY:=-R} -x "$LINUX_VERSION" | grep 'linux[0-9._]\+')"
;;
linux-asahi)
IGNORE_PKGS+=(linux)
PACKAGE_LIST+=(linux-asahi linux-base)
;;
linux)
PACKAGE_LIST+=(linux)
LINUX_VERSION="$(XBPS_ARCH=$TARGET_ARCH $XBPS_QUERY_CMD -r "$ROOTFS" ${XBPS_REPOSITORY:=-R} -x linux | grep 'linux[0-9._]\+')"
Expand All @@ -639,6 +643,10 @@ shopt -u extglob
_kver="$(XBPS_ARCH=$TARGET_ARCH $XBPS_QUERY_CMD -r "$ROOTFS" ${XBPS_REPOSITORY:=-R} -p pkgver $LINUX_VERSION)"
KERNELVERSION=$($XBPS_UHELPER_CMD getpkgversion ${_kver})

if [ "$LINUX_VERSION" = linux-asahi ]; then
KERNELVERSION="${KERNELVERSION%%_*}-asahi_${KERNELVERSION##*_}"
fi

if [ "$?" -ne "0" ]; then
die "Failed to find kernel package version"
fi
Expand Down
5 changes: 3 additions & 2 deletions mkplatformfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ usage() {

Supported platforms: i686, x86_64, GCP,
rpi-armv6l, rpi-armv7l, rpi-aarch64,
pinebookpro, pinephone, rock64, rockpro64
pinebookpro, pinephone, rock64, rockpro64, asahi

OPTIONS
-b <system-pkg> Set an alternative base-system package (default: base-system)
-c <cachedir> Set the XBPS cache directory (default: ./xbps-cachedir-<arch>)
Expand Down Expand Up @@ -128,6 +128,7 @@ case "$PLATFORM" in
pinephone*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
rock64*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
rockpro64*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
asahi*) PKGS="$BASEPKG asahi-base asahi-scripts grub-arm64-efi dracut" ;;
*) die "$PROGNAME: invalid platform!";;
esac

Expand Down