Files
uniLoader/main/boot.c
Aiden Isik 6ae4e8084f main: Pass address of address of DTB to patch_dtb
Pass the address of the address of the DTB to patch_dtb in boot.c, rather than just the address to the DTB.
This allows the modified DTB address to overwrite the address of the original DTB, fixing a bug where
the ramdisk address was not being passed to the kernel via the DTB successfully.
2026-05-14 21:03:32 +02:00

21 lines
476 B
C

// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2022, Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
* Copyright (c) 2026, Igor Belwon <igor.belwon@mentallysanemainliners.org>
*/
#include <lib/debug.h>
#include <main/boot.h>
#include <main/boot-fdt.h>
#include <string.h>
void boot_kernel(void* dt, void* kernel, void* ramdisk)
{
#ifdef CONFIG_LIBFDT
patch_dtb(&dt);
#endif
printk(KERN_INFO, "Booting kernel...\n");
arch_load_kernel(kernel, dt, ramdisk);
}