This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/TDA2PXEVM: It will fail when parse LZOP file

Part Number: TDA2PXEVM

Tool/software: Linux

Hello,

For early boot, It will load the firmware to comp_addr, also it will parse the header of LZOP file. But the LZOP file header doesn't match with the lzop_magic defined in lzo1x_decompress.c.Below is the  lzop_magic defined in lzo1x_decompress.c.

----------------------------------------------------------------------------

static const unsigned char lzop_magic[] = {
0x89, 0x4c, 0x5a, 0x4f, 0x00, 0x0d, 0x0a, 0x1a, 0x0a
};

----------------------------------------------------------------------------

While, I added the log for the header value, it is  not match.below is the log, and the *src is the first char of header value.

------------------------------------------------------------------------------------------------

ccccccccccc i=0, *src=159
Error loading remotecore IPU2!,Continuing with boot ...
ccccccccccc i=0, *src=191
Error loading remotecore DSP1!,Continuing with boot ...
ccccccccccc i=0, *src=129
Error loading remotecore DSP2!,Continuing with boot ...
ccccccccccc i=0, *src=0
Error loading remotecore IPU1!,Continuing with boot ...

Thanks a lot

Terence

  • Hi Terence,

    As updated in the below E2E thread, please keep the load_addr separate from the CMA address defined in the kernel DTB and the vision-SDK xs file.
    e2e.ti.com/.../2867615

    The flow now is:

    read from boot media --> IPU_COMP_ADDR
    Decompress image from COMP_ADDR ----> LOAD_ADDR
    Load firwamre from LOAD_ADDR ----> DRA7_RPROC_CMA_BASE

    To conclude, please don't set the comp_addr to be the same as the cma address in kernel DTB and Vision-SDK, it needs to be different.

    Regards
    Shravan
  • Hi Shravan,
    Thanks a lot.
    If so, it will consume more memory from our DDR. Our DDR is only 512M. After it load firmware successfully, is it will free this memory(both COMP_ADDR & LOAD_ADDR)? and where will free it?

    On the other hand, for normal boot, is it load the decompressed image(ex,vision_sdk_ipu1_0_release.xem4 ) to DRA7_RPROC_CMA_BASE directly through the kernel rproc driver?

    Terence
  • Hi Terence,

    After firmware load the space is freed and used by kernel (only CMA regions are still used, and can't be allocated by kernel. COMP_ADDR and LOAD_ADDR is used by kernel).

    In normal boot, the binary is still read to DDR and then put in CMA region (i.e load addr exists in normal kernel load as well), however this DDR allocation happens from kernel (scattered lists), and is freed upon completion.

    Regards
    Shravan
  • Hi Shravan,
    Understood. Thanks a lot for your answer.

    Terence