diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-06-15 08:59:03 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-06-15 09:01:09 +0200 |
commit | 8601b37911c1e2929c4e5bfca52c7237154b442e (patch) | |
tree | 61704caa2f7d4015511021716a7458a91995f5b7 /include/pbl.h | |
parent | 4b28ee86c605a2f43d574995b6bae0d37fc24561 (diff) | |
download | barebox-8601b37911c1e2929c4e5bfca52c7237154b442e.tar.gz barebox-8601b37911c1e2929c4e5bfca52c7237154b442e.tar.xz |
pbl: Provide C macro to test if we are compiling the pbl
Provide IN_PBL as boolean constant which can be tested for in C.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/pbl.h')
-rw-r--r-- | include/pbl.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/pbl.h b/include/pbl.h index d041a3fbad..787bd8293f 100644 --- a/include/pbl.h +++ b/include/pbl.h @@ -12,4 +12,10 @@ extern unsigned long free_mem_end_ptr; void pbl_barebox_uncompress(void *dest, void *compressed_start, unsigned int len); +#ifdef __PBL__ +#define IN_PBL 1 +#else +#define IN_PBL 0 +#endif + #endif /* __PBL_H__ */ |