Deploy On Spi Nor-Flash - Cherry PUMA SOM-RK3399-Q7 User Manual

Powerful system-on-module for versatile applications featuring the rockchip rk3399 application processor
Hide thumbs Also See for PUMA SOM-RK3399-Q7:
Table of Contents

Advertisement

4.9.4 U-Boot Customization
The boot script /boot/boot.scr handles the boot sequence. Unless you want to customize the sequence, no
further action is required.
If you want to step through the sequence manually or customize it, you can execute the following commands on
the U-Boot prompt:
setenv bootargs root=/dev/mmcblk0p1 rw rootwait
ext4load mmc 1:1 $kernel_addr_r boot/puma_rk3399/Image
ext4load mmc 1:1 $fdt_addr_r boot/puma_rk3399/rk3399-puma.dtb
booti $kernel_addr_r - $fdt_addr_r
Optionally, these commands can be compiled together in a single command and saved so it is performed on
every subsequent boot:
setenv bootargs root=/dev/mmcblk0p1 rw rootwait
setenv boot_sd
"ext4load mmc 1:1 $kernel_addr_r boot/puma_rk3399/Image && \
ext4load mmc 1:1 $fdt_addr_r boot/puma_rk3399/rk3399-puma.dtb && \
booti $kernel_addr_r - $fdt_addr_r"
setenv bootcmd run boot_sd
saveenv
To reset the U-Boot settings to default, execute:
env default -f -a
saveenv
Note: root=/dev/mmcblk0p1 and ext4load mmc 1:1 refer to the SD Card. Use root=/dev/mmcblk1p1 and
ext4load mmc 0:1 instead to boot from eMMC.

4.10 Deploy on SPI NOR-flash

To have a reliable boot sequence even if eMMC and/or SD-card fail, U-Boot can be written in to the onboard
NOR-flash. While u-boot.itb is used for both SD-card and SPI-flash boot, spl_spi.img is used instead of
spl_sd.img.
From U-boot:
sf probe
load mmc 1 $kernel_addr_r root/spl_spi.img
sf erase 0 +$filesize
sf write $kernel_addr_r 0 $filesize
load mmc 1 $kernel_addr_r root/u-boot.itb
sf erase 0x40000 +$filesize
sf write $kernel_addr_r 0x40000 $filesize
From Linux:
dd if=spl_spi.img of=/dev/mtdblock0 bs=256k
dd if=u-boot.itb
of=/dev/mtdblock0 bs=256k
RK3399-Q7 User Manual
© Cherry Embedded Solutions GmbH
seek=0
conv=nocreat
seek=1
conv=nocreat
v1.6
Page 25

Advertisement

Table of Contents
loading

Table of Contents