From owner-svn-ports-head@freebsd.org Thu Dec 17 18:12:02 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CC9B94BE9C6; Thu, 17 Dec 2020 18:12:02 +0000 (UTC) (envelope-from mhorne@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cxg7Q5XL0z4VNk; Thu, 17 Dec 2020 18:12:02 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B10591CFB4; Thu, 17 Dec 2020 18:12:02 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BHIC2bV016070; Thu, 17 Dec 2020 18:12:02 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHIC2CA016067; Thu, 17 Dec 2020 18:12:02 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202012171812.0BHIC2CA016067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Thu, 17 Dec 2020 18:12:02 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r558309 - in head/sysutils: . u-boot-sifive-fu540 X-SVN-Group: ports-head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in head/sysutils: . u-boot-sifive-fu540 X-SVN-Commit-Revision: 558309 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Dec 2020 18:12:02 -0000 Author: mhorne (src committer) Date: Thu Dec 17 18:12:01 2020 New Revision: 558309 URL: https://svnweb.freebsd.org/changeset/ports/558309 Log: Add sysutils/u-boot-sifive-fu540: u-boot for the HiFive Unleashed Tested by: Klaus Küchemann Reviewed by: manu, Klaus Küchemann Approved by: manu (uboot, ports) Differential Revision: https://reviews.freebsd.org/D25737 Added: head/sysutils/u-boot-sifive-fu540/ head/sysutils/u-boot-sifive-fu540/Makefile (contents, props changed) head/sysutils/u-boot-sifive-fu540/pkg-descr (contents, props changed) Modified: head/sysutils/Makefile Modified: head/sysutils/Makefile ============================================================================== --- head/sysutils/Makefile Thu Dec 17 17:53:37 2020 (r558308) +++ head/sysutils/Makefile Thu Dec 17 18:12:01 2020 (r558309) @@ -1407,6 +1407,7 @@ SUBDIR += u-boot-rpi3-32 SUBDIR += u-boot-rpi4 SUBDIR += u-boot-rpi-arm64 + SUBDIR += u-boot-sifive-fu540 SUBDIR += u-boot-sinovoip-bpi-m3 SUBDIR += u-boot-sopine SUBDIR += u-boot-sopine-spi Added: head/sysutils/u-boot-sifive-fu540/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/u-boot-sifive-fu540/Makefile Thu Dec 17 18:12:01 2020 (r558309) @@ -0,0 +1,18 @@ +# $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_MOVE= ${WRKSRC}/spl/u-boot-spl.bin +UBOOT_PLIST= u-boot.itb u-boot-spl.bin + +.include "${MASTERDIR}/Makefile" Added: head/sysutils/u-boot-sifive-fu540/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/u-boot-sifive-fu540/pkg-descr Thu Dec 17 18:12:01 2020 (r558309) @@ -0,0 +1,19 @@ +U-Boot loader and related files for the HiFive Unleashed (FU540). + +The SD card must be formatted with a GPT partition scheme, and expects two +specific GUID partition types for the SPL and FIT image. + +Note: due to limitations in gpart(8), sgdisk(8) should be used instead. Install +it with the sysutils/gdisk port or package. + +Assuming an SD card device in /dev/da2, execute: +sgdisk --clear --set-alignment=2 \ + --new=1:34:2081 --change-name=1:loader1 --typecode=1:5B193300-FC78-40CD-8002-E86C45580B47 \ + --new=2:2082:10273 --change-name=2:loader2 --typecode=2:2E54B353-1271-4842-806F-E436D6AF6985 \ + /dev/da2 + +Now, copy the u-boot files to the SD card with dd(1). +dd if=/usr/local/share/u-boot/u-boot-sifive-fu540/u-boot-spl.bin of=/dev/da2p1 conv=sync +dd if=/usr/local/share/u-boot/u-boot-sifive-fu540/u-boot.itb of=/dev/da2p2 conv=sync + +WWW: https://www.denx.de/wiki/U-Boot