aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJybz <j.biernacki@free.fr>2024-03-02 21:42:01 +0100
committerJybz <j.biernacki@free.fr>2024-03-02 21:42:01 +0100
commit919d2f573fbb6405d878f91cce1a93a8144a44ab (patch)
tree91d08e981925d12c7932da169a9c044f8b04c6f8
parentc61fc7cfea3bbf36f34d911b5a0648d32cef51b4 (diff)
downloadmageia4arm-919d2f573fbb6405d878f91cce1a93a8144a44ab.tar
mageia4arm-919d2f573fbb6405d878f91cce1a93a8144a44ab.tar.gz
mageia4arm-919d2f573fbb6405d878f91cce1a93a8144a44ab.tar.bz2
mageia4arm-919d2f573fbb6405d878f91cce1a93a8144a44ab.tar.xz
mageia4arm-919d2f573fbb6405d878f91cce1a93a8144a44ab.zip
chore: remove trailing whitespaces
-rwxr-xr-xbuild_all.sh6
-rwxr-xr-xcreate_arm_image.sh6
-rwxr-xr-xfunctions.sh44
-rw-r--r--platforms/bananaPro/second_stage_install.sh4
-rw-r--r--platforms/generic_aarch64/second_stage_install.sh4
-rwxr-xr-xplatforms/generic_aarch64/specialFunctions.sh2
-rw-r--r--platforms/rpi-aarch64/second_stage_install.sh6
-rwxr-xr-xplatforms/rpi3+64/specialFunctions.sh4
-rwxr-xr-xplatforms/rpi4/specialFunctions.sh4
-rwxr-xr-xtools/install_graphical.sh2
-rwxr-xr-xtools/resize_root.sh2
11 files changed, 42 insertions, 42 deletions
diff --git a/build_all.sh b/build_all.sh
index 502347a..9ff69c6 100755
--- a/build_all.sh
+++ b/build_all.sh
@@ -84,7 +84,7 @@ if [ ! -e "${CONFIG_FILE}" ]; then
exit ${CONFIG_FILE_NOT_FOUND}
fi
-
+
# If SBCs is not defined in the config file, take ALL board in the platforms directory.
SBCs="$(cat ${CONFIG_FILE} | jq -c ".SBCs[]")"
if [ 0 -ne "${?}" ]; then
@@ -104,13 +104,13 @@ destdir="$(cat ${CONFIG_FILE} | jq -c ".destdir")"
for SBC_config in ${SBCs}; do
SBC="$(echo ${SBC_config} | jq -r '.board')"
DESKTOP_STEP="$(echo ${SBC_config} | jq '.desktop')"
- if [ "null" != "${DESKTOP_STEP}" ]; then
+ if [ "null" != "${DESKTOP_STEP}" ]; then
DESKTOP="--desktop $(echo ${SBC_config} | jq '.desktop')"
else
unset DESKTOP
fi
NONFREE_STEP="$(echo ${SBC_config} | jq '.nonfree')"
- if [ "true" = "${NONFREE_STEP}" ]; then
+ if [ "true" = "${NONFREE_STEP}" ]; then
NONFREE="--nonfree"
else
unset NONFREE
diff --git a/create_arm_image.sh b/create_arm_image.sh
index c646850..1bac725 100755
--- a/create_arm_image.sh
+++ b/create_arm_image.sh
@@ -39,8 +39,8 @@ function help() {
echo -e "--tainted activate tainted repos"
echo -e "--desktop [xfce|...] add a desktop environment task"
echo -e "--package \"pkg1 pkg2\" One space separated list of package to install"
-
- echo -e "\nBuild levels:"
+
+ echo -e "\nBuild levels:"
echo -e "--create-chroot Create the chroot directory"
echo -e "--install-basesystem install base system"
echo -e "--add-urpmimedia add mirrors for urpmi"
@@ -377,7 +377,7 @@ case ${OPT} in
bunrningBootloader
unmountingPartitions
unloopingImage
-
+
warning "You can now burn the image ( ${INSTALL_PATH}/${IMAGE} ) on SD card"
print_info "pv \"${INSTALL_PATH}/${IMAGE}\" | dd of=/dev/mmcblk#"
generateExtra
diff --git a/functions.sh b/functions.sh
index 76fd278..2c9773b 100755
--- a/functions.sh
+++ b/functions.sh
@@ -32,7 +32,7 @@ function cleanExit(){
unloopingImage
fi
fi
-
+
exit $@
}
@@ -99,7 +99,7 @@ function createchroot() {
fi
fi
- if [ `arch` != "${ARM_VERSION}" ]; then
+ if [ `arch` != "${ARM_VERSION}" ]; then
if ! [ -f /usr/bin/qemu-arm-static ]; then
title "Qemu package not present : installing qemu packages"
#/usr/bin/dnf --assumeyes --setopt=install_weak_deps=False install qemu-user-static
@@ -203,7 +203,7 @@ function addurpmimedia() {
if [ 0 -eq ${?} ]; then
/sbin/urpmi.addmedia --urpmi-root "${BUILD_PATH}" --ignorearch --distrib "${MIRROR}"
else
- /sbin/urpmi.addmedia --urpmi-root "${BUILD_PATH}" --ignorearch --distrib "${MIRROR}/${ARM_VERSION}"
+ /sbin/urpmi.addmedia --urpmi-root "${BUILD_PATH}" --ignorearch --distrib "${MIRROR}/${ARM_VERSION}"
fi
else
print_info "MIRROR variable not set, using mirrorlist."
@@ -417,14 +417,14 @@ function unmountdevsysproc(){
function jumpchroot() {
title "chrooting to ${BUILD_PATH}"
-
+
print_info "Copying resolv.conf"
/usr/bin/cp -v --preserve=mode /etc/resolv.conf "${BUILD_PATH}/etc/"
if [ ${?} -ne 0 ]; then
error "line ${LINENO} error copying ${BUILD_PATH}/etc/resolv.conf : exiting"
cleanExit ${ERR_1}
fi
-
+
print_info "chrooting to ${BUILD_PATH}"
if [ "$OPT" = "chroot" ]; then
print_info "/sbin/chroot ${BUILD_PATH}"
@@ -456,14 +456,14 @@ function createImageWrap() {
cleanExit ${ERR_1}
fi
createimage
-
+
# loopingImage
partitionningimage
-
+
BOOTFS=${BOOTFS:="ext4"}
formatpartitions ${BOOTFS} ext4
-
+
loopingImage
return 0
@@ -524,7 +524,7 @@ function partitionningimage() {
ROOT_NB_SECTORS=$(echo "${ROOT_P_INFO}" | sed -e "s/^.*${IMAGE}[[:digit:]][[:space:]\*]\+//g" | cut -d ' ' -f 3)
ROOT_SIZE_KB="$((${SECTOR_SIZE}*${ROOT_NB_SECTORS}/1024))"
ROOT_OFFSET_B="$((${SECTOR_SIZE}*${ROOT_OFFSET_S}))"
-
+
print_info "Root offset : ${ROOT_OFFSET_S}"
print_info "Root offset (B) : ${ROOT_OFFSET_B}"
print_info "Root sectors : ${ROOT_NB_SECTORS}"
@@ -556,26 +556,26 @@ function loopingImage() {
fi
print_info "Image looped on ${DEVICE}"
-
-
+
+
#Previous function give us a list of partition. It is easy to get it and define prior this list the partition.
#But... How to distinguish between the boot p1 and the root p2 if both are empty and ext4 ? ...
if [ 1 -eq ${SEPARATE_BOOT_PARTITION} ]; then
BOOTP="${DEVICE}p1"
ROOTP="${DEVICE}p2"
-
+
# BOOT_UUID=$(/usr/sbin/blkid -s UUID -o value UUID "${BOOTP}")
BOOT_UUID=$(/usr/bin/lsblk -n -o UUID "${BOOTP}")
print_info "Boot UUID: ${BOOT_UUID}"
else
ROOTP="${DEVICE}p1"
fi
-
+
# ROOT_UUID=$(/usr/sbin/blkid -s UUID -o value UUID "${ROOTP}")
ROOT_UUID=$(/usr/bin/lsblk -n -o UUID "${ROOTP}")
print_info "Root UUID: ${ROOT_UUID}"
-
+
return 0
}
@@ -650,7 +650,7 @@ function copyingsystem() {
print_info "Remove second_stage_install.sh"
/usr/bin/rm -f "${BUILD_PATH}/second_stage_install.sh"
-
+
### BUG : rpi3b+64b is using a bootloader partition, in which only the bootloader lays. Here, everything is copying into.
if [ 1 -eq ${SEPARATE_BOOT_PARTITION} ]; then
ARM_BOOT="${BUILD_PATH}/mnt/arm_boot"
@@ -693,7 +693,7 @@ function mountPartitions() {
MOUNTED_ROOT=true
print_info "Root partition mount in ${ROOT}"
BUILD_PATH=${ROOT}
-
+
if [ 1 -eq ${SEPARATE_BOOT_PARTITION} ]; then
BOOT=$(/usr/bin/udisksctl mount -b ${BOOTP} | sed -e 's/^.* at //' -e 's/\.$//' )
if [ ${?} -ne 0 ]; then
@@ -702,7 +702,7 @@ function mountPartitions() {
fi
print_info "boot partition mount in ${BOOT}"
MOUNTED_BOOT=true
-
+
mkdir -p "${BUILD_PATH}/boot/EFI"
/usr/bin/mount -B ${BOOT} "${BUILD_PATH}/boot/EFI"
fi
@@ -755,7 +755,7 @@ function unmountingPartitions() {
error "line ${LINENO} error unmounting ${ROOT}..."
fi
fi
-
+
# if [ ! -z "${BOOTP}" ]; then
# udisksctl unmount -b ${BOOTP}
# if [ ${?} -eq 0 ]; then
@@ -779,7 +779,7 @@ function unloopingImage() {
title "Unlooping image..."
# Syncing devices before unmounting
/usr/bin/sync
-
+
if [ "x" != "${DEVICE:="x"}" ]; then
/usr/bin/udisksctl loop-delete -b ${DEVICE}
else
@@ -826,7 +826,7 @@ function mkfstab() {
# cleaning build space
function clean() {
title "Cleaning"
-
+
print_info "In case script failed or crash inside the chroot, need to unmount dev|sys|proc..."
# TODO find what blocks the umount.
@@ -872,7 +872,7 @@ function generateExtra() {
GEN_CHECKSUM=${GEN_CHECKSUM:="false"}
GEN_GZ=${GEN_GZ:="false"}
GEN_SIGN=${GEN_SIGN:="false"}
- if ${GEN_CHECKSUM} ; then
+ if ${GEN_CHECKSUM} ; then
title "Generate checksum"
md5sum "${INSTALL_PATH}/${IMAGE}" > "${INSTALL_PATH}/${IMAGE}.md5"
sha512sum "${INSTALL_PATH}/${IMAGE}" > "${INSTALL_PATH}/${IMAGE}.sha512"
@@ -881,7 +881,7 @@ function generateExtra() {
print_info "${INSTALL_PATH}/${IMAGE}.sha512"
print_info "${INSTALL_PATH}/${IMAGE}.sha3"
fi
- if ${GEN_GZ} ; then
+ if ${GEN_GZ} ; then
title "Image compression"
pv "${INSTALL_PATH}/${IMAGE}" | gzip -9 >"${INSTALL_PATH}/${IMAGE}.gz"
fi
diff --git a/platforms/bananaPro/second_stage_install.sh b/platforms/bananaPro/second_stage_install.sh
index 27339bf..757e9b8 100644
--- a/platforms/bananaPro/second_stage_install.sh
+++ b/platforms/bananaPro/second_stage_install.sh
@@ -95,9 +95,9 @@ mv /tmp/30_os-prober /etc/grub.d/
# fi
# #Recover the kernel module path :
# K_MOD_PATH=$(urpmf "modules/${K_INST_VERSION}$" | cut -d ':' -f 2)
-# #Recover the source version :
+# #Recover the source version :
# K_SRC_VERSION=$(rpm -q kernel-source-latest | sed -e 's/kernel-source-latest-\([\.[:digit:]]*\)-\([\.[:alnum:]]*\).*$/\1-\2/' )
-# #Recover the source path :
+# #Recover the source path :
# K_SRC_PATH=$(urpmf "src/kernel-${K_SRC_VERSION}$" | cut -d ':' -f 2)
# #Set the default Mageia's configuration file into the source path :
# cp /boot/config-${K_INST_VERSION} ${K_SRC_PATH}/.config
diff --git a/platforms/generic_aarch64/second_stage_install.sh b/platforms/generic_aarch64/second_stage_install.sh
index cba82e9..3468f22 100644
--- a/platforms/generic_aarch64/second_stage_install.sh
+++ b/platforms/generic_aarch64/second_stage_install.sh
@@ -70,9 +70,9 @@ export ARCH=arm64
# fi
# #Recover the kernel module path :
# K_MOD_PATH=$(urpmf "modules/${K_INST_VERSION}$" | cut -d ':' -f 2)
-# #Recover the source version :
+# #Recover the source version :
# K_SRC_VERSION=$(rpm -q kernel-source-latest | sed -e 's/kernel-source-latest-\([\.[:digit:]]*\)-\([\.[:alnum:]]*\).*$/\1-\2/' )
-# #Recover the source path :
+# #Recover the source path :
# K_SRC_PATH=$(urpmf "src/kernel-${K_SRC_VERSION}$" | cut -d ':' -f 2)
# #Set the default Mageia's configuration file into the source path :
# cp /boot/config-${K_INST_VERSION} ${K_SRC_PATH}/.config
diff --git a/platforms/generic_aarch64/specialFunctions.sh b/platforms/generic_aarch64/specialFunctions.sh
index ccbc9d2..2232a88 100755
--- a/platforms/generic_aarch64/specialFunctions.sh
+++ b/platforms/generic_aarch64/specialFunctions.sh
@@ -31,7 +31,7 @@ APPLY="w"
# PART_BOOT=1
# PART_BOOT_FIRST_SECTOR=${DEFAULT}
# PART_BOOT_SIZE="+128M"
-#
+#
# PART_ROOT=2
# PART_ROOT_FIRST_SECTOR=${DEFAULT}
# PART_ROOT_SIZE=${DEFAULT}
diff --git a/platforms/rpi-aarch64/second_stage_install.sh b/platforms/rpi-aarch64/second_stage_install.sh
index b66d01f..8829739 100644
--- a/platforms/rpi-aarch64/second_stage_install.sh
+++ b/platforms/rpi-aarch64/second_stage_install.sh
@@ -45,10 +45,10 @@ groupadd -r shadow
# 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
@@ -97,7 +97,7 @@ cp /usr/lib/u-boot/rpi_arm64/u-boot.bin /boot/EFI/u-boot.bin
# 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.
-chmod -x /etc/grub.d/30_os-prober
+chmod -x /etc/grub.d/30_os-prober
/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
/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
diff --git a/platforms/rpi3+64/specialFunctions.sh b/platforms/rpi3+64/specialFunctions.sh
index ba54564..06a163b 100755
--- a/platforms/rpi3+64/specialFunctions.sh
+++ b/platforms/rpi3+64/specialFunctions.sh
@@ -40,7 +40,7 @@ FDISK_SCRIPT="${NEW_PART}\n${PRIMARY}\n${PART_BOOT}\n${PART_BOOT_FIRST_SECTOR}\n
function preImgCreation()
{
-
+
title "Download binary blob for Rpi"
for i in ${FIRMWARE_DOWNLOAD_URL}; do
info "Download ${i}"
@@ -67,7 +67,7 @@ function preImgCreation()
# exit 1
# fi
# fi
-
+
title "Creating Pi image"
title "Making raspberry pi image"
return 0
diff --git a/platforms/rpi4/specialFunctions.sh b/platforms/rpi4/specialFunctions.sh
index 581baa5..96f3004 100755
--- a/platforms/rpi4/specialFunctions.sh
+++ b/platforms/rpi4/specialFunctions.sh
@@ -40,7 +40,7 @@ SFDISK_SCRIPT=",128M,U,*\n,,L,\nwrite\n"
function preImgCreation()
{
-
+
title "Download binary blob for Rpi"
for i in ${FIRMWARE_DOWNLOAD_URL}; do
info "Download ${i}"
@@ -67,7 +67,7 @@ function preImgCreation()
# exit 1
# fi
# fi
-
+
title "Creating Pi image"
title "Making raspberry pi image"
return 0
diff --git a/tools/install_graphical.sh b/tools/install_graphical.sh
index cb2c74d..a05f4b8 100755
--- a/tools/install_graphical.sh
+++ b/tools/install_graphical.sh
@@ -26,6 +26,6 @@ else
. $PATH/install_gstreamer.sh
echo "installing task-$1"
/usr/bin/dnf --nogpgcheck --assumeyes install task-$1 sox sddm
- /usr/bin/alternatives --config soundprofile
+ /usr/bin/alternatives --config soundprofile
fi
/usr/bin/systemctl enable sddm
diff --git a/tools/resize_root.sh b/tools/resize_root.sh
index 59a961f..9de10b7 100755
--- a/tools/resize_root.sh
+++ b/tools/resize_root.sh
@@ -20,7 +20,7 @@ if [ ${1} = "force" ]; then
LC_ALL=C growpart ${DEVICE} ${ROOT_PARTITION}
#Resize the partition with the new size :
- resize2fs ${ROOT_PARTITION}
+ resize2fs ${ROOT_PARTITION}
#Sync (just to be sure)
sync