Note that this does require another windows pc to open the bios-update executable, but there is no need to install windows on the target pc, nor do you need a windows recovery disk or windows-pe or any such thing.
Use a separate Windows system to download the correct bios-update executable for your system from the HP support site. In my case the file was called sp95703.exe (HP Notebook System BIOS Update, version F.35 Rev.A).
Run the executable on the Windows system. Don't worry, it will not try to install the update, but it will open a utility that creates a bios recovery drive, as explained on the HP site. Follow the steps to create the USB recovery drive.
In my case, for a HP ProDesk 400 G4 Desktop Mini PC with Ubuntu 20.04 on it, I had to unzip the .exe (7z x spxxx.exe) file and move the *.bin to:/boot/efi/EFI/HP/DEVFW/firmware.bin. I had to rename the *.bin file to firmware.bin. After restart the bios update worked. I should mention that moving the *.bin to /boot/efi/EFI/HP/BIOS/New did not worked for me. Hope this helps someone.
I had significant difficulty upgrading the bios. I wasn't able to get any of the other answers here working - many seem outdated and referring to old versions of the bios updater software. The tricky part with the network upgrade is that my computer is new enough that it only has usb-c instead of ethernet. Multiple people at HP support I spoke to said I would be unable to do the network upgrade as a result because it only worked directly over ethernet, but they were misinformed. Using a Thunderbolt dock did not work, but I bought a usb-c to ethernet adapter to try the bios upgrade and finally had success! 2b1af7f3a8