aboutsummaryrefslogtreecommitdiffstats
path: root/platforms/rpi-aarch64
diff options
context:
space:
mode:
authorJybz <j.biernacki@free.fr>2024-01-17 13:40:30 +0100
committerJybz <j.biernacki@free.fr>2024-03-02 17:19:13 +0100
commitc61fc7cfea3bbf36f34d911b5a0648d32cef51b4 (patch)
tree2dd0c7d50ee4c8f85349b3b789293c84c9e0fa58 /platforms/rpi-aarch64
parenta3b81566b3b730e0a3bc3e768a40498b230bf524 (diff)
downloadmageia4arm-c61fc7cfea3bbf36f34d911b5a0648d32cef51b4.tar
mageia4arm-c61fc7cfea3bbf36f34d911b5a0648d32cef51b4.tar.gz
mageia4arm-c61fc7cfea3bbf36f34d911b5a0648d32cef51b4.tar.bz2
mageia4arm-c61fc7cfea3bbf36f34d911b5a0648d32cef51b4.tar.xz
mageia4arm-c61fc7cfea3bbf36f34d911b5a0648d32cef51b4.zip
fix(rpi-aarch64): partition flagHEADuser/jibz/rpi-flag-fixmaster
Diffstat (limited to 'platforms/rpi-aarch64')
-rw-r--r--platforms/rpi-aarch64/mageia4arm.cfg9
-rw-r--r--platforms/rpi-aarch64/second_stage_install.sh47
-rwxr-xr-xplatforms/rpi-aarch64/specialFunctions.sh10
3 files changed, 42 insertions, 24 deletions
diff --git a/platforms/rpi-aarch64/mageia4arm.cfg b/platforms/rpi-aarch64/mageia4arm.cfg
index 28b6224..029bd53 100644
--- a/platforms/rpi-aarch64/mageia4arm.cfg
+++ b/platforms/rpi-aarch64/mageia4arm.cfg
@@ -26,14 +26,7 @@ TARGET="rpi-aarch64"
# #MIRROR="/mnt/STOCK/mageia/distrib/$MAGEIA_VERSION/$ARM_VERSION"
MIRROR_ROOT=http://ftp.free.fr/mirrors/mageia.org/distrib
MIRROR_REPO="${MIRROR_ROOT}/${MAGEIA_VERSION}/${ARM_VERSION}"
-#MIRROR=${MIRROR:="${MIRROR_REPO}"}
-
-#Default user
-# ID_USER="pi"
-# PASSWORD="raspberry"
-
-#root password
-# ROOT_PWD="piroot"
+MIRROR=${MIRROR:="${MIRROR_REPO}"}
#Hostname
HOSTNAME="${TARGET}"
diff --git a/platforms/rpi-aarch64/second_stage_install.sh b/platforms/rpi-aarch64/second_stage_install.sh
index 5d3f165..b66d01f 100644
--- a/platforms/rpi-aarch64/second_stage_install.sh
+++ b/platforms/rpi-aarch64/second_stage_install.sh
@@ -18,19 +18,49 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
export ARCH=arm64
+if [[ -e /toSource.bash ]] ; then
+ source /toSource.bash
+ rm -f /toSource.bash
+fi
# remove the warning:
# 186/194: lockdev warning: group lock does not exist - using root
# #############################################
groupadd -r lock
+groupadd -r shadow
/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
+# Force include of libmount
+# mkdir -p /etc/dracut.conf.d/
+# cat <<EOT >/etc/dracut.conf.d/00-fix-libmount.conf
+# add_drivers+=" brcmutil brcmfmac brcmfmac_wcc i2c_brcmstb reset_raspberrypi clk_bcm2711_dvp bcm2711_thermal gpio_raspberrypi_exp clk_raspberrypi raspberrypi_hwmon bcm2835_dma pcie_brcmstb sdhci_iproc configfs autofs4 "
+# hostonly="no"
+# omit_dracutmodules+=" network systemd "
+# add_dracutmodules+=" fs-lib virtfs virtiofs rootfs-block "
+# install_items+=" /usr/lib64/libmount.so /usr/lib64/libmount.so.1 /usr/lib64/libmount.so.1.1.0 "
+# EOT
+# cat <<EOT >/etc/dracut.conf.d/50-mageia.conf
+# # Configuration for 10i18n module. See /usr/share/dracut/10i18n/README
+# i18n_vars="/etc/sysconfig/i18n:SYSFONT-FONT,SYSFONTACM-FONT_MAP,UNIMAP-FONT_UNIMAP,LANG,LC_ALL /etc/sysconfig/keyboard:KEYTABLE,KEYMAP,GRP_TOGGLE"
+#
+# # build initrd only to boot current hardware
+# hostonly="no"
+#
+# # Do not include the network module by default which saves about 10megs
+# # Users can still generate a network friendly initrd by editing this file
+# # or overriding omit_dracutmodules from another config file
+# omit_dracutmodules+=" network systemd "
+# EOT
+
+# /sbin/urpmi.update "Core Updates Testing"
+
#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 u-boot-tools
+# rm -f /etc/dracut.conf.d/00-fix-libmount.conf
#For the wifi :
/sbin/urpmi.update "Nonfree Release"
@@ -54,6 +84,16 @@ sed -e 's|preboot=.*$|preboot=|' \
cp /usr/lib/u-boot/rpi_arm64/u-boot.bin /boot/EFI/u-boot.bin
+/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
+
+# /sbin/urpmi.update "Core Updates Testing"
+# <INSTALL_EXEC> --media "Core Updates Testing" kernel-desktop-latest
+
# permanently disable access to u-boot from grub, not working and not required.
chmod -x /etc/grub.d/30_uefi-firmware
# disable osprober because it finds and embedded the BuildSystem OS into the image.
@@ -62,11 +102,4 @@ chmod -x /etc/grub.d/30_os-prober
/usr/sbin/grub2-install --skip-fs-probe --target=arm64-efi --efi-directory=/boot/EFI --removable --no-nvram --force-file-id
chmod +x /etc/grub.d/30_os-prober
-/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.
diff --git a/platforms/rpi-aarch64/specialFunctions.sh b/platforms/rpi-aarch64/specialFunctions.sh
index f81a273..d61a2bd 100755
--- a/platforms/rpi-aarch64/specialFunctions.sh
+++ b/platforms/rpi-aarch64/specialFunctions.sh
@@ -17,18 +17,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-SFDISK_SCRIPT=",128M,c,*\n,,L,\nwrite\n"
+SFDISK_SCRIPT=",128M,c,\n,,L,\nwrite\n"
function preImgCreation()
{
-
-# title "Download binary blob for Rpi"
-# for i in ${FIRMWARE_DOWNLOAD_URL}; do
-# info "Download ${i}"
-# curl -L -O -J ${i} -s
-# done
-
- title "Creating Pi image"
title "Making raspberry pi image"
return 0
}