DESK-MP1-L/Development/Building Boot image

From DAVE Developer's Wiki
< DESK-MP1-L
Revision as of 10:37, 28 July 2023 by U0031 (talk | contribs) (Created page with "==Building Boot binary== ===Quick reference=== {| class="wikitable" border="1" |+Repository Information |- ! URL | git@git.dave.eu:desk-mp1-l/desk-mp1-boot-image.git |- ! sta...")

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Building Boot binary[edit | edit source]

Quick reference[edit | edit source]

Repository Information
URL git@git.dave.eu:desk-mp1-l/desk-mp1-boot-image.git
stable branch desk-mp1-l-1.x.x
stable tag desk-mp1-l-1.0.0

Instructions[edit | edit source]

It is assumed that the development environment has been set up properly as described here.

To build the boot binaries you need to perform this steps:

  • start the Linux development VM and login into the system
  • open a terminal window and cd into desk-mp1-boot-image directory
cd ~/desk-mp1-l/desk-mp1-boot-image
  • in case of needs you can update your local repository with the following git command
git pull --recurse-submodules
  • configure the build environment
source ~/desk-mp1-l/desk-mp1-l-1.0.0_env.sh
  • use the follow script:
    • build_start.sh: for build boot binary ATF + U-boot, the result can be find on boot-binary-files/uSD/.
    • build_and_put_to_tftpboot_dir.sh: for build boot binary ATF + U-boot and have the result on /tftpboot/desk-mp1-l/boot-binary-files/uSD/.
  • on each script file there are configuration section
    #ATF_MD=SD \
    #ATF_LOGLEVEL=50 \ # if you set this, ATF_DEBUG will be ignored
    #ATF_DEBUG=1 \
    #OUTPUT_BINARY="$PWD/boot-binary-files" \
    #MAKECONF="-j 6 -l 10" \
    UBOOT_DTS=stm32mp157a-dcsb5000dd1r \
    UBOOT_DEF=stm32mp15_desk_mp1_usd_defconfig \
    ATF_DTS=stm32mp157a-dcsb5000dd1r \
    ./build_all.sh
    
  • configurations:
    • ATF_MD: default value -> SD, media device from which to boot.
    • ATF_LOGLEVEL: default value -> 20, log level of ATF, if you change this value the ATF_DEBUG will be ignored.
    • ATF_DEBUG: default value -> 1, enable debug.
    • OUTPUT_BINARY: default value -> "$PWD/boot-binary-files", output binary directory.
    • MAKECONF: default value -> "-j 32 -l 50", configuration for makefile.
    • UBOOT_DTS: no default value, device tree name of u-boot to build, value needed for build!
    • UBOOT_DEF: no default value, name of defconfig to use on build of u-boot, value needed for build!
    • ATF_DTS: no default value, devce tree name of ATF to build, value needed for build!
  • Default configuration (if not specified the default value is used):
    • boot from uSD:
      • UBOOT_DTS=stm32mp157a-dcsb5000dd1r
      • UBOOT_DEF=stm32mp15_desk_mp1_usd_defconfig
      • ATF_DTS=stm32mp157a-dcsb5000dd1r

U-Boot defconfigs
Platform SOM ConfigID CB ConfigID defconfig
SBC ETRA - 0x00000001 stm32mp15_desk_mp1_usd_defconfig