path: root/arch/sandbox/cpu/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* sandbox: eth: Add a bridge to a real network for sandboxJoe Hershberger2015-04-181-0/+10
| | | | | | | | | | | | | | Implement a bridge between U-Boot's network stack and Linux's raw packet API allowing the sandbox to send and receive packets using the host machine's network interface. This raw Ethernet API requires elevated privileges. You can either run as root, or you can add the capability needed like so: sudo /sbin/setcap "CAP_NET_RAW+ep" /path/to/u-boot Signed-off-by: Joe Hershberger <> Reviewed-by: Simon Glass <>
* sandbox: Add SDL library for LCD, keyboard, audioSimon Glass2014-03-171-0/+3
| | | | | | | | | | | | | | | | | SDL (Simple DirectMedia Layer - see 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 <>
* kbuild: use Linux Kernel build scriptsMasahiro Yamada2014-02-191-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now we are ready to switch over to real Kbuild. This commit disables temporary scripts: scripts/{,} and enables real Kbuild scripts: scripts/{,,Makefile.lib}. This switch is triggered by the line in scripts/Kbuild.include -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/ obj +build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/ obj We 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 <>
* kbuild: change out-of-tree buildMasahiro Yamada2014-02-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-boot Here, $(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 <sub-dir>" 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/ obj=<sub-dir>" syntax for descending into sub-directories. (We can write it like "make $(obj)=<sub-dir>" 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 <>
* sandbox: Use system headers first for sandbox's os.c in a different wayMasahiro Yamada2014-01-291-4/+4
| | | | | | | | | | | | | | | | | | Commit cbe5cdfcd changed and arch/sandbox/cpu/Makefile to use -idirafter instead of -I and remove -nostdinc. But * Sandbox-specific code dirties * 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-nonliteral This commit use -idirafter and remove the -nostdinc differently and more simply. Signed-off-by: Masahiro Yamada <> Acked-by: Simon Glass <>
* sandbox: Use system headers first for sandbox's os.cSimon Glass2013-11-211-2/+4
| | | | | | | | | | | | This file must be compiled with system headers, even if U-Boot has headers of the same name. The existing solution for this is good enough for libfdt, but fails when we have headers like stdint.h in U-Boot. Use -idirafter instead of -I, and remove the -nostdinc and other things that we don't want for this file. The best way to do this is to keep a copy of the original flags, rather than trying to filter them later. Signed-off-by: Simon Glass <>
* sandbox: convert makefiles to Kbuild styleMasahiro Yamada2013-10-311-22/+1
| | | | | | Signed-off-by: Masahiro Yamada <> Cc: Simon Glass <> Acked-by: Simon Glass <>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <>
* sandbox: add concept of sandbox stateSimon Glass2012-03-121-1/+1
| | | | | | | | | | | | 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 <> Signed-off-by: Mike Frysinger <>
* sandbox: fix compiling of cpu/os.cAndreas Bießmann2011-12-101-3/+4
| | | | | | | | | | | | | | | | | | | | | | | 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 <> Signed-off-by: Mike Frysinger <>
* sandbox: Add main programSimon Glass2011-10-171-1/+1
| | | | | | Add a main program so that we can run U-Boot. Signed-off-by: Simon Glass <>
* sandbox: Add OS dependent layerSimon Glass2011-10-171-1/+4
| | | | | | | 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 <>
* sandbox: Add cpu filesSimon Glass2011-10-171-0/+47
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 <>
OpenPOWER on IntegriCloud