Convert common arceos image into efi image. Now it only supports Riscv64.
This project consists of two parts: efi_stub and mk_img tool.
Tool mk_img turns raw arceos into efi-image.
- concatenates efi_stub and raw arceos image together
- fixups efi_stub's headers and lets it be aware of raw arceos image
Now we get efi-image of arceos. Note: We don't need to chnage the raw arceos image.
At runtime:
- efi firmware (e.g. EDK2) loads efi-image and invokes its entry
- efi-image copys its raw-image part to 0x8020_0000
- efi-image does necessary work and enter into arceos
make
./mk_img/mk_img [target-efi-image] ./efi_stub/efi_stub [source-raw-image]