Info taken from here:
https://gist.github.com/eNV25/c8001491dc0440656ff7b0ae18993ba1?permalink_comment_id=5195795#gistcomment-5195795
Or here: https://gist.github.com/alexey198233/087a1a52d7a31b07bc4e114220561bac
There is one more way. I will explain using the example of the HP Probook 440g6 firmware.
The BIOS downloaded from the HP website is not intended for direct flashing (in my case, this is the R71_012800.bin file). The utilities on the HP_TOOLS section are needed to create the firmware.bin file (add few bytes to the beginning of the file), not for flash. The EFI/HP/BIOS/New path apparently serves only to display information about the firmware, it does not need to be created for flashing (that is why, if you have no HP_TOOLS partition, it complains about the incorrect firmware file size because it is not on the required path ). The firmware itself is created by utilities, copied into the EFI/HP/DEVFW folder and then flashed. The algorithm is as follows: