The PanGu development board supports eMMC, QSPI Flash, and SD Card mode startup.
| Boot device | config file | Board version |
|---|---|---|
| support boot from SD,eMMC flash | stm32mp15_basic_defconfig | PanGu 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.
$ lsapi config.mk cscope.po.out drivers include MAINTAINERS scripts tools u-boot.dtb u-boot.maparch configs ctags dts Kbuild Makefile spl u-boot u-boot-dtb.bin u-boot-nodtb.binboard cscope.files disk env Kconfig net System.map u-boot.bin u-boot-dtb.img u-boot.sreccmd cscope.in.out doc examples lib post tags u-boot.cfg u-boot.img u-boot.symcommon 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.logboard disk env lib u-boot-spl.bin u-boot-spl.lds u-boot-spl-pad.bincmd 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 name | Description |
|---|---|
| File name | Description |
| :-- | |
| spl/u-boot-spl.stm32 | The SPL binary containing the STM32 information header is used for FSBL under the Basic boot chain |
| u-boot.img | The u-boot binary containing the UImage header is used for SSBL under the Basic Boot chain |
| u-boot.stm32 | The u-boot binary containing the STM32 header, used for SSBL under the Trusted Boot chain |
| u-boot | U-Boot ELF file for GDB debugging |
| spl/u-boot-spl | ELF 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