|
|
@ -2,6 +2,11 @@
|
|
|
|
# mode = {debug, release}
|
|
|
|
# mode = {debug, release}
|
|
|
|
arch ?= riscv32
|
|
|
|
arch ?= riscv32
|
|
|
|
mode ?= debug
|
|
|
|
mode ?= debug
|
|
|
|
|
|
|
|
ifeq ($(arch), riscv64)
|
|
|
|
|
|
|
|
biscuit ?= no
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
biscuit ?= yes
|
|
|
|
|
|
|
|
endif
|
|
|
|
out_dir ?= build/$(arch)
|
|
|
|
out_dir ?= build/$(arch)
|
|
|
|
out_img ?= build/$(arch).img
|
|
|
|
out_img ?= build/$(arch).img
|
|
|
|
|
|
|
|
|
|
|
@ -12,6 +17,7 @@ ucore_bin_path := ucore/build/$(arch)
|
|
|
|
biscuit_bin_path := biscuit/build/$(arch)
|
|
|
|
biscuit_bin_path := biscuit/build/$(arch)
|
|
|
|
busybox := $(out_dir)/busybox
|
|
|
|
busybox := $(out_dir)/busybox
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rust_build_args := --target targets/$(arch)-rcore.json
|
|
|
|
rust_build_args := --target targets/$(arch)-rcore.json
|
|
|
|
cmake_build_args := -DARCH=$(arch)
|
|
|
|
cmake_build_args := -DARCH=$(arch)
|
|
|
|
|
|
|
|
|
|
|
@ -40,6 +46,7 @@ ifneq ($(arch), x86_64)
|
|
|
|
@cp $(ucore_bin_path)/* $(out_dir)/ucore
|
|
|
|
@cp $(ucore_bin_path)/* $(out_dir)/ucore
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(biscuit), yes)
|
|
|
|
biscuit:
|
|
|
|
biscuit:
|
|
|
|
ifeq ($(arch), $(filter $(arch), x86_64 aarch64 riscv64))
|
|
|
|
ifeq ($(arch), $(filter $(arch), x86_64 aarch64 riscv64))
|
|
|
|
@echo Building biscuit programs
|
|
|
|
@echo Building biscuit programs
|
|
|
@ -48,6 +55,7 @@ ifeq ($(arch), $(filter $(arch), x86_64 aarch64 riscv64))
|
|
|
|
@rm -rf $(out_dir)/biscuit && mkdir -p $(out_dir)/biscuit
|
|
|
|
@rm -rf $(out_dir)/biscuit && mkdir -p $(out_dir)/biscuit
|
|
|
|
@cp $(biscuit_bin_path)/* $(out_dir)/biscuit
|
|
|
|
@cp $(biscuit_bin_path)/* $(out_dir)/biscuit
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
$(busybox):
|
|
|
|
$(busybox):
|
|
|
|
ifeq ($(arch), x86_64)
|
|
|
|
ifeq ($(arch), x86_64)
|
|
|
|