summaryrefslogtreecommitdiffstats
path: root/lib/bootstrap/common.c
blob: 4a61992179e9aeedc6b325f36e997d79f3d982d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * Copyright (C) 2011 Sascha Hauer, Pengutronix
 * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnio@jcrosoft.com>
 *
 * Under GPLv2
 */

#include <common.h>
#include <bootstrap.h>
#include <filetype.h>

void bootstrap_boot(kernel_entry_func func, bool barebox)
{
	if (!func)
		return;

	if (barebox && !is_barebox_head((void*)func))
		return;

	shutdown_barebox();
	func(0, 0, NULL);

	while (1);
}