Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #109 from grm34:dev
Browse files Browse the repository at this point in the history
Adds AMD microcode
  • Loading branch information
grm34 authored Apr 12, 2020
2 parents fd945db + 5c66476 commit 51b12ae
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The only thing you need is one USB bootable device of [Arch Linux](https://mir.a

> *For AZERTY keyboard use LOADKEYS by running `loqdkeys fr`*
**3.** Download and run **archboot** *`wget tiny.cc/archboot; sh archboot`*
**3.** Download and run **archboot** *`wget tiny.cc/archboot-dev; sh archboot-dev`*

## Wiki

Expand Down
3 changes: 2 additions & 1 deletion src/apps/system_apps
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ export LINUX_HARDENED="linux-hardened"
export LINUX_LTS="linux-lts"
export LINUX_ZEN="linux-zen"

# Microcode (Intel CPU only)
# Microcode
export INTEL_UCODE="intel-ucode"
export AMD_UCODE="amd-ucode"

# Network
export NETAPPS="ntp networkmanager wget nmap rp-pppoe dhclient \
Expand Down
11 changes: 9 additions & 2 deletions src/arch/base
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,19 @@ _install_base() {
mv reflector /mnt/etc/systemd/system/reflector.service
_chroot "systemctl enable reflector.service"

# Intel Microcode
# Microcode
MICROCODE=$(lscpu | grep "Intel")
if [[ ${MICROCODE} ]]; then
_info "Installing Intel CPU Microcode"
_chroot "pacman --noconfirm -S ${INTEL_UCODE}"
export MICROCODE="True"
export MICROCODE="intel"
else
MICROCODE=$(lscpu | grep "AMD")
if [[ ${MICROCODE} ]]; then
_info "Installing AMD CPU Microcode"
_chroot "pacman --noconfirm -S ${AMD_UCODE}"
export MICROCODE="amd"
fi
fi

# user
Expand Down
8 changes: 5 additions & 3 deletions src/arch/bootloader
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ _install_bootloader() {
BOOTCONF="/mnt/boot/loader/entries/arch.conf"
echo "title Arch Linux" > ${BOOTCONF}
echo "linux /vmlinuz-${KERNEL_NAME,,}" >> ${BOOTCONF}
if [[ ${MICROCODE} == "True" ]]; then
echo "initrd /intel-ucode.img" >> ${BOOTCONF}
fi
case ${MICROCODE} in
intel|amd)
echo "initrd /${MICROCODE}-ucode.img" >> ${BOOTCONF}
;;
esac
echo "initrd /initramfs-${!KERNEL_NAME,,}.img" >> ${BOOTCONF}
echo "options root=${SYSTEM_PARTITION} quiet splash rw" >> ${BOOTCONF}
_chroot "bootctl list"
Expand Down

0 comments on commit 51b12ae

Please sign in to comment.