> Date: Mon, 29 Jul 2019 14:07:09 +1000
> From: Jonathan Gray <[email protected]>
>
> On Sun, Jul 28, 2019 at 11:40:26PM +0200, Mark Kettenis wrote:
> > > Date: Sun, 28 Jul 2019 17:04:12 +1000
> > > From: Jonathan Gray <[email protected]>
> > >
> > > On Fri, Jun 21, 2019 at 10:24:48PM +0200, Mark Kettenis wrote:
> > > > I've finally managed to build a properly working (and fully open
> > > > source) firmware for the ROCKPro64. The firmware consists of two
> > > > files, which can be downloaded from:
> > > >
> > > >
> > > > https://sibelius.home.xs4all.nl/firmware/rk3399-rockpro64/idbloader.img
> > > > https://sibelius.home.xs4all.nl/firmware/rk3399-rockpro64/u-boot.itb
> > > >
> > > > In order to use this firmware you'll have to write it to a uSD card or
> > > > an eMMC module with the following commands:
> > > >
> > > > # dd if=idbloader.img of=/dev/sdXc seek=64
> > > > # dd if=u-boot.itb of=/dev/sdXc seek=16384
> > > >
> > > > Note that if you flashed a firmware to the onboard SPI flash, you'll
> > > > have to erase it first or disable the SPI flash with a jumper wire
> > > > connecting pins 23 and 25.
> > > >
> > > > Also note that the firmware overlaps with the msdos partition in the
> > > > default OpenBSD/arm64 disk layout. Therefore you can't have the
> > > > firmware and the OpenBSD boot/root filesystems on the same device
> > > > without running through additional hoops. Ultimately the goal is to
> > > > make it possible to put this firmware in SPI flash, but I haven't
> > > > looked into that yet.
> > > >
> > > > This firmware uses a more standard serial speed of 115200, which means
> > > > you can use almost any USB TTL serial cable. DVFS is supported so you
> > > > can use sysctl hw.setperf to control to clock speed of the CPUs. But
> > > > be aware that without a fan the board will probably overheat if you
> > > > run it at the highest supported clock speed.
> > > >
> > > > At some point this should land in the official u-boot-aarch64
> > > > packages. But since this build relies on a fairly large patch set
> > > > that hasn't landed upstream yet, this may take some time.
> > >
> > > I have committed a U-Boot 2019.07 update which builds the
> > > rockpro64-rk3399 target and patches the default baud to 115200.
> > >
> > > As on firefly it has file named idbspl.img instead of idbloader.img.
> > > Don't have hardware so not sure if further patches are required.
> >
> > Unfortunately the LPDDR4 support patches landed after 2019.07 was
> > released. The ROCKPro64 won't work without those patches, and it is a
> > rather large set of patches :(.
>
> Alright, I'll remove it until the next release.
>
> >
> > I'm somewhat surprised to see that the rk3399 targets still build
> > without TPL. But maybe the SPL overflow happens because of the LPDDR4
> > patches. When we switch to TPL, I think it makes sense to start using
> > idbloader.img instead of idspl.img to be consistent with rk3288 and
> > the Rockchip documentation.
>
> Aren't the rk3399 targets already using TPL with 2019.07?
>
> evb-rk3399_defconfig:CONFIG_TPL=y
> firefly-rk3399_defconfig:CONFIG_TPL=y
> nanopc-t4-rk3399_defconfig:CONFIG_TPL=y
> nanopi-m4-rk3399_defconfig:CONFIG_TPL=y
> nanopi-neo4-rk3399_defconfig:CONFIG_TPL=y
> orangepi-rk3399_defconfig:CONFIG_TPL=y
> rock-pi-4-rk3399_defconfig:CONFIG_TPL=y
> rockpro64-rk3399_defconfig:CONFIG_TPL=y
>
> $ git tag --contains bdc00080111f6dc1e48586239e71e22665004aca
> v2019.07
> v2019.07-rc2
> v2019.07-rc3
> v2019.07-rc4
>
Your diff is not quite right as it doesn't concatenate tpl and spl.
Fix below. Still need to test this though. But ok if it boots on the
firefly?
Index: sysutils/u-boot/Makefile
===================================================================
RCS file: /cvs/ports/sysutils/u-boot/Makefile,v
retrieving revision 1.54
diff -u -p -r1.54 Makefile
--- sysutils/u-boot/Makefile 28 Jul 2019 06:57:19 -0000 1.54
+++ sysutils/u-boot/Makefile 29 Jul 2019 22:23:29 -0000
@@ -7,6 +7,7 @@ FLAVOR?= arm
COMMENT= U-Boot firmware
VERSION= 2019.07
+REVISION= 0
DISTNAME= u-boot-${VERSION}
PKGNAME= u-boot-${FLAVOR}-${VERSION:S/-//}
FULLPKGNAME= ${PKGNAME}
@@ -68,7 +69,6 @@ BOARDS=\
mvebu_espressobin-88f3720 \
mvebu_mcbin-88f8040 \
qemu_arm64 \
- rockpro64-rk3399 \
rpi_3
.elif "${FLAVOR}" == "arm"
OMAP=\
@@ -140,7 +140,6 @@ FILES=\
u-boot-spl.kwb \
u-boot-with-spl.bin \
u-boot.itb \
- idbspl.img \
idbloader.img \
spl/sunxi-spl.bin \
@@ -165,12 +164,14 @@ do-build:
idbloader.img && \
cat spl/u-boot-spl-dtb.bin >> idbloader.img
.endif
-.if "${BOARD}" == "firefly-rk3399" || "${BOARD}" == "rockpro64-rk3399"
+.if "${BOARD}" == "firefly-rk3399"
cd ${WRKSRC}/build/${BOARD} && \
${SETENV} ${MAKE_ENV} BL31=${RK3399_BL31} ${MAKE_PROGRAM} \
${MAKE_FLAGS} O="build/${BOARD}" \
-f ${MAKE_FILE} u-boot.itb && \
- tools/mkimage -n rk3399 -T rksd -d spl/u-boot-spl.bin idbspl.img
+ tools/mkimage -n rk3399 -T rksd -d tpl/u-boot-tpl.bin \
+ idbloader.img && \
+ cat spl/u-boot-spl-dtb.bin >> idbloader.img
.endif
.endfor
.for BOARD in ${SUNXI64}
Index: sysutils/u-boot/pkg/PFRAG.aarch64
===================================================================
RCS file: /cvs/ports/sysutils/u-boot/pkg/PFRAG.aarch64,v
retrieving revision 1.11
diff -u -p -r1.11 PFRAG.aarch64
--- sysutils/u-boot/pkg/PFRAG.aarch64 28 Jul 2019 06:57:20 -0000 1.11
+++ sysutils/u-boot/pkg/PFRAG.aarch64 29 Jul 2019 18:17:20 -0000
@@ -16,7 +16,7 @@ share/u-boot/bananapi_m64/u-boot.bin
share/u-boot/bananapi_m64/u-boot.img
share/u-boot/bananapi_m64/u-boot.itb
share/u-boot/firefly-rk3399/
-share/u-boot/firefly-rk3399/idbspl.img
+share/u-boot/firefly-rk3399/idbloader.img
share/u-boot/firefly-rk3399/u-boot
share/u-boot/firefly-rk3399/u-boot.bin
share/u-boot/firefly-rk3399/u-boot.img
@@ -86,12 +86,6 @@ share/u-boot/pinebook/u-boot.itb
share/u-boot/qemu_arm64/
share/u-boot/qemu_arm64/u-boot
share/u-boot/qemu_arm64/u-boot.bin
-share/u-boot/rockpro64-rk3399/
-share/u-boot/rockpro64-rk3399/idbspl.img
-share/u-boot/rockpro64-rk3399/u-boot
-share/u-boot/rockpro64-rk3399/u-boot.bin
-share/u-boot/rockpro64-rk3399/u-boot.img
-share/u-boot/rockpro64-rk3399/u-boot.itb
share/u-boot/rpi_3/
share/u-boot/rpi_3/u-boot
share/u-boot/rpi_3/u-boot.bin