Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sysutils/u-boot-starfive-visionfive2: new port
Create a u-boot port for the VisionFive 2 RISC-V SBC. Reviewed by: manu Approved by: manu (ports) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43517
- Loading branch information
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
MASTERDIR= ${.CURDIR}/../u-boot-master | ||
|
||
MODEL= starfive-visionfive2 | ||
BOARD_CONFIG= starfive_visionfive2_defconfig | ||
FAMILY= starfive | ||
UBOOT_ARCH= riscv64 | ||
|
||
# The FIT image will embed an OpenSBI firmware binary | ||
OPENSBI_FIRM= ${LOCALBASE}/share/opensbi/lp64/generic/firmware/fw_dynamic.bin | ||
BUILD_DEPENDS+= ${OPENSBI_FIRM}:sysutils/opensbi | ||
MAKE_ENV+= OPENSBI=${OPENSBI_FIRM} | ||
|
||
UBOOT_MOVE= ${WRKSRC}/spl/u-boot-spl.bin.normal.out | ||
UBOOT_PLIST= u-boot.itb u-boot-spl.bin.normal.out | ||
|
||
.include "${MASTERDIR}/Makefile" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
U-Boot loader and related files for the StarFive VisionFive v2 (JH7110). | ||
|
||
The SD card must be formatted with a GPT partition scheme, and expects two | ||
specific GUID partition types for the SPL and FIT image. | ||
|
||
Assuming an SD card device in /dev/da2, execute: | ||
# gpart create -s gpt da2 | ||
# gpart add -l spl -t !2E54B353-1271-4842-806F-E436D6AF6985 -b 2m -s 2m da2 | ||
# gpart add -l uboot -t !BC13C2FF-59E6-4262-A352-B275FD6F7172 -b 4m -s 4m da2 | ||
|
||
Now, copy the u-boot files to the SD card with dd(1). | ||
dd if=/usr/local/share/u-boot/u-boot-starfive-visionfive2/u-boot-spl.bin.normal.out \ | ||
of=/dev/da2p1 conv=sync | ||
dd if=/usr/local/share/u-boot/u-boot-starfive-visionfive2/u-boot.itb \ | ||
of=/dev/da2p2 conv=sync |