blob: e4c525054de7d635c7b292259e31f5c3565a8726 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/usr/bin/env bash
#
# scripts/build-image-release.sh — build the release GPT disk image
#
# Produces a single dd-able system image with the release build of
# the kernel, rsboot bootloader, and all binaries in /bin/.
#
# Usage:
# ./scripts/build-image-release.sh [output.img]
#
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
cd "$PROJECT_DIR"
IMAGE="${1:-rs-dos.img}"
echo "=== Building release kernel ==="
cargo build --release --package rsdos --target x86_64-unknown-uefi
echo "=== Building system image (chain + GPT) ==="
"$SCRIPT_DIR/mksystem.sh" --chain --gpt "$IMAGE"
echo ""
echo "=== Done: $IMAGE ==="
ls -lh "$IMAGE"
echo ""
echo "Boot with: ./scripts/boot-image.sh --gui"
echo "USB: sudo dd if=$IMAGE of=/dev/sdX bs=4M status=progress"
|