This commit is contained in:
mollusk 2018-11-18 06:51:33 -07:00
commit d19dec5f71
11 changed files with 184 additions and 130 deletions

View File

@ -27,7 +27,7 @@ ALL_PXE_ARCHS=$(foreach arch,$(PXE_ARCHS),void-$(arch)-NETBOOT-$(DATE).tar.gz)
SUDO := sudo SUDO := sudo
XBPS_REPOSITORY := -r https://repo.voidlinux.eu/current -r https://repo.voidlinux.eu/current/musl -r https://repo.voidlinux.eu/current/aarch64 XBPS_REPOSITORY := -r https://alpha.de.repo.voidlinux.org/current -r https://alpha.de.repo.voidlinux.org/current/musl -r https://alpha.de.repo.voidlinux.org/current/aarch64
COMPRESSOR_THREADS=2 COMPRESSOR_THREADS=2
%.sh: %.sh.in %.sh: %.sh.in

View File

@ -28,12 +28,12 @@ readonly LXQT_IMG=void-live-${ARCH}-${DATE}-lxqt.iso
readonly GRUB="grub-i386-efi grub-x86_64-efi" readonly GRUB="grub-i386-efi grub-x86_64-efi"
readonly BASE_PKGS="dialog cryptsetup lvm2 mdadm $GRUB" readonly BASE_PKGS="dialog cryptsetup lvm2 mdadm $GRUB"
readonly X_PKGS="$BASE_PKGS xorg-minimal xorg-input-drivers xorg-video-drivers setxkbmap xauth font-misc-misc terminus-font dejavu-fonts-ttf alsa-plugins-pulseaudio" readonly X_PKGS="$BASE_PKGS xorg-minimal xorg-input-drivers xorg-video-drivers setxkbmap xauth font-misc-misc terminus-font dejavu-fonts-ttf alsa-plugins-pulseaudio intel-ucode"
readonly E_PKGS="$X_PKGS lxdm enlightenment terminology econnman udisks2 firefox-esr" readonly E_PKGS="$X_PKGS lxdm enlightenment terminology econnman udisks2 firefox-esr"
readonly XFCE_PKGS="$X_PKGS lxdm xfce4 gnome-themes-standard gnome-keyring network-manager-applet gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr" readonly XFCE_PKGS="$X_PKGS lxdm xfce4 gnome-themes-standard gnome-keyring network-manager-applet gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr"
readonly MATE_PKGS="$X_PKGS lxdm mate mate-extra gnome-keyring network-manager-applet gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr" readonly MATE_PKGS="$X_PKGS lxdm mate mate-extra gnome-keyring network-manager-applet gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr"
readonly CINNAMON_PKGS="$X_PKGS lxdm cinnamon gnome-keyring colord gnome-terminal gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr" readonly CINNAMON_PKGS="$X_PKGS lxdm cinnamon gnome-keyring colord gnome-terminal gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr"
readonly KDE_PKGS="$X_PKGS kde" readonly KDE_PKGS="$X_PKGS kde5 konsole firefox dolphin"
readonly LXDE_PKGS="$X_PKGS lxdm lxde gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr" readonly LXDE_PKGS="$X_PKGS lxdm lxde gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr"
readonly LXQT_PKGS="$X_PKGS lxdm lxqt gvfs-afc gvfs-mtp gvfs-smb udisks2 qupzilla" readonly LXQT_PKGS="$X_PKGS lxdm lxqt gvfs-afc gvfs-mtp gvfs-smb udisks2 qupzilla"

View File

@ -20,8 +20,8 @@
# XBPS Configuration # XBPS Configuration
# === # ===
# xbpsrepository: which repo should the install pull from # xbpsrepository: which repo should the install pull from
# default: http://repo.voidlinux.eu/current # default: http://alpha.de.repo.voidlinux.org/current
#xbpsrepository="http://repo.voidlinux.eu/current" #xbpsrepository="http://alpha.de.repo.voidlinux.org/current"
# pkgs: additional packages to install into the target # pkgs: additional packages to install into the target
# default: none # default: none

View File

@ -201,10 +201,10 @@ VAI_configure_autoinstall() {
XBPS_ARCH="$(xbps-uhelper arch)" XBPS_ARCH="$(xbps-uhelper arch)"
case $XBPS_ARCH in case $XBPS_ARCH in
*-musl) *-musl)
xbpsrepository="https://repo.voidlinux.eu/current/musl" xbpsrepository="https://alpha.de.repo.voidlinux.org/current/musl"
;; ;;
*) *)
xbpsrepository="https://repo.voidlinux.eu/current" xbpsrepository="https://alpha.de.repo.voidlinux.org/current"
;; ;;
esac esac

View File

@ -21,10 +21,14 @@ if [ -d ${NEWROOT}/etc/gdm ]; then
fi fi
fi fi
# Configure KDM autologin # Configure sddm autologin for the kde iso.
if [ -e ${NEWROOT}/etc/kdm/kdmrc ]; then if [ -r ${NEWROOT}/etc/sddm.conf ]; then
sed -i -e "s|^\#\(AutoLoginEnable=\).*|\1|" ${NEWROOT}/etc/kdm/kdmrc mv ${NEWROOT}/etc/sddm.conf ${NEWROOT}/etc/sddm.conf.old
sed -i -e "s|^\#\(AutoLoginUser=\).*|\1$USERNAME|" ${NEWROOT}/etc/kdm/kdmrc cat > ${NEWROOT}/etc/sddm.conf <<_EOF
[Autologin]
User=anon
Session=plasma.desktop
_EOF
fi fi
# Configure lightdm autologin. # Configure lightdm autologin.
@ -52,5 +56,7 @@ if [ -r ${NEWROOT}/etc/lxdm/lxdm.conf ]; then
sed -e "s,.*session.*=.*,session=/usr/bin/startlxde," -i ${NEWROOT}/etc/lxdm/lxdm.conf sed -e "s,.*session.*=.*,session=/usr/bin/startlxde," -i ${NEWROOT}/etc/lxdm/lxdm.conf
elif [ -x ${NEWROOT}/usr/bin/startlxqt ]; then elif [ -x ${NEWROOT}/usr/bin/startlxqt ]; then
sed -e "s,.*session.*=.*,session=/usr/bin/startlxqt," -i ${NEWROOT}/etc/lxdm/lxdm.conf sed -e "s,.*session.*=.*,session=/usr/bin/startlxqt," -i ${NEWROOT}/etc/lxdm/lxdm.conf
elif [ -x ${NEWROOT}/usr/bin/startfluxbox ]; then
sed -e "s,.*session.*=.*,session=/usr/bin/startfluxbox," -i ${NEWROOT}/etc/lxdm/lxdm.conf
fi fi
fi fi

View File

@ -379,6 +379,18 @@ show_partitions() {
fi fi
done done
done done
# Device Mapper
for p in /dev/mapper/*; do
part=$(basename $p)
[ "${part}" = "live-rw" ] && continue
[ "${part}" = "live-base" ] && continue
[ "${part}" = "control" ] && continue
fstype=$(lsblk -nfr $p|awk '{print $2}'|head -1)
fssize=$(lsblk -nr $p|awk '{print $4}'|head -1)
echo "${p}"
echo "size:${fssize:-unknown};fstype:${fstype:-none}"
done
# Software raid (md) # Software raid (md)
for p in $(ls -d /dev/md* 2>/dev/null|grep '[0-9]'); do for p in $(ls -d /dev/md* 2>/dev/null|grep '[0-9]'); do
part=$(basename $p) part=$(basename $p)
@ -482,7 +494,7 @@ ${BOLD}NOTE: you don't need this on EFI systems.${RESET}\n\n
For EFI systems GPT is mandatory and a FAT32 partition with at least\n For EFI systems GPT is mandatory and a FAT32 partition with at least\n
100MB must be created with the TOGGLE \`boot', this will be used as\n 100MB must be created with the TOGGLE \`boot', this will be used as\n
EFI System Partition. This partition must have mountpoint as \`/boot/efi'.\n\n EFI System Partition. This partition must have mountpoint as \`/boot/efi'.\n\n
At least 1 partitions is required for the rootfs (/).\n At least 1 partition is required for the rootfs (/).\n
For swap, RAM*2 must be really enough. For / 600MB are required.\n\n For swap, RAM*2 must be really enough. For / 600MB are required.\n\n
${BOLD}WARNING: /usr is not supported as a separate partition.${RESET}\n ${BOLD}WARNING: /usr is not supported as a separate partition.${RESET}\n
${RESET}\n" 18 80 ${RESET}\n" 18 80
@ -795,7 +807,7 @@ set_bootloader() {
test_network() { test_network() {
rm -f xtraeme.asc && \ rm -f xtraeme.asc && \
xbps-uhelper fetch http://repo.voidlinux.eu/live/xtraeme.asc >$LOG 2>&1 xbps-uhelper fetch http://alpha.de.repo.voidlinux.org/live/xtraeme.asc >$LOG 2>&1
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
DIALOG --msgbox "Network is working properly!" ${MSGBOXSIZE} DIALOG --msgbox "Network is working properly!" ${MSGBOXSIZE}
NETWORK_DONE=1 NETWORK_DONE=1
@ -945,6 +957,7 @@ validate_filesystems() {
mnts=$(grep -E '^MOUNTPOINT.*' $CONF_FILE) mnts=$(grep -E '^MOUNTPOINT.*' $CONF_FILE)
set -- ${mnts} set -- ${mnts}
while [ $# -ne 0 ]; do while [ $# -ne 0 ]; do
fmt=""
dev=$2; fstype=$3; size=$4; mntpt="$5"; mkfs=$6 dev=$2; fstype=$3; size=$4; mntpt="$5"; mkfs=$6
shift 6 shift 6
@ -1215,6 +1228,8 @@ ${BOLD}Do you want to continue?${RESET}" 20 80 || return
rm -f $TARGETDIR/etc/motd rm -f $TARGETDIR/etc/motd
rm -f $TARGETDIR/etc/issue rm -f $TARGETDIR/etc/issue
rm -f $TARGETDIR/usr/sbin/void-installer rm -f $TARGETDIR/usr/sbin/void-installer
# Remove modified sddm.conf to let sddm use the defaults.
rm -f $TARGETDIR/etc/sddm.conf
# Remove live user. # Remove live user.
echo "Removing $USERNAME live user from targetdir ..." >$LOG echo "Removing $USERNAME live user from targetdir ..." >$LOG
chroot $TARGETDIR userdel -r $USERNAME >$LOG 2>&1 chroot $TARGETDIR userdel -r $USERNAME >$LOG 2>&1
@ -1284,15 +1299,17 @@ ${BOLD}Do you want to continue?${RESET}" 20 80 || return
fi fi
if [ -f $TARGETDIR/etc/sudoers ]; then if [ -f $TARGETDIR/etc/sudoers ]; then
if [ -z "$(echo $(get_option USERGROUPS) | grep -w wheel)" ]; then USERLOGIN="$(get_option USERLOGIN)"
# enable sudo for primary user USERLOGIN if [ -z "$(echo $(get_option USERGROUPS) | grep -w wheel)" -a -n "$USERLOGIN" ]; then
echo "# Enable sudo for login '$(get_option USERLOGIN)'" >> $TARGETDIR/etc/sudoers # enable sudo for primary user USERLOGIN who is not member of wheel
echo "$(get_option USERLOGIN) ALL=(ALL) ALL" >> $TARGETDIR/etc/sudoers echo "# Enable sudo for login '$USERLOGIN'" >> $TARGETDIR/etc/sudoers
echo "$USERLOGIN ALL=(ALL) ALL" >> $TARGETDIR/etc/sudoers
else else
# enable sudoers entry for members of group wheel for primary user # enable the sudoers entry for members of group wheel
sed -i $TARGETDIR/etc/sudoers \ sed -i $TARGETDIR/etc/sudoers \
-e "s;#.*%wheel ALL=(ALL) ALL;%wheel ALL=(ALL) ALL;" -e "s;#.*%wheel ALL=(ALL) ALL;%wheel ALL=(ALL) ALL;"
fi fi
unset USERLOGIN
fi fi
# enable text console for grub if chosen # enable text console for grub if chosen
@ -1343,23 +1360,42 @@ menu() {
DEFITEM="Keyboard" DEFITEM="Keyboard"
fi fi
DIALOG --default-item $DEFITEM \ if xbps-uhelper arch | grep '-musl$' > /dev/null; then
--extra-button --extra-label "Settings" \ DIALOG --default-item $DEFITEM \
--title " Void Linux installation menu " \ --extra-button --extra-label "Settings" \
--menu "$MENULABEL" 10 70 0 \ --title " Void Linux installation menu " \
"Keyboard" "Set system keyboard" \ --menu "$MENULABEL" 10 70 0 \
"Network" "Set up the network" \ "Keyboard" "Set system keyboard" \
"Source" "Set source installation" \ "Network" "Set up the network" \
"Hostname" "Set system hostname" \ "Source" "Set source installation" \
"Locale" "Set system locale" \ "Hostname" "Set system hostname" \
"Timezone" "Set system time zone" \ "Timezone" "Set system time zone" \
"RootPassword" "Set system root password" \ "RootPassword" "Set system root password" \
"UserAccount" "Set primary user name and password" \ "UserAccount" "Set primary user name and password" \
"BootLoader" "Set disk to install bootloader" \ "BootLoader" "Set disk to install bootloader" \
"Partition" "Partition disk(s)" \ "Partition" "Partition disk(s)" \
"Filesystems" "Configure filesystems and mount points" \ "Filesystems" "Configure filesystems and mount points" \
"Install" "Start installation with saved settings" \ "Install" "Start installation with saved settings" \
"Exit" "Exit installation" "Exit" "Exit installation"
else
DIALOG --default-item $DEFITEM \
--extra-button --extra-label "Settings" \
--title " Void Linux installation menu " \
--menu "$MENULABEL" 10 70 0 \
"Keyboard" "Set system keyboard" \
"Network" "Set up the network" \
"Source" "Set source installation" \
"Hostname" "Set system hostname" \
"Locale" "Set system locale" \
"Timezone" "Set system time zone" \
"RootPassword" "Set system root password" \
"UserAccount" "Set primary user name and password" \
"BootLoader" "Set disk to install bootloader" \
"Partition" "Partition disk(s)" \
"Filesystems" "Configure filesystems and mount points" \
"Install" "Start installation with saved settings" \
"Exit" "Exit installation"
fi
if [ $? -eq 3 ]; then if [ $? -eq 3 ]; then
# Show settings # Show settings

View File

@ -173,6 +173,12 @@ register_binfmt() {
_mask="\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff" _mask="\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff"
QEMU_BIN=qemu-aarch64-static QEMU_BIN=qemu-aarch64-static
;; ;;
ppc*)
_cpu=ppc
_magic="\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14"
_mask="\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff"
QEMU_BIN=qemu-ppc-static
;;
mipsel*) mipsel*)
_cpu=mipsel _cpu=mipsel
_magic="\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00" _magic="\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00"
@ -270,9 +276,9 @@ set_cachedir() {
# These should all resolve even if they won't have the appropriate # These should all resolve even if they won't have the appropriate
# repodata files for the selected architecture. # repodata files for the selected architecture.
: "${XBPS_REPOSITORY:=--repository=http://repo.voidlinux.eu/current \ : "${XBPS_REPOSITORY:=--repository=http://alpha.de.repo.voidlinux.org/current \
--repository=http://repo.voidlinux.eu/current/musl \ --repository=http://alpha.de.repo.voidlinux.org/current/musl \
--repository=http://repo.voidlinux.eu/current/aarch64}" --repository=http://alpha.de.repo.voidlinux.org/current/aarch64}"

View File

@ -31,7 +31,7 @@ umask 022
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 squashfs-tools xorriso"
readonly INITRAMFS_PKGS="binutils xz device-mapper dhclient dracut-network" readonly INITRAMFS_PKGS="binutils xz device-mapper dhclient dracut-network"
readonly PROGNAME=$(basename $0) readonly PROGNAME=$(basename "$0")
info_msg() { info_msg() {
printf "\033[1m$@\n\033[m" printf "\033[1m$@\n\033[m"
@ -46,19 +46,19 @@ print_step() {
} }
mount_pseudofs() { mount_pseudofs() {
for f in sys dev proc; do for f in sys dev proc; do
mkdir -p $ROOTFS/$f mkdir -p "$ROOTFS"/$f
mount --bind /$f $ROOTFS/$f mount --bind /$f "$ROOTFS"/$f
done done
} }
umount_pseudofs() { umount_pseudofs() {
umount -f $ROOTFS/sys >/dev/null 2>&1 umount -f "$ROOTFS"/sys >/dev/null 2>&1
umount -f $ROOTFS/dev >/dev/null 2>&1 umount -f "$ROOTFS"/dev >/dev/null 2>&1
umount -f $ROOTFS/proc >/dev/null 2>&1 umount -f "$ROOTFS"/proc >/dev/null 2>&1
} }
error_out() { error_out() {
umount_pseudofs umount_pseudofs
[ -d "$BUILDDIR" -a -z "$KEEP_BUILDDIR" ] && rm -rf "$BUILDDIR" [ -d "$BUILDDIR" -a -z "$KEEP_BUILDDIR" ] && rm -rf "$BUILDDIR"
exit ${1:=0} exit "${1:=0}"
} }
usage() { usage() {
@ -69,11 +69,12 @@ Options:
-a <xbps-arch> Set XBPS_ARCH (do not use it unless you know what it is) -a <xbps-arch> Set XBPS_ARCH (do not use it unless you know what it is)
-b <system-pkg> Set an alternative base-system package (defaults to base-system). -b <system-pkg> Set an alternative base-system package (defaults to base-system).
-r <repo-url> Use this XBPS repository (may be specified multiple times). -r <repo-url> Use this XBPS repository (may be specified multiple times).
-c <cachedir> Use this XBPS cache directory (/var/cache/xbps if unset). -c <cachedir> Use this XBPS cache directory (a subdirectory of current
directory if unset).
-k <keymap> Default keymap to use (us if unset) -k <keymap> Default keymap to use (us if unset)
-l <locale> Default locale to use (en_US.UTF-8 if unset). -l <locale> Default locale to use (en_US.UTF-8 if unset).
-i <lz4|gzip|bzip2|xz> Compression type for the initramfs image (lz4 if unset). -i <lz4|gzip|bzip2|xz> Compression type for the initramfs image (xz if unset).
-s <gzip|bzip2|xz> Compression type for the squashfs image (xz if unset) -s <gzip|lzo|xz> Compression type for the squashfs image (xz if unset)
-S <freesize> Allocate this free size (MB) for the rootfs. -S <freesize> Allocate this free size (MB) for the rootfs.
-o <file> Output file name for the ISO image (auto if unset). -o <file> Output file name for the ISO image (auto if unset).
-p "pkg pkgN ..." Install additional packages into the ISO image. -p "pkg pkgN ..." Install additional packages into the ISO image.
@ -99,133 +100,133 @@ copy_void_conf() {
} }
copy_dracut_files() { copy_dracut_files() {
mkdir -p $1/usr/lib/dracut/modules.d/01vmklive mkdir -p "$1"/usr/lib/dracut/modules.d/01vmklive
cp dracut/vmklive/* $1/usr/lib/dracut/modules.d/01vmklive/ cp dracut/vmklive/* "$1"/usr/lib/dracut/modules.d/01vmklive/
} }
copy_autoinstaller_files() { copy_autoinstaller_files() {
mkdir -p $1/usr/lib/dracut/modules.d/01autoinstaller mkdir -p "$1"/usr/lib/dracut/modules.d/01autoinstaller
cp dracut/autoinstaller/* $1/usr/lib/dracut/modules.d/01autoinstaller/ cp dracut/autoinstaller/* "$1"/usr/lib/dracut/modules.d/01autoinstaller/
} }
install_prereqs() { install_prereqs() {
copy_void_conf $VOIDHOSTDIR copy_void_conf "$VOIDHOSTDIR"
XBPS_ARCH=$ARCH $XBPS_INSTALL_CMD -r $VOIDHOSTDIR $XBPS_REPOSITORY \ XBPS_ARCH=$ARCH "$XBPS_INSTALL_CMD" -r "$VOIDHOSTDIR" ${XBPS_REPOSITORY} \
$XBPS_HOST_CACHEDIR -y ${REQUIRED_PKGS} -c "$XBPS_HOST_CACHEDIR" -y $REQUIRED_PKGS
[ $? -ne 0 ] && die "Failed to install required software, exiting..." [ $? -ne 0 ] && die "Failed to install required software, exiting..."
} }
install_packages() { install_packages() {
copy_void_conf $ROOTFS copy_void_conf "$ROOTFS"
XBPS_ARCH=$BASE_ARCH ${XBPS_INSTALL_CMD} -r $ROOTFS \ XBPS_ARCH=$BASE_ARCH "${XBPS_INSTALL_CMD}" -r "$ROOTFS" \
$XBPS_REPOSITORY $XBPS_CACHEDIR -yn ${PACKAGE_LIST} ${INITRAMFS_PKGS} ${XBPS_REPOSITORY} -c "$XBPS_CACHEDIR" -yn $PACKAGE_LIST $INITRAMFS_PKGS
[ $? -ne 0 ] && die "Missing required binary packages, exiting..." [ $? -ne 0 ] && die "Missing required binary packages, exiting..."
mount_pseudofs mount_pseudofs
LANG=C XBPS_ARCH=$BASE_ARCH ${XBPS_INSTALL_CMD} -U -r $ROOTFS \ LANG=C XBPS_ARCH=$BASE_ARCH "${XBPS_INSTALL_CMD}" -U -r "$ROOTFS" \
$XBPS_REPOSITORY $XBPS_CACHEDIR -y ${PACKAGE_LIST} ${INITRAMFS_PKGS} ${XBPS_REPOSITORY} -c "$XBPS_CACHEDIR" -y $PACKAGE_LIST $INITRAMFS_PKGS
[ $? -ne 0 ] && die "Failed to install $PACKAGE_LIST" [ $? -ne 0 ] && die "Failed to install $PACKAGE_LIST"
xbps-reconfigure -r $ROOTFS -f base-files >/dev/null 2>&1 xbps-reconfigure -r "$ROOTFS" -f base-files >/dev/null 2>&1
chroot $ROOTFS env -i xbps-reconfigure -f base-files chroot "$ROOTFS" env -i xbps-reconfigure -f base-files
# Enable choosen UTF-8 locale and generate it into the target rootfs. # Enable choosen UTF-8 locale and generate it into the target rootfs.
if [ -f $ROOTFS/etc/default/libc-locales ]; then if [ -f "$ROOTFS"/etc/default/libc-locales ]; then
sed -e "s/\#\(${LOCALE}.*\)/\1/g" -i $ROOTFS/etc/default/libc-locales sed -e "s/\#\(${LOCALE}.*\)/\1/g" -i "$ROOTFS"/etc/default/libc-locales
fi fi
chroot $ROOTFS env -i xbps-reconfigure -a chroot "$ROOTFS" env -i xbps-reconfigure -a
if [ -x installer.sh ]; then if [ -x installer.sh ]; then
install -Dm755 installer.sh $ROOTFS/usr/sbin/void-installer install -Dm755 installer.sh "$ROOTFS"/usr/sbin/void-installer
else else
install -Dm755 /usr/sbin/void-installer $ROOTFS/usr/sbin/void-installer install -Dm755 /usr/sbin/void-installer "$ROOTFS"/usr/sbin/void-installer
fi fi
# Cleanup and remove useless stuff. # Cleanup and remove useless stuff.
rm -rf $ROOTFS/var/cache/* $ROOTFS/run/* $ROOTFS/var/run/* rm -rf "$ROOTFS"/var/cache/* "$ROOTFS"/run/* "$ROOTFS"/var/run/*
} }
copy_include_directory() { copy_include_directory() {
find $INCLUDE_DIRECTORY -mindepth 1 -maxdepth 1 -exec cp -rfpPv {} $ROOTFS/ \; find "$INCLUDE_DIRECTORY" -mindepth 1 -maxdepth 1 -exec cp -rfpPv {} "$ROOTFS"/ \;
} }
generate_initramfs() { generate_initramfs() {
local _args local _args
copy_dracut_files $ROOTFS copy_dracut_files "$ROOTFS"
copy_autoinstaller_files $ROOTFS copy_autoinstaller_files "$ROOTFS"
if [ "$BASE_SYSTEM_PKG" = "base-system-systemd" ]; then if [ "$BASE_SYSTEM_PKG" = "base-system-systemd" ]; then
_args="--add systemd" _args="--add systemd"
else else
_args="--omit systemd" _args="--omit systemd"
fi fi
chroot $ROOTFS env -i /usr/bin/dracut -N --${INITRAMFS_COMPRESSION} \ chroot "$ROOTFS" env -i /usr/bin/dracut -N --"${INITRAMFS_COMPRESSION}" \
--add-drivers "ahci" --force-add "vmklive autoinstaller" ${_args} "/boot/initrd" $KERNELVERSION --add-drivers "ahci" --force-add "vmklive autoinstaller" ${_args} "/boot/initrd" $KERNELVERSION
[ $? -ne 0 ] && die "Failed to generate the initramfs" [ $? -ne 0 ] && die "Failed to generate the initramfs"
mv $ROOTFS/boot/initrd $BOOT_DIR mv "$ROOTFS"/boot/initrd "$BOOT_DIR"
cp $ROOTFS/boot/vmlinuz-$KERNELVERSION $BOOT_DIR/vmlinuz cp "$ROOTFS"/boot/vmlinuz-$KERNELVERSION "$BOOT_DIR"/vmlinuz
} }
cleanup_rootfs() { cleanup_rootfs() {
for f in ${INITRAMFS_PKGS}; do for f in ${INITRAMFS_PKGS}; do
revdeps=$(xbps-query -r $ROOTFS -X $f) revdeps=$(xbps-query -r "$ROOTFS" -X $f)
if [ -n "$revdeps" ]; then if [ -n "$revdeps" ]; then
xbps-pkgdb -r $ROOTFS -m auto $f xbps-pkgdb -r "$ROOTFS" -m auto $f
else else
xbps-remove -r $ROOTFS -Ry ${f} >/dev/null 2>&1 xbps-remove -r "$ROOTFS" -Ry ${f} >/dev/null 2>&1
fi fi
done done
rm -r $ROOTFS/usr/lib/dracut/modules.d/01vmklive rm -r "$ROOTFS"/usr/lib/dracut/modules.d/01vmklive
rm -r $ROOTFS/usr/lib/dracut/modules.d/01autoinstaller rm -r "$ROOTFS"/usr/lib/dracut/modules.d/01autoinstaller
} }
generate_isolinux_boot() { generate_isolinux_boot() {
cp -f $SYSLINUX_DATADIR/isolinux.bin "$ISOLINUX_DIR" cp -f "$SYSLINUX_DATADIR"/isolinux.bin "$ISOLINUX_DIR"
cp -f $SYSLINUX_DATADIR/ldlinux.c32 "$ISOLINUX_DIR" cp -f "$SYSLINUX_DATADIR"/ldlinux.c32 "$ISOLINUX_DIR"
cp -f $SYSLINUX_DATADIR/libcom32.c32 "$ISOLINUX_DIR" cp -f "$SYSLINUX_DATADIR"/libcom32.c32 "$ISOLINUX_DIR"
cp -f $SYSLINUX_DATADIR/vesamenu.c32 "$ISOLINUX_DIR" cp -f "$SYSLINUX_DATADIR"/vesamenu.c32 "$ISOLINUX_DIR"
cp -f $SYSLINUX_DATADIR/libutil.c32 "$ISOLINUX_DIR" cp -f "$SYSLINUX_DATADIR"/libutil.c32 "$ISOLINUX_DIR"
cp -f $SYSLINUX_DATADIR/chain.c32 "$ISOLINUX_DIR" cp -f "$SYSLINUX_DATADIR"/chain.c32 "$ISOLINUX_DIR"
cp -f isolinux/isolinux.cfg.in "$ISOLINUX_DIR"/isolinux.cfg cp -f isolinux/isolinux.cfg.in "$ISOLINUX_DIR"/isolinux.cfg
cp -f ${SPLASH_IMAGE} "$ISOLINUX_DIR" cp -f ${SPLASH_IMAGE} "$ISOLINUX_DIR"
sed -i -e "s|@@SPLASHIMAGE@@|$(basename ${SPLASH_IMAGE})|" \ sed -i -e "s|@@SPLASHIMAGE@@|$(basename "${SPLASH_IMAGE}")|" \
-e "s|@@KERNVER@@|${KERNELVERSION}|" \ -e "s|@@KERNVER@@|${KERNELVERSION}|" \
-e "s|@@KEYMAP@@|${KEYMAP}|" \ -e "s|@@KEYMAP@@|${KEYMAP}|" \
-e "s|@@ARCH@@|$BASE_ARCH|" \ -e "s|@@ARCH@@|$BASE_ARCH|" \
-e "s|@@LOCALE@@|${LOCALE}|" \ -e "s|@@LOCALE@@|${LOCALE}|" \
-e "s|@@BOOT_TITLE@@|${BOOT_TITLE}|" \ -e "s|@@BOOT_TITLE@@|${BOOT_TITLE}|" \
-e "s|@@BOOT_CMDLINE@@|${BOOT_CMDLINE}|" \ -e "s|@@BOOT_CMDLINE@@|${BOOT_CMDLINE}|" \
$ISOLINUX_DIR/isolinux.cfg "$ISOLINUX_DIR"/isolinux.cfg
} }
generate_grub_efi_boot() { generate_grub_efi_boot() {
cp -f grub/grub.cfg $GRUB_DIR cp -f grub/grub.cfg "$GRUB_DIR"
cp -f grub/grub_void.cfg.in $GRUB_DIR/grub_void.cfg cp -f grub/grub_void.cfg.in "$GRUB_DIR"/grub_void.cfg
sed -i -e "s|@@SPLASHIMAGE@@|$(basename ${SPLASH_IMAGE})|" \ sed -i -e "s|@@SPLASHIMAGE@@|$(basename "${SPLASH_IMAGE}")|" \
-e "s|@@KERNVER@@|${KERNELVERSION}|" \ -e "s|@@KERNVER@@|${KERNELVERSION}|" \
-e "s|@@KEYMAP@@|${KEYMAP}|" \ -e "s|@@KEYMAP@@|${KEYMAP}|" \
-e "s|@@ARCH@@|$BASE_ARCH|" \ -e "s|@@ARCH@@|$BASE_ARCH|" \
-e "s|@@BOOT_TITLE@@|${BOOT_TITLE}|" \ -e "s|@@BOOT_TITLE@@|${BOOT_TITLE}|" \
-e "s|@@BOOT_CMDLINE@@|${BOOT_CMDLINE}|" \ -e "s|@@BOOT_CMDLINE@@|${BOOT_CMDLINE}|" \
-e "s|@@LOCALE@@|${LOCALE}|" $GRUB_DIR/grub_void.cfg -e "s|@@LOCALE@@|${LOCALE}|" "$GRUB_DIR"/grub_void.cfg
mkdir -p $GRUB_DIR/fonts mkdir -p "$GRUB_DIR"/fonts
cp -f $GRUB_DATADIR/unicode.pf2 $GRUB_DIR/fonts cp -f "$GRUB_DATADIR"/unicode.pf2 "$GRUB_DIR"/fonts
modprobe -q loop || : modprobe -q loop || :
# Create EFI vfat image. # Create EFI vfat image.
truncate -s 32M $GRUB_DIR/efiboot.img >/dev/null 2>&1 truncate -s 32M "$GRUB_DIR"/efiboot.img >/dev/null 2>&1
mkfs.vfat -F12 -S 512 -n "grub_uefi" "$GRUB_DIR/efiboot.img" >/dev/null 2>&1 mkfs.vfat -F12 -S 512 -n "grub_uefi" "$GRUB_DIR/efiboot.img" >/dev/null 2>&1
GRUB_EFI_TMPDIR="$(mktemp --tmpdir=$HOME -d)" GRUB_EFI_TMPDIR="$(mktemp --tmpdir="$HOME" -d)"
LOOP_DEVICE="$(losetup --show --find ${GRUB_DIR}/efiboot.img)" LOOP_DEVICE="$(losetup --show --find "${GRUB_DIR}"/efiboot.img)"
mount -o rw,flush -t vfat "${LOOP_DEVICE}" "${GRUB_EFI_TMPDIR}" >/dev/null 2>&1 mount -o rw,flush -t vfat "${LOOP_DEVICE}" "${GRUB_EFI_TMPDIR}" >/dev/null 2>&1
cp -a $IMAGEDIR/boot $VOIDHOSTDIR cp -a "$IMAGEDIR"/boot "$VOIDHOSTDIR"
xbps-uchroot $VOIDHOSTDIR grub-mkstandalone -- \ xbps-uchroot "$VOIDHOSTDIR" grub-mkstandalone -- \
--directory="/usr/lib/grub/i386-efi" \ --directory="/usr/lib/grub/i386-efi" \
--format="i386-efi" \ --format="i386-efi" \
--output="/tmp/bootia32.efi" \ --output="/tmp/bootia32.efi" \
@ -235,9 +236,9 @@ generate_grub_efi_boot() {
losetup --detach "${LOOP_DEVICE}" losetup --detach "${LOOP_DEVICE}"
die "Failed to generate EFI loader" die "Failed to generate EFI loader"
fi fi
mkdir -p ${GRUB_EFI_TMPDIR}/EFI/BOOT mkdir -p "${GRUB_EFI_TMPDIR}"/EFI/BOOT
cp -f $VOIDHOSTDIR/tmp/bootia32.efi ${GRUB_EFI_TMPDIR}/EFI/BOOT/BOOTIA32.EFI cp -f "$VOIDHOSTDIR"/tmp/bootia32.efi "${GRUB_EFI_TMPDIR}"/EFI/BOOT/BOOTIA32.EFI
xbps-uchroot $VOIDHOSTDIR grub-mkstandalone -- \ xbps-uchroot "$VOIDHOSTDIR" grub-mkstandalone -- \
--directory="/usr/lib/grub/x86_64-efi" \ --directory="/usr/lib/grub/x86_64-efi" \
--format="x86_64-efi" \ --format="x86_64-efi" \
--output="/tmp/bootx64.efi" \ --output="/tmp/bootx64.efi" \
@ -247,10 +248,10 @@ generate_grub_efi_boot() {
losetup --detach "${LOOP_DEVICE}" losetup --detach "${LOOP_DEVICE}"
die "Failed to generate EFI loader" die "Failed to generate EFI loader"
fi fi
cp -f $VOIDHOSTDIR/tmp/bootx64.efi ${GRUB_EFI_TMPDIR}/EFI/BOOT/BOOTX64.EFI cp -f "$VOIDHOSTDIR"/tmp/bootx64.efi "${GRUB_EFI_TMPDIR}"/EFI/BOOT/BOOTX64.EFI
umount "$GRUB_EFI_TMPDIR" umount "$GRUB_EFI_TMPDIR"
losetup --detach "${LOOP_DEVICE}" losetup --detach "${LOOP_DEVICE}"
rm -rf $GRUB_EFI_TMPDIR rm -rf "$GRUB_EFI_TMPDIR"
} }
generate_squashfs() { generate_squashfs() {
@ -263,16 +264,16 @@ generate_squashfs() {
fi fi
mkdir -p "$BUILDDIR/tmp/LiveOS" mkdir -p "$BUILDDIR/tmp/LiveOS"
truncate -s "$((ROOTFS_SIZE+ROOTFS_FREESIZE))M" \ truncate -s "$((ROOTFS_SIZE+ROOTFS_FREESIZE))M" \
$BUILDDIR/tmp/LiveOS/ext3fs.img >/dev/null 2>&1 "$BUILDDIR"/tmp/LiveOS/ext3fs.img >/dev/null 2>&1
mkdir -p "$BUILDDIR/tmp-rootfs" mkdir -p "$BUILDDIR/tmp-rootfs"
mkfs.ext3 -F -m1 "$BUILDDIR/tmp/LiveOS/ext3fs.img" >/dev/null 2>&1 mkfs.ext3 -F -m1 "$BUILDDIR/tmp/LiveOS/ext3fs.img" >/dev/null 2>&1
mount -o loop "$BUILDDIR/tmp/LiveOS/ext3fs.img" "$BUILDDIR/tmp-rootfs" mount -o loop "$BUILDDIR/tmp/LiveOS/ext3fs.img" "$BUILDDIR/tmp-rootfs"
cp -a $ROOTFS/* $BUILDDIR/tmp-rootfs/ cp -a "$ROOTFS"/* "$BUILDDIR"/tmp-rootfs/
umount -f "$BUILDDIR/tmp-rootfs" umount -f "$BUILDDIR/tmp-rootfs"
mkdir -p "$IMAGEDIR/LiveOS" mkdir -p "$IMAGEDIR/LiveOS"
$VOIDHOSTDIR/usr/bin/mksquashfs "$BUILDDIR/tmp" "$IMAGEDIR/LiveOS/squashfs.img" \ "$VOIDHOSTDIR"/usr/bin/mksquashfs "$BUILDDIR/tmp" "$IMAGEDIR/LiveOS/squashfs.img" \
-comp ${SQUASHFS_COMPRESSION} || die "Failed to generate squashfs image" -comp "${SQUASHFS_COMPRESSION}" || die "Failed to generate squashfs image"
chmod 444 "$IMAGEDIR/LiveOS/squashfs.img" chmod 444 "$IMAGEDIR/LiveOS/squashfs.img"
# Remove rootfs and temporary dirs, we don't need them anymore. # Remove rootfs and temporary dirs, we don't need them anymore.
@ -280,7 +281,7 @@ generate_squashfs() {
} }
generate_iso_image() { generate_iso_image() {
$VOIDHOSTDIR/usr/bin/xorriso -as mkisofs \ "$VOIDHOSTDIR"/usr/bin/xorriso -as mkisofs \
-iso-level 3 -rock -joliet \ -iso-level 3 -rock -joliet \
-max-iso9660-filenames -omit-period \ -max-iso9660-filenames -omit-period \
-omit-version-number -relaxed-filenames -allow-lowercase \ -omit-version-number -relaxed-filenames -allow-lowercase \
@ -289,7 +290,7 @@ generate_iso_image() {
-eltorito-catalog boot/isolinux/boot.cat \ -eltorito-catalog boot/isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \ -no-emul-boot -boot-load-size 4 -boot-info-table \
-eltorito-alt-boot -e boot/grub/efiboot.img -isohybrid-gpt-basdat -no-emul-boot \ -eltorito-alt-boot -e boot/grub/efiboot.img -isohybrid-gpt-basdat -no-emul-boot \
-isohybrid-mbr $SYSLINUX_DATADIR/isohdpfx.bin \ -isohybrid-mbr "$SYSLINUX_DATADIR"/isohdpfx.bin \
-output "$CURDIR/$OUTPUT_FILE" "$IMAGEDIR" || die "Failed to generate ISO image" -output "$CURDIR/$OUTPUT_FILE" "$IMAGEDIR" || die "Failed to generate ISO image"
} }
@ -301,7 +302,7 @@ while getopts "a:b:r:c:C:T:Kk:l:i:I:s:S:o:p:h" opt; do
a) BASE_ARCH="$OPTARG";; a) BASE_ARCH="$OPTARG";;
b) BASE_SYSTEM_PKG="$OPTARG";; b) BASE_SYSTEM_PKG="$OPTARG";;
r) XBPS_REPOSITORY="--repository=$OPTARG $XBPS_REPOSITORY";; r) XBPS_REPOSITORY="--repository=$OPTARG $XBPS_REPOSITORY";;
c) XBPS_CACHEDIR="--cachedir=$OPTARG";; c) XBPS_CACHEDIR="$OPTARG";;
K) readonly KEEP_BUILDDIR=1;; K) readonly KEEP_BUILDDIR=1;;
k) KEYMAP="$OPTARG";; k) KEYMAP="$OPTARG";;
l) LOCALE="$OPTARG";; l) LOCALE="$OPTARG";;
@ -314,18 +315,19 @@ while getopts "a:b:r:c:C:T:Kk:l:i:I:s:S:o:p:h" opt; do
C) BOOT_CMDLINE="$OPTARG";; C) BOOT_CMDLINE="$OPTARG";;
T) BOOT_TITLE="$OPTARG";; T) BOOT_TITLE="$OPTARG";;
h) usage;; h) usage;;
*) usage;;
esac esac
done done
shift $((OPTIND - 1)) shift $((OPTIND - 1))
XBPS_REPOSITORY="$XBPS_REPOSITORY --repository=http://repo.voidlinux.eu/current --repository=http://muslrepo.voidlinux.eu/current" XBPS_REPOSITORY="$XBPS_REPOSITORY --repository=http://alpha.de.repo.voidlinux.org/current --repository=http://alpha.de.repo.voidlinux.org/current/musl"
ARCH=$(xbps-uhelper arch) ARCH=$(xbps-uhelper arch)
# Set defaults # Set defaults
: ${BASE_ARCH:=$(xbps-uhelper arch 2>/dev/null || uname -m)} : ${BASE_ARCH:=$(xbps-uhelper arch 2>/dev/null || uname -m)}
: ${XBPS_CACHEDIR:=-c $(pwd -P)/xbps-cachedir-${BASE_ARCH}} : ${XBPS_CACHEDIR:="$(pwd -P)"/xbps-cachedir-${BASE_ARCH}}
: ${XBPS_HOST_CACHEDIR:=-c $(pwd -P)/xbps-cachedir-${ARCH}} : ${XBPS_HOST_CACHEDIR:="$(pwd -P)"/xbps-cachedir-${ARCH}}
: ${KEYMAP:=us} : ${KEYMAP:=us}
: ${LOCALE:=en_US.UTF-8} : ${LOCALE:=en_US.UTF-8}
: ${INITRAMFS_COMPRESSION:=xz} : ${INITRAMFS_COMPRESSION:=xz}
@ -341,7 +343,8 @@ if [ "$(id -u)" -ne 0 ]; then
die "Must be run as root, exiting..." die "Must be run as root, exiting..."
fi fi
readonly CURDIR="$PWD" readonly CURDIR="$PWD"
ISO_VOLUME="VOID_LIVE" ISO_VOLUME="VOID_LIVE"
if [ -n "$ROOTDIR" ]; then if [ -n "$ROOTDIR" ]; then
@ -349,7 +352,7 @@ if [ -n "$ROOTDIR" ]; then
else else
BUILDDIR=$(mktemp --tmpdir="$(pwd -P)" -d) BUILDDIR=$(mktemp --tmpdir="$(pwd -P)" -d)
fi fi
BUILDDIR=$(readlink -f $BUILDDIR) BUILDDIR=$(readlink -f "$BUILDDIR")
IMAGEDIR="$BUILDDIR/image" IMAGEDIR="$BUILDDIR/image"
ROOTFS="$IMAGEDIR/rootfs" ROOTFS="$IMAGEDIR/rootfs"
VOIDHOSTDIR="$BUILDDIR/void-host" VOIDHOSTDIR="$BUILDDIR/void-host"
@ -361,8 +364,8 @@ CURRENT_STEP=0
STEP_COUNT=9 STEP_COUNT=9
[ -n "${INCLUDE_DIRECTORY}" ] && ((STEP_COUNT=STEP_COUNT+1)) [ -n "${INCLUDE_DIRECTORY}" ] && ((STEP_COUNT=STEP_COUNT+1))
: ${SYSLINUX_DATADIR:=$VOIDHOSTDIR/usr/share/syslinux} : ${SYSLINUX_DATADIR:="$VOIDHOSTDIR"/usr/share/syslinux}
: ${GRUB_DATADIR:=$VOIDHOSTDIR/usr/share/grub} : ${GRUB_DATADIR:="$VOIDHOSTDIR"/usr/share/grub}
: ${SPLASH_IMAGE:=data/splash.png} : ${SPLASH_IMAGE:=data/splash.png}
: ${XBPS_INSTALL_CMD:=xbps-install} : ${XBPS_INSTALL_CMD:=xbps-install}
: ${XBPS_REMOVE_CMD:=xbps-remove} : ${XBPS_REMOVE_CMD:=xbps-remove}
@ -371,16 +374,16 @@ STEP_COUNT=9
: ${XBPS_UHELPER_CMD:=xbps-uhelper} : ${XBPS_UHELPER_CMD:=xbps-uhelper}
: ${XBPS_RECONFIGURE_CMD:=xbps-reconfigure} : ${XBPS_RECONFIGURE_CMD:=xbps-reconfigure}
mkdir -p $ROOTFS $VOIDHOSTDIR $ISOLINUX_DIR $GRUB_DIR mkdir -p "$ROOTFS" "$VOIDHOSTDIR" "$ISOLINUX_DIR" "$GRUB_DIR"
print_step "Synchronizing XBPS repository data..." print_step "Synchronizing XBPS repository data..."
copy_void_keys $ROOTFS copy_void_keys "$ROOTFS"
copy_void_keys $VOIDHOSTDIR copy_void_keys "$VOIDHOSTDIR"
XBPS_ARCH=$BASE_ARCH $XBPS_INSTALL_CMD -r $ROOTFS ${XBPS_REPOSITORY} -S XBPS_ARCH=$BASE_ARCH $XBPS_INSTALL_CMD -r "$ROOTFS" ${XBPS_REPOSITORY} -S
XBPS_ARCH=$ARCH $XBPS_INSTALL_CMD -r $VOIDHOSTDIR $XBPS_REPOSITORY -S XBPS_ARCH=$ARCH $XBPS_INSTALL_CMD -r "$VOIDHOSTDIR" ${XBPS_REPOSITORY} -S
_linux_series=$(XBPS_ARCH=$BASE_ARCH $XBPS_QUERY_CMD -r $ROOTFS ${XBPS_REPOSITORY:=-R} -x linux|head -1) _linux_series=$(XBPS_ARCH=$BASE_ARCH $XBPS_QUERY_CMD -r "$ROOTFS" ${XBPS_REPOSITORY:=-R} -x linux|head -1)
_kver=$(XBPS_ARCH=$BASE_ARCH $XBPS_QUERY_CMD -r $ROOTFS ${XBPS_REPOSITORY:=-R} -p pkgver ${_linux_series}) _kver=$(XBPS_ARCH=$BASE_ARCH $XBPS_QUERY_CMD -r "$ROOTFS" ${XBPS_REPOSITORY:=-R} -p pkgver ${_linux_series})
KERNELVERSION=$($XBPS_UHELPER_CMD getpkgversion ${_kver}) KERNELVERSION=$($XBPS_UHELPER_CMD getpkgversion ${_kver})
: ${OUTPUT_FILE="void-live-${BASE_ARCH}-${KERNELVERSION}-$(date +%Y%m%d).iso"} : ${OUTPUT_FILE="void-live-${BASE_ARCH}-${KERNELVERSION}-$(date +%Y%m%d).iso"}
@ -389,8 +392,8 @@ print_step "Installing software to generate the image: ${REQUIRED_PKGS} ..."
install_prereqs install_prereqs
mkdir -p "$ROOTFS"/etc mkdir -p "$ROOTFS"/etc
[ -s data/motd ] && cp data/motd $ROOTFS/etc [ -s data/motd ] && cp data/motd "$ROOTFS"/etc
[ -s data/issue ] && cp data/issue $ROOTFS/etc [ -s data/issue ] && cp data/issue "$ROOTFS"/etc
print_step "Installing void pkgs into the rootfs: ${PACKAGE_LIST} ..." print_step "Installing void pkgs into the rootfs: ${PACKAGE_LIST} ..."
install_packages install_packages
@ -419,4 +422,6 @@ print_step "Generating ISO image..."
generate_iso_image generate_iso_image
hsize=$(du -sh "$CURDIR/$OUTPUT_FILE"|awk '{print $1}') hsize=$(du -sh "$CURDIR/$OUTPUT_FILE"|awk '{print $1}')
info_msg "Created $(readlink -f $CURDIR/$OUTPUT_FILE) ($hsize) successfully." info_msg "Created $(readlink -f "$CURDIR"/"$OUTPUT_FILE") ($hsize) successfully."

View File

@ -158,7 +158,7 @@ info_msg "Install kernel and additional required netboot packages"
# dracut-network provides the in-initrd network stack dialog is needed # dracut-network provides the in-initrd network stack dialog is needed
# by the install environment. ${INITRAMFS_COMPRESSION} is the name of # by the install environment. ${INITRAMFS_COMPRESSION} is the name of
# the compressor we want to use (lz4 by default). # the compressor we want to use (lz4 by default).
if [ -z "${XBPS_TARGET_ARCH##*x86*}" ] ; then if [ -z "${XBPS_TARGET_ARCH##*86*}" ] ; then
# This platform is x86 or compatible, we should use # This platform is x86 or compatible, we should use
# syslinux/pxelinux to boot the system. # syslinux/pxelinux to boot the system.
info_msg "Selecting syslinux bootloader" info_msg "Selecting syslinux bootloader"
@ -177,7 +177,7 @@ run_cmd_chroot "$ROOTFS" "xbps-reconfigure -a"
# initrd so that it can install the kernel drivers in it. Normally # initrd so that it can install the kernel drivers in it. Normally
# this check is quite complex, but since this is a clean rootfs and we # this check is quite complex, but since this is a clean rootfs and we
# just installed exactly one kernel, this check can get by with a # just installed exactly one kernel, this check can get by with a
# really niave command to figure out the kernel version # really naive command to figure out the kernel version
KERNELVERSION=$(ls "$ROOTFS/usr/lib/modules/") KERNELVERSION=$(ls "$ROOTFS/usr/lib/modules/")
# Now that things are setup, we can call dracut and build the initrd. # Now that things are setup, we can call dracut and build the initrd.

View File

@ -113,7 +113,7 @@ case "$PLATFORM" in
dockstar*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;; dockstar*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
odroid-u2*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;; odroid-u2*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
odroid-c2*) PKGS="$BASEPKG ${PLATFORM%-musl}-base" ;; odroid-c2*) PKGS="$BASEPKG ${PLATFORM%-musl}-base" ;;
rpi3*) PKGS="$BASEPKG rpi3-base" ;; rpi3*) PKGS="$BASEPKG rpi-base" ;;
rpi2*) PKGS="$BASEPKG rpi-base" ;; rpi2*) PKGS="$BASEPKG rpi-base" ;;
rpi*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;; rpi*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
pogo*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;; pogo*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;

View File

@ -53,6 +53,7 @@ Supported architectures: i686, i686-musl, x86_64, x86_64-musl,
armv5tel, armv5tel-musl, armv6l, armv6l-musl, armv7l, armv7l-musl armv5tel, armv5tel-musl, armv6l, armv6l-musl, armv7l, armv7l-musl
aarch64, aarch64-musl, aarch64, aarch64-musl,
mipsel, mipsel-musl mipsel, mipsel-musl
ppc
Options Options