Update and fix raspberry-pi-zero-2-w.sh

This commit is contained in:
Arszilla
2022-08-22 23:01:14 +03:00
parent 7f9ea7391d
commit 79558078d4

View File

@@ -9,8 +9,10 @@
# Hardware model
hw_model=${hw_model:-"raspberry-pi-zero-2-w"}
# Architecture
architecture=${architecture:-"armhf"}
# 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 <<EOF >> "${work_dir}"/third-stage
cat <<EOF >>"${work_dir}"/third-stage
status_stage3 'Copy rpi services'
cp -p /bsp/services/rpi/*.service /etc/systemd/system/
@@ -73,21 +75,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