Hello,
I need to change to DDR size from the default 4G to 2G for a custom ECU using S32g3. For BSP 46.00 I know this is part of the BL2 (TFA) and there a is chapter in the BSP user manual, BUT...
the steps described there are "manual", meaning the TFA should be build as an independent binary.
I am using Yocto with BSP46.00 and took as a start reference s32g399aevb3. I have created my own custom MACHINE and meta layer and can successfully do the bitbake and run the image on the EVB (still 4G as original MACHINE).
Now I want to integrate the DDR size change (4G -> 2G) in my Yocto flow. For now I am thinking to add the new ddr files as a patch in a bbapend for TFA recipe, but the issue is that Yocto build will fail if NXP_FIRMWARE_LOCAL_DIR is not provided.
My questions are:
1. Is the "manual" option the only one (I hope not)?
2. Is my intended approach correct?
3. If using a patch for TFA (or even pointing to a local repo) in the bbapend, how can I avoid the build fail caused by removing NXP_FIRMWARE_LOCAL_DIR? I expect that I can't create my own binaries and also makes no sense to have my changes for ddr and also the ddr_firmware intended for the EVB (that is why I need to remove NXP_FIRMWARE_LOCAL_DIR).
Hello
thanks for the fast reply.
>>1. The DDR_FW_BIN_PATH parameter must be set to specify the path to the NXP board-specific DDR firmware binary file, so it is >>only for building images for NXP board(RDB, EVB, etc.)
Since I do not want to build for a specific NXP board, why should I provide link to NXP bord specific binaries? My machine is based on s32g3evb3 (I use in my machine file require conf/machine/include/s32g3evb3.inc), so I want to make sure that at the end of the compilation TFA uses the actual new files generated by S32DS and NOT NXP binaries. How can I make sure if I can't remove DDR_FW_BIN_PATH parameter from the bitbake flow?
>>2. For building TFA for custom board, it is suggested using the CUSTOM_DDR_DRV parameter for make. It must be set to a path >>(relative to the TF-A root folder) where all the DDR source and header files are, in the state they were generated by DDR Tool.
I will try to generate some DDR source and compile the TFA
>>3. Once the TFA could be build correctly, you may make the changes to the Yocto accordingly to have further test.
What should be the Yocto changes?
One more question:
If I have to change the DDR size, do I have to also modify something in U-boot or is the TFA change enough?
Hello, @FlaviuNistor
Thanks for your post.
1. The DDR_FW_BIN_PATH parameter must be set to specify the path to the NXP board-specific DDR firmware binary file, so it is only for building images for NXP board(RDB, EVB, etc.)
2. For building TFA for custom board, it is suggested using the CUSTOM_DDR_DRV parameter for make. It must be set to a path (relative to the TF-A root folder) where all the DDR source and header files are, in the state they were generated by DDR Tool.
3. Once the TFA could be build correctly, you may make the changes to the Yocto accordingly to have further test.
I hope it will help.
BR
Chenyin