forked from Starry-OS/StarryOS
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (50 loc) · 1.41 KB
/
Makefile
File metadata and controls
64 lines (50 loc) · 1.41 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
61
62
63
64
# Build Options
export RUSTC_BOOTSTRAP := 1
export ARCH := aarch64
export LOG := warn
export DWARF := y
export MEMTRACK := n
# QEMU Options
export BLK := y
export NET := y
export VSOCK := y
export MEM := 1G
export ICOUNT := n
export SMP := 4
# 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/20250917
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) arceos/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 arceos $@
build run debug disasm: defconfig
@make -C arceos $@
# 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
crosvm:
$(MAKE) --debug=v ARCH=aarch64 APP_FEATURES=crosvm MYPLAT=axplat-aarch64-crosvm-virt BUS=pci LOG=warn build
dice:
$(MAKE) --debug=v ARCH=aarch64 APP_FEATURES=dice MYPLAT=axplat-aarch64-crosvm-virt BUS=pci LOG=warn build
.PHONY: build run justrun debug disasm clean