Skip to content

Commit

Permalink
Merge branch 'master' into osbuilder_go
Browse files Browse the repository at this point in the history
  • Loading branch information
Itxaka committed Jul 18, 2023
2 parents 664c8d1 + d8a56ba commit dc79429
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
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
4 changes: 2 additions & 2 deletions tools-image/prepare_arm_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ cp -rfv ${STATEDIR}/cOS/active.img ${RECOVERY}/cOS/recovery.img
tune2fs -L ${SYSTEM_LABEL} ${RECOVERY}/cOS/recovery.img

# Install real grub config to recovery
cp -rfv /arm/grub/config/* $RECOVERY
cp -rfv /raw/grub/config/* $RECOVERY
mkdir -p $RECOVERY/grub2/fonts
cp -rfv /arm/grub/artifacts/* $RECOVERY/grub2
cp -rfv /raw/grub/artifacts/* $RECOVERY/grub2
mv $RECOVERY/grub2/*pf2 $RECOVERY/grub2/fonts

dd if=/dev/zero of=recovery_partition.img bs=1M count=$recovery_size
Expand Down

0 comments on commit dc79429

Please sign in to comment.