svn commit: r492255 - in head/sysutils: . u-boot-firefly-rk3399 u-boot-master

Emmanuel Vadot manu at FreeBSD.org
Tue Feb 5 15:58:31 UTC 2019


Author: manu
Date: Tue Feb  5 15:58:29 2019
New Revision: 492255
URL: https://svnweb.freebsd.org/changeset/ports/492255

Log:
  u-boot-firefly-rk3399: Add a u-boot port for this board
  
  This is a ARM64 board with a RockChip RK3399 SoC.
  
  Add support for RK3399 to the u-boot-master port. No METADATA are created
  for now as this u-boot is split in two file and we don't support this scheme
  yet.
  Two patch are needed :
   - One to allow booting u-boot proper from the same source as the DTS (accepted
   and merge upstream)
   - One to have the BL31 (ATF binary) path in a environment variable instead of
   in the source directory (accepted upstream).

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

Modified: head/sysutils/Makefile
==============================================================================
--- head/sysutils/Makefile	Tue Feb  5 15:50:07 2019	(r492254)
+++ head/sysutils/Makefile	Tue Feb  5 15:58:29 2019	(r492255)
@@ -1373,6 +1373,7 @@
     SUBDIR += u-boot-cubox-hummingboard
     SUBDIR += u-boot-duovero
     SUBDIR += u-boot-imx-serial-loader
+    SUBDIR += u-boot-firefly-rk3399
     SUBDIR += u-boot-master
     SUBDIR += u-boot-nanopi-a64
     SUBDIR += u-boot-nanopi-m1plus

Added: head/sysutils/u-boot-firefly-rk3399/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/u-boot-firefly-rk3399/Makefile	Tue Feb  5 15:58:29 2019	(r492255)
@@ -0,0 +1,14 @@
+# $FreeBSD$
+
+MASTERDIR=	${.CURDIR}/../u-boot-master
+
+MODEL=		firefly-rk3399
+BOARD_CONFIG=	firefly-rk3399_defconfig
+FAMILY=		rk3399
+
+PATCHFILES+=	1020889/raw \
+		1036621/raw
+
+UBOOT_EXTRA_TARGETS=	u-boot.itb
+
+.include "${MASTERDIR}/Makefile"

Added: head/sysutils/u-boot-firefly-rk3399/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/u-boot-firefly-rk3399/pkg-descr	Tue Feb  5 15:58:29 2019	(r492255)
@@ -0,0 +1,7 @@
+U-Boot loader and related files for the Firefly RK3399.
+
+To install this bootloader on an sdcard just do:
+dd if=/usr/local/share/u-boot/u-boot-firefly-rk3399/idbspl.img of=/path/to/sdcarddevice seek=64
+dd if=/usr/local/share/u-boot/u-boot-firefly-rk3399/u-boot.itb of=/path/to/sdcarddevice seek=16384 conv=sync
+
+WWW: http://www.denx.de/wiki/U-Boot

Modified: head/sysutils/u-boot-master/Makefile
==============================================================================
--- head/sysutils/u-boot-master/Makefile	Tue Feb  5 15:50:07 2019	(r492254)
+++ head/sysutils/u-boot-master/Makefile	Tue Feb  5 15:58:29 2019	(r492255)
@@ -24,7 +24,7 @@ BUILD_DEPENDS+=	${COMPILER}:devel/${COMPILER}
 USES=		bison gmake python:2.7,build shebangfix tar:bz2
 BINARY_ALIAS=	bison=${LOCALBASE}/bin/bison dtc=${LOCALBASE}/bin/dtc sed=gsed swig=swig3.0
 
-SHEBANG_FILES=	tools/binman/binman.py
+SHEBANG_FILES=	tools/binman/binman.py arch/arm/mach-rockchip/make_fit_atf.py
 SSP_UNSAFE=	yes
 UBOOT_DIR=	share/u-boot/${PORTNAME}${PKGNAMESUFFIX}
 INST=		${PREFIX}/${UBOOT_DIR}
@@ -89,6 +89,10 @@ UBOOT_METADATA_IMX6_METHOD=	raw
 UBOOT_METADATA_IMX6_RAW_OFFSET=	2
 UBOOT_METADATA_IMX6_RAW_BS=	512
 
+# Override for RK3399 family
+UBOOT_PLIST_RK3399=	idbspl.img u-boot.itb
+UBOOT_ARCH_RK3399=	aarch64
+
 # Uboot variables
 .if !defined(UBOOT_VERSION) && defined(UBOOT_VERSION_${FAMILY:tu})
 UBOOT_VERSION=${UBOOT_VERSION_${FAMILY:tu}}
@@ -129,6 +133,12 @@ BUILD_DEPENDS+=	${LOCALBASE}/share/atf-sun50i_a64/bl31
 MAKE_ENV+=	BL31=${LOCALBASE}/share/atf-sun50i_a64/bl31.bin
 .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}
+MAKE_ENV+=	BL31=${LOCALBASE}/share/atf-rk3399/bl31.elf
+.endif
+
 # Each u-boot family has different files to include, bring them in.
 .for i in ${UBOOT_PLIST}
 PLIST_FILES+=	${UBOOT_DIR}/${i}
@@ -178,11 +188,18 @@ do-configure:
 	(cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${MAKE_CMD} ${BOARD_CONFIG})
 .endif
 
-.if ${UBOOT_ARCH} == arm
 post-build:
+.if ${UBOOT_ARCH} == arm
 	mkimage -C none -A arm -T script -d ${FILESDIR}/boot.cmd ${WRKSRC}/boot.scr
 .endif
-
+.if defined(UBOOT_EXTRA_TARGETS)
+.for i in ${UBOOT_EXTRA_TARGETS}
+	(cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${i})
+.endfor
+.endif
+.if ${FAMILY} == "rk3399"
+	mkimage -n rk3399 -T rksd -d ${WRKSRC}/spl/u-boot-spl.bin ${WRKSRC}/idbspl.img
+.endif
 # If we need to put anything into WRKSRC, do so now so we can build the PLIST
 # in do-install
 .if defined(UBOOT_MOVE)

Modified: head/sysutils/u-boot-master/distinfo
==============================================================================
--- head/sysutils/u-boot-master/distinfo	Tue Feb  5 15:50:07 2019	(r492254)
+++ head/sysutils/u-boot-master/distinfo	Tue Feb  5 15:58:29 2019	(r492255)
@@ -1,5 +1,9 @@
-TIMESTAMP = 1549296844
+TIMESTAMP = 1549364847
 SHA256 (u-boot/u-boot-2019.01.tar.bz2) = 50bd7e5a466ab828914d080d5f6a432345b500e8fba1ad3b7b61e95e60d51c22
 SIZE (u-boot/u-boot-2019.01.tar.bz2) = 13366005
 SHA256 (u-boot/939129/raw) = 2a4ebf283aec8e74ec77b3cb071c6883f73807454ca94fea78361c7391187b97
 SIZE (u-boot/939129/raw) = 310
+SHA256 (u-boot/1020889/raw) = f8e991ce06037ea3e43a8c5f1f01b8890f8fcf7e122a2b7d0d6dc05cf80164d5
+SIZE (u-boot/1020889/raw) = 380
+SHA256 (u-boot/1036621/raw) = 28dbd66d14fab9dc782ce091d3c132a226b8425f6503c329ee8a7031b79b52f7
+SIZE (u-boot/1036621/raw) = 480


More information about the svn-ports-all mailing list