[PATCH 1/2] imx8mm-cl-iot-gate: Do not build fip.bin by default

Fabio Estevam festevam at gmail.com
Mon Aug 16 23:09:34 CEST 2021


Hi Paul,

On Sun, Aug 15, 2021 at 4:27 PM Paul Liu <paul.liu at linaro.org> wrote:

> No. I think they actually use fip.bin but just not upstreamed yet. Please
> see the "Firmware version" in the list. For Compulab we are using mainline
> U-boot. But for imx8mm-evk it is NXP released firmware.
>
> And yes we do use mainline ATF and mainline OPTEE. I'll explain how to
> build all of them.
>
> # OPTEE
>
> 1. export ARCH=arm
> 2. export CROSS_COMPILE=arm-linux-gnueabihf-
> 3. export CROSS_COMPILE64=aarch64-linux-gnu-
> 4. make PLATFORM=imx PLATFORM_FLAVOR=mx8mm_cl_iot_gate O=build.mx8mmevk \
>     CFG_TEE_CORE_LOG_LEVEL=2 \
>     CFG_TEE_TA_LOG_LEVEL=2 \
>     CFG_TEE_CORE_DEBUG=y \
>     CFG_EXTERNAL_DTB_OVERLAY=y \
>     CFG_DT=y \
>     CFG_DT_ADDR=0x52000000 \
>     CFG_DEBUG_INFO=y
>
>
> And we got tee-header_v2.bin tee-pager_v2.bin and tee-pageable_v2.bin.
> These files will be used in the TF-A stage.
>
> Then we start building U-boot (BL31).
>
> # U-boot (BL31)
>
> 1. export ARCH=arm64
> 2. export CROSS_COMPILE=aarch64-linux-gnu-
> 3. export ATF_LOAD_ADDR=0x920000
> 4. make O=/tmp/uboot-imx8 imx8mm-cl-iot-gate_defconfig
> 5. make O=/tmp/uboot-imx8
>
> We got u-boot.bin at this stage. u-boot.bin is needed for the next stage.
>
> # TF-A
>
> make ARCH=aarch64 CROSS_COMPILE=aarch64-linux-gnu- PLAT=imx8mm \
>     SPD=opteed BL32_BASE=0x7e000000 IMX_BOOT_UART_BASE=0x30880000 \
>     NEED_BL32=yes NEED_BL33=yes NEED_BL2=yes \
>     LOG_LEVEL=50 \
>     USE_TBBR_DEFS=1 GENERATE_COT=1 TRUSTED_BOARD_BOOT=1 \
>     MBEDTLS_DIR=../mbedtls \
>     BL32=../optee_os/build.mx8mmevk/core/tee-header_v2.bin \
>     BL32_EXTRA1=../optee_os/build.mx8mmevk/core/tee-pager_v2.bin \
>     BL32_EXTRA2=../optee_os/build.mx8mmevk/core/tee-pageable_v2.bin \
>     BL33=/tmp/uboot-imx8/u-boot.bin BL2_CFLAGS=-DIMX8M_FIP_MMAP \
>     fip bl2 bl31

Sorry, but I found this overly complicated.

Makefile:1112: warning: overriding recipe for target
'/home/fabio/arm-trusted-firmware/build/imx8mm/release/lib'
plat/imx/imx8m/imx8mm/platform.mk:114: warning: ignoring old recipe
for target '/home/fabio/arm-trusted-firmware/build/imx8mm/release/lib'
Makefile:1112: warning: overriding recipe for target
'/home/fabio/arm-trusted-firmware/build/imx8mm/release/romlib'
plat/imx/imx8m/imx8mm/platform.mk:114: warning: ignoring old recipe
for target '/home/fabio/arm-trusted-firmware/build/imx8mm/release/romlib'
Makefile:1112: warning: overriding recipe for target
'/home/fabio/arm-trusted-firmware/build/imx8mm/release/libwrapper'
plat/imx/imx8m/imx8mm/platform.mk:114: warning: ignoring old recipe
for target '/home/fabio/arm-trusted-firmware/build/imx8mm/release/libwrapper'
  CC      services/spd/opteed/opteed_common.c
  CC      services/spd/opteed/opteed_main.c
  CC      services/spd/opteed/opteed_pm.c
  AS      services/spd/opteed/opteed_helpers.S
  CC      /home/fabio/mbedtls/library/aes.c
In file included from include/drivers/auth/mbedtls/mbedtls_config.h:114,
                 from /home/fabio/mbedtls/include/mbedtls/build_info.h:59,
                 from /home/fabio/mbedtls/library/common.h:26,
                 from /home/fabio/mbedtls/library/aes.c:26:
/home/fabio/mbedtls/include/mbedtls/check_config.h:593:2: error:
#error "MBEDTLS_SHA256_C defined without MBEDTLS_SHA224_C"
  593 | #error "MBEDTLS_SHA256_C defined without MBEDTLS_SHA224_C"

What about having two defconfigs for this board?

imx8mm-cl-iot-gate_defconfig for the regular users. This one can be
simply be built by
following the README I wrote and it matches the way used on other
i.MX8MM boards.

imx8mm-cl-iot-gate_optee_defconfig for the users that want to use
fip/optee, etc?

Would you agree with such an approach?

Thanks,

Fabio Estevam


More information about the U-Boot mailing list