Created
October 18, 2023 00:03
-
-
Save Kamillaova/2e106d17bf81540427cf0df2fd169cfe to your computer and use it in GitHub Desktop.
/etc/initcpio/install/custom_acpi. Add the patched acpi tables to /etc/custom_acpi, for example: /etc/custom_acpi/DSDT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
__basename() { | |
local tmp | |
tmp=${1%"${1##*[!/]}"} | |
tmp=${tmp##*/} | |
tmp=${tmp%"${2/"$tmp"}"} | |
printf '%s\n' "${tmp:-/}" | |
} | |
tables_directory="/etc/custom_acpi" | |
build() { | |
find "${tables_directory}" -type f -print0 | while IFS= read -r -d $'\0' table; do | |
local table_name=$(__basename "${table}") | |
add_file "${table}" "/kernel/firmware/acpi/${table_name,,}.aml" | |
done | |
} | |
help() { | |
echo "This hook adds acpi table patches from ${tables_directory}." | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment