diff --git a/kernel/Makefile b/kernel/Makefile index 87668a4..ea52c55 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -31,14 +31,15 @@ target := $(arch)-blog_os kernel := target/$(target)/$(mode)/ucore bin := target/$(target)/$(mode)/kernel.bin bootimage := target/$(target)/bootimage.bin - 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 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_opts := \ @@ -186,11 +187,6 @@ endif 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 ### ifeq ($(board), raspi3) diff --git a/user/img/ucore-rv32.img b/user/img/ucore-riscv32.img similarity index 100% rename from user/img/ucore-rv32.img rename to user/img/ucore-riscv32.img