diff options
Diffstat (limited to 'target/riscv32')
-rw-r--r-- | target/riscv32/Makefile | 18 | ||||
-rw-r--r-- | target/riscv32/kernel/qemu-riscv32 | 7 |
2 files changed, 12 insertions, 13 deletions
diff --git a/target/riscv32/Makefile b/target/riscv32/Makefile index 37750d763..577ef3f15 100644 --- a/target/riscv32/Makefile +++ b/target/riscv32/Makefile @@ -6,7 +6,7 @@ include $(ADK_TOPDIR)/mk/kernel-build.mk include $(ADK_TOPDIR)/mk/image.mk KERNEL:=$(LINUX_DIR)/arch/riscv/boot/Image -QEMU_ARGS:=-M virt -m 256 -nographic -device loader,file=$(FW_DIR)/$(TARGET_KERNEL),addr=0x80200000 +QEMU_ARGS:=-M virt -m 512 -nographic ifeq ($(ADK_TARGET_QEMU_WITH_VIRTIO),y) QEMU_ARGS+=-netdev user,id=eth0 -device virtio-net-device,netdev=eth0 endif @@ -45,7 +45,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-riscv32 ${QEMU_ARGS} -kernel $(FW_DIR)/fw_jump.elf' + @echo 'qemu-system-riscv32 ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)' endif endif @@ -54,21 +54,13 @@ kernel-strip: kernel-install: kernel-strip @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL) -bbl: - @rm -rf $(BUILD_DIR)/opensbi - (cd $(BUILD_DIR)/ && git clone https://github.com/riscv/opensbi.git) - (cd $(BUILD_DIR)/opensbi && PATH='$(HOST_PATH)' \ - CROSS_COMPILE=$(GNU_TARGET_NAME)- \ - PLATFORM=qemu/virt make) - cp $(BUILD_DIR)/opensbi/build/platform/qemu/virt/firmware/fw_jump.elf $(FW_DIR) - # filesystem specific targets ifeq ($(ADK_TARGET_FS),initramfs) -imageinstall: kernel-install bbl $(FW_DIR)/$(INITRAMFS) targethelp +imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp endif ifeq ($(ADK_TARGET_FS),initramfsarchive) -imageinstall: kernel-install bbl $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp +imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp endif ifeq ($(ADK_TARGET_FS),initramfspiggyback) -imageinstall: createinitramfs bbl targethelp +imageinstall: createinitramfs targethelp endif diff --git a/target/riscv32/kernel/qemu-riscv32 b/target/riscv32/kernel/qemu-riscv32 index ab8ffb263..a1ef83228 100644 --- a/target/riscv32/kernel/qemu-riscv32 +++ b/target/riscv32/kernel/qemu-riscv32 @@ -5,3 +5,10 @@ CONFIG_CPU_RV_GENERIC=y CONFIG_RV_SYSRISCV_ATOMIC=y CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y CONFIG_32BIT=y +CONFIG_HVC_DRIVER=y +CONFIG_HVC_RISCV_SBI=y +CONFIG_SERIAL_EARLYCON_RISCV_SBI=y +CONFIG_CMDLINE_BOOL=y +CONFIG_SOC_SIFIVE=y +CONFIG_SERIAL_SIFIVE=y +CONFIG_SERIAL_SIFIVE_CONSOLE=y |