Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Use GPT for raw images" #69

Merged
merged 3 commits into from
Jul 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions tools-image/build-arm-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,6 @@ partprobe

echo ">> Writing image and partition table"
dd if=/dev/zero of="${output_image}" bs=1024000 count="${size}" || exit 1
# make it gpt
echo "label: gpt" | sfdisk "${output_image}"
if [ "$model" == "rpi64" ]; then
sgdisk -n 1:8192:+96M -c 1:EFI -t 1:0c00 ${output_image}
else
Expand All @@ -360,8 +358,11 @@ sgdisk -n 3:0:+$(( ${recovery_size} + ${oem_size} ))M -c 3:lvm -t 3:8e00 ${outpu
fi
sgdisk -n 4:0:+64M -c 4:persistent -t 4:8300 ${output_image}

# Make the disk GPT
sgdisk -g ${output_image}
sgdisk -m 1:2:3:4 ${output_image}

if [ "$model" == "rpi64" ]; then
sfdisk --part-type ${output_image} 1 c
fi

# Prepare the image and copy over the files

Expand All @@ -382,7 +383,7 @@ export device="/dev/mapper/${device}"

partprobe

kpartx -vag $DRIVE
kpartx -va $DRIVE

echo ">> Populating partitions"
efi=${device}p1
Expand Down Expand Up @@ -470,7 +471,7 @@ sync
sleep 5
sync

kpartx -dvg $DRIVE || true
kpartx -dv $DRIVE || true

umount $DRIVE || true

Expand Down