|
|
@ -31,14 +31,15 @@ target := $(arch)-blog_os
|
|
|
|
kernel := target/$(target)/$(mode)/ucore
|
|
|
|
kernel := target/$(target)/$(mode)/ucore
|
|
|
|
bin := target/$(target)/$(mode)/kernel.bin
|
|
|
|
bin := target/$(target)/$(mode)/kernel.bin
|
|
|
|
bootimage := target/$(target)/bootimage.bin
|
|
|
|
bootimage := target/$(target)/bootimage.bin
|
|
|
|
|
|
|
|
|
|
|
|
user_dir := ../user
|
|
|
|
user_dir := ../user
|
|
|
|
user_bin_path := $(user_dir)/target/$(arch)-ucore/debug
|
|
|
|
|
|
|
|
user_bins := $(patsubst $(user_bin_path)/%.d, $(user_bin_path)/%, $(wildcard $(user_bin_path)/*.d))
|
|
|
|
|
|
|
|
user_obj := build/$(arch)/user.o
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export ARCH = $(arch)
|
|
|
|
export ARCH = $(arch)
|
|
|
|
export SFSIMG = $(user_dir)/build/user-$(arch).img
|
|
|
|
#export SFSIMG = $(user_dir)/build/user-$(arch).img
|
|
|
|
|
|
|
|
ifeq ($(arch), x86_64)
|
|
|
|
|
|
|
|
export SFSIMG = $(user_dir)/img/ucore-i386.img
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
export SFSIMG = $(user_dir)/img/ucore-$(arch).img
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
### qemu options ###
|
|
|
|
### qemu options ###
|
|
|
|
qemu_opts := \
|
|
|
|
qemu_opts := \
|
|
|
@ -186,11 +187,6 @@ endif
|
|
|
|
sfsimg:
|
|
|
|
sfsimg:
|
|
|
|
@cd $(user_dir) && make sfsimg
|
|
|
|
@cd $(user_dir) && make sfsimg
|
|
|
|
|
|
|
|
|
|
|
|
# make user.o from binary files
|
|
|
|
|
|
|
|
$(user_obj): $(user_bins)
|
|
|
|
|
|
|
|
@cd $(user_bin_path) && \
|
|
|
|
|
|
|
|
$(ld) -o $(abspath $@) $(patsubst %, -b binary %, $(notdir $(user_bins)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### install ###
|
|
|
|
### install ###
|
|
|
|
ifeq ($(board), raspi3)
|
|
|
|
ifeq ($(board), raspi3)
|
|
|
|