|
iPXE
|
Linux kernel image format. More...
#include <stdint.h>#include <string.h>#include <errno.h>#include <byteswap.h>#include <ipxe/image.h>#include <ipxe/memmap.h>#include <ipxe/uaccess.h>#include <ipxe/segment.h>#include <ipxe/initrd.h>#include <ipxe/io.h>#include <ipxe/fdt.h>#include <ipxe/init.h>#include <ipxe/lkrn.h>Go to the source code of this file.
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| static int | lkrn_parse (struct image *image, struct lkrn_context *ctx) |
| Parse kernel image. More... | |
| static int | lkrn_ram (struct image *image, struct lkrn_context *ctx) |
| Locate start of RAM. More... | |
| static int | lkrn_exec (struct image *image) |
| Execute kernel image. More... | |
| static int | lkrn_probe (struct image *image) |
| Probe kernel image. More... | |
| struct image_type lkrn_image_type | __image_type (PROBE_NORMAL) |
| Linux kernel image type. More... | |
| static int | zimg_parse (struct image *image, struct zimg_context *zctx) |
| Parse compressed kernel image. More... | |
| static int | zimg_extract (struct image *image, struct image *extracted) |
| Extract compresed kernel image. More... | |
| static int | zimg_probe (struct image *image) |
| Probe compressed kernel image. More... | |
Linux kernel image format.
Definition in file lkrn.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Parse kernel image.
| image | Kernel image |
| ctx | Kernel image context |
| rc | Return status code |
Definition at line 53 of file lkrn.c.
References cpu_to_le32, ctx, image::data, DBGC, ENOEXEC, hdr, le32_to_cpu, le64_to_cpu, image::len, LKRN_MAGIC_ARCH, memset(), and image::name.
Referenced by lkrn_exec(), and lkrn_probe().
|
static |
Locate start of RAM.
| image | Kernel image |
| ctx | Kernel image context |
| rc | Return status code |
Definition at line 100 of file lkrn.c.
References ctx, DBGC, DBGC_MEMMAP, ENOTSUP, memmap_region::flags, for_each_memmap, MEMMAP_FL_MEMORY, memmap_region::min, and image::name.
Referenced by lkrn_exec().
|
static |
Execute kernel image.
| image | Kernel image |
| rc | Return status code |
Definition at line 124 of file lkrn.c.
References assert(), be32_to_cpu, image::cmdline, ctx, image::data, DBGC, dest, ECANCELED, fdt_create(), fdt_remove(), free_image(), IMAGE_STATIC, IMAGE_STATIC_NAME, images, initrd_align(), initrd_len, initrd_load_all(), initrd_region(), initrd_reshuffle(), image::len, image::list, list_add, list_add_tail, list_del, lkrn_jump(), lkrn_parse(), lkrn_ram(), memmap_size(), memmove(), memset(), memmap_region::min, image::name, prep_segment(), rc, REF_INIT, image::refcnt, shutdown_boot(), and strerror().
|
static |
Probe kernel image.
| image | Kernel image |
| rc | Return status code |
Definition at line 249 of file lkrn.c.
References ctx, DBGC, lkrn_parse(), image::name, and rc.
| struct image_type lkrn_image_type __image_type | ( | PROBE_NORMAL | ) |
Linux kernel image type.
Linux kernel compressed image type.
|
static |
Parse compressed kernel image.
| image | Compressed kernel image |
| zctx | Compressed kernel image context |
| rc | Return status code |
Definition at line 275 of file lkrn.c.
References cpu_to_le32, image::data, DBGC, ENOEXEC, le32_to_cpu, image::len, zimg_header::len, zimg_context::len, zimg_header::magic, memset(), image::name, zimg_header::offset, zimg_context::offset, zimg_context::raw, zimg_header::type, zimg_context::type, and ZIMG_MAGIC.
Referenced by zimg_extract(), and zimg_probe().
Extract compresed kernel image.
| image | Compressed kernel image |
| extracted | Extracted image |
| rc | Return status code |
Definition at line 320 of file lkrn.c.
References image::data, DBGC, image_set_data(), zimg_context::len, image::name, zimg_context::offset, rc, strerror(), zimg_context::string, zimg_context::type, and zimg_parse().
|
static |
Probe compressed kernel image.
| image | Compressed kernel image |
| rc | Return status code |
Definition at line 349 of file lkrn.c.
References DBGC, image::name, rc, zimg_context::string, zimg_context::type, and zimg_parse().
1.8.15