aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLogan Gunthorpe <logang@deltatee.com>2019-03-22 17:11:46 -0600
committerLogan Gunthorpe <logang@deltatee.com>2019-03-22 18:27:58 -0600
commitb54479d8e7aaec0a29fca0844cae7485dff50b7d (patch)
treecd36d196ea2c418a8ee6f851f126fc0e44e3cae8
parent662884bd08835875210a2c01674e5594fcae78c7 (diff)
downloadriscv-pk-b54479d8e7aaec0a29fca0844cae7485dff50b7d.zip
riscv-pk-b54479d8e7aaec0a29fca0844cae7485dff50b7d.tar.gz
riscv-pk-b54479d8e7aaec0a29fca0844cae7485dff50b7d.tar.bz2
Always build bbl.bin
bbl.bin is necessary for booting on hardware and is created by a simple objcopy line. It's much more convienent for riscv-pk to create this file then to expect the user to know to do it or to dig through the SDK's makefile to learn that it's required. Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
-rw-r--r--Makefile.in7
-rw-r--r--bbl/bbl.mk.in5
2 files changed, 9 insertions, 3 deletions
diff --git a/Makefile.in b/Makefile.in
index 73e92d9..2771d2d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -283,11 +283,11 @@ $$($(2)_install_prog_exes) : % : %.o $$($(2)_prog_libnames)
$(2)_c_deps += $$($(2)_install_prog_deps)
$(2)_junk += \
$$($(2)_install_prog_objs) $$($(2)_install_prog_deps) \
- $$($(2)_install_prog_exes)
+ $$($(2)_install_prog_exes) $($(2)_extra_targets)
# Subproject specific targets
-all-$(1) : lib$(1).a $$($(2)_install_prog_exes)
+all-$(1) : lib$(1).a $$($(2)_install_prog_exes) $($(2)_extra_targets)
check-$(1) : $$($(2)_test_outs)
echo; grep -h -e'Unit Tests' -e'FAILED' -e'Segementation' $$^; echo
@@ -311,6 +311,7 @@ test_outs += $$($(2)_test_outs)
install_hdrs += $$(addprefix $(src_dir)/$(1)/, $$($(2)_hdrs))
install_libs += lib$(1).a
install_exes += $$($(2)_install_prog_exes)
+extra_targets += $($(2)_extra_targets)
endef
@@ -446,7 +447,7 @@ junk += $(project_name)-*.tar.gz
# Default
#-------------------------------------------------------------------------
-all : $(install_hdrs) $(install_libs) $(install_exes)
+all : $(install_hdrs) $(install_libs) $(install_exes) $(extra_targets)
.PHONY : all
#-------------------------------------------------------------------------
diff --git a/bbl/bbl.mk.in b/bbl/bbl.mk.in
index f91dfbf..b0ef476 100644
--- a/bbl/bbl.mk.in
+++ b/bbl/bbl.mk.in
@@ -35,3 +35,8 @@ bbl_test_srcs =
bbl_install_prog_srcs = \
bbl.c \
+
+bbl.bin: bbl
+ $(OBJCOPY) -S -O binary --change-addresses -0x80000000 $< $@
+
+bbl_extra_targets = bbl.bin