08 Jul, 2014
1 commit
-
The directory arch/${ARCH}/cpu/${CPU} does not exist
in avr32, blackfin, microblaze, nios2, openrisc, sandbox, x86.These architectures have only one CPU type.
Defining CPU should not be required for such architectures.This commit allows cpu field (= the 3rd field of boards.cfg)
to be kept blank.Signed-off-by: Masahiro Yamada
Cc: Andreas Bießmann
Cc: Simon Glass
Cc: Sonic Zhang
Cc: Michal Simek
Cc: Thomas Chou
Cc: Stefan Kristiansson
24 Jun, 2014
2 commits
-
local_irq_save() should be a macro, not a function
because local_irq_save() saves flag to the given argument.GCC is silent about this issue, but Clang warns:
In file included from lib/asm-offsets.c:15:
In file included from include/common.h:20:
In file included from include/linux/bitops.h:110:
arch/sandbox/include/asm/bitops.h:59:17:
warning: variable 'flags' is uninitialized when used here
[-Wuninitialized]
local_irq_save(flags);
^~~~~That change causes another warning:
In file included from include/linux/bitops.h:110:0,
from include/common.h:20,
from lib/asm-offsets.c:15:
arch/sandbox/include/asm/bitops.h: In function ‘test_and_set_bit’:
arch/sandbox/include/asm/bitops.h:56:16: warning: unused variable ‘flags’ [-Wunused-variable]So, flags should be set to __always_unused.
Signed-off-by: Masahiro Yamada
Cc: Simon Glass
Cc: Jeroen Hofstee
Acked-by: Simon Glass
Acked-by: Jeroen Hofstee -
Each node in the linked-list that os_dirent_ls() returns has its next
pointer set only when the next node is created. For the last node in the
list, there is no next node, so this never happens, and the next pointer
is never initialized. Explicitly initialize the next pointer so that it
isn't dangling. Without this, "sb ls" might crash.Signed-off-by: Stephen Warren
Acked-by: Simon Glass
21 Jun, 2014
2 commits
-
Linux supports this, and if we are to have compatible device tree files,
U-Boot should also.Avoid giving the device tree files access to U-Boot's include/ directory.
Only include/dt-bindings is accessible.Signed-off-by: Simon Glass
Acked-by: Stephen Warren
Reviewed-by: Masahiro Yamada -
Support the iotrace feature for sandbox, and enable it, using some dummy
I/O access methods.Signed-off-by: Simon Glass
27 May, 2014
1 commit
-
using UBI and DM together leads in compiler error, as
both define a "struct device", so rename "struct device"
in include/dm/device.h to "struct udevice", as we use
linux code (MTD/UBI/UBIFS some USB code,...) and cannot
change the linux "struct device"Signed-off-by: Heiko Schocher
Cc: Simon Glass
Cc: Marek Vasut
17 May, 2014
1 commit
-
This reverts commit 258060905e04fe2eb509756ef3b37e23e220a2d6.
Conflicts:
boards.cfgWrong patch 25806090 was applied by accident. Revert it.
Signed-off-by: Masahiro Yamada
Cc: Simon Glass
Acked-by: Simon Glass
13 May, 2014
1 commit
-
Some platforms (tested on mpc85xx, mpc86xx) use global data before calling
function baord_inti_f(). The data should not be cleared later. Any arch
which uses global data in generic board board_init_f() should define
CONFIG_SYS_GENERIC_GLOBAL_DATA.Signed-off-by: York Sun
CC: Scott Wood
CC: Simon Glass
CC: Albert ARIBAUD
Acked-by: Simon Glass
10 May, 2014
3 commits
-
Signed-off-by: Masahiro Yamada
Cc: Simon Glass
Acked-by: Simon Glass -
Prior to commit 33a02da0, all boards must have board/${BOARD}/
or board/${VENDOR}/${BOARD}/ directory.
Now this rule is obsolete.It looks weird that sandbox defines "vendor" and "board" just for
meeting the old U-Boot directory structure.Signed-off-by: Masahiro Yamada
Cc: Simon Glass -
Some machines do not have SDL libraries installed, and it is still useful
to build sandbox without LCD/keyboard support.Add an option for this, used as follows:
make sandbox_config all NO_SDL=1
Signed-off-by: Simon Glass
18 Mar, 2014
9 commits
-
When jumping from one sandbox U-Boot to another in sandbox, the RAM buffer
is preserved in the jump by using a temporary file. Add an option to tell
the receiving U-Boot to remove this file when it is no longer needed.Similarly the old U-Boot image is left behind in this case. We cannot delete
it immediately since gdb cannot then find its debug symbols. Delete it just
before exiting.Together these changes ensure that temporary files are removed both for
memory and U-Boot.Signed-off-by: Simon Glass
-
It is useful for Cltl-C to be handled by U-Boot as it is on other boards.
But it is also useful to be able to terminate U-Boot with Ctrl-C.Add an option to enable signals while in raw mode, and make this the
default. Add an option to leave the terminal cooked, which is useful for
redirecting output.Signed-off-by: Simon Glass
-
Add a simple LCD driver which uses SDL to display the image. We update the
image regularly, while still providing for reasonable performance.Adjust the common lcd code to support sandbox.
For command-line runs we do not want the LCD to be displayed, so add a
--show_lcd option to enable it.Tested-by: Che-Liang Chiou
Signed-off-by: Simon Glass -
Add a sound driver for sandbox, which uses SDL.
Tested-by: Che-Liang Chiou
Signed-off-by: Simon Glass -
SDL (Simple DirectMedia Layer - see www.libsdl.org) is a library which
provides simple graphics and sound features. It works under X11 and also
with a simple frame buffer interface. It is ideally suited to sandbox
U-Boot since it fits nicely with the low-level feature set required by
U-Boot. For example, U-Boot has its own font drawing routines, its own
keyboard processing and just needs raw sound output.We can use SDL to provide emulation of these basic functions for sandbox.
This significantly expands the testing that is possible with sandbox.Add a basic SDL library which we will use in future commits.
Tested-by: Che-Liang Chiou
Signed-off-by: Simon Glass -
In order to support the 'go' command we allow the jumping U-Boot to pass its
filename to the new U-Boot image. This can then be used to delete that image
if required.Reviewed-by: Simon Glass
Tested-by: Che-Liang Chiou
Signed-off-by: Simon Glass -
For some tests it is useful to be able to run U-Boot again but pass on the
same memory contents. Add a function to achieve this.Reviewed-by: Simon Glass
Signed-off-by: Simon Glass -
Add an LCD display and keyboard to the sandbox device tree so that these
features can be used.Signed-off-by: Simon Glass
-
This function does not actually change the pointer contents, so use const
so that functions which have a const pointer do not need to cast.Signed-off-by: Simon Glass
07 Mar, 2014
1 commit
-
The unit-test for hush's "test -e" currently relies upon being run in
the U-Boot build directory, because it tests for the existence of a file
that exists in that directory.Fix this by explicitly creating the file we use for the existence test,
and deleting it afterwards so that multiple successive unit-test
invocations succeed. This required adding an os.c function to erase
files.Reported-by: Simon Glass
Signed-off-by: Stephen Warren
05 Mar, 2014
2 commits
-
Convert sandbox over to use driver model GPIOs.
Signed-off-by: Simon Glass
-
Add support for building a device tree for sandbox's CONFIG_OF_HOSTFILE
option to make it easier to use device tree with sandbox.This adjusts the Makefile to build a u-boot.dtb file which can be passed
to sandbox U-Boot with:./u-boot -d u-boot.dtb
Signed-off-by: Simon Glass
26 Feb, 2014
1 commit
-
Move sandbox-specific link rule to arch/sandbox/config.mk.
Signed-off-by: Masahiro Yamada
20 Feb, 2014
2 commits
-
Now we are ready to switch over to real Kbuild.
This commit disables temporary scripts:
scripts/{Makefile.build.tmp, Makefile.host.tmp}
and enables real Kbuild scripts:
scripts/{Makefile.build,Makefile.host,Makefile.lib}.This switch is triggered by the line in scripts/Kbuild.include
-build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
+build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build objWe need to adjust some build scripts for U-Boot.
But smaller amount of modification is preferable.Additionally, we need to fix compiler flags which are
locally added or removed.In Kbuild, it is not allowed to change CFLAGS locally.
Instead, ccflags-y, asflags-y, cppflags-y,
CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o
are prepared for that purpose.Signed-off-by: Masahiro Yamada
Tested-by: Gerhard Sittig -
This commit changes the working directory
where the build process occurs.Before this commit, build process occurred under the source
tree for both in-tree and out-of-tree build.That's why we needed to add $(obj) prefix to all generated
files in makefiles like follows:
$(obj)u-boot.bin: $(obj)u-bootHere, $(obj) is empty for in-tree build, whereas it points
to the output directory for out-of-tree build.And our old build system changes the current working directory
with "make -C " syntax when descending into the
sub-directories.On the other hand, Kbuild uses a different idea
to handle out-of-tree build and directory descending.The build process of Kbuild always occurs under the output tree.
When "O=dir/to/store/output/files" is given, the build system
changes the current working directory to that directory and
restarts the make.Kbuild uses "make -f $(srctree)/scripts/Makefile.build obj="
syntax for descending into sub-directories.
(We can write it like "make $(obj)=" with a shorthand.)
This means the current working directory is always the top
of the output directory.Signed-off-by: Masahiro Yamada
Tested-by: Gerhard Sittig
30 Jan, 2014
1 commit
-
Commit cbe5cdfcd changed config.mk and arch/sandbox/cpu/Makefile
to use -idirafter instead of -I and remove -nostdinc.But
* Sandbox-specific code dirties config.mk
* os.c is compiled without such compiler flags as:
-Wall -Wstrict-prototypes -Wno-format-security
-fno-builtin -ffreestanding -fno-stack-protector
-fstack-usage -Wno-format-nonliteralThis commit use -idirafter and remove the -nostdinc
differently and more simply.Signed-off-by: Masahiro Yamada
Acked-by: Simon Glass
25 Jan, 2014
1 commit
-
The function os_free() returns nothing.
Its return type should be "void" rather than "void *".Signed-off-by: Masahiro Yamada
09 Jan, 2014
9 commits
-
This function is defined but has no prototype declaration. Add it.
Signed-off-by: Simon Glass
Signed-off-by: Simon Glass -
It is often useful to be able to save out the state from a sandbox test
run, for analysis or to restore it later to continue a test. Add generic
infrastructure for doing this using a device tree binary file. This is
a flexible tagged file format which is already supported by U-Boot, and
it supports hierarchy if needed.Signed-off-by: Simon Glass
Signed-off-by: Simon Glass
Reviewed-by: Hung-ying Tyan -
It is useful to be able to save and restore the RAM contents of sandbox
U-Boot either for setting up tests, for later analysys, or for chaining
together multiple tests which need to keep the same memory contents.Add a function to provide a memory file for U-Boot. This is read on
start-up and written when shutting down. If the file does not exist
on start-up, it will be created when shutting down.Signed-off-by: Simon Glass
Signed-off-by: Simon Glass -
Normally when U-Boot starts with a command (-c option) it quits when the
command completes. Normally this is what is requires, since the test is
likely complete.Provide an option to jump into the console instead, so that debugging or
other tasks may be performed before quitting.Signed-off-by: Simon Glass
Signed-off-by: Simon Glass -
With sandbox, errors and problems may be reported before console_init_f()
is executed. For example, an argument may not parse correctly or U-Boot may
panic(). At present this output is swallowed so there is no indication what
is going wrong.Adjust the console to deal with a very early sandbox setup, by detecting that
there is no global_data yet, and calling os functions in that case.Signed-off-by: Simon Glass
Signed-off-by: Simon Glass -
When sandbox does a 'bootm' to run a kernel we cannot actually execute it.
So just exit sandbox, which is essentially what U-Boot does on other archs.
Also, allow sandbox to use bootm on any kernel, so that it can be used
to test booting of kernels from any architecture.Signed-off-by: Simon Glass
Signed-off-by: Simon Glass -
The execution flow becomes easier if we can return from board_init_f()
as ARM does. We can control things from start.c instead of having to
call back into that file from other places.Signed-off-by: Simon Glass
Signed-off-by: Simon Glass -
The is displayed for options with no argument, and omitted for those
with an argument. Swap this around.Signed-off-by: Simon Glass
Signed-off-by: Simon Glass -
Implement realloc() and free() for sandbox, by adding a header to each
block which contains the block size.Signed-off-by: Simon Glass
Signed-off-by: Simon Glass
Reviewed-by: Che-Liang Chiou
Reviewed-by: Hung-ying Tyan
10 Dec, 2013
2 commits
-
This adds a SPI framework for people to hook up simulated SPI clients.
Signed-off-by: Mike Frysinger
Signed-off-by: Simon Glass -
The new name is longer but more clearly related to sandbox.
This is in a separate patch within the same series since some comments on the
SPI series rely on it.Signed-off-by: Simon Glass
Reviewed-by: Hung-ying Tyan
22 Nov, 2013
1 commit
-
Very often a constant pointer is passed to this function, so we should
declare this, since map_to_sysmem() does not change the pointer.Signed-off-by: Simon Glass