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

Powerful system-on-module
Hide thumbs Also See for Theobroma Systems 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
root=/dev/mmcblk0p1 and ext4load mmc 1:1 refer to the SD Card. Use root=/dev/mmcblk1p1 and
Note:
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
PUMA RK3399-Q7 User Manual
© Theobroma Systems Design und Consulting GmbH
seek=0
conv=nocreat
seek=1
conv=nocreat
v1.7
Page 25

Advertisement

Table of Contents
loading

Table of Contents