Uboot
Update time:2018-01-02 Views:1828
Foreword
RK Uboot is based on the open source Uboot development, Uboot modes contains the boot loading mode and download mode. Boot loading mode is the normal working mode of Uboot. When the embedded product releases, Uboot always works in this mode, which is mainly used to load the kernel of FLASH into SDRAM when boot up and start the operating system. The download mode is mainly used for loading the firmware into the FLASH, you can press RECOVERY button for a long time to enter the download mode. This article briefly describes the usage of Uboot, see SDK RKDocs / Develop reference documents / Rockchip U-Boot Development Guide V3.7-20160708.pdf and get more documents about Uboot.
Note that this document mainly describes that the Uboot is compiled based on Android 7.1,android SDK download link is Android_7.1_SDK
Compile
First, cd into the u-boot directory in the Android 7.1 SDK source directory, make the default configuration before compilation. Config, execute
make rk3328_box_defconfig
If you need to modify the relevant options, following can also be used
make menuconfig
Compile and execute
make ARCHV=aarch64
Compiled to generate
u-boot/uboot.img u-boot/trust.img u-boot/rk3328_loader_v1.08.244.bin
Burning Firmware
Open the burning tool, make the board connected to the USB double male to male data cable (refer to the 《Connect the device》 or 《Loader mode》 for how to connect device). Press and hold the RECOVERY button during power-on, release the RECOVERY button and then board will enter the download mode, select the compiled Loader file with the burning tool, click the "Run" button, as shown below
Confirm that the New Loader Has Been Written Correctly
If you have successfully written your newly compiled Loader, similar to the following information in the boot log output:
#Boot ver: 2016-12-19#1.05
If time and version is the same as your compilation, means that you have successfully updated the Loader.
Enter Uboot Command Line Mode
Because Firefly products are mainly used for development, so we set the default countdown as 1 second, any key you entered in the serial port that Uboot will enter the command line mode. But the released product has no need to enter the u-boot command line mode, if you don't want uboot to enter the command line mode, just do the following changes in file u-boot/include/configs/rk33plat.h
/* mod it to enable console commands. */ #define CONFIG_BOOTDELAY 0
change CONFIG_BOOTDELAY to 0 so that uboot can not enter the command line mode.
First-Level Loader
as first-level Loader mode, the firmware only support eMMC flash, the image after compiling is as follow:
RK3328LoaderU-BOOT_V2.17.01.bin
V2.17.01 is the released version number, rockchip defines the version of the U-Boot loader, 2.17 is defined according to the storage version, and you MUST NOT modify this version. 01 is a small version defined by U-Boot. so you can modify the Makefile according to the actual needs of the projects.
Second-Level Loader
as two-level Loader mode, then the firmware supports all storage devices, this mode requires MiniLoader support, generated by configuring the macro CONFIG_MERGER_MINILOADER. At the same time after compiling the firmware there will be a trust image generated, and generated by configuring the macro CONFIG_MERGER_TRUSTIMAGE .
ROC-RK3328-CC use Second-Level Loader, the image after compiling is as follow:
u-boot/uboot.img u-boot/trust.img u-boot/RK3328MiniLoaderAll_V1.05.bin
V1.05 is the release version number, rockchip defines the U-Boot loader version, 1.05 is defined according to the storage version, you MUST NOT modify this version. Uboot.img is a Second-Level loader package of Uboot. trust.img is a Second-Level loader package of Uboot.