Files
moss-kernel/scripts/create-image.sh
Matthew Leach abd5ef39c2 create-image: use mtools to populate image
Use the `mtools` set of utilities to populate the image without the need
to run mount the image (requring sudo).
2025-12-07 16:41:35 +00:00

18 lines
340 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
base="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )"
pushd "$base" &>/dev/null || exit 1
img="$base/moss.img"
dd if=/dev/zero of="$img" bs=1M count=128
mkfs.vfat -F 32 "$img"
mmd -i "$img" ::/bin
mmd -i "$img" ::/dev
mcopy -i "$img" "$base/build/bin"/* "::/bin"
popd &>/dev/null || exit 1