this will allow to execute a program of the host from barebox
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We never had interrupt support in barebox and we have no plans to
add interrupt support. Even if we do I doubt the current fragments
of irq support are helpful, so remove them.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
now we can detect the host build from gcc macro
and cross compile the sandbox
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Loïc Minier <loic.minier@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
let the linker to provide the basic linker script
just insert the commands and initcalls before the .rodata section
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
today we have the same linker script in board and lib
and only the board linker script is used
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
When building sandbox with ccache, one would hit warnings such as:
warning: 'struct mmsghdr' declared inside parameter list
on random files; a way to reproduce this issue is to build a simple
file doing just:
#include <sys/socket.h>
int main(void) {
return 0;
}
gcc -Wall -P -c -o foo foo.c
But actually the -P flag is only useful when generating non-C files,
such as linker scripts in the case of barebox. Removing the -P flag
from all the gcc invocations, except when generating .lds files makes
the warning go away. It turns out that this is what
linux/scripts/Makefile.build also does nowadays.
Signed-off-by: Loïc Minier <loic.minier@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
this will avoid __bswapsi2 issue see with gcc 4.5.1
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
arch/sandbox/board/built-in.o: In function `hf_probe':
hostfile.c:(.text+0xac): undefined reference to `devfs_create'
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
include/common.h declares this as "unsigned long addr", so we unify it.
This also silences a doxygen warning.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Until now, the main function of the sandbox port wants to use the libc
getopt(), but as we have a getopt() implementation in barebox as well,
it is silently used instead. This works in the usual case, but if an
error occurs (i.e. by using an unknown argument) in getopt(), the
implementation tries to write to the console, which is not initialized
and thus breaks with a null pointer exception.
This patch changes the main function to use getopt_long() instead of
getopt(). This makes us use the implementation in glibc and while being
there, we get long options, which makes us look more professional...
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
before if you specify id = 0 the next available id will be taken
otherwise fail if already registered now as in linux we use -1
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
this will reduce and simplify defconfigs maintainance
it will also save some disk space
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
this will allow each arch to handle the boards more simply and depending on
there need
the env var BOARD will refer to the current board dirent
for sandbox as we have only one board the board dirent is arch/sandbox/board
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The env%d string got created, but the the hardcoded "env" string was
always used instead, causing errors with loading the env.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Move platform independent header files to arch/sandbox/include/asm, leaving
those in asm/arch*.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Sandbox compilation failed with:
gcc -Wp,-MD,arch/sandbox/lib/.tap.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.3.1/include -I/usr/include -Iinclude -P -Wall -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(tap)" -D"KBUILD_MODNAME=KBUILD_STR(tap)" -c -o arch/sandbox/lib/tap.o arch/sandbox/lib/tap.c
In file included from /usr/include/bits/socket.h:32,
from /usr/include/sys/socket.h:36,
from arch/sandbox/lib/tap.c:29:
/usr/include/limits.h:125:26: error: limits.h: No such file or directory
/usr/include/limits.h uses the next_include directive
This was because of the -nostdinc
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>