Skip to content

Commit a03de85

Browse files
committed
make-recovery-images: Change partition size to be 256MB
Make this the same size as Raspberry Pi OS. Since this is compressed it doesn't make the downloads noticably longer.
1 parent 0b4cab2 commit a03de85

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

imager/make-recovery-images

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ for src in release/*.zip; do
2929
cd "${TMP_DIR}/files"
3030
unzip "../${src}"
3131
cd "${TMP_DIR}"
32-
dd if=/dev/zero bs=1M count=40 of=temp.img
32+
dd if=/dev/zero bs=1M count=258 of=temp.img
3333
/sbin/sfdisk temp.img <<EOF
3434
label: dos
3535
label-id: 0x0a7b5ac5
3636
device: temp.img
3737
unit: sectors
3838
39-
./test.img1 : start= 2048, size= 70000, type=c
39+
./test.img1 : start= 2048, size= 524288, type=c
4040
EOF
4141
file temp.img
4242
kpartx -lv temp.img | head -n1 | awk '{print $1}'
4343
LOOP="/dev/mapper/$(kpartx -lv temp.img | head -n1 | awk '{print $1}')"
4444
kpartx -av temp.img
45-
/sbin/mkfs.fat -F 32 "${LOOP}"
45+
/sbin/mkfs.fat -F 32 -s 1 "${LOOP}"
4646
mkdir fs
4747
mount "${LOOP}" fs
4848
cp -v files/* fs
@@ -54,7 +54,9 @@ EOF
5454
chown "${SUDO_UID}:${SUDO_GID}" images
5555
mv "${TMP_DIR}/temp.img" "images/${img}"
5656
file "images/${img}"
57-
zip "images/${src}" "images/${img}"
57+
cd images
58+
zip "${src}" "${img}"
59+
cd ..
5860
rm "images/${img}"
5961
chown "${SUDO_UID}:${SUDO_GID}" "images/${src}"
6062
done

0 commit comments

Comments
 (0)