Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jul 2019 14:55:59 +0000 (UTC)
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r507459 - in head/sysutils: . u-boot-master u-boot-rockpro64
Message-ID:  <201907271455.x6REtxsY088876@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: manu
Date: Sat Jul 27 14:55:59 2019
New Revision: 507459
URL: https://svnweb.freebsd.org/changeset/ports/507459

Log:
  sysutils/u-boot-rockpro64: Add new u-boot port for Pine64 RockPro64 board
  
  This use the DDR blob and miniloader from RockChip + trust FW + ATF + u-boot
  proper.

Added:
  head/sysutils/u-boot-rockpro64/
  head/sysutils/u-boot-rockpro64/Makefile   (contents, props changed)
  head/sysutils/u-boot-rockpro64/pkg-descr   (contents, props changed)
Modified:
  head/sysutils/Makefile
  head/sysutils/u-boot-master/Makefile

Modified: head/sysutils/Makefile
==============================================================================
--- head/sysutils/Makefile	Sat Jul 27 14:54:09 2019	(r507458)
+++ head/sysutils/Makefile	Sat Jul 27 14:55:59 2019	(r507459)
@@ -1401,6 +1401,7 @@
     SUBDIR += u-boot-pinebook
     SUBDIR += u-boot-riotboard
     SUBDIR += u-boot-rock64
+    SUBDIR += u-boot-rockpro64
     SUBDIR += u-boot-rpi
     SUBDIR += u-boot-rpi-0-w
     SUBDIR += u-boot-rpi2

Modified: head/sysutils/u-boot-master/Makefile
==============================================================================
--- head/sysutils/u-boot-master/Makefile	Sat Jul 27 14:54:09 2019	(r507458)
+++ head/sysutils/u-boot-master/Makefile	Sat Jul 27 14:55:59 2019	(r507459)
@@ -22,6 +22,10 @@ BUILD_DEPENDS+=	gsed:textproc/gsed \
 BUILD_DEPENDS+=	${COMPILER}:devel/${COMPILER}
 
 USES=		bison gmake python:2.7,build shebangfix tar:bz2
+.if defined(FAMILY) && ${FAMILY} == rk3399
+USES+=		linux
+USE_LINUX+=	base:build
+.endif
 BINARY_ALIAS=	bison=${LOCALBASE}/bin/bison dtc=${LOCALBASE}/bin/dtc sed=gsed swig=swig3.0 python2=python2.7
 
 SHEBANG_FILES=	tools/binman/binman.py arch/arm/mach-rockchip/make_fit_atf.py
@@ -94,7 +98,7 @@ UBOOT_PLIST_RK3328=	idbloader.img u-boot.itb
 UBOOT_ARCH_RK3328=	aarch64
 
 # Override for RK3399 family
-UBOOT_PLIST_RK3399=	idbspl.img u-boot.itb
+UBOOT_PLIST_RK3399=	idbloader.img trust.img uboot.img
 UBOOT_ARCH_RK3399=	aarch64
 
 # Override for ARMADA38X family
@@ -146,13 +150,15 @@ MAKE_ENV+=	BL31=${LOCALBASE}/share/atf-sun50i_a64/bl31
 
 .if defined(FAMILY) && ${FAMILY} == rk3328
 BUILD_DEPENDS+=	${LOCALBASE}/share/atf-rk3328/bl31.elf:sysutils/atf-rk3328 \
-		${PYTHON_PKGNAMEPREFIX}pyelftools>0:devel/py-pyelftools@${PY_FLAVOR}
+		${PYTHON_PKGNAMEPREFIX}pyelftools>0:devel/py-pyelftools@${PY_FLAVOR} \
+		${LOCALBASE}/bin/rk-trust_merger:sysutils/linux-rkbin
 MAKE_ENV+=	BL31=${LOCALBASE}/share/atf-rk3328/bl31.elf
 .endif
 
 .if defined(FAMILY) && ${FAMILY} == rk3399
 BUILD_DEPENDS+=	${LOCALBASE}/share/atf-rk3399/bl31.elf:sysutils/atf-rk3399 \
-		${PYTHON_PKGNAMEPREFIX}pyelftools>0:devel/py-pyelftools@${PY_FLAVOR}
+		${PYTHON_PKGNAMEPREFIX}pyelftools>0:devel/py-pyelftools@${PY_FLAVOR} \
+		${LOCALBASE}/bin/rk-trust_merger:sysutils/linux-rkbin
 MAKE_ENV+=	BL31=${LOCALBASE}/share/atf-rk3399/bl31.elf
 .endif
 
@@ -219,7 +225,10 @@ post-build:
 	cat ${WRKSRC}/spl/u-boot-spl.bin >> ${WRKSRC}/idbloader.img
 .endif
 .if defined(FAMILY) && ${FAMILY} == rk3399
-	mkimage -n rk3399 -T rksd -d ${WRKSRC}/spl/u-boot-spl.bin ${WRKSRC}/idbspl.img
+	mkimage -n rk3399 -T rksd -d ${LOCALBASE}/share/linux-rkbin/bin/rk33/rk3399_ddr_800MHz_v1.23.bin ${WRKSRC}/idbloader.img
+	cat ${LOCALBASE}/share/linux-rkbin/bin/rk33/rk3399_miniloader_v1.19.bin >> ${WRKSRC}/idbloader.img
+	(cd ${WRKSRC} && rk-trust_merger ${LOCALBASE}/share/linux-rkbin/rktrust/RK3399TRUST.ini)
+	(cd ${WRKSRC} && rk-loaderimage --pack --uboot u-boot-dtb.bin uboot.img)
 .endif
 # If we need to put anything into WRKSRC, do so now so we can build the PLIST
 # in do-install

Added: head/sysutils/u-boot-rockpro64/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/u-boot-rockpro64/Makefile	Sat Jul 27 14:55:59 2019	(r507459)
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+MASTERDIR=	${.CURDIR}/../u-boot-master
+
+MODEL=		rockpro64
+BOARD_CONFIG=	rockpro64-rk3399_defconfig
+FAMILY=		rk3399
+
+.include "${MASTERDIR}/Makefile"

Added: head/sysutils/u-boot-rockpro64/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/u-boot-rockpro64/pkg-descr	Sat Jul 27 14:55:59 2019	(r507459)
@@ -0,0 +1,8 @@
+U-Boot loader and related files for the Pine64 RockPro64.
+
+To install this bootloader on an sdcard just do:
+dd if=/usr/local/share/u-boot/u-boot-rockpro64/idbloader.img of=/path/to/sdcarddevice seek=64 bs=512 conv=sync
+dd if=/usr/local/share/u-boot/u-boot-rockpro64/trust.img of=/path/to/sdcarddevice seek=24576 bs=512 conv=sync
+dd if=/usr/local/share/u-boot/u-boot-rockpro64/uboot.img of=/path/to/sdcarddevice seek=16384 bs=512 conv=sync
+
+WWW: http://www.denx.de/wiki/U-Boot



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907271455.x6REtxsY088876>