Compare commits

...

10 Commits

Author SHA1 Message Date
david cd9bece1fd qemu.sh: 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 12m13s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, bullseye) (push) Successful in 1h27m39s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, sid) (push) Successful in 1h15m43s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, trixie) (push) Failing after 2h35m17s Details
sd-card-images CI / build docker images (push) Has been skipped Details
2024-05-13 19:00:36 +01:00
david 96b4e6e486 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
2024-05-13 17:01:25 +01:00
david 0893f1209b build-debian: 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 8m30s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, bullseye) (push) Failing after 8m3s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, sid) (push) Failing after 9m47s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, trixie) (push) Failing after 7m46s Details
sd-card-images CI / build docker images (push) Has been skipped Details
2024-05-13 16:26:42 +01:00
david 0084b4c11a README_devuan.md: Get Dockerfile.devuan directly from a git branch.
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, bookworm) (push) Failing after 5m38s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, bullseye) (push) Failing after 6m10s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, sid) (push) Failing after 10m8s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, trixie) (push) Failing after 10m37s Details
sd-card-images CI / build docker images (push) Has been skipped Details
2024-05-13 15:13:18 +01:00
david 9581e2e022 README_devuan.md: Get Dockerfile.devuan directly via git.
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, bullseye) (push) Has been cancelled Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, sid) (push) Has been cancelled 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, bookworm) (push) Has been cancelled Details
2024-05-13 14:21:50 +01:00
david 109f5489da Increase ALL timeouts by 100 mins.
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, bookworm) (push) Failing after 29m17s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, bullseye) (push) Failing after 18m44s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, sid) (push) Failing after 19m14s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, trixie) (push) Failing after 18m53s Details
sd-card-images CI / build docker images (push) Has been skipped Details
2024-05-13 02:05:46 +01:00
david d9da51b30f Increase timeouts by 100 mins.
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, bookworm) (push) Failing after 32m4s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, bullseye) (push) Failing after 5m54s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, sid) (push) Failing after 5m49s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, trixie) (push) Failing after 5m32s Details
sd-card-images CI / build docker images (push) Has been skipped Details
2024-05-13 01:14:40 +01:00
david b7b3be32f9 Removed echo to test new runner image.
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, bookworm) (push) Failing after 13m55s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, bullseye) (push) Failing after 6m4s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, sid) (push) Failing after 6m26s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, trixie) (push) Failing after 6m21s Details
sd-card-images CI / build docker images (push) Has been skipped Details
2024-05-12 22:00:05 +01:00
david 5b052a2e55 Added "echo" to guarantee no error in ci.yaml.
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, bookworm) (push) Failing after 6m40s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, bullseye) (push) Failing after 41s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, sid) (push) Failing after 41s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, trixie) (push) Failing after 44s Details
sd-card-images CI / build docker images (push) Has been skipped Details
2024-05-12 20:30:31 +01:00
david 45bdd6e5ce README_devuan: what we want to implement.
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, bookworm) (push) Failing after 6m11s Details
sd-card-images CI / test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} (i386, debian, bullseye) (push) Failing after 6m9s 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
2024-05-12 17:52:34 +01:00
6 changed files with 106 additions and 12 deletions

View File

@ -39,7 +39,7 @@ jobs:
steps:
- name: Install dependencies
timeout-minutes: 5
timeout-minutes: 105
env:
DEBIAN_FRONTEND: noninteractive
run: |
@ -78,7 +78,7 @@ jobs:
uses: actions/checkout@v4
- name: Build qemu_x86_virt
timeout-minutes: 5
timeout-minutes: 105
run: |
env PATH=$GITHUB_WORKSPACE/scripts:$PATH \
ARTIFACTS_DIR=$RUNNER_TEMP \
@ -90,7 +90,7 @@ jobs:
i686-linux-gnu
- name: Build ${{ matrix.suite }} ${{ matrix.arch }}
timeout-minutes: 5
timeout-minutes: 105
run: |
sudo env PATH=$GITHUB_WORKSPACE/scripts:$PATH \
ARTIFACTS_DIR=$RUNNER_TEMP \
@ -99,7 +99,7 @@ jobs:
$DEBIAN_SUITE
- name: Test qemu_x86_virt + ${{ matrix.suite }} ${{ matrix.arch }}
timeout-minutes: 15
timeout-minutes: 115
run: |
sudo ./test/qemu.sh $RUNNER_TEMP/boot-qemu_x86_virt.bin.gz \
$RUNNER_TEMP/${{ matrix.os }}-${{ matrix.suite }}-${{ matrix.arch }}-*.bin.gz
@ -114,15 +114,15 @@ jobs:
uses: actions/checkout@v4
- name: Set up QEMU
timeout-minutes: 1
timeout-minutes: 101
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
timeout-minutes: 1
timeout-minutes: 101
uses: docker/setup-buildx-action@v2
- name: Build
timeout-minutes: 30
timeout-minutes: 130
uses: docker/build-push-action@v3
with:
context: .

89
README_devuan.md Normal file
View File

@ -0,0 +1,89 @@
# Debian SD card images
This repository is a bunch of scripts to build SD card images that various [single-board computers](https://en.wikipedia.org/wiki/Single-board_computer) (SBC) can boot. Emphasis is on pureness; pure Debian and pure mainline U-boot.
## Pre-built images
Pre-built images ready for download are availble at [sd-card-images.johang.se](https://sd-card-images.johang.se).
## Usage
The generated SD card images are made up of two separate images:
- **boot-BOARD.bin**: Boot image that contains partition table, U-Boot and chip-specific code. The boot image will only work on the board it's built for. The filename indicates which board it's built for.
- **debian-ARCH-VERSION-PASSWORD.bin**: Debian ext4 root filesystem image that contains a complete Debian installation, including kernel, initrd and device tree. This Debian image is generic and will work on all chips and boards with the CPU architecture it's built for. The filename indicates Debian version, CPU architecture and default root password.
These two images are the concatenated to a single image, which is then written to SD card, for example like this:
$ zcat boot-raspberrypi_3b.bin.gz debian-buster-arm64-XXXXXX.bin.gz > sd-card.img
# dd if=sd-card.img of=/dev/sdXXX
### Build your own Devuan boot image
#### To build a boot image for Raspberry Pi 3 B:
```bash
docker build -t devuan/sd-images -f Dockerfile.devuan https://git2.ring-zero.co.uk/cyteen/sd-card-images.git#testing_branch
mkdir -p /tmp/sd-images
docker run --rm -v /tmp/sd-images:/artifacts sd-images build-boot raspberrypi_3b bcm2837 rpi_3_defconfig aarch64-linux-gnu
```
The image will end up in /tmp/sd-images on the host.
#### To build a boot image for Pine64 Rockpro64:
```bash
docker build -t devuan/sd-images -f ./Dockerfile.devuan .
mkdir -p /tmp/sd-images
docker run --rm \
-v /tmp/sd-images:/artifacts \
devuan/sd-images \
build-boot ROCKPro64 rk3399 rockpro64-rk3399_defconfig aarch64-linux-gnu
```
The image will end up in /tmp/sd-images on the host.
#### To build a boot image for Sinovoip Banana Pi M2 Zero
```bash
docker build -t devuan/sd-images -f ./Dockerfile.devuan .
mkdir -p /tmp/sd-images
docker run --rm \
-v /tmp/sd-images:/artifacts \
devuan/sd-images \
build-boot banana_pi_m2_zero allwinner-h2+ bananapi_m2_zero_defconfig arm-linux-gnueabihf
```
The image will end up in /tmp/sd-images on the host.
### Build your own Debian ext4 root filesystem image
#### To build a Devuan ext4 root filesystem image for arm64:
```bash
docker build -t devuan/sd-images -f ./Dockerfile.devuan .
mkdir -p /tmp/sd-images
docker run --rm \
-v /tmp/sd-images:/artifacts \
-v `pwd`:/debimg \
--privileged \
devuan/sd-images \
build-debian devuan arm64 daedalus
```
The image will end up in /tmp/sd-images on the host.
#### To build a Devuan ext4 root filesystem image for armhf:
```bash
docker build -t devuan/sd-images -f ./Dockerfile.devuan .
mkdir -p /tmp/sd-images
docker run --rm \
-v /tmp/sd-images:/artifacts \
-v `pwd`:/debimg \
--privileged \
devuan/sd-images \
build-debian devuan armhf daedalus
```
The image will end up in /tmp/sd-images on the host.

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%"