Skip to content
Closed
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ that can change the behavior of the live system:
- `live.autologin` will skip the initial login screen on `tty1`.
- `live.user` will change the username of the non-root user from the default `anon`. The password remains `voidlinux`.
- `live.shell` sets the default shell for the non-root user in the live environment.
- `live.screenreader` enables the console screenreader `espeakup` in the live environment.
- `live.accessibility` enables accessibility features like the console screenreader `espeakup` in the live environment.
- `console` can be set to `ttyS0`, `hvc0`, or `hvsi0` to enable `agetty` on that serial console.
- `locale.LANG` will set the `LANG` environment variable. Defaults to `en_US.UTF-8`.
- `vconsole.keymap` will set the console keymap. Defaults to `us`.
Expand Down
24 changes: 20 additions & 4 deletions build-x86-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,26 @@ cleanup() {
rm -r "$INCLUDEDIR"
}

setup_pipewire() {
PKGS="$PKGS pipewire alsa-pipewire"
mkdir -p "$INCLUDEDIR"/etc/xdg/autostart
ln -s /usr/share/applications/pipewire.desktop "$INCLUDEDIR"/etc/xdg/autostart/
mkdir -p "$INCLUDEDIR"/etc/pipewire/pipewire.conf.d
ln -s /usr/share/examples/wireplumber/10-wireplumber.conf "$INCLUDEDIR"/etc/pipewire/pipewire.conf.d/
ln -s /usr/share/examples/pipewire/20-pipewire-pulse.conf "$INCLUDEDIR"/etc/pipewire/pipewire.conf.d/
mkdir -p "$INCLUDEDIR"/etc/alsa/conf.d
ln -s /usr/share/alsa/alsa.conf.d/50-pipewire.conf "$INCLUDEDIR"/etc/alsa/conf.d
ln -s /usr/share/alsa/alsa.conf.d/99-pipewire-default.conf "$INCLUDEDIR"/etc/alsa/conf.d
}

build_variant() {
variant="$1"
shift
IMG=void-live-${ARCH}-${DATE}-${variant}.iso
GRUB_PKGS="grub-i386-efi grub-x86_64-efi"
PKGS="dialog cryptsetup lvm2 mdadm void-docs-browse xtools-minimal xmirror $GRUB_PKGS"
PKGS="dialog cryptsetup lvm2 mdadm void-docs-browse xtools-minimal xmirror espeakup $GRUB_PKGS"
XORG_PKGS="xorg-minimal xorg-input-drivers xorg-video-drivers setxkbmap xauth font-misc-misc terminus-font dejavu-fonts-ttf alsa-plugins-pulseaudio"
A11Y_PKGS="espeakup void-live-audio brltty orca"
PKGS="dialog cryptsetup lvm2 mdadm void-docs-browse xtools-minimal xmirror $A11Y_PKGS $GRUB_PKGS"
XORG_PKGS="xorg-minimal xorg-input-drivers xorg-video-drivers setxkbmap xauth font-misc-misc terminus-font dejavu-fonts-ttf"
SERVICES="sshd"

LIGHTDM_SESSION=''
Expand All @@ -58,7 +70,7 @@ build_variant() {
LIGHTDM_SESSION=enlightenment
;;
xfce)
PKGS="$PKGS $XORG_PKGS lightdm lightdm-gtk3-greeter xfce4 gnome-themes-standard gnome-keyring network-manager-applet gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox"
PKGS="$PKGS $XORG_PKGS lightdm lightdm-gtk3-greeter xfce4 gnome-themes-standard gnome-keyring network-manager-applet gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox xfce4-pulseaudio-plugin"
SERVICES="$SERVICES dbus elogind lightdm NetworkManager polkitd"
LIGHTDM_SESSION=xfce
;;
Expand Down Expand Up @@ -100,6 +112,10 @@ build_variant() {
echo "$LIGHTDM_SESSION" > "$INCLUDEDIR"/etc/lightdm/.session
fi

if [ "$variant" != base ]; then
setup_pipewire
fi

./mklive.sh -a "$ARCH" -o "$IMG" -p "$PKGS" -S "$SERVICES" -I "$INCLUDEDIR" ${REPO} "$@"
}

Expand Down
10 changes: 10 additions & 0 deletions dracut/vmklive/accessibility.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh -x
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

type getargbool >/dev/null 2>&1 || . /lib/dracut-lib.sh

if getargbool 0 live.accessibility; then
[ -d "${NEWROOT}/etc/sv/espeakup" ] && ln -s "/etc/sv/espeakup" "${NEWROOT}/etc/runit/runsvdir/current/"
[ -d "${NEWROOT}/etc/sv/brltty" ] && ln -s "/etc/sv/brltty" "${NEWROOT}/etc/runit/runsvdir/current/"
fi
2 changes: 1 addition & 1 deletion dracut/vmklive/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ install() {
inst_hook pre-pivot 02 "$moddir/display-manager-autologin.sh"
inst_hook pre-pivot 02 "$moddir/getty-serial.sh"
inst_hook pre-pivot 03 "$moddir/locale.sh"
inst_hook pre-pivot 04 "$moddir/screenreader.sh"
inst_hook pre-pivot 04 "$moddir/accessibility.sh"
}
9 changes: 0 additions & 9 deletions dracut/vmklive/screenreader.sh

This file was deleted.

87 changes: 64 additions & 23 deletions grub/grub_void.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,85 @@ set pager="1"
set locale_dir="(${voidlive})/boot/grub/locale"

if [ -e "${prefix}/${grub_cpu}-${grub_platform}/all_video.mod" ]; then
insmod all_video
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod video_bochs
insmod video_cirrus
insmod efi_gop
insmod efi_uga
insmod video_bochs
insmod video_cirrus
fi

insmod font

if loadfont "(${voidlive})/boot/grub/fonts/unicode.pf2" ; then
insmod gfxterm
set gfxmode="auto"
terminal_input console
terminal_output gfxterm
insmod png
background_image "(${voidlive})/boot/isolinux/@@SPLASHIMAGE@@"
insmod gfxterm
set gfxmode="auto"

terminal_input console
terminal_output gfxterm

insmod png
background_image "(${voidlive})/boot/isolinux/@@SPLASHIMAGE@@"
fi

# Set default menu entry
default=linux
timeout=15
timeout_style=menu

# GRUB init tune for accessibility
play 600 988 1 1319 4

if [ cpuid -l ]; then
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@)" {
set gfxpayload="keep"
linux (${voidlive})/boot/vmlinuz \
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@)" --id "linux" {
set gfxpayload="keep"
linux (${voidlive})/boot/vmlinuz \
root=live:CDLABEL=VOID_LIVE ro init=/sbin/init \
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@
initrd (${voidlive})/boot/initrd
}
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@) (RAM)" {
set gfxpayload="keep"
linux (${voidlive})/boot/vmlinuz \
initrd (${voidlive})/boot/initrd
}
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@) (RAM)" --id "linuxram" {
set gfxpayload="keep"
linux (${voidlive})/boot/vmlinuz \
root=live:CDLABEL=VOID_LIVE ro init=/sbin/init \
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ rd.live.ram
initrd (${voidlive})/boot/initrd
}
initrd (${voidlive})/boot/initrd
}
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@) with speech" --hotkey s --id "linuxa11y" {
set gfxpayload="keep"
linux (${voidlive})/boot/vmlinuz \
root=live:CDLABEL=VOID_LIVE ro init=/sbin/init \
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ live.accessibility live.autologin
initrd (${voidlive})/boot/initrd
}
if [ "${grub_platform}" == "efi" ]; then
menuentry "Run Memtest86+ (RAM test)" --id memtest {
set gfxpayload="keep"
linux (${voidlive})/boot/memtest.efi
}
menuentry 'UEFI Firmware Settings' --id uefifw {
fwsetup
}
else
menuentry "Run Memtest86+ (RAM test)" --id memtest {
set gfxpayload="keep"
linux (${voidlive})/boot/memtest.bin
}
fi

menuentry "System restart" --id restart {
echo "System rebooting..."
reboot
}

menuentry "System shutdown" --id poweroff {
echo "System shutting down..."
halt
}
fi
5 changes: 4 additions & 1 deletion installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1325,10 +1325,13 @@ ${BOLD}Do you want to continue?${RESET}" 20 80 || return
INFOBOX "Removing temporary packages from target ..." 4 60
echo "Removing temporary packages from target ..." >$LOG
TO_REMOVE="dialog xtools-minimal"
# only remove espeakup if it wasn't enabled in the live environment
# only remove espeakup and brltty if it wasn't enabled in the live environment
if ! [ -e "/var/service/espeakup" ]; then
TO_REMOVE+=" espeakup"
fi
if ! [ -e "/var/service/brltty" ]; then
TO_REMOVE+=" brltty"
fi
xbps-remove -r $TARGETDIR -Ry $TO_REMOVE >>$LOG 2>&1
rmdir $TARGETDIR/mnt/target
else
Expand Down
31 changes: 25 additions & 6 deletions isolinux/isolinux.cfg.in
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
UI vesamenu.c32
PROMPT 0
TIMEOUT 100
TIMEOUT 150
ONTIMEOUT linux

MENU TABMSG Press ENTER to boot or TAB to edit a menu entry
MENU AUTOBOOT BIOS default device boot in # second{,s}...
MENU BACKGROUND @@SPLASHIMAGE@@
MENU WIDTH 78
MENU MARGIN 1
MENU ROWS 4
MENU ROWS 8
MENU VSHIFT 2
MENU TIMEOUTROW 8
MENU TIMEOUTROW 12
MENU TABMSGROW 2
MENU CMDLINEROW 11
MENU HELPMSGROW 16
MENU HELPMSGENDROW 29
MENU CMDLINEROW 15
MENU HELPMSGROW 19
MENU HELPMSGENDROW 33

MENU COLOR title * #FF5255FF *
MENU COLOR border * #00000000 #00000000 none
Expand All @@ -24,11 +24,30 @@ LABEL linux
MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@
KERNEL /boot/vmlinuz
APPEND initrd=/boot/initrd root=live:CDLABEL=VOID_LIVE init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@

LABEL linuxram
MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@ (RAM)
KERNEL /boot/vmlinuz
APPEND initrd=/boot/initrd root=live:CDLABEL=VOID_LIVE init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ rd.live.ram

LABEL linuxa11y
MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@ (with ^speech)
KERNEL /boot/vmlinuz
APPEND initrd=/boot/initrd root=live:CDLABEL=VOID_LIVE init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ live.accessibility live.autologin

LABEL c
MENU LABEL Boot first HD found by BIOS
COM32 chain.c32
APPEND hd0

LABEL memtest
MENU LABEL Run Memtest86+ (RAM test)
LINUX /boot/memtest.bin

LABEL reboot
MENU LABEL Reboot
COM32 reboot.c32

LABEL poweroff
MENU LABEL Power Off
COM32 poweroff.c32
10 changes: 9 additions & 1 deletion mklive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ umask 022

. ./lib.sh

readonly REQUIRED_PKGS="base-files libgcc dash coreutils sed tar gawk syslinux grub-i386-efi grub-x86_64-efi squashfs-tools xorriso"
readonly REQUIRED_PKGS="base-files libgcc dash coreutils sed tar gawk syslinux grub-i386-efi grub-x86_64-efi memtest86+ squashfs-tools xorriso"
readonly INITRAMFS_PKGS="binutils xz device-mapper dhclient dracut-network openresolv"
readonly PROGNAME=$(basename "$0")
declare -a INCLUDE_DIRS=()
Expand Down Expand Up @@ -189,6 +189,8 @@ generate_isolinux_boot() {
cp -f "$SYSLINUX_DATADIR"/vesamenu.c32 "$ISOLINUX_DIR"
cp -f "$SYSLINUX_DATADIR"/libutil.c32 "$ISOLINUX_DIR"
cp -f "$SYSLINUX_DATADIR"/chain.c32 "$ISOLINUX_DIR"
cp -f "$SYSLINUX_DATADIR"/reboot.c32 "$ISOLINUX_DIR"
cp -f "$SYSLINUX_DATADIR"/poweroff.c32 "$ISOLINUX_DIR"
cp -f isolinux/isolinux.cfg.in "$ISOLINUX_DIR"/isolinux.cfg
cp -f ${SPLASH_IMAGE} "$ISOLINUX_DIR"

Expand All @@ -200,6 +202,9 @@ generate_isolinux_boot() {
-e "s|@@BOOT_TITLE@@|${BOOT_TITLE}|" \
-e "s|@@BOOT_CMDLINE@@|${BOOT_CMDLINE}|" \
"$ISOLINUX_DIR"/isolinux.cfg

# include memtest86+
cp -f "$VOIDHOSTDIR"/boot/memtest.bin "$BOOT_DIR"
}

generate_grub_efi_boot() {
Expand Down Expand Up @@ -252,6 +257,9 @@ generate_grub_efi_boot() {
umount "$GRUB_EFI_TMPDIR"
losetup --detach "${LOOP_DEVICE}"
rm -rf "$GRUB_EFI_TMPDIR"

# include memtest86+
cp -f "$VOIDHOSTDIR"/boot/memtest.efi "$BOOT_DIR"
}

generate_squashfs() {
Expand Down