summaryrefslogtreecommitdiffstats
path: root/scripts/boot.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xscripts/boot.sh16
1 files changed, 10 insertions, 6 deletions
diff --git a/scripts/boot.sh b/scripts/boot.sh
index 9c60dc9..cb017d8 100755
--- a/scripts/boot.sh
+++ b/scripts/boot.sh
@@ -32,8 +32,8 @@ OVMF="${OVMF:-/usr/share/edk2/x64/OVMF.4m.fd}"
32MEM="${MEM:-256M}" 32MEM="${MEM:-256M}"
33SMP="${SMP:-1}" 33SMP="${SMP:-1}"
34SYSTEM_IMG="${SYSTEM_IMG:-/tmp/system.img}" 34SYSTEM_IMG="${SYSTEM_IMG:-/tmp/system.img}"
35PROFILE="debug" 35PROFILE="release"
36CARGO_FLAGS="" 36
37GUI="" 37GUI=""
38DEBUG="" 38DEBUG=""
39 39
@@ -41,9 +41,9 @@ DEBUG=""
41source "$SCRIPT_DIR/lib-boot-args.sh" 41source "$SCRIPT_DIR/lib-boot-args.sh"
42handle_arg() { 42handle_arg() {
43 case "$1" in 43 case "$1" in
44 --release | -r) 44 --debug)
45 PROFILE="release" 45 PROFILE="debug"
46 CARGO_FLAGS="--release" 46 CARGO_FLAGS=""
47 ;; 47 ;;
48 *) 48 *)
49 echo "unknown: $1" 49 echo "unknown: $1"
@@ -57,7 +57,11 @@ OUT_DIR="target/x86_64-unknown-uefi/$PROFILE"
57 57
58# ---- build ---- 58# ---- build ----
59echo "=== Building kernel ($PROFILE) ===" 59echo "=== Building kernel ($PROFILE) ==="
60cargo build --package rsdos --target x86_64-unknown-uefi $CARGO_FLAGS 60if [ "$PROFILE" = "release" ]; then
61 cargo build --release --package rsdos --target x86_64-unknown-uefi
62else
63 cargo build --package rsdos --target x86_64-unknown-uefi
64fi
61 65
62# ---- stage system image ---- 66# ---- stage system image ----
63echo "=== Staging system image ===" 67echo "=== Staging system image ==="