What does a metal port mean to them? How many files? How many abstractions? How wrapped up in special case performance logic are they?
As there are not enough people who can do this, there should be a high rate. There is also a lot of minutia on top of the literal coding.
There is a ton of power you need to get this done. This needs to be granted to you as a matter of the contract. Continually reconvincing them to do the correct thing as you go will be tremendously draining.
You should have contractual technical assistance on their side with adapting their build system. (“In addition to a Decisionmaker, Client will provide a build assistance engineer to help with the asset pipeline and other project specfic tooling as needed, within 48 hours of notice of a problem. Build assistance engineer will supply written documentation on portion under discussion after the meeting for future documentation.”)
If you do not have a current and past stable of test devices, a portion (33-40%) should be billed as a fixed