os-core/Makefile

30 lines
467 B
Makefile
Raw Normal View History

2019-12-01 22:57:02 +01:00
include Makevars.mk
2019-05-29 11:10:01 +02:00
2019-12-01 22:57:02 +01:00
# Rules
#
2019-05-29 11:10:01 +02:00
all: kernel
2019-12-01 22:57:02 +01:00
$(BUILD_DIR)kernel:
mkdir -p $@
2019-05-29 11:10:01 +02:00
2019-12-01 22:57:02 +01:00
.PHONY: clean run debug kernel
2019-12-01 22:57:02 +01:00
kernel: $(BUILD_DIR)kernel
cd kernel && BUILD_DIR=../$(BUILD_DIR)kernel/ make
2019-05-29 11:10:01 +02:00
clean:
2019-12-01 22:57:02 +01:00
rm -Rf ./$(BUILD_DIR)*
2019-05-29 11:10:01 +02:00
run: kernel
2019-12-01 22:57:02 +01:00
$(AARCH64_QEMU)
2019-05-29 11:10:01 +02:00
debug: kernel
2019-12-01 22:57:02 +01:00
$(AARCH64_QEMU) -S -gdb tcp::1234 & \
gdb-multiarch -q \
-ex 'file $(BUILD_DIR)kernel/kernel.elf' \
-ex 'target remote localhost:1234'
kill %1
console:
sudo picocom -b 115200 -r -l /dev/ttyUSB0