aboutsummaryrefslogtreecommitdiffstats
path: root/platforms/rpi-aarch64/second_stage_install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'platforms/rpi-aarch64/second_stage_install.sh')
-rw-r--r--platforms/rpi-aarch64/second_stage_install.sh47
1 files changed, 47 insertions, 0 deletions
diff --git a/platforms/rpi-aarch64/second_stage_install.sh b/platforms/rpi-aarch64/second_stage_install.sh
new file mode 100644
index 0000000..8f6a73f
--- /dev/null
+++ b/platforms/rpi-aarch64/second_stage_install.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+# Copyright (C) 2017-2018 Daniel Tartavel-jeannot <contact@librepc.com>
+# Copyright (C) 2019-2020 Jean-Baptiste Biernacki <j.biernacki@free.fr>
+#
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+export ARCH=arm64
+
+/usr/bin/chown :shadow /etc/shadow /etc/gshadow /etc/login.defs /etc/pam.d/chage-chfn-chsh /etc/pam.d/chpasswd-newusers /etc/pam.d/system-auth /etc/pam.d/user-group-mod /bin/passwd /bin/chage
+
+/usr/bin/chown :systemd-journal -R /var/log/journal
+
+#Install all packages you need
+<INSTALL_EXEC> basesystem grub2-efi efibootmgr chrony polkit lockdev rng-tools man openssh-server rfkill wireless-tools bluez wpa_supplicant make rsync binutils ldetect usbutils kernel-desktop-latest u-boot
+
+#For the wifi :
+/sbin/urpmi.update "Nonfree Release"
+/sbin/urpmi.update "Nonfree Updates"
+<INSTALL_EXEC> --media "Nonfree Release" kernel-firmware-nonfree
+<INSTALL_EXEC> --media "Nonfree Updates" kernel-firmware-nonfree
+
+/usr/bin/sed -i -e 's/GRUB_CMDLINE_LINUX_DEFAULT="\(.*\)"/GRUB_CMDLINE_LINUX_DEFAULT="\1 audit=0"/' /etc/default/grub
+
+/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
+/usr/sbin/grub2-install --skip-fs-probe --target=arm64-efi --efi-directory=/boot/EFI --force --force-file-id
+
+/usr/bin/chown :chrony -R /etc/chrony.keys /var/log/chrony
+/usr/bin/chown :daemon /etc/wpa_supplicant.conf
+/usr/bin/chown :tty /bin/write /bin/wall
+/usr/bin/chown :lock /sbin/lockdev
+/usr/bin/chown :bin /sbin/traceroute
+/usr/bin/chown polkitd /etc/polkit-1/rules.d
+
+## DO NOT EXIT THE SCRIPT. A second part is automatically added in this script during the process in order to create the default user and set root password.