build-debian: fallocate work-around for git CI on COW files systems.
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, bookworm) (push) Failing after 59m4s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, bullseye) (push) Failing after 54m49s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, trixie) (push) Has been cancelled Details
sd-card-images CI / build docker images (push) Has been cancelled Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, sid) (push) Has been cancelled Details

This commit is contained in:
david 2024-05-13 17:01:25 +01:00
parent 0893f1209b
commit 96b4e6e486
3 changed files with 8 additions and 5 deletions

View File

@ -73,7 +73,8 @@ sed -i -e "s/BOOT_UART=0/BOOT_UART=1/" bootcode.bin
# Create empty FAT partition
rm -f vfat.img
fallocate -l 28MiB vfat.img
# fallocate fails on some (git CI) COW filesystems, so have a coreutils alternative.
fallocate -l 28MiB vfat.img || truncate --size 28MiB vfat.img
mkfs.vfat vfat.img
# Copy boot files to FAT partition

View File

@ -197,8 +197,8 @@ mv debian/tmp/versions.csv versions.csv
# >>> ((3800000000 - 32 * 1024 * 1024) // (1024 * 1024)) * (1024 * 1024)
# 3765436416
rm -f ext4.img
# fallocate fails on COW filesystems. Use a simple, zero time alternative.
fallocate -l 3765436416 ext4.img || dd if=/dev/zero of=ext4.img bs=1 count=0 seek=3765436416
# fallocate fails on some (git CI) COW filesystems, so have a coreutils alternative.
fallocate -l 3765436416 ext4.img || truncate --size=3765436416 ext4.img
mkfs.ext4 -d debian ext4.img
pigz ext4.img

View File

@ -14,7 +14,8 @@ if [ $IMAGE_SIZE -lt 1000000000 ]; then
exit 1
fi
rm -f "${IMAGE}"
fallocate -v -l "${IMAGE_SIZE}" "${IMAGE}" # 3,800,000,000 bytes
# fallocate fails on some (git CI) COW filesystems, so have a coreutils alternative.
fallocate -v -l "${IMAGE_SIZE}" "${IMAGE}" || truncate --size "${IMAGE_SIZE}" "${IMAGE}" # 3,800,000,000 bytes
parted -s "${IMAGE}" mklabel msdos
parted -s "${IMAGE}" mkpart primary fat32 -- 4MiB 32MiB # 28 MiB (29,360,128 bytes)
@ -23,7 +24,8 @@ parted -s "${IMAGE}" set 2 boot on
# Create empty FAT partition
rm -f vfat.img
fallocate -l 28MiB vfat.img
# fallocate fails on some (git CI) COW filesystems, so have a coreutils alternative.
fallocate -l 28MiB vfat.img || truncate --size 28MiB vfat.img
mkfs.vfat vfat.img
# Leave a friendly note about this partition