Skip to content

Commit

Permalink
add create-miniloader.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
citruz committed Jun 2, 2023
1 parent c0dc951 commit b5ac991
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions scripts/create-miniloader.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash -e

if [ -z "$1" ]; then
echo "need to provide input image"
exit 1
fi

input=$(realpath "$1")
output="$(dirname "$input")/miniloader.img"

if [ -f "$output" ]; then
echo "$output already exists"
exit 1
fi

dd if="$input" of="$output" bs=1M count=8
dd if=/dev/zero of="$output" bs=1024 count=32 conv=notrunc
echo "$output"

0 comments on commit b5ac991

Please sign in to comment.