forked from barebox/barebox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.h
36 lines (29 loc) · 963 Bytes
/
bootstrap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnio@jcrosoft.com>
*/
#ifndef __BOOSTRAP_H__
#define __BOOSTRAP_H__
#include <common.h>
#define bootstrap_err(fmt, arg...) printf(fmt, ##arg)
typedef void (*kernel_entry_func)(int zero, int arch, void *params);
void bootstrap_boot(kernel_entry_func func, bool barebox);
#ifdef CONFIG_BOOTSTRAP_DEVFS
void* bootstrap_read_devfs(char *devname, bool use_bb, int offset,
int default_size, int max_size, size_t *bufsize);
#else
static inline void* bootstrap_read_devfs(char *devname, bool use_bb, int offset,
int default_size, int max_size, size_t *bufsize)
{
return NULL;
}
#endif
#ifdef CONFIG_BOOTSTRAP_DISK
void* bootstrap_read_disk(const char *devname, char *fstype, size_t *bufsize);
#else
static inline void* bootstrap_read_disk(const char *devname, char *fstype, size_t *bufsize)
{
return NULL;
}
#endif
#endif /* __BOOSTRAP_H__ */