PanGuBoard DevelopmentKit

The PanGu development board supports eMMC, QSPI Flash, and SD Card mode startup.

Boot deviceconfig fileBoard version
support boot from SD,eMMC flashstm32mp15_basic_defconfigPanGu eMMC version

The PanGu development board uses U-Boot as the boot loader for the entire system. After building U-Boot, you get two files, u-boot-spl.stm32 and u-boot.img. U-boot-spl.stm32 in the spl directory, u-boot.img in the root directory of u-boot. Can be written to different storage devices.

After downloading the U-Boot code, unzip it in the working directory and make sure the current shell has loaded the build toolchain.

$ cd $HOME/PanGu
$ tar xvf U-Boot-i2som.tar.gz

U-Boot support multi boot types, boot chain,Basic boot and Trusted boot。

Basic boot

$ make pangu_basic_defconfig
$ make DEVICE_TREE=stm32mp157a-panguboard all

Trusted boot

$ make pangu_trusted_defconfig
$ make DEVICE_TREE=stm32mp157a-panguboard all

 

After the compilation is finished, you can view the current directory and the spl directory in the current directory, and you can see the corresponding file.

$ ls
api     config.mk      cscope.po.out  drivers   include   MAINTAINERS  scripts     tools               u-boot.dtb      u-boot.map
arch    configs        ctags          dts       Kbuild    Makefile     spl         u-boot              u-boot-dtb.bin  u-boot-nodtb.bin
board   cscope.files   disk           env Kconfig   net          System.map  u-boot.bin          u-boot-dtb.img  u-boot.srec
cmd     cscope.in.out  doc            examples  lib       post         tags        u-boot.cfg          u-boot.img      u-boot.sym
common  cscope.out     Documentation  fs        Licenses  README       test u-boot.cfg.configs  u-boot.lds
$ ls spl/
arch   common   dts  include     u-boot-spl      u-boot-spl-dtb.bin  u-boot-spl-nodtb.bin  u-boot-spl.stm32.log
board  disk     env lib         u-boot-spl.bin  u-boot-spl.lds      u-boot-spl-pad.bin
cmd    drivers  fs   u-boot.cfg  u-boot-spl.dtb  u-boot-spl.map      u-boot-spl.stm32

After the build is complete, some files are generated, and the following is a description of the files

File nameDescription
File nameDescription
:-- 
spl/u-boot-spl.stm32The SPL binary containing the STM32 information header is used for FSBL under the Basic boot chain
u-boot.imgThe u-boot binary containing the UImage header is used for SSBL under the Basic Boot chain
u-boot.stm32The u-boot binary containing the STM32 header, used for SSBL under the Trusted Boot chain
u-bootU-Boot ELF file for GDB debugging
spl/u-boot-splELF file of SPL, usually used for gdb debugging

Replace the U-Boot in SD card
When testing a new U-Boot program, you can use the SD card startup method, you can quickly verify that U-Boot starts normally, and you can write U-Boot to the corresponding partition of the SD card.

dd if=u-boot-spl.stm32 of=/dev/sdb1 conv=fdatasync
dd if=u-boot-spl.stm32 of=/dev/sdb2 conv=fdatasync
dd if=u-boot.img of=/dev/sdb3 conv=fdatasync