From owner-svn-ports-head@freebsd.org Tue Feb 5 15:58:31 2019 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E8AC14BE137; Tue, 5 Feb 2019 15:58:31 +0000 (UTC) (envelope-from manu@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) server-signature RSA-PSS (4096 bits) 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 0469D813E1; Tue, 5 Feb 2019 15:58:31 +0000 (UTC) (envelope-from manu@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 EB9FE2019E; Tue, 5 Feb 2019 15:58:30 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x15FwU0F077943; Tue, 5 Feb 2019 15:58:30 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x15FwTf3077938; Tue, 5 Feb 2019 15:58:29 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201902051558.x15FwTf3077938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 5 Feb 2019 15:58:29 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r492255 - in head/sysutils: . u-boot-firefly-rk3399 u-boot-master X-SVN-Group: ports-head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sysutils: . u-boot-firefly-rk3399 u-boot-master X-SVN-Commit-Revision: 492255 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0469D813E1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 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: Tue, 05 Feb 2019 15:58:31 -0000 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