fix issues
This commit is contained in:
12
run.sh
12
run.sh
@@ -4,4 +4,14 @@ set -xue
|
||||
# QEMU path
|
||||
QEMU=qemu-system-riscv32
|
||||
|
||||
$QEMU -machine virt -bios default -nographic -serial mon:stdio --no-reboot
|
||||
# Path to clang and compiler flags
|
||||
CC=clang
|
||||
CFLAGS="-std=c11 -O2 -g3 -Wall -Wextra --target=riscv32-unknown-elf -fno-stack-protector -ffreestanding -nostdlib"
|
||||
|
||||
# Build the kernel
|
||||
$CC $CFLAGS -Wl,-Tkernel.ld -Wl,-Map=kernel.map -o kernel.elf \
|
||||
kernel.c
|
||||
|
||||
# Start QEMU
|
||||
$QEMU -machine virt -bios default -nographic -serial mon:stdio --no-reboot \
|
||||
-kernel kernel.elf
|
||||
|
Reference in New Issue
Block a user