mirror of
https://github.com/raspberrypi/rpi-eeprom.git
synced 2026-01-20 21:13:36 +08:00
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.
This commit is contained in:
@@ -29,20 +29,20 @@ for src in release/*.zip; do
|
||||
cd "${TMP_DIR}/files"
|
||||
unzip "../${src}"
|
||||
cd "${TMP_DIR}"
|
||||
dd if=/dev/zero bs=1M count=40 of=temp.img
|
||||
dd if=/dev/zero bs=1M count=258 of=temp.img
|
||||
/sbin/sfdisk temp.img <<EOF
|
||||
label: dos
|
||||
label-id: 0x0a7b5ac5
|
||||
device: temp.img
|
||||
unit: sectors
|
||||
|
||||
./test.img1 : start= 2048, size= 70000, type=c
|
||||
./test.img1 : start= 2048, size= 524288, type=c
|
||||
EOF
|
||||
file temp.img
|
||||
kpartx -lv temp.img | head -n1 | awk '{print $1}'
|
||||
LOOP="/dev/mapper/$(kpartx -lv temp.img | head -n1 | awk '{print $1}')"
|
||||
kpartx -av temp.img
|
||||
/sbin/mkfs.fat -F 32 "${LOOP}"
|
||||
/sbin/mkfs.fat -F 32 -s 1 "${LOOP}"
|
||||
mkdir fs
|
||||
mount "${LOOP}" fs
|
||||
cp -v files/* fs
|
||||
@@ -54,7 +54,9 @@ EOF
|
||||
chown "${SUDO_UID}:${SUDO_GID}" images
|
||||
mv "${TMP_DIR}/temp.img" "images/${img}"
|
||||
file "images/${img}"
|
||||
zip "images/${src}" "images/${img}"
|
||||
cd images
|
||||
zip "${src}" "${img}"
|
||||
cd ..
|
||||
rm "images/${img}"
|
||||
chown "${SUDO_UID}:${SUDO_GID}" "images/${src}"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user