Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
SDB - Self-describing Bus
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
SDB - Self-describing Bus
Commits
8d6417ea
Commit
8d6417ea
authored
Sep 18, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sdbfs/lib: support barebox
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
6bac58be
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
libsdbfs-kernel.h
sdbfs/lib/libsdbfs-kernel.h
+14
-3
libsdbfs.h
sdbfs/lib/libsdbfs.h
+1
-1
No files found.
sdbfs/lib/libsdbfs-kernel.h
View file @
8d6417ea
/*
* This supports both the Linux kernel and barebox, that is similar
* by design, and defines __KERNEL__ too.
*/
#ifdef __BAREBOX__
# include <errno.h>
#else
/* really linux */
# include <linux/errno.h>
#endif
#include <linux/types.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <asm/byteorder.h>
/*
...
...
@@ -11,8 +19,12 @@
* So, check if we got the information we need before strange errors happen.
* The DECLARE_BITMAP macro is in <linux/types.h> since the epoch, but it
* is not installed in /usr/include/linux/types.h, so use it to check.
*
* If building for barebox, we miss the macro, but we are sure that
* we are picking the correct header, because the library is only built
* within the barebox source tree.
*/
#if
ndef DECLARE_BITMAP
#if
!defined(DECLARE_BITMAP) && !defined(__BAREBOX__)
# error "Please point LINUX to a source tree if you define __KERNEL__"
#endif
...
...
@@ -20,5 +32,4 @@
#define SDB_USER 0
#define SDB_FREESTAND 0
#define sdb_print(format, ...) printk(format, __VA_ARGS__)
sdbfs/lib/libsdbfs.h
View file @
8d6417ea
#ifndef __LIBSDBFS_H__
#define __LIBSDBFS_H__
/* The library can work in
three different environments
*/
/* The library can work in
different environments, take care of them
*/
#ifdef __KERNEL__
# include "libsdbfs-kernel.h"
#elif defined(__unix__)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment