mirror of
https://github.com/ipxe/ipxe
synced 2025-12-08 18:30:28 +03:00
[riscv] Add a .lkrn build target resembling a Linux kernel binary
On x86 BIOS, it has been useful to be able to build iPXE to resemble a Linux kernel, so that it can be loaded by programs such as syslinux which already know how to handle Linux kernel binaries. Add an equivalent .lkrn build target for RISC-V SBI, allowing for build targets such as: make bin-riscv64/ipxe.lkrn make bin-riscv64/cgem.lkrn The Linux kernel header format allows us to specify a required length (including uninitialised-data portions) and defines that the image will be loaded at a fixed offset from the start of RAM. We can therefore use known-safe areas of memory (within our own .bss) for the initial temporary page table and stack. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -452,6 +452,7 @@ paging_mode_names:
|
||||
* This can be used only once .bss is known to be writable.
|
||||
*/
|
||||
.section ".bss.page_table", "a", @nobits
|
||||
.globl page_table
|
||||
.balign PAGE_SIZE
|
||||
page_table:
|
||||
.space PAGE_SIZE
|
||||
|
||||
Reference in New Issue
Block a user