Commit Graph

13 Commits

Author SHA1 Message Date
Andreas Bießmann f8d2c65fd9 sandbox: fix compiling of cpu/os.c
U-boot itself generally builds with -nostdinc.  This is because the
bootloader needs to be completely standalone.  In the sandbox arch
though, we need a little bit of code to glue the u-boot world to the
host operating system, and we need to be able to access the host
libc's headers in order to do so.

Currently, we're using -I/usr/include to workaround the global
-nostdinc, but that doesn't work for everyone and for all headers.
Instead, let's filter out -nostdinc when building the os.c code.

Without this patch, some distros hit errors such as:
---8<---
In file included from /usr/include/fcntl.h:27:0,
                 from os.c:22:
/usr/include/features.h:323:26: fatal error:
     bits/predefs.h: No such file or directory
--->8---

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-12-10 17:56:37 -05:00
Matthias Weisser d99a6874f5 sandbox: Add timer simulation
Making sleep command work

Signed-off-by: Matthias Weisser <weisserm@arcor.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-12-10 17:54:04 -05:00
Matthias Weisser 21899b1085 sandbox: Add improved RAM simulation
Using mmap to allocate memory from the OS for RAM simulation we can use
u-boot own malloc implementation.

Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Matthias Weisser <weisserm@arcor.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-12-10 17:54:04 -05:00
Mike Frysinger fec79acc86 sandbox: drop unused return
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Simon Glass <sjg@chromium.org>
2011-11-03 22:35:25 +01:00
Mike Frysinger ab06a758b9 sandbox: put stdin into raw mode
This allows us to act like a serial device: we get tab chars and CTRL+C
and respond appropriately.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Tested-by: Simon Glass <sjg@chromium.org>
2011-11-03 22:35:21 +01:00
Anton staaf cceea66bfe sandbox: Add asm/cache.h for sandbox
This file is required by the new DMA buffer alignment macro.

Signed-off-by: Anton Staaf <robotboy@chromium.org>
Cc: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-11-03 22:34:49 +01:00
Helmut Raiger 9660e442de cosmetic: s/BOARD_LATE_INIT/CONFIG_BOARD_LATE_INIT
This renames BOARD_LATE_INIT to CONFIG_BOARD_LATE_INIT.
Along the way it removes some leftover

 #define BOARD_LATE_INIT		1

and adds some basic documentation for board specific
callbacks in README.

Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
Acked-by: Stefano Babic <sbabic@denx.de>
2011-10-27 23:53:59 +02:00
Simon Glass bace3d00f2 sandbox: Add main program
Add a main program so that we can run U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-10-17 23:56:58 +02:00
Simon Glass 7a9219c17a sandbox: Add OS dependent layer
We want to keep all OS-dependent code in once place, with a simple interface
to U-Boot. For now, this is that place.

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-10-17 23:56:58 +02:00
Simon Glass b8605a1cbd sandbox: Add architecture lib files
These files are taken from the ARM board implementation and then reduced
to remove unneeded cruft.

Ideally we would work towards unifying arch/xxx/lib files, particularly
board.c.

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-10-17 23:53:46 +02:00
Simon Glass 4b0730d242 sandbox: Add cpu files
This is an initial implementation with all functions defined but not working.

The lds file is very simple since we can mostly rely on the linker defaults.

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-10-17 23:53:46 +02:00
Simon Glass 65bf1d39f4 sandbox: Add architecture image support
We won't actually load an image with this architecture, but we still need to
define it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-10-17 22:46:38 +02:00
Simon Glass 744d9859a7 sandbox: Add architecture header files
This adds required header files for the sandbox architecture, and a basic
description of what sandbox is (README.sandbox).

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-10-17 22:45:50 +02:00