Fix: 'truncate' work-around for git CI on COW files systems.
docker build and deploy / build and deploy (push) Has been cancelled Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, bookworm) (push) Failing after 6m14s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, bullseye) (push) Failing after 11m50s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, sid) (push) Failing after 6m3s Details
sd-card-images CI / build docker images (push) Has been skipped Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, trixie) (push) Failing after 5m55s Details
Rebuild debian-*.csv / rebuild-debian-csv (push) Failing after 1m45s Details
Delete packages / delete-packages (push) Failing after 32s Details
sd-card-images prebuilt / test ${{ matrix.debian }} (boot-qemu_aarch64_virt, debian-bookworm-arm64, /index-debians-arm64.txt) (push) Failing after 19m10s Details
sd-card-images prebuilt / test ${{ matrix.debian }} (boot-qemu_aarch64_virt, debian-sid-arm64, /index-debians-arm64.txt) (push) Failing after 4m48s Details
sd-card-images prebuilt / test ${{ matrix.debian }} (boot-qemu_aarch64_virt, debian-trixie-arm64, /index-debians-arm64.txt) (push) Failing after 18m35s Details
sd-card-images prebuilt / test ${{ matrix.debian }} (boot-qemu_aarch64_virt, ubuntu-jammy-arm64, /index-debians-arm64.txt) (push) Failing after 3m52s Details
sd-card-images prebuilt / test ${{ matrix.debian }} (boot-qemu_aarch64_virt, ubuntu-mantic-arm64, /index-debians-arm64.txt) (push) Failing after 4m13s Details
sd-card-images prebuilt / test ${{ matrix.debian }} (boot-qemu_aarch64_virt, ubuntu-noble-arm64, /index-debians-arm64.txt) (push) Failing after 3m50s Details
sd-card-images prebuilt / test ${{ matrix.debian }} (boot-qemu_arm_virt, debian-bookworm-armhf, /index-debians-armhf.txt) (push) Failing after 18m35s Details
sd-card-images prebuilt / test ${{ matrix.debian }} (boot-qemu_arm_virt, debian-sid-armhf, /index-debians-armhf.txt) (push) Failing after 4m19s Details
sd-card-images prebuilt / test ${{ matrix.debian }} (boot-qemu_arm_virt, debian-trixie-armhf, /index-debians-armhf.txt) (push) Failing after 19m11s Details

fallocate fails on some (git CI) COW filesystems, so have a
coreutils alternative.

build-boot-rpi
build-debian
build-image
qemu.sh
This commit is contained in:
david 2024-05-14 12:24:25 +01:00
parent 6ee61b294c
commit d150c563f6
4 changed files with 10 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,7 +197,8 @@ mv debian/tmp/versions.csv versions.csv
# >>> ((3800000000 - 32 * 1024 * 1024) // (1024 * 1024)) * (1024 * 1024)
# 3765436416
rm -f ext4.img
fallocate -l 3765436416 ext4.img
# 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

View File

@ -31,7 +31,8 @@ LOOP1=$(losetup -f -P --show image.bin) && {
}
# Assume 8GB virtual disk
fallocate -l 8GB image.bin
# fallocate fails on some (git CI) COW filesystems, so have a coreutils alternative.
fallocate -l 8GB image.bin || truncate --size 8GB image.bin
# Extend second partition
parted -s -a opt image.bin "resizepart 2 100%"