1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00

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).
This commit is contained in:
Emmanuel Vadot 2019-02-05 15:58:29 +00:00
parent 4b4136e015
commit f1b124467d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=492255
5 changed files with 47 additions and 4 deletions

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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.bin:sysutils/atf-sun50i_a
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)

View File

@ -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