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

2017-10-09 Thread Mark Kettenis
> From: "Dr. Philipp Tomsich" 
> 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
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


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

2017-10-09 Thread Dr. Philipp Tomsich

> On 9 Oct 2017, at 10:00, Mark Kettenis  wrote:
> 
>> From: Simon Glass 
>> Date: Sun, 8 Oct 2017 22:41:50 -0600
>> 
>> On 27 September 2017 at 21:35, Heinrich Schuchardt  
>> 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 
>>> ---
>>> board/rockchip/firefly_rk3399/README | 55 
>>> 
>>> 1 file changed, 55 insertions(+)
>>> create mode 100644 board/rockchip/firefly_rk3399/README
>> 
>> Reviewed-by: Simon Glass 
> 
> 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.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


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

2017-10-09 Thread Mark Kettenis
> From: Simon Glass 
> Date: Sun, 8 Oct 2017 22:41:50 -0600
> 
> On 27 September 2017 at 21:35, Heinrich Schuchardt  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 
> > ---
> >  board/rockchip/firefly_rk3399/README | 55 
> > 
> >  1 file changed, 55 insertions(+)
> >  create mode 100644 board/rockchip/firefly_rk3399/README
> 
> Reviewed-by: Simon Glass 

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.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


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

2017-10-08 Thread Simon Glass
On 27 September 2017 at 21:35, Heinrich Schuchardt  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 
> ---
>  board/rockchip/firefly_rk3399/README | 55 
> 
>  1 file changed, 55 insertions(+)
>  create mode 100644 board/rockchip/firefly_rk3399/README

Reviewed-by: Simon Glass 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


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

2017-09-27 Thread Heinrich Schuchardt
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 
---
 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 00..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=0x1
+[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 0x2 -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
-- 
2.14.1

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot