-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (46 loc) · 1.18 KB
/
Makefile
File metadata and controls
60 lines (46 loc) · 1.18 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Build Options
export ARCH := riscv64
export LOG := warn
export DWARF := y
export MEMTRACK := n
# QEMU Options
export BLK := y
export NET := y
export VSOCK := n
export MEM := 1G
export ICOUNT := n
# Generated Options
export A := $(PWD)
export NO_AXSTD := y
export AX_LIB := axfeat
export APP_FEATURES := qemu
ifeq ($(MEMTRACK), y)
APP_FEATURES += starry-api/memtrack
endif
default: build
ROOTFS_URL = https://github.com/Starry-OS/rootfs/releases/download/20260214
ROOTFS_IMG = rootfs-$(ARCH).img
rootfs:
@if [ ! -f $(ROOTFS_IMG) ]; then \
echo "Image not found, downloading..."; \
curl -f -L $(ROOTFS_URL)/$(ROOTFS_IMG).xz -O; \
xz -d $(ROOTFS_IMG).xz; \
fi
@cp $(ROOTFS_IMG) make/disk.img
img:
@echo -e "\033[33mWARN: The 'img' target is deprecated. Please use 'rootfs' instead.\033[0m"
@$(MAKE) --no-print-directory rootfs
defconfig justrun clean:
@$(MAKE) -C make $@
build run debug disasm: defconfig
@$(MAKE) -C make $@
ci-test:
./scripts/ci-test.py $(ARCH)
# Aliases
rv:
$(MAKE) ARCH=riscv64 run
la:
$(MAKE) ARCH=loongarch64 run
vf2:
$(MAKE) ARCH=riscv64 APP_FEATURES=vf2 MYPLAT=axplat-riscv64-visionfive2 BUS=mmio build
.PHONY: build run justrun debug disasm clean