How to create ps2 FPKG patch as update PKG file

I have seen instances where for example MKSM is not working, you apply the update file and then it starts working.

I have few PKGs which I have managed to run smoothly on vanilla version but as soon I integrate mtap the game won't even boot.