mirror of
https://github.com/ivoszbg/uniLoader.git
synced 2026-05-15 17:50:04 +00:00
This is done to clean main/ code of ugly architecture ifdefs. Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
18 lines
554 B
C
18 lines
554 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 <main/boot.h>
|
|
#include <string.h>
|
|
|
|
void arch_load_kernel(void* kernel, void* dt, void* ramdisk)
|
|
{
|
|
memcpy((void*)CONFIG_PAYLOAD_ENTRY, kernel, (unsigned long) kernel_size);
|
|
#ifndef CONFIG_RAMDISK_NO_COPY
|
|
memcpy((void*)CONFIG_RAMDISK_ENTRY, ramdisk, (unsigned long) ramdisk_size);
|
|
#endif
|
|
load_kernel_and_jump(0, 0, dt, (void*)CONFIG_PAYLOAD_ENTRY);
|
|
}
|