Skip to content

Commit

Permalink
finish boot(section 5)
Browse files Browse the repository at this point in the history
  • Loading branch information
yttnn committed Dec 5, 2023
1 parent 6a78ed2 commit 6cac361
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions run.sh
Expand Up @@ -6,7 +6,7 @@ set -xue
QEMU=$HOME/tools/qemu-riscv32-8.1.2/bin/qemu-system-riscv32
# path of clang
CLANG=clang
CFLAGS="-c -std=c11 -O2 -g3 -Wall -Wextra --target=riscv32 -ffreestanding -nostdlib"
CFLAGS="-c -std=c11 -O2 -g3 -Wall -Wextra --target=riscv32 -ffreestanding -nostdlib -mno-relax"
# linker
LINKER=ld.lld
LDFLAGS="-m elf32lriscv -L/lib -Tkernel.ld -Map=kernel.map"
Expand All @@ -15,5 +15,5 @@ $CLANG $CFLAGS -o kernel.o kernel.c
$LINKER $LDFLAGS kernel.o -o kernel.elf

# launch qemu
# $QEMU -machine virt -bios opensbi-riscv32-generic-fw_dynamic.bin -nographic -serial mon:stdio --no-reboot \
# -kernel kernel.elf
$QEMU -machine virt -bios opensbi-riscv32-generic-fw_dynamic.bin -nographic -serial mon:stdio --no-reboot \
-kernel kernel.elf

0 comments on commit 6cac361

Please sign in to comment.