Files
moss-kernel/scripts/create-image.sh
Matthew Leach 0a32eeaaa0 scripts: create /tmp
Create /tmp and modify the kernel command line to mount tmpfs on /tmp.
2025-12-17 20:04:31 -08:00

19 lines
361 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
mmd -i "$img" ::/tmp
mcopy -i "$img" "$base/build/bin"/* "::/bin"
popd &>/dev/null || exit 1