[U-Boot] [PATCH 1/1] rockchip: provide installation instruction for Firefly-RK3399.

Unfortunately installing U-Boot on an SD card for the Firefly-RK3399 is not trivial.
I could not get U-Boot running with SPL. So I ended up using the Rockchip miniloader.
Adding a README hopefully will give other users an easier start.
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de --- board/rockchip/firefly_rk3399/README | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 board/rockchip/firefly_rk3399/README
diff --git a/board/rockchip/firefly_rk3399/README b/board/rockchip/firefly_rk3399/README new file mode 100644 index 0000000000..e9fb41f02d --- /dev/null +++ b/board/rockchip/firefly_rk3399/README @@ -0,0 +1,55 @@ +Installation of U-Boot on the Firefly-RK3399 +============================================ + +Here is a step-by-step instruction for installing U-Boot for the +Firefly-RK3399 on an SD card using the precompiled miniloader provided +by Rockchip. An alternative is to use the second stage loader SPL built by +U-Boot. + +Get precompiled binaries +======================== + + git clone https://github.com/rockchip-linux/rkbin.git + +Flash precompiled binaries to the SD card +========================================= + + mkimage -n rk3399 -T rksd -d rkbin/rk33/rk3399_ddr_800MHz_v1.08.bin \ + idbloader.img + cat rkbin/rk33/rk3399_miniloader_v1.06.bin >> idbloader.img + sudo dd if=idbloader.img of=/dev/sdX seek=64 conv=notrunc + cat > trust.ini << EOF + [VERSION] + MAJOR=1 + MINOR=0 + [BL30_OPTION] + SEC=0 + [BL31_OPTION] + SEC=1 + PATH=rkbin/rk33/rk3399_bl31_v1.00.elf + ADDR=0x10000 + [BL32_OPTION] + SEC=0 + [BL33_OPTION] + SEC=0 + [OUTPUT] + PATH=trust.img + EOF + rkbin/tools/trust_merger trust.ini + sudo dd if=trust.img of=/dev/sdX seek=24576 conv=notrunc + +Running trust_merger requires an x86_64 system. + +Compile U-Boot +============== + + make mrproper + make firefly-rk3399_defconfig + make + mkimage -n rk3399 -O u-boot -a 0x20000 -T rkimage -d u-boot-dtb.bin \ + uboot.img + +Flash U-Boot to the SD-card +=========================== + + sudo dd if=u-boot/uboot.img of=/dev/sdX seek=16384 conv=notrunc

On 27 September 2017 at 21:35, Heinrich Schuchardt xypron.glpk@gmx.de wrote:
Unfortunately installing U-Boot on an SD card for the Firefly-RK3399 is not trivial.
I could not get U-Boot running with SPL. So I ended up using the Rockchip miniloader.
Adding a README hopefully will give other users an easier start.
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de
board/rockchip/firefly_rk3399/README | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 board/rockchip/firefly_rk3399/README
Reviewed-by: Simon Glass sjg@chromium.org

From: Simon Glass sjg@chromium.org Date: Sun, 8 Oct 2017 22:41:50 -0600
On 27 September 2017 at 21:35, Heinrich Schuchardt xypron.glpk@gmx.de wrote:
Unfortunately installing U-Boot on an SD card for the Firefly-RK3399 is not trivial.
I could not get U-Boot running with SPL. So I ended up using the Rockchip miniloader.
Adding a README hopefully will give other users an easier start.
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de
board/rockchip/firefly_rk3399/README | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 board/rockchip/firefly_rk3399/README
Reviewed-by: Simon Glass sjg@chromium.org
Hmm,
Do we really want to push people in this direction, using propriatary, closed-source binaries?
The "pure" U-Boot approach that is currently documented works just fine. The only problem is that the firefly-rk3399 by default boots from eMMC. And the first-stage bootloader only recognizes SD-cards with the propriatary loader. So the trick is to wipe the firmware stored in eMMC or replace it with U-Boot.

On 9 Oct 2017, at 10:00, Mark Kettenis mark.kettenis@xs4all.nl wrote:
From: Simon Glass sjg@chromium.org Date: Sun, 8 Oct 2017 22:41:50 -0600
On 27 September 2017 at 21:35, Heinrich Schuchardt xypron.glpk@gmx.de wrote:
Unfortunately installing U-Boot on an SD card for the Firefly-RK3399 is not trivial.
I could not get U-Boot running with SPL. So I ended up using the Rockchip miniloader.
Adding a README hopefully will give other users an easier start.
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de
board/rockchip/firefly_rk3399/README | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 board/rockchip/firefly_rk3399/README
Reviewed-by: Simon Glass sjg@chromium.org
Hmm,
Do we really want to push people in this direction, using propriatary, closed-source binaries?
I would rather see people discouraged from going down that road as well… or to document this as a deprecated approach only.
The "pure" U-Boot approach that is currently documented works just fine. The only problem is that the firefly-rk3399 by default boots from eMMC. And the first-stage bootloader only recognizes SD-cards with the propriatary loader. So the trick is to wipe the firmware stored in eMMC or replace it with U-Boot.
Would you be willing to submit a patch with documentation for this?
Thanks, Philipp.

From: "Dr. Philipp Tomsich" philipp.tomsich@theobroma-systems.com Date: Mon, 9 Oct 2017 12:31:22 +0200
The "pure" U-Boot approach that is currently documented works just fine. The only problem is that the firefly-rk3399 by default boots from eMMC. And the first-stage bootloader only recognizes SD-cards with the propriatary loader. So the trick is to wipe the firmware stored in eMMC or replace it with U-Boot.
Would you be willing to submit a patch with documentation for this?
I'm still not sure what the right approach is...
Doing what I did (boot into the Ubuntu shipped with the original firmware and use dd(1) to overwrite the firmware image) almost certainly isn't.
I suppose the best approach would be to use the "rockusb" mode to overwrite the eMMC firmware with a "pure" U-Boot image would be the way to go, but I didn't get that to work using OpenBSD's libusb and I didn't have a Linux box around. I plan to come back to that but not before november :(.
Cheers,
Mark
participants (4)
-
Dr. Philipp Tomsich
-
Heinrich Schuchardt
-
Mark Kettenis
-
Simon Glass