[U-Boot] Booting on RK3399
Mark Kettenis
mark.kettenis at xs4all.nl
Thu Jan 3 01:50:21 UTC 2019
> From: Simon Glass <sjg at chromium.org>
> Date: Wed, 2 Jan 2019 18:15:31 -0700
>
> Hi Kever,
>
> I have a firefly-rk3399 and would like to boot it into U-Boot (as a start)
> from an uSD card.
>
> Are there instructions somewhere on how to do this? I gather that I need
> OP-TEE but not how to build it or how to put the image together. I would
> like to have instructions in README.rockchip if possible.
>
> I'm planning to add U-Boot support for bob and maybe kevin (both
> Chromebooks) but am not sure where to start. I thought the firefly might be
> best since it is pretty common.
Hi Simon,
The instructions in board/u-boot/rockchip/evb_rk3399/README apply to
the firefly-rk3399 as well. I've successfully built working firmware
for my board using the TF-A (ATF) 2.0 release and U-Boot SPL in the
past that way.
One complication with the firefly board is that by default it boots
from eMMC, so you can't easily test new firmware by putting it on uSD
card unless you make the eMMC unbootable somehow (e.g. by overwriting
the start of the eMMC storage with zeroes). In that case you can boot
from uSD card if you write U-Boot SPL and U-Boot proper at the right
offsets:
# dd if=idbspl.img of=/dev/sd1c seek=64
# dd if=u-boot.itb of=/dev/sd1c seek=16384
(that's on OpenBSD, on Linux the device names will be different)
Haven't tested flashing eMMC with rkdeveloptool myself, but that
should work on the firefly as well.
Another complication as that the serial console speed defaults to
1500000 which isn't supported by all serial-to-USB chips and frankly
too sensitive to wire noise. Also be aware that TF-A built from the
official ARM sources at
https://github.com/ARM-software/arm-trusted-firmware.git
defaults to 115200 (which is more reasonable IMHO). So I have the
following diff in my U-Boot tree. The device tree change comes in
handy if you want to boot from uSD card, otherwise U-Boot SPL will
attempt to load the full U-Boot from eMMC. Perhaps that bit should be
committed at some point.
Having support for bob would be great. I have one, and would like to
make OpenBSD run on it.
Cheers,
Mark
diff --git a/arch/arm/dts/rk3399-firefly.dts b/arch/arm/dts/rk3399-firefly.dts
index be350866a7..f90e7e88db 100644
--- a/arch/arm/dts/rk3399-firefly.dts
+++ b/arch/arm/dts/rk3399-firefly.dts
@@ -15,7 +15,7 @@
chosen {
stdout-path = &uart2;
- u-boot,spl-boot-order = &sdhci, &sdmmc;
+ u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
};
backlight: backlight {
diff --git a/configs/firefly-rk3399_defconfig b/configs/firefly-rk3399_defconfig
index 7ac4064a8b..01b3a0771f 100644
--- a/configs/firefly-rk3399_defconfig
+++ b/configs/firefly-rk3399_defconfig
@@ -58,7 +58,7 @@ CONFIG_REGULATOR_RK8XX=y
CONFIG_PWM_ROCKCHIP=y
CONFIG_RAM=y
CONFIG_SPL_RAM=y
-CONFIG_BAUDRATE=1500000
+CONFIG_BAUDRATE=115200
CONFIG_DEBUG_UART_SHIFT=2
CONFIG_SYSRESET=y
CONFIG_USB=y
More information about the U-Boot
mailing list