Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jul 2019 14:54:10 +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: r507458 - in head/sysutils: . u-boot-master u-boot-rock64
Message-ID:  <201907271454.x6REsAIS088602@repo.freebsd.org>

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

Log:
  sysutils/u-boot-rock64: Add new port for u-boot for the Pine64 Rock64 board
  
  And add support for building RK3328 u-boot in u-boot-master.
  This use the rockchip DDR blob + ATF + u-boot-spl and u-boot proper.

Added:
  head/sysutils/u-boot-rock64/
  head/sysutils/u-boot-rock64/Makefile   (contents, props changed)
  head/sysutils/u-boot-rock64/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:51:48 2019	(r507457)
+++ head/sysutils/Makefile	Sat Jul 27 14:54:09 2019	(r507458)
@@ -1400,6 +1400,7 @@
     SUBDIR += u-boot-pine64-lts
     SUBDIR += u-boot-pinebook
     SUBDIR += u-boot-riotboard
+    SUBDIR += u-boot-rock64
     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:51:48 2019	(r507457)
+++ head/sysutils/u-boot-master/Makefile	Sat Jul 27 14:54:09 2019	(r507458)
@@ -89,6 +89,10 @@ UBOOT_METADATA_IMX6_METHOD=	raw
 UBOOT_METADATA_IMX6_RAW_OFFSET=	2
 UBOOT_METADATA_IMX6_RAW_BS=	512
 
+# Override for RK3328 family
+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_ARCH_RK3399=	aarch64
@@ -140,6 +144,12 @@ BUILD_DEPENDS+=	${LOCALBASE}/share/atf-sun50i_a64/bl31
 MAKE_ENV+=	BL31=${LOCALBASE}/share/atf-sun50i_a64/bl31.bin
 .endif
 
+.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}
+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}
@@ -203,6 +213,10 @@ post-build:
 .for i in ${UBOOT_EXTRA_TARGETS}
 	(cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${i})
 .endfor
+.endif
+.if defined(FAMILY) && ${FAMILY} == rk3328
+	mkimage -n rk3328 -T rksd -d ${LOCALBASE}/share/linux-rkbin/bin/rk33/rk3328_ddr_333MHz_v1.16.bin ${WRKSRC}/idbloader.img
+	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

Added: head/sysutils/u-boot-rock64/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/u-boot-rock64/Makefile	Sat Jul 27 14:54:09 2019	(r507458)
@@ -0,0 +1,11 @@
+# $FreeBSD$
+
+MASTERDIR=	${.CURDIR}/../u-boot-master
+
+MODEL=		rock64
+BOARD_CONFIG=	rock64-rk3328_defconfig
+FAMILY=		rk3328
+
+UBOOT_EXTRA_TARGETS=	u-boot.itb
+
+.include "${MASTERDIR}/Makefile"

Added: head/sysutils/u-boot-rock64/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/u-boot-rock64/pkg-descr	Sat Jul 27 14:54:09 2019	(r507458)
@@ -0,0 +1,7 @@
+U-Boot loader and related files for the Pine64 Rock64.
+
+To install this bootloader on an sdcard just do:
+dd if=/usr/local/share/u-boot/u-boot-rock64/idbloader.img of=/path/to/sdcarddevice seek=64 bs=512 conv=sync
+dd if=/usr/local/share/u-boot/u-boot-rock64/u-boot.itb 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?201907271454.x6REsAIS088602>