-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (27 loc) · 1.06 KB
/
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
30
31
32
33
34
35
36
37
38
39
.PHONY: clean all
all:
$(MAKE) -C user/ all VERBOSE=$(VERBOSE)
$(MAKE) -C kernel/ kernel.bin VERBOSE=$(VERBOSE)
test-kernel:
./kernel/run_tests.sh
test-user:
./user/run_tests.sh
docker:
docker run -i --platform linux/amd64 --entrypoint 'make' --workdir /psys-base --rm -v $(PWD):/psys-base gcc:11.4.0
debug: run-kernel-debug run-debugger
debug.macos: run-kernel-debug run-debugger.macos
run: run-kernel
run-kernel :
qemu-system-i386 -machine q35 -m 256 -kernel kernel/kernel.bin -device e1000,bus=pcie.0 -device virtio-gpu-pci,bus=pcie.0 -smbios type=0,uefi=on
run-kernel-test :
qemu-system-i386 -machine q35 -m 256 -kernel kernel/kernel.bin -debugcon stdio > qemu-output.txt 2> /dev/null &
run-kernel-debug:
killall qemu-system-i386 || true
qemu-system-i386 -machine q35 -m 256 -kernel kernel/kernel.bin -s -S -debugcon stdio > qemu-output.txt &
run-debugger:
/usr/bin/gdb kernel/kernel.bin -ex 'target remote localhost:1234'
run-debugger.macos:
lldb kernel/kernel.bin -o 'gdb-remote localhost:1234'
clean:
$(MAKE) clean -C kernel/
$(MAKE) clean -C user/