I am developing an operating system from scratch on the principle of "research through practice." The file for EFI is used for download. Interaction with EFI is reduced to a minimum. In VirtualBox, the file is launched once, depending on the contents of the ld script, or rather, on the settings of the beginning of the image.

On a real machine, without any conclusions, simply returns to the boot menu or displays that there is no loadable media.

It is difficult to cite something as an example to show the problem. The code can be obtained by reference .

Googling gives absolutely nothing in this respect (I could be wrong).

    1 answer 1

    Experimentally revealed that the EFI image is launched, if you specify the address of the beginning of the image 0x401000. Other values, for unknown reason, are not accepted.

    In the script for ld pointed to SECTIONS at the very beginning . = 0x401000; . = 0x401000; and the image began to be loaded both on VM, and on real gland.