Skip to content

Commit

Permalink
uipdate new image
Browse files Browse the repository at this point in the history
  • Loading branch information
valerius committed Jan 16, 2024
1 parent 42b1f0b commit 1700364
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions build-archlinux-rpi-aarch64-img.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ IF9fLyAKX19fXy8gXF9ffCBffCAgIFxfXyxffCBcX198IFxfX198IFxfXywgfCBffCBcX19ffCAg
IF9fX3wgXF9fXy8gIF98ICBffCBcX19ffCAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIHxfX18vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAK" | base64 -d

# variables
INSTALL_RPI_KERNEL=false
ROOT_PASSWORD="toortoor!"

WORKDIR_BASE="$1"
DEFAULT_LOCALE="$2"
KEYMAP="$3"
Expand Down Expand Up @@ -64,14 +68,22 @@ echo "Installing packages..."
# Install packages
arch-chroot $WORKDIR_BASE/root pacman -S --noconfirm $PACKAGES

echo "Installing linux-${$RPI_MODEL} kernel and eeprom..."
arch-chroot $WORKDIR_BASE/root pacman -S --noconfirm rpi${RPI_MODEL}-eeprom
# Install linux-rpiX kernel and eeprom
# create a if statement to check if variable INSTALL_RPI_KERNEL is true
if [ "$INSTALL_RPI_KERNEL" = true ] ; then
echo "Installing linux-${$RPI_MODEL} kernel and eeprom..."
arch-chroot $WORKDIR_BASE/root pacman -S --noconfirm rpi${RPI_MODEL}-eeprom
fi

echo "Setup hostname..."
# Set the hostname
arch-chroot $WORKDIR_BASE/root /bin/bash -c "echo \"$RPI_HOSTNAME\" | tee /etc/hostname"
arch-chroot $WORKDIR_BASE/root hostnamectl set-hostname "$RPI_HOSTNAME"

echo "Setting a new root password..."
# Change the root password
arch-chroot $WORKDIR_BASE/root /bin/bash -c "echo root:$ROOT_PASSWORD | chpasswd"

echo "Setup network..."
# delete all network files in /etc/systemd/network
arch-chroot $WORKDIR_BASE/root rm -rf /etc/systemd/network/*
Expand Down

0 comments on commit 1700364

Please sign in to comment.