-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
30 lines (22 loc) · 914 Bytes
/
Makefile
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
SHELL = /bin/sh
ARM = aarch64-linux-gnu
LD = $(ARM)-ld
OBJCOPY = $(ARM)-objcopy
LINKER = src/boot/link.ld
KERNEL = target/aarch64-unknown-none-softfloat/debug/osc
all: clean kernel8.img
kernel8.img: $(KERNEL)
$(OBJCOPY) -O binary $(KERNEL) kernel8.img
$(KERNEL): $(LINKER)
RUSTFLAGS="-C link-arg=$(LINKER) -C target-cpu=cortex-a53 -D warnings" cargo rustc --target=aarch64-unknown-none-softfloat
clean:
rm -rf kernel8.img
cargo clean
run: all
qemu-system-aarch64 -M raspi3 -kernel kernel8.img -display none -serial null -serial stdio
debug: all
tilix -a app-new-session -e "qemu-system-aarch64 -M raspi3 -kernel kernel8.img -display none -serial null -serial stdio -s -S"
tilix -a app-new-session -e "./debug.sh"
debugtmux: all
tmux new-window -d "qemu-system-aarch64 -M raspi3 -kernel kernel8.img -display none -serial null -serial stdio -s -S"
tmux new-window -d "./debug.sh"