Files
uniLoader/main/boot-fdt.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
420 B
C

// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2026, Igor Belwon <igor.belwon@mentallysanemainliners.org>
*/
#include <drivers/ramdisk-handler.h>
#include <lib/debug.h>
static char fdt_buf[CONFIG_FDT_BUF_SIZE];
void patch_dtb(void** dt)
{
int ret;
ret = ramdisk_handler_patch_dtb(*dt, &fdt_buf, sizeof(fdt_buf));
if (ret != 0)
printk(KERN_ERR, "failed to patch dtb\n");
else
*dt = &fdt_buf;
}