Created
May 4, 2020 13:12
-
-
Save Kitsumi/e0b27b1730ae9f7cd816a65979aa62c5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/env bash | |
# Pre install configurations | |
## Workaround for flakiness of `pt` mirror. | |
sed -i 's/mirror.archlinuxarm.org/de.mirror.archlinuxarm.org/g' /etc/pacman.d/mirrorlist | |
echo -e "[switch]\nSigLevel = Optional\nServer = https://9net.org/l4t-arch/" >> /etc/pacman.conf | |
# Configuring pacman | |
pacman-key --init | |
pacman-key --populate archlinuxarm | |
# Installation | |
## Removing linux-aarch64 as we won't be needing this | |
pacman -R linux-aarch64 --noconfirm | |
i=5 | |
echo -e "\n\nBeginning packages installation!\nRetry attempts left: ${i}" | |
until pacman -Syu `cat /base-pkgs` --noconfirm; do | |
echo -e "\n\nPackages installation failed, retrying!\nRetry attempts left: ${i}" | |
let --i | |
done | |
[[ ${i} == 0 ]] && echo -e "\n\nBuilding failed!\nExiting..." && exit 1 | |
for pkg in `find /pkgs/*.pkg.* -type f`; do | |
pacman -U $pkg --noconfirm | |
done | |
yes | pacman -Scc | |
# Post install configurations | |
systemctl enable r2p bluetooth lightdm NetworkManager | |
echo brcmfmac > /etc/suspend-modules.conf | |
sed -i 's/#keyboard=/keyboard=onboard/' /etc/lightdm/lightdm-gtk-greeter.conf | |
usermod -aG video,audio,wheel alarm | |
ldconfig | |
echo "Exit proot." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment