From patchwork Sat Feb 18 18:46:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Heiko_St=C3=BCbner?= X-Patchwork-Id: 729760 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3vRcFy1XcTz9s8D for ; Mon, 20 Feb 2017 19:28:06 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 085C7B3DB3; Mon, 20 Feb 2017 09:22:52 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jC4vE6bNJdUr; Mon, 20 Feb 2017 09:22:51 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 967D7B3A61; Mon, 20 Feb 2017 09:18:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 059D14A068 for ; Sat, 18 Feb 2017 20:00:33 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FI5WNQuqDOvY for ; Sat, 18 Feb 2017 20:00:32 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from gloria.sntech.de (gloria.sntech.de [95.129.55.99]) by theia.denx.de (Postfix) with ESMTPS id D139E4A026 for ; Sat, 18 Feb 2017 20:00:32 +0100 (CET) Received: from [88.128.80.43] (helo=phil.lufthansa-flynet.com) by gloria.sntech.de with esmtpsa (TLS1.1:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1cfA6X-0004qF-8F; Sat, 18 Feb 2017 19:51:34 +0100 From: Heiko Stuebner To: sjg@chromium.org Date: Sat, 18 Feb 2017 19:46:40 +0100 Message-Id: <20170218184640.30635-21-heiko@sntech.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170218184640.30635-1-heiko@sntech.de> References: <20170218184640.30635-1-heiko@sntech.de> Cc: romain.perier@collabora.com, u-boot@lists.denx.de Subject: [U-Boot] [PATCH v4 20/20] rockchip: rk3188: add README.rockchip paragraph describing sd boot X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Building sd images for rk3188 requires more steps due to the needed split into TPL and SPL as loaders. Describe how to build an image for it in a separate paragraph in the READER.rockchip file. Signed-off-by: Heiko Stuebner Acked-by: Simon Glass --- doc/README.rockchip | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/doc/README.rockchip b/doc/README.rockchip index 43cafc7bd6..744fdcea14 100644 --- a/doc/README.rockchip +++ b/doc/README.rockchip @@ -147,6 +147,32 @@ For evb_rk3036 board: Note: rk3036 SDMMC and debug uart use the same iomux, so if you boot from SD, the debug uart must be disabled + +Booting from an SD card on RK3188 +================================= + +For rk3188 boards the general storage onto the card stays the same as +described above, but the image creation needs a bit more care. + +The bootrom of rk3188 expects to find a small 1kb loader which returns +control to the bootrom, after which it will load the real loader, which +can then be up to 29kb in size and does the regular ddr init. + +Additionally the rk3188 requires everything the bootrom loads to be +rc4-encrypted. Except for the very first stage the bootrom always reads +and decodes 2kb pages, so files should be sized accordingly. + +# copy tpl, pad to 1020 bytes and append spl +cat tpl/u-boot-tpl.bin > tplspl.bin +truncate -s 1020 tplspl.bin +cat spl/u-boot-spl.bin >> tplspl.bin +tools/mkimage -n rk3188 -T rksd -d tplspl.bin out + +# truncate, encode and append u-boot.bin +truncate -s %2048 u-boot.bin +cat u-boot.bin | split -b 512 --filter='openssl rc4 -K 7C4E0304550509072D2C7B38170D1711' >> out + + Using fastboot on rk3288 ======================== - Write GPT partition layout to mmc device which fastboot want to use it to