Re: [U-Boot] [U-Boot, 3/3] rockchip: rk3399: Add more instructions to the README

2018-07-20 Thread Philipp Tomsich
> This commit adds a content section and also instructions
> on how to create a bootable SD/MMC device for RK3399 boards.
> 
> Signed-off-by: Ezequiel Garcia 
> Reviewed-by: Simon Glass 
> Reviewed-by: Philipp Tomsich 
> ---
>  board/rockchip/evb_rk3399/README | 55 ++--
>  1 file changed, 53 insertions(+), 2 deletions(-)
> 

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


Re: [U-Boot] [U-Boot, 3/3] rockchip: rk3399: Add more instructions to the README

2018-07-20 Thread Dr. Philipp Tomsich
Thanks for the clarification, I’ll take this as-is.

> On 20 Jul 2018, at 19:09, Ezequiel Garcia  wrote:
> 
> On Fri, 2018-07-20 at 18:28 +0200, Philipp Tomsich wrote:
>> 
>> On Mon, 16 Jul 2018, Ezequiel Garcia wrote:
>> 
>>> This commit adds a content section and also instructions
>>> on how to create a bootable SD/MMC device for RK3399 boards.
>> 
>> Are any of these instructions Ficus-specific?  We have our own README for 
>> our own boards, as these have different instructions from the EVB boards.
>> 
> 
> Nope, it applies to any rk3399 board. And the rest of the file as well,
> as long as the board has eMMC.
> 
>> Just wondering, as I'd have expected this to come in as part of the ficus 
>> board-directory...
>> 
> 
> Yeah, but all the instructions on this file applied to the Ficus
> (and to many others) so I decided to just extend it for now.
> 
> If it needs moving to some generic doc, I think we can do that as a follow up 
> patch.
> 
>>> Signed-off-by: Ezequiel Garcia 
>>> Reviewed-by: Simon Glass 
>> 
>> Reviewed-by: Philipp Tomsich 
>> 
> 
> Thanks for the review!
> Eze

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


Re: [U-Boot] [U-Boot, 3/3] rockchip: rk3399: Add more instructions to the README

2018-07-20 Thread Ezequiel Garcia
On Fri, 2018-07-20 at 18:28 +0200, Philipp Tomsich wrote:
> 
> On Mon, 16 Jul 2018, Ezequiel Garcia wrote:
> 
> > This commit adds a content section and also instructions
> > on how to create a bootable SD/MMC device for RK3399 boards.
> 
> Are any of these instructions Ficus-specific?  We have our own README for 
> our own boards, as these have different instructions from the EVB boards.
> 

Nope, it applies to any rk3399 board. And the rest of the file as well,
as long as the board has eMMC.

> Just wondering, as I'd have expected this to come in as part of the ficus 
> board-directory...
> 

Yeah, but all the instructions on this file applied to the Ficus
(and to many others) so I decided to just extend it for now.

If it needs moving to some generic doc, I think we can do that as a follow up 
patch.

> > Signed-off-by: Ezequiel Garcia 
> > Reviewed-by: Simon Glass 
> 
> Reviewed-by: Philipp Tomsich 
> 

Thanks for the review!
Eze
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 3/3] rockchip: rk3399: Add more instructions to the README

2018-07-20 Thread Philipp Tomsich



On Mon, 16 Jul 2018, Ezequiel Garcia wrote:


This commit adds a content section and also instructions
on how to create a bootable SD/MMC device for RK3399 boards.


Are any of these instructions Ficus-specific?  We have our own README for 
our own boards, as these have different instructions from the EVB boards.


Just wondering, as I'd have expected this to come in as part of the ficus 
board-directory...



Signed-off-by: Ezequiel Garcia 
Reviewed-by: Simon Glass 


Reviewed-by: Philipp Tomsich 


---
board/rockchip/evb_rk3399/README | 55 ++--
1 file changed, 53 insertions(+), 2 deletions(-)

diff --git a/board/rockchip/evb_rk3399/README b/board/rockchip/evb_rk3399/README
index 0b4c6d19ad39..3775d3ff447f 100644
--- a/board/rockchip/evb_rk3399/README
+++ b/board/rockchip/evb_rk3399/README
@@ -1,3 +1,21 @@
+Contents
+
+
+1. Introduction
+2. Get the Source and prebuild binary
+3. Compile the ATF
+4. Compile the U-Boot
+5. Compile the rkdeveloptool
+6. Package the image
+   6.1. Package the image for U-Boot SPL(option 1)
+   6.2. Package the image for Rockchip miniloader(option 2)
+7. Bootloader storage options
+8. Flash the image to eMMC
+   8.1. Flash the image with U-Boot SPL(option 1)
+   8.2. Flash the image with Rockchip miniloader(option 2)
+9. Create a bootable SD/MMC
+10. And that is it
+
Introduction


@@ -97,6 +115,12 @@ Package the image for Rockchip miniloader(option 2)

  Get trust.img and uboot.img in this step.

+Bootloader storage options
+==
+
+There are a few different storage options for the bootloader.
+This document explores two of these: eMMC and removable SD/MMC.
+
Flash the image to eMMC
===

@@ -117,6 +141,33 @@ Power on(or reset with RESET KEY) with MASKROM KEY 
preesed, and then:
  > rkdeveloptool wl 0x6000 u-boot/trust.img
  > rkdeveloptool rd

+Create a bootable SD/MMC
+
+
+The idbspl.img contains the first stage, and the u-boot.img the second stage.
+As explained in the Rockchip partition table reference [2], the first stage
+(aka loader1) start sector is 64, and the second stage start sector is 16384.
+
+Each sector is 512 bytes, which means the first stage offset is 32 KiB,
+and the second stage offset is 8 MiB.
+
+Note: the second stage location is actually not as per the spec,
+but defined by the SPL. Mainline SPL defines an 8 MiB offset for the second
+stage.
+
+Assuming the SD card is exposed by device /dev/mmcblk0, the commands
+to write the two stages are:
+
+  > dd if=idbspl.img of=/dev/mmcblk0 bs=1k seek=32
+  > dd if=u-boot.itb of=/dev/mmcblk0 bs=1k seek=8192
+
+Setting up the kernel and rootfs is beyond the scope of this document.
+
+And that is it
+==
+
You should be able to get U-Boot log in console/UART2(baurdrate 150)
-For more detail, please reference to:
-http://opensource.rock-chips.com/wiki_Boot_option
+For more detail, please reference [2].
+
+[1] http://opensource.rock-chips.com/wiki_Partitions
+[2] http://opensource.rock-chips.com/wiki_Boot_option


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