Hi Wang,
BL31 is not designed to have image loading capabilities.
BL2 is the boot stage, supposed to load all the images (BL1 has minimal support to load just BL2).
If you want a custom image load capability in BL31, you need to implement it in platform (as we won't support this in generic code). Also, I guess the image which you want to load is not part of FIP image, if that is the case then you can have simple implementation of loading image (without using the image loading framework).
You can refer to plat/arm/board/n1sdp/n1sdp_bl31_setup.c
Thanks Manish ________________________________ From: TF-A tf-a-bounces@lists.trustedfirmware.org on behalf of Chenxu Wang via TF-A tf-a@lists.trustedfirmware.org Sent: 06 December 2021 08:39 To: tf-a@lists.trustedfirmware.org tf-a@lists.trustedfirmware.org Subject: [TF-A] How to load some images in BL31?
Hi all,
I want to load a specific image in BL31. But when I call load_auth_image(). It says
"in function `load_image': trusted-firmware-a/common/bl_common.c:87: undefined reference to `plat_get_image_source'"
Also, the io_read, io_size and etc. are undefined reference.
I find other BL files (bl1, bl2) will call the load_auth_image() in their main functions or sub-functions. If I want to implement it on BL31, what should I do? Should I modify the Makefile?
Sincerely, Wang -- TF-A mailing list TF-A@lists.trustedfirmware.org https://lists.trustedfirmware.org/mailman/listinfo/tf-a