On 1/3/25 7:45 AM, Alice Guo wrote:
From: Alice Guo <[email protected]>

i.MX95 uses binman to invoke mkimage to create image container. 2 image
containers are needed currently. The first one is composed of
ahab-container.img, LPDDR firmware images, OEI images, System Manager
image and u-boot-spl.bin. The second one is comsisted of ARM Trusted
firmware and u-boot.bin.

Because DDR OEI image and LPDDR firmware images have to be packaged
together and named as m33-oei-ddrfw.bin by binman, so imx9_image.sh does
not check if m33-oei-ddrfw.bin exists.

When using "make imx95_19x19_evk_defconfig; make", imx9_image.sh will
delete the line for u-boot.bin in container.cfg. In fact, binman is
always called after the u-boot.bin is built, so imx9_image.sh does not
check if u-boot.bin exists.

Signed-off-by: Alice Guo <[email protected]>

[...]

@@ -227,12 +234,16 @@ typedef struct {
  #define CORE_CA35       4
  #define CORE_CA72       5
  #define CORE_SECO       6
+#define CORE_M33        7
#define CORE_ULP_CM33 0x1
  #define CORE_ULP_CA35         0x2
  #define CORE_ULP_UPOWER       0x4
  #define CORE_ULP_SENTINEL     0x6
+#define CORE_IMX95_M33P 0U
+#define CORE_IMX95_A55C0       2U

Drop the trailing U from the constant.

  #define SC_R_OTP      357U
  #define SC_R_DEBUG    354U
  #define SC_R_ROM_0    236U

[...]

@@ -586,8 +639,10 @@ static void set_image_array_entry(flash_header_v3_t 
*container,
                        meta = IMAGE_A53_DEFAULT_META(custom_partition);
                } else if (soc == QM && core == CORE_CA72) {
                        meta = IMAGE_A72_DEFAULT_META(custom_partition);
-               } else if (((soc == ULP) || (soc == IMX9)) && core == 
CORE_CA35) {
+               } else if ((soc == ULP) && core == CORE_CA35) {
                        meta = 0;
+               } else if ((soc == IMX9) && core == CORE_CA35) {

Should this be CORE_CA55 ?

+                       meta = CORE_IMX95_A55C0;
                } else {
                        fprintf(stderr,
                                "Error: invalid AP core id: %" PRIu64 "\n",

[...]

-static int get_container_image_start_pos(image_t *image_stack, uint32_t align)
+static int get_container_image_start_pos(image_t *image_stack, uint32_t align, 
uint32_t *v2x)
  {
        image_t *img_sp = image_stack;
        /*8K total container header*/
        int file_off = CONTAINER_IMAGE_ARRAY_START_OFFSET;
        FILE *fd = NULL;
-       flash_header_v3_t header;
+       flash_header_v3_t *header;
+       flash_header_v3_t *header2;
+       void *p;
        int ret;
+ p = calloc(1, SZ_4K);

Can this be simply reserved on stack ?

[...]

diff --git a/tools/imx9_image.sh b/tools/imx9_image.sh
index 
ca78a57a19a06ade4792da6d2435cbc4fa07de62..6523d1a0ad109db2da29bae122a20b084c2522ed
 100755
--- a/tools/imx9_image.sh
+++ b/tools/imx9_image.sh
@@ -18,6 +18,14 @@ for f in $blobs; do
                continue
        fi
+ if [ $f = "m33-oei-ddrfw.bin" ]; then
+               continue
+       fi
Can this be wired into binman somehow instead ?

Reply via email to