Arm trusted firmware reads wrong fip file from flash

i’m having trouble getting arm trusted firmware to work on hikey960v2
I followed all the steps in this guide, and the steps in
The problem seems to be in reading the fip.bin, or rather the problem is writing the fip file as it seems it is not properly flashed.
ATF bl2 fails to find the UUID of the BL2_SCP image in the fip.bin output by the build process, the fip file it reads from flash only has the BL31 and BL33 UUIDs.

I tried checking older versions of ATF, as I figured it might be a problem in current versions, but the same problems occurred.

At this moment I feel the problem is in the flashing step.
I tried moving the partitions in the partition tables, as well as the value of the macro HIKEY960_FIP_BASE present in hikey960_def.h to match what I thought would be the writing position of the file in the partition, but without sucess.

If anyone could give me any idea as to what the problem might be, that’d be great