diff options
| author | Maxim Moskalets <[email protected]> | 2024-06-05 21:43:34 +0300 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-06-14 12:59:07 -0600 |
| commit | 46b6a3e6c71de8622634d5aa8dca6a216148981b (patch) | |
| tree | 9165147b03cdfe51e1290b1be617a5921acc8365 /include/elf.h | |
| parent | 2c9690e79c76807468e34f34d2065ade2d727227 (diff) | |
cmd: move ELF load and boot to lib/elf.c
Loading and running the ELF image is the responsibility of the
library and should not be associated with the command line interface.
It is also required to run ELF images from FIT with the bootm command
so as not to depend on the command line interface.
Signed-off-by: Maxim Moskalets <[email protected]>
Diffstat (limited to 'include/elf.h')
| -rw-r--r-- | include/elf.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/elf.h b/include/elf.h index a4ba74d8abe..b88e6cf4032 100644 --- a/include/elf.h +++ b/include/elf.h @@ -12,6 +12,12 @@ #ifndef __ASSEMBLY__ #include "compiler.h" +/* Flag param bits for bootelf() function */ +typedef struct { + unsigned phdr : 1; /* load via program (not section) headers */ + unsigned autostart : 1; /* Start ELF after loading */ +} Bootelf_flags; + /* This version doesn't work for 64-bit ABIs - Erik */ /* These typedefs need to be handled better */ @@ -700,6 +706,10 @@ unsigned long elf_hash(const unsigned char *name); #define R_RISCV_RELATIVE 3 #ifndef __ASSEMBLY__ +unsigned long bootelf_exec(ulong (*entry)(int, char * const[]), + int argc, char *const argv[]); +unsigned long bootelf(unsigned long addr, Bootelf_flags flags, + int argc, char *const argv[]); int valid_elf_image(unsigned long addr); unsigned long load_elf64_image_phdr(unsigned long addr); unsigned long load_elf64_image_shdr(unsigned long addr); |
