diff options
Diffstat (limited to 'target/riscv64/Makefile')
-rw-r--r-- | target/riscv64/Makefile | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/target/riscv64/Makefile b/target/riscv64/Makefile index 4796d939b..9b022f98e 100644 --- a/target/riscv64/Makefile +++ b/target/riscv64/Makefile @@ -16,12 +16,12 @@ targethelp: @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}' ifeq ($(ADK_TARGET_QEMU),y) @echo "Start qemu with following command line:" - @echo 'qemu-system-riscv64 ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}' + @echo 'qemu-system-riscv64 ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL).bbl -initrd ${FW_DIR}/${INITRAMFS}' endif endif ifeq ($(ADK_TARGET_FS),initramfsarchive) targethelp: - @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}' + @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}.bbl' @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)" endif ifeq ($(ADK_TARGET_FS),initramfspiggyback) @@ -29,7 +29,7 @@ targethelp: @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}' ifeq ($(ADK_TARGET_QEMU),y) @echo "Start qemu with following command line:" - @echo 'qemu-system-riscv64 ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)' + @echo 'qemu-system-riscv64 ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL).bbl' endif endif @@ -39,13 +39,23 @@ kernel-strip: kernel-install: kernel-strip @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 |