Skip to content

Commit 1ca254d

Browse files
committed
Add BTRFS support
1 parent c1fabae commit 1ca254d

4 files changed

Lines changed: 10 additions & 14 deletions

File tree

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ RUN apt-get install -y \
2222
flex \
2323
parted \
2424
fdisk \
25+
btrfs-progs \
2526
python3-dev \
2627
python3-libfdt \
2728
python3-setuptools \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ sudo apt install git build-essential crossbuild-essential-arm64 bc bison flex \
119119
For assembling disk images — debos, bmaptool, and zeekstd all need to be installed from source:
120120

121121
```bash
122-
sudo apt install golang pipx pigz cargo parted fdisk mmdebstrap \
122+
sudo apt install golang pipx pigz cargo parted fdisk btrfs-progs mmdebstrap \
123123
systemd-resolved systemd-container qemu-user-binfmt \
124124
libglib2.0-dev libostree-dev fakemachine
125125

build-images.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,10 @@ trap cleanup EXIT
2323

2424
bmaptool copy "$IMG_OUT"/debian-rootfs.img.zst "$IMG_OUT"/debian-rootfs.img
2525
sync "$IMG_OUT"/debian-rootfs.img
26-
TMP=`mktemp`
27-
chmod 644 "$TMP"
2826

2927
# Boot entries are pure BLS in /boot/loader/entries, read directly by U-Boot's
3028
# 'bls' bootmeth (no extlinux.conf). Nothing to rewrite here for the boot menu.
3129

32-
debugfs -R "cat /usr/lib/os-release" "$IMG_OUT"/debian-rootfs.img > "$TMP"
33-
echo "BUILD_ID=$BUILD_ID" >> "$TMP"
34-
debugfs -w -R "rm /usr/lib/os-release" "$IMG_OUT"/debian-rootfs.img
35-
debugfs -w -R "write $TMP /usr/lib/os-release" "$IMG_OUT"/debian-rootfs.img
36-
sync "$IMG_OUT"/debian-rootfs.img
37-
38-
rm -f "$TMP"
39-
4030
for s in 512 4096; do
4131
echo "Creating images for $s-byte sector size"
4232
truncate -s "$IMGSIZE" "$TMPDIR"/debian-"$s"-nobootloader-"$BUILD_ID".img

debian-rk3576-img.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,18 @@ actions:
2121
start: 32KiB
2222
end: 64MiB
2323
- name: root
24-
fs: ext4
24+
fs: btrfs
2525
start: 64MiB
2626
end: -1MiB
27-
flags: [ boot ]
2827
mountpoints:
2928
- mountpoint: /
3029
partition: root
31-
options: [ x-systemd.growfs ]
30+
options: [ compress=zstd, x-systemd.growfs ]
31+
32+
- action: run
33+
description: Enable zstd compression on the image mount
34+
chroot: false
35+
command: mount -o remount,compress=zstd "$IMAGEMNTDIR"
3236

3337
- action: filesystem-deploy
3438
append-kernel-cmdline: {{ $cmdline }}
@@ -43,3 +47,4 @@ actions:
4347
description: Install Linux kernel packages inside the target
4448
chroot: true
4549
command: find /var/cache/linux-kernel -name linux-image-\*.deb -a ! -name \*-dbg_\* -print0 | xargs -0 apt install -y
50+

0 commit comments

Comments
 (0)