Lines Matching +full:u +full:- +full:boot +full:- +full:spl
5 # SPDX-License-Identifier: GPL-2.0+
8 U-Boot on Rockchip
11 There are several repositories available with versions of U-Boot that support
25 - Firefly RK3288 board or something else with a supported RockChip SoC
26 - Power connection to 5V using the supplied micro-USB power cable
27 - Separate USB serial cable attached to your computer and the Firefly
28 (connect to the micro-USB connector below the logo)
29 - rkflashtool [3]
30 - openssl (sudo apt-get install openssl)
31 - Serial UART connection [4]
32 - Suitable ARM cross compiler, e.g.:
33 sudo apt-get install gcc-4.7-arm-linux-gnueabi
41 - EVB RK3288 - use evb-rk3288 configuration
42 - Fennec RK3288 - use fennec-rk3288 configuration
43 - Firefly RK3288 - use firefly-rk3288 configuration
44 - Hisense Chromebook - use chromebook_jerry configuration
45 - MiQi RK3288 - use miqi-rk3288 configuration
46 - phyCORE-RK3288 RDK - use phycore-rk3288 configuration
47 - PopMetal RK3288 - use popmetal-rk3288 configuration
48 - Radxa Rock 2 - use rock2 configuration
49 - Tinker RK3288 - use tinker-rk3288 configuration
53 - EVB RK3036 - use evb-rk3036 configuration
54 - Kylin - use kylin_rk3036 configuration
58 CROSS_COMPILE=arm-linux-gnueabi- make O=firefly firefly-rk3288_defconfig all
66 For USB to work you must get your board into ROM boot mode, either by erasing
67 your MMC or (perhaps) holding the recovery button when you boot the board.
68 To erase your MMC, you can boot into Linux and type (as root)
76 ./firefly-rk3288/tools/mkimage -n rk3288 -T rkimage -d \
77 ./firefly-rk3288/spl/u-boot-spl-dtb.bin out && \
78 cat out | openssl rc4 -K 7c4e0304550509072d2c7b38170d1711 | rkflashtool l
82 U-Boot SPL 2015.07-rc1-00383-ge345740-dirty (Jun 03 2015 - 10:06:49)
84 spl: mmc init failed with error: -17
89 in SPL then we could in principle load U-Boot and boot to a prompt from USB
91 use the existing boot ROM code from SPL.
99 ./firefly-rk3288/tools/mkimage -n rk3288 -T rksd -d \
100 firefly-rk3288/spl/u-boot-spl-dtb.bin out && \
102 sudo dd if=firefly-rk3288/u-boot-dtb.img of=/dev/sdc seek=16384
104 This puts the Rockchip header and SPL image first and then places the U-Boot
106 corresponds with this setting in U-Boot:
110 Put this SD (or micro-SD) card into your board and reset it. You should see
113 U-Boot 2016.01-rc2-00309-ge5bad3b-dirty (Jan 02 2016 - 23:41:59 -0700)
118 *** Warning - bad CRC, using default environment
128 The rockchip bootrom can load and boot an initial spl, then continue to
129 load a second-level bootloader(ie. U-BOOT) as soon as it returns to bootrom.
131 U-Boot is controlled with this setting in U-Boot:
137 ./firefly-rk3288/tools/mkimage -n rk3288 -T rksd -d \
138 firefly-rk3288/spl/u-boot-spl-dtb.bin out && \
139 cat firefly-rk3288/u-boot-dtb.bin >> out && \
145 ./evb-rk3036/tools/mkimage -n rk3036 -T rksd -d evb-rk3036/spl/u-boot-spl.bin out && \
146 cat evb-rk3036/u-boot-dtb.bin >> out && \
149 Note: rk3036 SDMMC and debug uart use the same iomux, so if you boot from SD, the
156 Since the size of SPL can't be exceeded 0x8000 bytes in RK3288, it is not possible add
157 new SPL features like Falcon mode or etc.
159 So introduce TPL so-that adding new features to SPL is possible because now TPL should
160 run minimal with code like DDR, clock etc and rest of new features in SPL.
162 As of now TPL is added on Vyasa-RK3288 board.
166 ./tools/mkimage -n rk3288 -T rksd -d ./tpl/u-boot-tpl.bin out &&
167 cat ./spl/u-boot-spl-dtb.bin >> out &&
169 sudo dd if=u-boot-dtb.img of=/dev/mmcblk0 seek=16384
180 handled by a single image (built as the SPL stage) that tests whether
182 boot0-hook.
185 rc4-encrypted. Except for the very first stage the bootrom always reads
188 # copy tpl, pad to 1020 bytes and append spl
189 tools/mkimage -n rk3188 -T rksd -d spl/u-boot-spl.bin out
191 # truncate, encode and append u-boot.bin
192 truncate -s %2048 u-boot.bin
193 cat u-boot.bin | split -b 512 --filter='openssl rc4 -K 7C4E0304550509072D2C7B38170D1711' >> out
198 - Write GPT partition layout to mmc device which fastboot want to use it to
203 - Invoke fastboot command to prepare
207 - Start fastboot request on PC
209 fastboot -i 0x2207 flash loader evb-rk3288/spl/u-boot-spl-dtb.bin
214 WARNING: unknown variable: partition-type:loader
226 ./chromebook_jerry/tools/mkimage -n rk3288 -T rkspi \
227 -d chromebook_jerry/spl/u-boot-spl-dtb.bin spl.bin && \
228 dd if=spl.bin of=spl-out.bin bs=128K conv=sync && \
229 cat spl-out.bin chromebook_jerry/u-boot-dtb.img >out.bin && \
232 This converts the SPL image to the required SPI format by adding the Rockchip
233 header and skipping every 2KB block. Then the U-Boot image is written at
235 The position of U-Boot is controlled with this setting in U-Boot:
241 sudo em100 -s -c GD25LQ32 -d out.bin.pad -r
245 U-Boot SPL 2015.07-rc2-00215-g9a58220-dirty (Jun 23 2015 - 12:11:32)
248 U-Boot 2015.07-rc2-00215-g9a58220-dirty (Jun 23 2015 - 12:11:32 -0600)
265 - USB host
266 - USB device
267 - Run CPU at full speed (code exists but we only see ~60 DMIPS maximum)
268 - NAND flash
269 - Support for other Rockchip parts
270 - Boot U-Boot proper over USB OTG (at present only SPL works)
279 [2] https://github.com/linux-rockchip/u-boot-rockchip.git branch u-boot-rk3288
280 [3] https://github.com/linux-rockchip/rkflashtool.git
281 [4] http://wiki.t-firefly.com/index.php/Firefly-RK3288/Serial_debug/en
284 -------
286 rkimage.c produces an SPL image suitable for sending directly to the boot ROM
287 over USB OTG. This is a very simple format - just the string RK32 (as 4 bytes)
288 followed by u-boot-spl-dtb.bin.
290 The boot ROM loads image to 0xff704000 which is in the internal SRAM. The SRAM
294 ----
297 u-boot-spl-dtb.bin. The header is defined by 'struct header0_info' although
298 most of the fields are unused by U-Boot. We just need to specify the
299 signature, a flag and the block offset and size of the SPL image.
302 is encoding using RC4 with the key 7c4e0304550509072d2c7b38170d1711. The SPL
305 The maximum size of u-boot-spl-dtb.bin which the boot ROM will read is 32KB,
308 board refuses to boot if this limit is exceeded.
313 Since this image is set to load U-Boot from the SD card at block offset,
315 u-boot-dtb.img to the SD card at that offset. See above for instructions.
318 -----
320 rkspi.c produces an image consisting of a header and u-boot-spl-dtb.bin. The
329 --------
336 ----------------------------
340 overhead and in SPL with a 32KB size limit some shortcuts have been taken.
341 In general all Rockchip drivers should use these features, with SPL-specific
345 ----------------------------
349 like miniloader, trusted-os, arm-trust-firmware.
354 --