mirror of
https://codeberg.org/privacy1st/arch
synced 2024-12-23 01:16:04 +01:00
microcode metapackages
This commit is contained in:
parent
31d3d15fbc
commit
4f002945a7
@ -69,27 +69,6 @@ function get_user_input() {
|
||||
fi
|
||||
}
|
||||
|
||||
function get_cpu_vendor() {
|
||||
# @post
|
||||
# CPU_VENDOR ("amd", "intel", "none")
|
||||
|
||||
if [ -z "${CPU_VENDOR}" ]; then
|
||||
# if CPU_VENDOR has no value yet, ask user for input!
|
||||
|
||||
local vendor_id
|
||||
vendor_id=$(cat /proc/cpuinfo | grep vendor_id | head -1 | sed 's|vendor_id\s*:\s*||')
|
||||
|
||||
if [ "$vendor_id" = "AuthenticAMD" ]; then
|
||||
CPU_VENDOR="amd"
|
||||
elif [ "$vendor_id" = "GenuineIntel" ]; then
|
||||
CPU_VENDOR="intel"
|
||||
else
|
||||
echo "Unknown CPU vendor: $vendor_id"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function get_default_mount_options() {
|
||||
# @pre
|
||||
# FS
|
||||
@ -155,27 +134,10 @@ function choose_mount_options() {
|
||||
function run_pacstrap() {
|
||||
# @pre
|
||||
# BIOS_TYPE
|
||||
# CPU_VENDOR
|
||||
|
||||
echo "Running pacstrap ..."
|
||||
PKGS=()
|
||||
|
||||
case "${CPU_VENDOR}" in
|
||||
amd)
|
||||
PKGS+=("${CPU_VENDOR}-ucode")
|
||||
;;
|
||||
intel)
|
||||
PKGS+=("${CPU_VENDOR}-ucode")
|
||||
;;
|
||||
none)
|
||||
true
|
||||
;;
|
||||
*)
|
||||
echo "Not yet implemented!"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
case "${BIOS_TYPE}" in
|
||||
uefi)
|
||||
PKGS+=('de-p1st-base-efi')
|
||||
@ -324,8 +286,6 @@ function main() {
|
||||
check_network || return $?
|
||||
# out: BIOS_TYPE, FS, HOSTNAME, USERNAME, USER_PWD, LUKS_PWD
|
||||
get_user_input || return $?
|
||||
# out: CPU_VENDOR
|
||||
get_cpu_vendor || return $?
|
||||
|
||||
# in: FS
|
||||
# out: FS_DEFAULT_MOUNT_OPTIONS
|
||||
@ -353,7 +313,7 @@ function main() {
|
||||
mkdir /mnt/boot || return $?
|
||||
sudo mount "$BOOT_PART" /mnt/boot || return $?
|
||||
|
||||
# in: BIOS_TYPE, CPU_VENDOR
|
||||
# in: BIOS_TYPE
|
||||
run_pacstrap || return $?
|
||||
# in: FS
|
||||
run_genfstab || return $?
|
||||
|
@ -30,4 +30,4 @@ LEAVE_MOUNTED=1
|
||||
PACSTRAP_INTERACTIVE=1
|
||||
|
||||
# TODO: additional pacman packages, e.g.
|
||||
# ADD_PKGS=('de-p1st-kernel-default')
|
||||
# ADD_PKGS=('de-p1st-kernel-default' 'de-p1st-ucode-amd')
|
@ -50,3 +50,24 @@ function space_separated_to_array() {
|
||||
# Without newline at last array element: https://unix.stackexchange.com/a/519917/315162
|
||||
readarray -d " " -t ptr2 < <(printf '%s' "$ptr")
|
||||
}
|
||||
|
||||
function get_cpu_vendor() {
|
||||
# @post
|
||||
# CPU_VENDOR ("amd", "intel", "none")
|
||||
|
||||
if [ -z "${CPU_VENDOR}" ]; then
|
||||
# if CPU_VENDOR has no value yet, ask user for input!
|
||||
|
||||
local vendor_id
|
||||
vendor_id=$(cat /proc/cpuinfo | grep vendor_id | head -1 | sed 's|vendor_id\s*:\s*||')
|
||||
|
||||
if [ "$vendor_id" = "AuthenticAMD" ]; then
|
||||
CPU_VENDOR="amd"
|
||||
elif [ "$vendor_id" = "GenuineIntel" ]; then
|
||||
CPU_VENDOR="intel"
|
||||
else
|
||||
echo "Unknown CPU vendor: $vendor_id"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
13
pkg/de-p1st-ucode-amd/PKGBUILD
Normal file
13
pkg/de-p1st-ucode-amd/PKGBUILD
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Daniel Langbein <daniel@systemli.org>
|
||||
_pkgname=ucode-amd
|
||||
_reponame=arch
|
||||
pkgname="de-p1st-$_pkgname"
|
||||
pkgver=0.0.1
|
||||
pkgrel=1
|
||||
pkgdesc="AMD Microcode"
|
||||
arch=('any')
|
||||
url="https://codeberg.org/privacy1st/${_reponame}"
|
||||
license=('MIT')
|
||||
depends=('amd-ucode')
|
||||
optdepends=()
|
||||
provides=('de-p1st-ucode') # implicitly provides $pkgname
|
13
pkg/de-p1st-ucode-intel/PKGBUILD
Normal file
13
pkg/de-p1st-ucode-intel/PKGBUILD
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Daniel Langbein <daniel@systemli.org>
|
||||
_pkgname=ucode-intel
|
||||
_reponame=arch
|
||||
pkgname="de-p1st-$_pkgname"
|
||||
pkgver=0.0.1
|
||||
pkgrel=1
|
||||
pkgdesc="Intel Microcode"
|
||||
arch=('any')
|
||||
url="https://codeberg.org/privacy1st/${_reponame}"
|
||||
license=('MIT')
|
||||
depends=('intel-ucode')
|
||||
optdepends=()
|
||||
provides=('de-p1st-ucode') # implicitly provides $pkgname
|
13
pkg/de-p1st-ucode-placeholder/PKGBUILD
Normal file
13
pkg/de-p1st-ucode-placeholder/PKGBUILD
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Daniel Langbein <daniel@systemli.org>
|
||||
_pkgname=ucode-placeholder
|
||||
_reponame=arch
|
||||
pkgname="de-p1st-$_pkgname"
|
||||
pkgver=0.0.1
|
||||
pkgrel=1
|
||||
pkgdesc="Ucode placeholder, e.g. for VM installation"
|
||||
arch=('any')
|
||||
url="https://codeberg.org/privacy1st/${_reponame}"
|
||||
license=('MIT')
|
||||
depends=()
|
||||
optdepends=()
|
||||
provides=('de-p1st-ucode') # implicitly provides $pkgname
|
Loading…
Reference in New Issue
Block a user