summaryrefslogtreecommitdiffstats
path: root/arch/sandbox/cpu/os.c
Commit message (Collapse)AuthorAgeFilesLines
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* sandbox: Support trace featureSimon Glass2013-06-261-1/+1
| | | | | | | | | | Support tracing on sandbox by adding suitable CONFIG options. To enable it, compile U-Boot with FTRACE=1. The timer functions are marked to skip tracing, since these are called from the tracing code itself, and we want to avoid an infinite loop. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Add a way of obtaining directory listingsSimon Glass2013-03-041-0/+101
| | | | | | | | This implementation uses opendir()/readdir() to access the directory information and then puts it in a linked list for the caller's use. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com>
* sandbox: Improve sandbox serial port keyboard interfaceTaylor Hutt2013-02-281-0/+8
| | | | | | | | | | | Implements the tstc() interface for the serial driver. Multiplexing the console between the serial port and a keyboard uses a polling method of checking if characters are available; this means that the serial console must be non-blocking when attempting to read characters. Signed-off-by: Taylor Hutt <thutt@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: add getopt supportSimon Glass2012-03-121-0/+98
| | | | | | | | | | | | | | | This adds simple command-line parsing to sandbox. The idea is that it sets up the state with options provided, and this state can then be queried later, as needed. New flags are declared with the SB_CMDLINE_OPT_SHORT helper macro, pointers are automatically gathered up in a special section, and then the core code takes care of gathering them up and processing at runtime. This way there is no central place where we have to store a list of flags with ifdefs. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: add flags for open() callSimon Glass2012-03-121-2/+22
| | | | | | | | This provides a way for callers to create files for writing. The flags are translated at runtime, for the ones we support. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: add lseek helperMike Frysinger2012-03-121-0/+13
| | | | | | | Follow up patches want to be able to seek fd's. Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: add required header to os.cSimon Glass2012-03-121-0/+1
| | | | | | | We should include the sys/time.h header to avoid warnings. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: sort header files in os.cSimon Glass2012-03-121-4/+4
| | | | | | | Tidy this up as the list is long and likely to get longer. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: Add timer simulationMatthias Weisser2011-12-101-0/+27
| | | | | | | Making sleep command work Signed-off-by: Matthias Weisser <weisserm@arcor.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: Add improved RAM simulationMatthias Weisser2011-12-101-0/+7
| | | | | | | | | 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>
* sandbox: put stdin into raw modeMike Frysinger2011-11-031-0/+34
| | | | | | | | 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>
* sandbox: Add OS dependent layerSimon Glass2011-10-171-0/+55
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>
OpenPOWER on IntegriCloud