The boot process of Prickly Pear Kernel could be divided into 2 parts: bootloader(prekernel) and kernel. These parts are tight together and share the same ABI to prepare the required environment for the kernel.
- VM is on.
- Filled boot args.
- All kernel data required for a kernel bootup (e.g. the kernel itself, boot args and vm translation tables) should be a continuous region of memory (both physical and virtual). This region is described with
boot_args->vaddr
,boot_args->paddr
andboot_args->kernel_data_size
. - After kernel data 4mb should be mapped for a successful kernel boot process. This part is used for kernel structs (e.g physical allocation table) which are required before the kernel can set up its own vm translation tables.
- Initial debug devices should be mapped (UART and/or framebuffer).
- For 64-bit kernels all RAM should be mapped to itself.
The kernel is an ELF file but there are some use cases when it is needed a raw binary image or an UEFI-capable image. In order to prepare the required environment for a kernel bootup there is a part called prekernel. It is a position independent raw binary which contains code to boot the kernel.
Raw image consists of prekernel, kernel and devtree.
An alternative to prekernel part is a standalone bootloader which could prepare the required environment for the kernel.