From 344982d3c284a1e0737aefa35efa974a619adf87 Mon Sep 17 00:00:00 2001 From: Mitchell Horne Date: Fri, 31 Jul 2020 17:06:21 +0000 Subject: [PATCH] New port: sysutils/u-boot-qemu-riscv64 Add a u-boot port for QEMU's 64-bit RISC-V config. A simple u-boot payload is provided that can be specified on the command line. It runs in supervisor mode, and should be paired with OpenSBI. Reviewed by: manu Approved by: u-boot (manu) Differential Revision: https://reviews.freebsd.org/D25737 --- sysutils/Makefile | 1 + sysutils/u-boot-qemu-riscv64/Makefile | 10 ++++++++++ sysutils/u-boot-qemu-riscv64/pkg-descr | 12 ++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 sysutils/u-boot-qemu-riscv64/Makefile create mode 100644 sysutils/u-boot-qemu-riscv64/pkg-descr diff --git a/sysutils/Makefile b/sysutils/Makefile index e19639c6fc53..0cb98af2894f 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -1364,6 +1364,7 @@ SUBDIR += u-boot-pinebookpro SUBDIR += u-boot-qemu-arm SUBDIR += u-boot-qemu-arm64 + SUBDIR += u-boot-qemu-riscv64 SUBDIR += u-boot-riotboard SUBDIR += u-boot-rock64 SUBDIR += u-boot-rockpro64 diff --git a/sysutils/u-boot-qemu-riscv64/Makefile b/sysutils/u-boot-qemu-riscv64/Makefile new file mode 100644 index 000000000000..e013399e5839 --- /dev/null +++ b/sysutils/u-boot-qemu-riscv64/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +MASTERDIR= ${.CURDIR}/../u-boot-master + +MODEL= qemu-riscv64 +BOARD_CONFIG= qemu-riscv64_smode_defconfig +FAMILY= qemu +UBOOT_ARCH= riscv64 + +.include "${MASTERDIR}/Makefile" diff --git a/sysutils/u-boot-qemu-riscv64/pkg-descr b/sysutils/u-boot-qemu-riscv64/pkg-descr new file mode 100644 index 000000000000..fc688a3c8448 --- /dev/null +++ b/sysutils/u-boot-qemu-riscv64/pkg-descr @@ -0,0 +1,12 @@ +U-Boot loader for QEMU RISC-V 64-bit + +To use this bootloader to boot a FreeBSD RISC-V image, install +emulators/qemu50 and sysutils/opensbi and execute it as: + +qemu-system-riscv64 -machine virt -m 2048m -smp 2 -nographic \ + -bios /usr/local/share/opensbi/lp64/generic/firmware/fw_jump.elf \ + -kernel /usr/local/share/u-boot/u-boot-qemu-riscv64/u-boot.bin \ + -drive file=/path/to/freebsd.img,format=raw,id=hd0 \ + -device virtio-blk-device,drive=hd0 + +WWW: https://www.denx.de/wiki/U-Boot