From f3c08d0ae708448cf5b53ee92ed260a4ba103b16 Mon Sep 17 00:00:00 2001 From: Arszilla Date: Mon, 22 Aug 2022 23:02:27 +0300 Subject: [PATCH] Update and fix raspberry-pi1.sh --- raspberry-pi1.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/raspberry-pi1.sh b/raspberry-pi1.sh index a768e83..8c7e2b2 100755 --- a/raspberry-pi1.sh +++ b/raspberry-pi1.sh @@ -9,8 +9,10 @@ # Hardware model hw_model=${hw_model:-"raspberry-pi1"} + # Architecture architecture=${architecture:-"armel"} + # Desktop manager (xfce, gnome, i3, kde, lxde, mate, e17 or none) desktop=${desktop:-"xfce"} @@ -22,7 +24,7 @@ basic_network add_interface eth0 # Third stage -cat <> "${work_dir}"/third-stage +cat <>"${work_dir}"/third-stage status_stage3 'Copy rpi services' cp -p /bsp/services/rpi/*.service /etc/systemd/system/ @@ -72,21 +74,28 @@ parted -s -a minimal "${image_dir}/${image_name}.img" mkpart primary "$fstype" " # Set the partition variables make_loop + # Create file systems mkfs_partitions + # Make fstab. make_fstab + # Configure Raspberry Pi firmware (set config.txt to 64-bit) include rpi_firmware # Create the dirs for the partitions and mount them status "Create the dirs for the partitions and mount them" mkdir -p "${base_dir}"/root/ + if [[ $fstype == ext4 ]]; then -mount -t ext4 -o noatime,data=writeback,barrier=0 "${rootp}" "${base_dir}"/root + mount -t ext4 -o noatime,data=writeback,barrier=0 "${rootp}" "${base_dir}"/root + else -mount "${rootp}" "${base_dir}"/root + mount "${rootp}" "${base_dir}"/root + fi + mkdir -p "${base_dir}"/root/boot mount "${bootp}" "${base_dir}"/root/boot