summaryrefslogtreecommitdiff
path: root/target/riscv32
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2018-04-08 11:16:17 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2018-04-08 11:16:17 +0100
commit65b25cd0f268e989dfa5f1efcfca1e75ca38af64 (patch)
tree3b0b4bf6f1189402dea0a26d386a4e9328e4e916 /target/riscv32
parent0bddc7e755f67b8918c379c715b2f4fe00ef5913 (diff)
riscv: fix kernel boot in qemu
Diffstat (limited to 'target/riscv32')
-rw-r--r--target/riscv32/Makefile18
1 files changed, 14 insertions, 4 deletions
diff --git a/target/riscv32/Makefile b/target/riscv32/Makefile
index 30099fb55..9b268093a 100644
--- a/target/riscv32/Makefile
+++ b/target/riscv32/Makefile
@@ -29,15 +29,25 @@ kernel-strip:
$(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
kernel-install: kernel-strip
- @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+ @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+
+bbl:
+ @mkdir -p $(BUILD_DIR)/bbl
+ @rm -rf $(BUILD_DIR)/riscv-pk
+ (cd $(BUILD_DIR)/ && git clone https://github.com/riscv/riscv-pk.git)
+ (cd $(BUILD_DIR)/bbl && PATH='$(HOST_PATH)' ../riscv-pk/configure \
+ --host=$(GNU_TARGET_NAME) --target=$(GNU_TARGET_NAME) \
+ --with-payload=$(FW_DIR)/$(TARGET_KERNEL))
+ (cd $(BUILD_DIR)/bbl && PATH='$(HOST_PATH)' make)
+ cp $(BUILD_DIR)/bbl/bbl $(FW_DIR)/$(TARGET_KERNEL).bbl
# filesystem specific targets
ifeq ($(ADK_TARGET_FS),initramfs)
-imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
+imageinstall: kernel-install bbl $(FW_DIR)/$(INITRAMFS) targethelp
endif
ifeq ($(ADK_TARGET_FS),initramfsarchive)
-imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
+imageinstall: kernel-install bbl $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
endif
ifeq ($(ADK_TARGET_FS),initramfspiggyback)
-imageinstall: createinitramfs targethelp
+imageinstall: createinitramfs bbl targethelp
endif