Skip to content

Commit

Permalink
build: make prepare will remove opensbi firmware directory
Browse files Browse the repository at this point in the history
This will fix, it you run make sim, then run make prepare
and then run make freeloader, the freeloader is wrong
sdcard uboot can't find mmc device, due to the dtb is bind
to opensbi because make sim, so we need to clean firmware directory
and make a rebuild for firmware

Signed-off-by: Huaqi Fang <[email protected]>
  • Loading branch information
fanghuaqi committed Dec 18, 2023
1 parent ecc2dee commit aeffd6e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ opensbi_srcdir := $(srcdir)/opensbi
opensbi_wrkdir := $(wrkdir)/opensbi
opensbi_plat_confdir := $(confdir)/opensbi
opensbi_plat_srcdir := $(srcdir)/opensbi/platform/generic/nuclei/
opensbi_payload := $(opensbi_wrkdir)/platform/generic/firmware/fw_payload.elf
opensbi_jumpbin := $(opensbi_wrkdir)/platform/generic/firmware/fw_jump.bin
opensbi_jumpelf := $(opensbi_wrkdir)/platform/generic/firmware/fw_jump.elf
opensbi_firmware_wrkdir := $(opensbi_wrkdir)/platform/generic/firmware
opensbi_payload := $(opensbi_firmware_wrkdir)/fw_payload.elf
opensbi_jumpbin := $(opensbi_firmware_wrkdir)/fw_jump.bin
opensbi_jumpelf := $(opensbi_firmware_wrkdir)/fw_jump.elf

opensbi_plat_deps := $(wildcard $(addprefix $(opensbi_plat_confdir)/, *.mk *.c *.h))

Expand Down Expand Up @@ -495,7 +496,7 @@ run_openocd:
$(openocd) -f $(platform_openocd_cfg)


.PHONY: distclean clean cleanboot cleanlinux cleanbuildroot cleansysroot cleanfreeloader clean_freeloader cleanopensbi prepare presim preboot
.PHONY: distclean clean cleanboot cleanlinux cleanbuildroot cleansysroot cleanfreeloader clean_freeloader cleanopensbi prepare presim preboot
distclean:
rm -rf $(wrkdir_root)

Expand Down Expand Up @@ -525,12 +526,11 @@ cleanfreeloader:
cleanopensbi:
rm -rf $(opensbi_wrkdir)


# If you change your make target from sim to bootimages, you need to run preboot first
preboot: prepare

prepare:
rm -rf $(vmlinux_bin) $(vmlinux) $(linux_image) $(vmlinux_sim_bin) $(vmlinux_sim)
rm -rf $(vmlinux_bin) $(vmlinux) $(linux_image) $(vmlinux_sim_bin) $(vmlinux_sim) $(opensbi_firmware_wrkdir)

.PHONY: sim opensbi_sim presim

Expand Down

0 comments on commit aeffd6e

Please sign in to comment.