Blame


1 ec901abe 2023-02-20 continue AS = clang
2 ec901abe 2023-02-20 continue CXX = clang++
3 ec901abe 2023-02-20 continue LD = ld.lld
4 4eb324fc 2023-02-20 continue OBJCOPY = llvm-objcopy
5 620d1d53 2023-02-20 continue
6 f56312c5 2023-02-14 continue ARCH = aarch64
7 f56312c5 2023-02-14 continue TARGET = ${ARCH}-none-elf
8 6efd408f 2023-03-01 continue BOARD = virt
9 f56312c5 2023-02-14 continue
10 6efd408f 2023-03-01 continue -include config.mk
11 6efd408f 2023-03-01 continue
12 f56312c5 2023-02-14 continue ASFLAGS = -target ${TARGET}
13 98601545 2023-02-18 continue ASFILES = boot.o
14 f56312c5 2023-02-14 continue
15 98601545 2023-02-18 continue CXXFLAGS = -target ${TARGET} -Wall -Wextra -nostdlib -fno-exceptions
16 ec901abe 2023-02-20 continue CXXFLAGS +=-ffreestanding -mgeneral-regs-only
17 3be3b31b 2023-03-02 continue CXXFLAGS +=-Iinclude -std=c++11
18 98601545 2023-02-18 continue CXXFILES = kernel.cc uart_${BOARD}.cc
19 f56312c5 2023-02-14 continue
20 ec901abe 2023-02-20 continue OBJS = ${ASFILES:.S=.o} ${CXXFILES:.cc=.o}
21 98601545 2023-02-18 continue
22 3be3b31b 2023-03-02 continue .PHONY: clean qemu gdb-remote
23 f56312c5 2023-02-14 continue
24 98601545 2023-02-18 continue all: squat.img
25 f56312c5 2023-02-14 continue
26 98601545 2023-02-18 continue squat.img: squat.elf
27 620d1d53 2023-02-20 continue ${OBJCOPY} squat.elf -O binary squat.img
28 f56312c5 2023-02-14 continue
29 98601545 2023-02-18 continue squat.elf: linker.ld ${OBJS}
30 98601545 2023-02-18 continue ${LD} -T linker.ld -o squat.elf ${OBJS}
31 98601545 2023-02-18 continue
32 f56312c5 2023-02-14 continue .S.o:
33 98601545 2023-02-18 continue ${AS} ${ASFLAGS} -c boot.S -o boot.o
34 98601545 2023-02-18 continue
35 98601545 2023-02-18 continue clean:
36 98601545 2023-02-18 continue rm -rf *.o squat.elf squat.img
37 6efd408f 2023-03-01 continue
38 3be3b31b 2023-03-02 continue qemu: squat.img
39 3be3b31b 2023-03-02 continue qemu-system-${ARCH} -M ${BOARD} -cpu cortex-a53 \
40 3be3b31b 2023-03-02 continue -kernel squat.img -nographic -monitor none -serial stdio
41 3be3b31b 2023-03-02 continue gdb-remote: squat.img
42 6efd408f 2023-03-01 continue qemu-system-${ARCH} -s -S -M ${BOARD} -cpu cortex-a53 \
43 6efd408f 2023-03-01 continue -kernel squat.img -nographic -monitor none -serial stdio