barebox/include/bootstrap.h
Jean-Christophe PLAGNIOL-VILLARD df132b9d78 introduce common bootstrap code
This will allow to have a generic code to create different bootstrap

As example
Barebox as TI Xloader
Barebox as AT91 Bootstrap

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-22 22:03:44 +01:00

35 lines
762 B
C

/*
* Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnio@jcrosoft.com>
*
* Under GPLv2
*/
#ifndef __BOOSTRAP_H__
#define __BOOSTRAP_H__
#define bootstrap_err(fmt, arg...) printf(fmt, ##arg)
void bootstrap_boot(int (*func)(void), bool barebox);
#ifdef CONFIG_BOOTSTRAP_DEVFS
void* bootstrap_read_devfs(char *devname, bool use_bb, int offset,
int default_size, int max_size);
#else
static inline void* bootstrap_read_devfs(char *devname, bool use_bb, int offset,
int default_size, int max_size)
{
return NULL;
}
#endif
#ifdef CONFIG_BOOTSTRAP_DISK
void* bootstrap_read_disk(char *devname, char *fstype);
#else
static inline void* bootstrap_read_disk(char *devname, char *fstype)
{
return NULL;
}
#endif
#endif /* __BOOSTRAP_H__ */