Skip to content

Commit 22835a4

Browse files
committed
Add support for fwupd and plymouth
1 parent f48c243 commit 22835a4

File tree

3 files changed

+101
-55
lines changed

3 files changed

+101
-55
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ For new features, improvements and bugs, fill an issue in GitHub or make a pull
7070
* **Custom shell**: bash, zsh, dash, fish
7171
* **WPA WIFI network** installation
7272
* **Periodic TRIM** for SSD storage
73-
* Intel and AMD **processors microcode**
73+
* Intel and AMD **processors microcode** support
7474
* Optional **swap file**
75+
* **fwupd** support
76+
* **Plymouth** support
7577
* **PipeWire** support
7678
* **Secure Boot** support
7779
* **Kernel compression** and **custom parameters**

alis.conf

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ DEVICE_TRIM="true"
3838
LVM="false"
3939
LUKS_PASSWORD=""
4040
LUKS_PASSWORD_RETYPE=""
41-
FILE_SYSTEM_TYPE="ext4 !btrfs !xfs !f2fs" # (single)
41+
FILE_SYSTEM_TYPE="auto !ext4 !btrfs !xfs !f2fs" # (single, auto=ext4)
4242
BTRFS_SUBVOLUMES_MOUNTPOINTS=("root,root,/" "home,home,/home" "var,var,/var" "snapshots,snapshots,/snapshots" "swap,swap,/swap")
4343
#BTRFS_SUBVOLUMES_MOUNTPOINTS=("root,@,/" "home,@home,/home" "var,@var_log,/var/log" "snapshots,@snapshots,/.snapshots" "swap,@swap,/swap")
4444
SWAP_SIZE="!2048 !4096 !8192" # (single)
@@ -71,7 +71,7 @@ REFLECTOR_COUNTRIES=("Spain")
7171
PACMAN_MIRROR="https://mirrors.kernel.org/archlinux/\$repo/os/\$arch"
7272
PACMAN_PARALLEL_DOWNLOADS="true"
7373
KERNELS="!linux-lts !linux-lts-headers !linux-hardened !linux-hardened-headers !linux-zen !linux-zen-headers" # (multiple)
74-
KERNELS_COMPRESSION="!gzip !bzip2 !lzma !xz !lzop !lz4 zstd"
74+
KERNELS_COMPRESSION="auto !gzip !bzip2 !lzma !xz !lzop !lz4 !zstd" # (single, auto=zstd)
7575
KERNELS_PARAMETERS="!iommu=soft !nvme_load=YES"
7676

7777
# aur
@@ -87,7 +87,7 @@ AUR_PACKAGE="paru-bin !yay-bin !paru !yay !aurman" # (single)
8787
## DISPLAY_DRIVER_DDX add DDX driver which provides 2D acceleration in Xorg.
8888
## VULKAN add support for Vulkan.
8989
## DISPLAY_DRIVER_HARDWARE_VIDEO_ACCELERATION, DISPLAY_DRIVER_HARDWARE_VIDEO_ACCELERATION_INTEL add support for hardware video acceleration
90-
DISPLAY_DRIVER="auto !intel !amdgpu !ati !nvidia !nvidia-lts !nvidia-dkms !nvidia-470xx-dkms !nvidia-390xx-dkms !nvidia-340xx-dkms !nouveau" # (single)
90+
DISPLAY_DRIVER="auto !intel !amdgpu !ati !nvidia !nvidia-lts !nvidia-dkms !nvidia-470xx-dkms !nvidia-390xx-dkms !nvidia-340xx-dkms !nouveau" # (single, auto=$vendor)
9191
KMS="true"
9292
FASTBOOT="true"
9393
FRAMEBUFFER_COMPRESSION="true"
@@ -137,15 +137,17 @@ SYSTEMD_HOMED_STORAGE_CIFS_SERVICE=""
137137
## UKI (experimental) generate and use a Unified Kernel Image.
138138
### Generally, it is not necessary to modify, alis enables or disables some hooks
139139
### taking in account other variables values like bootloader or device encryption.
140-
HOOKS="base !udev !usr !resume !systemd !btrfs autodetect keyboard !keymap !consolefont !sd-vconsole modconf block !net !dmraid !mdadm !mdadm_udev !encrypt !sd-encrypt !lvm2 fsck filesystems"
140+
## PLYMOUTH provides an eye-candy splash screen leading all the way up to the login manager
141+
HOOKS="base !udev !usr !resume !systemd !btrfs autodetect keyboard !keymap !consolefont !sd-vconsole modconf block !net !dmraid !mdadm !mdadm_udev !plymouth !encrypt !sd-encrypt !lvm2 fsck filesystems"
141142
MODULES="!vmd !tpm"
142143
UKI="false"
144+
PLYMOUTH="false"
145+
PLYMOUTH_THEME="auto !bgtr !fade-in !glow !script !solar !spinner !spinfinity !tribar !text !details" # (single, auto=default)
143146

144147
# bootloader
145148
## BOOTLOADER system boot loader.
146-
### With auto value grub is used for BIOS system, systemd for UEFI system.
147149
## SECURE_BOOT (experimental) use secure boot.
148-
BOOTLOADER="auto !grub !refind !systemd !efistub" # (single)
150+
BOOTLOADER="auto !grub !refind !systemd !efistub" # (single, if UEFI auto=systemd, if bios auto=grub)
149151
SECURE_BOOT="false"
150152

151153
# shell
@@ -172,7 +174,9 @@ PACKAGES_PIPEWIRE="true"
172174
PROVISION="false"
173175

174176
# misc
177+
## FWUPD support for update device firmware
175178
## VAGRANT for build a VirtualBox OVA with Packer
179+
FWUPD="false"
176180
VAGRANT="false"
177181

178182
# systemd

alis.sh

Lines changed: 88 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ function check_variables() {
171171
check_variables_value "PACMAN_MIRROR" "$PACMAN_MIRROR"
172172
check_variables_boolean "PACMAN_PARALLEL_DOWNLOADS" "$PACMAN_PARALLEL_DOWNLOADS"
173173
check_variables_list "KERNELS" "$KERNELS" "linux-lts linux-lts-headers linux-hardened linux-hardened-headers linux-zen linux-zen-headers" "false" "false"
174-
check_variables_list "KERNELS_COMPRESSION" "$KERNELS_COMPRESSION" "gzip bzip2 lzma xz lzop lz4 zstd" "false" "true"
174+
check_variables_list "KERNELS_COMPRESSION" "$KERNELS_COMPRESSION" "auto gzip bzip2 lzma xz lzop lz4 zstd" "true" "true"
175175
check_variables_list "AUR_PACKAGE" "$AUR_PACKAGE" "paru-bin yay-bin paru yay aurman" "true" "true"
176176
check_variables_list "DISPLAY_DRIVER" "$DISPLAY_DRIVER" "auto intel amdgpu ati nvidia nvidia-lts nvidia-dkms nvidia-470xx-dkms nvidia-390xx-dkms nvidia-340xx-dkms nouveau" "false" "true"
177177
check_variables_boolean "KMS" "$KMS"
@@ -204,13 +204,16 @@ function check_variables() {
204204
check_variables_value "HOOKS" "$HOOKS"
205205
check_variables_boolean "UKI" "$UKI"
206206
check_variables_list "BOOTLOADER" "$BOOTLOADER" "auto grub refind systemd efistub" "true" "true"
207+
check_variables_boolean "PLYMOUTH" "$PLYMOUTH"
208+
check_variables_list "PLYMOUTH_THEME" "$PLYMOUTH_THEME" "auto bgtr fade-in glow script solar spinner spinfinity tribar text details" "true" "true"
207209
check_variables_boolean "SECURE_BOOT" "$SECURE_BOOT"
208210
check_variables_list "CUSTOM_SHELL" "$CUSTOM_SHELL" "bash zsh dash fish" "true" "true"
209211
check_variables_list "DESKTOP_ENVIRONMENT" "$DESKTOP_ENVIRONMENT" "gnome kde xfce mate cinnamon lxde i3-wm i3-gaps deepin budgie bspwm awesome qtile openbox leftwm dusk" "false" "true"
210212
check_variables_list "DISPLAY_MANAGER" "$DISPLAY_MANAGER" "auto gdm sddm lightdm lxdm" "true" "true"
211213
check_variables_boolean "PACKAGES_MULTILIB" "$PACKAGES_MULTILIB"
212214
check_variables_boolean "PACKAGES_INSTALL" "$PACKAGES_INSTALL"
213215
check_variables_boolean "PROVISION" "$PROVISION"
216+
check_variables_boolean "FWUPD" "$FWUPD"
214217
check_variables_boolean "VAGRANT" "$VAGRANT"
215218
check_variables_boolean "REBOOT" "$REBOOT"
216219
}
@@ -266,6 +269,14 @@ function facts() {
266269
DEVICE_MMC="true"
267270
fi
268271

272+
if [ "$FILE_SYSTEM_TYPE" == "auto" ]; then
273+
FILE_SYSTEM_TYPE="ext4"
274+
fi
275+
276+
if [ "$KERNELS_COMPRESSION" == "auto" ]; then
277+
KERNELS_COMPRESSION="zstd"
278+
fi
279+
269280
if [ "$DISPLAY_DRIVER" == "auto" ]; then
270281
case "$GPU_VENDOR" in
271282
"intel" )
@@ -298,6 +309,10 @@ function facts() {
298309
;;
299310
esac
300311

312+
if [ "$PLYMOUTH_THEME" == "auto" ]; then
313+
PLYMOUTH_THEME=""
314+
fi
315+
301316
if [ "$BOOTLOADER" == "auto" ]; then
302317
if [ "$BIOS_TYPE" == "uefi" ]; then
303318
BOOTLOADER="systemd"
@@ -781,6 +796,9 @@ function mkinitcpio_configuration() {
781796
HOOKS=${HOOKS//!encrypt/encrypt}
782797
fi
783798
fi
799+
if [ "$PLYMOUTH" == "true" ]; then
800+
HOOKS=${HOOKS//!plymouth/plymouth}
801+
fi
784802

785803
HOOKS=$(sanitize_variable "$HOOKS")
786804
MODULES=$(sanitize_variable "$MODULES")
@@ -806,6 +824,12 @@ function mkinitcpio_configuration() {
806824
if [ "$KERNELS_COMPRESSION" == "zstd" ]; then
807825
pacman_install "zstd"
808826
fi
827+
if [ "$PLYMOUTH" == "true" ]; then
828+
pacman_install "plymouth"
829+
if [ -n "$PLYMOUTH_THEME" ]; then
830+
plymouth-set-default-theme -R "$PLYMOUTH_THEME"
831+
fi
832+
fi
809833

810834
if [ "$UKI" == "true" ]; then
811835
mkdir -p "${MNT_DIR}${ESP_DIRECTORY}/EFI/linux"
@@ -1160,6 +1184,67 @@ function network() {
11601184
arch-chroot "${MNT_DIR}" systemctl enable NetworkManager.service
11611185
}
11621186

1187+
function misc() {
1188+
print_step "misc()"
1189+
1190+
if [ -n "$CUSTOM_SHELL" ]; then
1191+
execute_step "custom_shell"
1192+
fi
1193+
if [ "$FWUPD" == "true" ]; then
1194+
execute_step "fwupd"
1195+
fi
1196+
if [ "$VAGRANT" == "true" ]; then
1197+
execute_step "vagrant"
1198+
fi
1199+
}
1200+
1201+
function custom_shell() {
1202+
print_step "custom_shell()"
1203+
1204+
local CUSTOM_SHELL_PATH=""
1205+
case "$CUSTOM_SHELL" in
1206+
"zsh" )
1207+
pacman_install "zsh"
1208+
local CUSTOM_SHELL_PATH="/usr/bin/zsh"
1209+
;;
1210+
"dash" )
1211+
pacman_install "dash"
1212+
local CUSTOM_SHELL_PATH="/usr/bin/dash"
1213+
;;
1214+
"fish" )
1215+
pacman_install "fish"
1216+
local CUSTOM_SHELL_PATH="/usr/bin/fish"
1217+
;;
1218+
esac
1219+
1220+
if [ -n "$CUSTOM_SHELL_PATH" ]; then
1221+
custom_shell_user "root" $CUSTOM_SHELL_PATH
1222+
custom_shell_user "$USER_NAME" $CUSTOM_SHELL_PATH
1223+
for U in "${ADDITIONAL_USERS[@]}"; do
1224+
local S=()
1225+
IFS='=' read -ra S <<< "$U"
1226+
local USER=${S[0]}
1227+
custom_shell_user "$USER" $CUSTOM_SHELL_PATH
1228+
done
1229+
fi
1230+
}
1231+
1232+
function fwupd() {
1233+
print_step "fwupd()"
1234+
1235+
pacman_install "fwupd"
1236+
}
1237+
1238+
function vagrant() {
1239+
print_step "vagrant()"
1240+
1241+
pacman_install "openssh"
1242+
create_user "vagrant" "vagrant"
1243+
arch-chroot "${MNT_DIR}" systemctl enable sshd.service
1244+
arch-chroot "${MNT_DIR}" ssh-keygen -A
1245+
arch-chroot "${MNT_DIR}" sshd -t
1246+
}
1247+
11631248
function virtualbox() {
11641249
print_step "virtualbox()"
11651250

@@ -1471,38 +1556,6 @@ function bootloader_efistub_entry() {
14711556
fi
14721557
}
14731558

1474-
function custom_shell() {
1475-
print_step "custom_shell()"
1476-
1477-
local CUSTOM_SHELL_PATH=""
1478-
case "$CUSTOM_SHELL" in
1479-
"zsh" )
1480-
pacman_install "zsh"
1481-
local CUSTOM_SHELL_PATH="/usr/bin/zsh"
1482-
;;
1483-
"dash" )
1484-
pacman_install "dash"
1485-
local CUSTOM_SHELL_PATH="/usr/bin/dash"
1486-
;;
1487-
"fish" )
1488-
pacman_install "fish"
1489-
local CUSTOM_SHELL_PATH="/usr/bin/fish"
1490-
;;
1491-
esac
1492-
1493-
if [ -n "$CUSTOM_SHELL_PATH" ]; then
1494-
custom_shell_user "root" $CUSTOM_SHELL_PATH
1495-
custom_shell_user "$USER_NAME" $CUSTOM_SHELL_PATH
1496-
for U in "${ADDITIONAL_USERS[@]}"; do
1497-
local S=()
1498-
IFS='=' read -ra S <<< "$U"
1499-
local USER=${S[0]}
1500-
custom_shell_user "$USER" $CUSTOM_SHELL_PATH
1501-
done
1502-
fi
1503-
}
1504-
1505-
15061559
function custom_shell_user() {
15071560
local USER="$1"
15081561
local CUSTOM_SHELL_PATH="$2"
@@ -1697,6 +1750,7 @@ function display_manager_lxdm() {
16971750
arch-chroot "${MNT_DIR}" systemctl enable lxdm.service
16981751
}
16991752

1753+
# @deprecated: prefer to install packages after base system installation
17001754
function packages() {
17011755
print_step "packages()"
17021756

@@ -1719,14 +1773,6 @@ function provision() {
17191773
(cd "$PROVISION_DIRECTORY" && cp -vr --parents . "${MNT_DIR}")
17201774
}
17211775

1722-
function vagrant() {
1723-
pacman_install "openssh"
1724-
create_user "vagrant" "vagrant"
1725-
arch-chroot "${MNT_DIR}" systemctl enable sshd.service
1726-
arch-chroot "${MNT_DIR}" ssh-keygen -A
1727-
arch-chroot "${MNT_DIR}" sshd -t
1728-
}
1729-
17301776
function end() {
17311777
echo ""
17321778
echo -e "${GREEN}Arch Linux installed successfully"'!'"${NC}"
@@ -1881,20 +1927,14 @@ function main() {
18811927
execute_step "bootloader"
18821928
execute_step "mkinitcpio_configuration"
18831929
execute_step "mkinitcpio"
1884-
if [ -n "$CUSTOM_SHELL" ]; then
1885-
execute_step "custom_shell"
1886-
fi
1930+
execute_step "misc"
18871931
if [ -n "$DESKTOP_ENVIRONMENT" ]; then
18881932
execute_step "desktop_environment"
18891933
execute_step "display_manager"
18901934
fi
1891-
execute_step "packages"
18921935
if [ "$PROVISION" == "true" ]; then
18931936
execute_step "provision"
18941937
fi
1895-
if [ "$VAGRANT" == "true" ]; then
1896-
execute_step "vagrant"
1897-
fi
18981938
execute_step "systemd_units"
18991939
local END_TIMESTAMP=$(date -u +"%F %T")
19001940
local INSTALLATION_TIME=$(date -u -d @$(($(date -d "$END_TIMESTAMP" '+%s') - $(date -d "$START_TIMESTAMP" '+%s'))) '+%T')

0 commit comments

Comments
 (0)