From nobody Tue Jan 23 17:20:23 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKDPM2HpVz57kTC; Tue, 23 Jan 2024 17:20:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKDPM1sZyz42l4; Tue, 23 Jan 2024 17:20:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706030423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DKIVltaztc+L0LvaxInG7AFXWj3ClpxQGye2RcFXhOE=; b=PSOar6HkIwdBmQXcsVM2zBfEMam6ruGBDJeS207rMq+ThVOR0ekMJoOPjtCj7K/8a4h/EE wxvOyUuQII5IFL+vOQbgo/ap7ytA+xHu8SaEoZBPwz3jB45mKwsNZYYXeT+Gq1aDD7CpSS N8BlFMtB+Hp+BJFPUOnKEWi2Q8mvz5oZFlIBDwS0yTyTeLIJf8OL0Ye8hMo48l9touTucB LU6+yFt4YLXlV36TVwg2UhNubt9XC0bBZ7FsJz5V8Jd07PJQXb2dI9muGtHArFJ1xdvZ1y LiaQ3eIcgINzdpj0bIbocrBZwMHjPF3SU5LBTDK2oc7h6JtiOvshcuF4wamWvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706030423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DKIVltaztc+L0LvaxInG7AFXWj3ClpxQGye2RcFXhOE=; b=CpRuZynU27IGGVK/D+J1+mKOCaXEA+8VVvmYubyGlfus8EyjyauNFCmRr7y6Dh97UvEBsK OH3lTsntYaVVQOJokxkAn3iaLT0fMGUyNKGpD3VYUoWWSF4DE9z82fhh3eJW1OvvIJjsXY gcJh521HuJNTK2sknJjle04pHQA4QDGl0v46/wluuEFTj1cC6XI6w1Fj145lKuVAlNvb7q c214182tKuuzQmt/j+8vsqlmQglDlQ50FfvKi2bh4M7oKCZyJrDsjmczwnjQOMb/RmdajT OMuRiGMtMwFN0BonEOKZ4d0lPP3Uq+wr4n6m9tqCwtT0Ngb7BDTdI1pvBYmupw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706030423; a=rsa-sha256; cv=none; b=C2wxI+FjCQoecq9GlbshMQYhY/yqc/1YcLuskSU9vE2EteAP3JzMswbLN7yyONBATyf0Wp Up6CgUu5b1qhSjHd6+ppXqgTtLc9qGifW/gqgd2XQQ8V1FEsYorklB1b0mxWNmMjasqYEY TFS5Lutbuea+/ieWghgYvf6t4EgSNAZMj94T2lBNNbFfNxa+OOi2iP/MCT7XYCCRrp/gT3 k8xqc0Lce2s8Ymx+gaPv90LNPxcPZqDN5EDfY5pq483VMsbCNkInzjLWG9JCRh0wrZyI8l 0NOlDCFGJbPQGYsYkLC/UH9+ULVwmlbTgO195jC7MzUaF4X4yMPbl6R0nk7qLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKDPM0x72zfmC; Tue, 23 Jan 2024 17:20:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40NHKN9m034582; Tue, 23 Jan 2024 17:20:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NHKNo4034579; Tue, 23 Jan 2024 17:20:23 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:20:23 GMT Message-Id: <202401231720.40NHKNo4034579@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Mitchell Horne Subject: git: 970cec81a5cd - main - sysutils/u-boot-starfive-visionfive2: new port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 970cec81a5cd4e2a11937b3c42ffa398f180c966 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/ports/commit/?id=970cec81a5cd4e2a11937b3c42ffa398f180c966 commit 970cec81a5cd4e2a11937b3c42ffa398f180c966 Author: Mitchell Horne AuthorDate: 2024-01-23 17:19:26 +0000 Commit: Mitchell Horne CommitDate: 2024-01-23 17:19:26 +0000 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 --- sysutils/Makefile | 1 + sysutils/u-boot-starfive-visionfive2/Makefile | 16 ++++++++++++++++ sysutils/u-boot-starfive-visionfive2/pkg-descr | 15 +++++++++++++++ 3 files changed, 32 insertions(+) diff --git a/sysutils/Makefile b/sysutils/Makefile index 8d00c89931ec..c770a710ad59 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -1537,6 +1537,7 @@ SUBDIR += u-boot-sinovoip-bpi-m3 SUBDIR += u-boot-sopine SUBDIR += u-boot-sopine-spi + SUBDIR += u-boot-starfive-visionfive2 SUBDIR += u-boot-tools SUBDIR += u-boot-wandboard SUBDIR += ua diff --git a/sysutils/u-boot-starfive-visionfive2/Makefile b/sysutils/u-boot-starfive-visionfive2/Makefile new file mode 100644 index 000000000000..101a17f18a02 --- /dev/null +++ b/sysutils/u-boot-starfive-visionfive2/Makefile @@ -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" diff --git a/sysutils/u-boot-starfive-visionfive2/pkg-descr b/sysutils/u-boot-starfive-visionfive2/pkg-descr new file mode 100644 index 000000000000..a3fc9635157c --- /dev/null +++ b/sysutils/u-boot-starfive-visionfive2/pkg-descr @@ -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