U-Boot

Preface

RK U-Boot is developed on the basis of open-source U-Boot, whose working modes include Bootloader mode and Download mode.

Booloader mode is the normal working mode of U-Boot. When an embedded product is released, U-Boot works in this mode. It is mainly used to load the kernel of flash into memory and start the operating system when booting up.

The Download mode is usually for downloading firmware into the flash. Press and hold the Recovery button to enter Download mode when booting up. This article simply introduces the application of U-Boot.

Building

Building U-Boot is similar to the process of kernel building. Before compiling, you need to write the configuration to “.config”,run the command:

cd u-boot
./make.sh roc-rk3308-cc

If you need to modify the relative option, you can run:

 make menuconfig

Run below command to Compile:

 make

After compiling successfully, generate:

 rk3308_loader_xxx.bin
 uboot.img
 trust.img

The combination of rk3308_loader_xxx.bin and uboot.img is the secondary loader mode in board, which supports both eMMC flash and NAND flash.

Burning

Open the flash tool and connect a USB Type-C cable to the board. Connect to the power supply and press and hold Recovery button to enter the U-Boot Download mode. Select the compiled Loader file and uboot and click Run, as shown in the following figure:

_images/uboot_loader.png

Verify whether to burn a new loader

If you have successfully burn your latest compiled Loader, you can see the following information in the serial debug port during starting up:

Boot1 Release Time: Jul 13 2018 15:37:40, version: 1.05

If the printing time and version are consistent with your compilation(miniloader in ROC-RK3308-CC is not an open-source software and is maintained by RK themselves), you have updated the Loader successfully.