Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147481313
D25737.id74674.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D25737.id74674.diff
View Options
Index: sysutils/Makefile
===================================================================
--- sysutils/Makefile
+++ sysutils/Makefile
@@ -1353,6 +1353,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
@@ -1362,6 +1363,7 @@
SUBDIR += u-boot-rpi3
SUBDIR += u-boot-rpi3-32
SUBDIR += u-boot-rpi4
+ SUBDIR += u-boot-sifive-fu540
SUBDIR += u-boot-sinovoip-bpi-m3
SUBDIR += u-boot-sopine
SUBDIR += u-boot-tools
Index: sysutils/u-boot-master/Makefile
===================================================================
--- sysutils/u-boot-master/Makefile
+++ sysutils/u-boot-master/Makefile
@@ -132,6 +132,9 @@
.elif ${UBOOT_ARCH} == aarch64
CROSS_COMPILE=aarch64-none-elf-
ARCHFLAGS=ARCH=arm
+.elif ${UBOOT_ARCH} == riscv64
+CROSS_COMPILE=riscv64-none-elf-
+ARCHFLAGS=ARCH=riscv
.else
# Best guess for other architectures
CROSS_COMPILE=${UBOOT_ARCH}-none-elf-
Index: sysutils/u-boot-qemu-riscv64/Makefile
===================================================================
--- /dev/null
+++ sysutils/u-boot-qemu-riscv64/Makefile
@@ -0,0 +1,14 @@
+# $FreeBSD$
+
+MASTERDIR= ${.CURDIR}/../u-boot-master
+
+MODEL= qemu-riscv64
+BOARD_CONFIG= qemu-riscv64_smode_defconfig
+FAMILY= qemu
+UBOOT_ARCH= riscv64
+
+UBOOT_PLIST= u-boot.bin
+
+UBOOT_VERSION= 2020.07
+
+.include "${MASTERDIR}/Makefile"
Index: sysutils/u-boot-qemu-riscv64/pkg-descr
===================================================================
--- /dev/null
+++ 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
+ -device loader,file=/usr/local/share/u-boot/u-boot-qemu-riscv64/u-boot.bin,addr=0x80200000 \
+ -drive file=/path/to/rootfs,format=raw,id=hd0 \
+ -device virtio-blk-device,drive=hd0
+
+WWW: https://www.denx.de/wiki/U-Boot
Index: sysutils/u-boot-sifive-fu540/Makefile
===================================================================
--- /dev/null
+++ sysutils/u-boot-sifive-fu540/Makefile
@@ -0,0 +1,17 @@
+# $FreeBSD$
+
+MASTERDIR= ${.CURDIR}/../u-boot-master
+
+MODEL= sifive-fu540
+BOARD_CONFIG= sifive_fu540_defconfig
+FAMILY= sifive
+UBOOT_ARCH= riscv64
+
+# The FIT image will embed an OpenSBI firmware binary
+OPENSBI_FIRM= ${LOCALBASE}/share/opensbi/lp64/sifive/fu540/firmware/fw_dynamic.bin
+BUILD_DEPENDS+= ${OPENSBI_FIRM}:sysutils/opensbi
+MAKE_ENV+= OPENSBI=${OPENSBI_FIRM}
+
+UBOOT_PLIST= u-boot.itb spl/u-boot-spl.bin
+
+.include "${MASTERDIR}/Makefile"
Index: sysutils/u-boot-sifive-fu540/pkg-descr
===================================================================
--- /dev/null
+++ sysutils/u-boot-sifive-fu540/pkg-descr
@@ -0,0 +1,13 @@
+U-Boot loader and related files for the SiFive Unleashed (FU540).
+
+First, prep the SD card. It must be formatted with a GPT partition scheme, and
+expects two specific GUID partition types for the SPL and FIT image.
+gpart create -s gpt sdcarddevice
+gpart add -b 64 -s 2048 -t "\!5B193300-FC78-40CD-8002-E86C45580B47" sdcarddevice
+gpart add -b 2112 -s 8192 -t "\!2E54B353-1271-4842-806F-E436D6AF6985" sdcarddevice
+
+Now, copy the u-boot files to the SD card via dd(1).
+dd if=/usr/local/share/u-boot/u-boot-sifive-fu540/u-boot-spl.bin of=/path/to/sdcarddevice seek=64 bs=512 conv=sync
+dd if=/usr/local/share/u-boot/u-boot-sifive-fu540/u-boot.itb of=/path/to/sdcarddevice seek=2112 bs=512 conv=sync
+
+WWW: https://www.denx.de/wiki/U-Boot
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 12, 8:17 AM (13 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29573125
Default Alt Text
D25737.id74674.diff (3 KB)
Attached To
Mode
D25737: RISC-V u-boot ports
Attached
Detach File
Event Timeline
Log In to Comment