2022-06-14 14:14:56 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2022, Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <main.h>
|
|
|
|
|
|
|
|
void main(void* dt, void* kernel) {
|
|
|
|
/* C entry */
|
|
|
|
|
|
|
|
/* Initialize SoC and Board specific peripherals/quirks */
|
|
|
|
soc_init();
|
2022-06-14 16:51:51 +00:00
|
|
|
printk("soc_init() passed!");
|
2022-06-14 14:14:56 +00:00
|
|
|
|
|
|
|
board_init();
|
2022-06-14 16:51:51 +00:00
|
|
|
printk("board_init() passed!");
|
2022-06-14 14:14:56 +00:00
|
|
|
|
|
|
|
/* Copy kernel to memory and boot */
|
2022-06-14 16:51:51 +00:00
|
|
|
printk("Booting linux...");
|
2022-06-16 15:18:20 +00:00
|
|
|
__builtin_memcpy((void*)CONFIG_PAYLOAD_ENTRY, kernel, (unsigned long) &kernel_size);
|
2022-06-14 14:14:56 +00:00
|
|
|
load_kernel(dt, 0, 0, 0, (void*)CONFIG_PAYLOAD_ENTRY);
|
|
|
|
}
|