| Age | Commit message (Collapse) | Author |
|
Now that run_command() handles both parsers, clean up sandbox to use it.
This fixes a build error.
Signed-off-by: Simon Glass <[email protected]>
Acked-by: Mike Frysinger <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
|
|
In order to pass command line arguments to sandbox we need to be able
to act on them. So take control back at the end of board_init_r() from
where we can call the main loop or do something else.
Signed-off-by: Simon Glass <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
|
|
The state exists through the life of U-Boot. It can be adjusted by command
line options and perhaps later through a config file. It is available to
U-Boot through state_...() calls (within sandbox code).
The primary purpose of this is to contain the "hardware" state. It should
only be used by sandbox internal code.
Signed-off-by: Simon Glass <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
|
|
We use tabs for indentation, not spaces.
Acked-by: Simon Glass <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
|
|
Follow up patches want to be able to seek fd's.
Acked-by: Simon Glass <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
|
|
We should include the sys/time.h header to avoid warnings.
Signed-off-by: Simon Glass <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
|
|
Tidy this up as the list is long and likely to get longer.
Signed-off-by: Simon Glass <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
|
|
Making sleep command work
Signed-off-by: Matthias Weisser <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
|
|
Using mmap to allocate memory from the OS for RAM simulation we can use
u-boot own malloc implementation.
Tested-by: Simon Glass <[email protected]>
Signed-off-by: Matthias Weisser <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
|
|
Signed-off-by: Mike Frysinger <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
This allows us to act like a serial device: we get tab chars and CTRL+C
and respond appropriately.
Signed-off-by: Mike Frysinger <[email protected]>
Tested-by: Simon Glass <[email protected]>
|
|
Add a main program so that we can run U-Boot.
Signed-off-by: Simon Glass <[email protected]>
|
|
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 <[email protected]>
|
|
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 <[email protected]>
|