public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jagan Teki <jagan@amarulasolutions.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/4] doc: rockchip: Add global doc for rk3399 build/run
Date: Mon, 11 Mar 2019 13:50:05 +0530	[thread overview]
Message-ID: <20190311082005.18550-4-jagan@amarulasolutions.com> (raw)
In-Reply-To: <20190311082005.18550-1-jagan@amarulasolutions.com>

Since rockchip have an individual doc/README.rockchip, it would
be better to update the same instead of maintaining it separately
in board files.

So, add the documentation for rk3399
- procedure to build
- procedure to boot from SD

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 doc/README.rockchip | 69 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)

diff --git a/doc/README.rockchip b/doc/README.rockchip
index ec10ebbc26..b8d693bbc9 100644
--- a/doc/README.rockchip
+++ b/doc/README.rockchip
@@ -88,8 +88,36 @@ One RV3188 baord is supported:
 
 For example:
 
+1. To build RK3288 board:
+
    CROSS_COMPILE=arm-linux-gnueabi- make O=firefly firefly-rk3288_defconfig all
 
+2. To build RK3399 board:
+
+   (export cross compiler path for aarch64)
+
+   2.1 Compile ATF
+
+       $ git clone https://github.com/ARM-software/arm-trusted-firmware.git
+       $ cd arm-trusted-firmware
+
+       (export cross compiler path for Cortex-M0 MCU likely arm-none-eabi-)
+       $ make realclean
+       $ make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399
+
+       (copy bl31.elf U-Boot root dir)
+       $ cp build/rk3399/release/bl31/bl31.elf /path/to/u-boot
+
+   2.2 Compile U-Boot
+
+       $ cd /path/to/u-boot
+       $ make orangepi-rk3399_defconfig
+       $ make
+       $ make u-boot.itb
+
+       (Get spl/u-boot-spl-dtb.bin, u-boot.itb images and some boards would get
+	spl/u-boot-spl.bin since it doesn't enable CONFIG_SPL_OF_CONTROL)
+
 (or you can use another cross compiler if you prefer)
 
 
@@ -225,6 +253,45 @@ tools/mkimage -n rk3188 -T rksd -d spl/u-boot-spl.bin out
 truncate -s %2048 u-boot.bin
 cat u-boot.bin | split -b 512 --filter='openssl rc4 -K 7C4E0304550509072D2C7B38170D1711' >> out
 
+Booting from an SD card on RK3399
+=================================
+
+To write an image that boots from an SD card (assumed to be /dev/sdc):
+
+1. Prefix rk3399 header to SPL image
+
+   $ cd /path/to/u-boot
+   $ ./tools/mkimage -n rk3399 -T rksd -d spl/u-boot-spl-dtb.bin out
+
+2. Write prefixed SPL at 64th sector
+
+   $ sudo dd if=out of=/dev/sdc seek=64
+
+3. Write U-Boot proper at 16384 sector
+
+   $ sudo dd if=u-boot.itb of=/dev/sdc seek=16384
+   $ sync
+
+Put this SD (or micro-SD) card into your board and reset it. You should see
+something like:
+
+U-Boot SPL board init
+Trying to boot from MMC1
+
+
+U-Boot 2019.01-00004-g14db5ee998 (Mar 11 2019 - 13:18:41 +0530)
+
+Model: Orange Pi RK3399 Board
+DRAM:  2 GiB
+MMC:   dwmmc at fe310000: 2, dwmmc at fe320000: 1, sdhci at fe330000: 0
+Loading Environment from MMC... OK
+In:    serial at ff1a0000
+Out:   serial at ff1a0000
+Err:   serial at ff1a0000
+Model: Orange Pi RK3399 Board
+Net:   eth0: ethernet at fe300000
+Hit any key to stop autoboot:  0
+=>
 
 Using fastboot on rk3288
 ========================
@@ -385,5 +452,7 @@ There are some documents about partitions in the links below.
 http://rockchip.wikidot.com/partitions
 
 --
+Jagan Teki <jagan@amarulasolutions.com>
+11 Mar 2019
 Simon Glass <sjg@chromium.org>
 24 June 2015
-- 
2.18.0.321.gffc6fa0e3

  parent reply	other threads:[~2019-03-11  8:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11  8:20 [U-Boot] [PATCH 1/4] rockchip: dts: rk3399: Sync rk3399-opp from Linux Jagan Teki
2019-03-11  8:20 ` [U-Boot] [PATCH 2/4] rockchip: dts: rk3399: Create initial rk3399-u-boot.dtsi Jagan Teki
2019-04-21 18:41   ` [U-Boot] [U-Boot, " Philipp Tomsich
2019-04-22  6:29     ` Jagan Teki
2019-03-11  8:20 ` [U-Boot] [PATCH 3/4] rockchip: rk3399: Add Orangepi RK3399 support Jagan Teki
2019-04-21 18:41   ` [U-Boot] [U-Boot, " Philipp Tomsich
     [not found]     ` <1222175619.1358697.1555924899492.JavaMail.javamailuser@localhost>
2019-04-22 11:50       ` Jagan Teki
2019-03-11  8:20 ` Jagan Teki [this message]
2019-04-21 18:41   ` [U-Boot] [U-Boot, 4/4] doc: rockchip: Add global doc for rk3399 build/run Philipp Tomsich
2019-04-21 18:41 ` [U-Boot] [U-Boot, 1/4] rockchip: dts: rk3399: Sync rk3399-opp from Linux Philipp Tomsich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190311082005.18550-4-jagan@amarulasolutions.com \
    --to=jagan@amarulasolutions.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox