January 27, 2026

Allwinner H5 chip - the U-boot Makefile, part 2

So, what about BL31?

We set the BL31 environment variable to the path to bl31.elf, but how and where does this get used in the build process?

It just gets passed via the command line to "binman" as follows:

-a atf-bl1-path=${BL1} \
-a atf-bl31-path=${BL31} \
The BL1 variable is undefined, so it will just get passed as a null string. All the action with bl31.elf is guided by this file
u-boot/arch/arm/dts/sunxi-u-boot.dtsi
In particular this section:
     atf {
          description = "ARM Trusted Firmware";
          type = "firmware";
          os = "arm-trusted-firmware";
          arch = ARCH;
          compression = "none";
          load = ;
          entry = ;

          atf-bl31 {
              filename = "bl31.bin";
              missing-msg = "atf-bl31-sunxi";
          };
      };
We find this in our .config file:
CONFIG_SUNXI_BL31_BASE=0x00044000
We supply an elf file, while the above talks about a bin file, but apparently binman can perform the appropriate magic.


Have any comments? Questions? Drop me a line!

Tom's electronics pages / tom@mmto.org