summaryrefslogtreecommitdiffstats
path: root/arch/sandbox/cpu/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* 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/{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 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 <yamada.m@jp.panasonic.com> Tested-by: Gerhard Sittig <gsi@denx.de>
* 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/Makefile.build 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 <yamada.m@jp.panasonic.com> Tested-by: Gerhard Sittig <gsi@denx.de>
* sandbox: Use system headers first for sandbox's os.c in a different wayMasahiro Yamada2014-01-291-4/+4
| | | | | | | | | | | | | | | | | | 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-nonliteral This commit use -idirafter and remove the -nostdinc differently and more simply. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* 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 <sjg@chromium.org>
* sandbox: convert makefiles to Kbuild styleMasahiro Yamada2013-10-311-22/+1
| | | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* 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: 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 <sjg@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* 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 <biessmann@corscience.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* 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 <sjg@chromium.org>
* 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 <sjg@chromium.org>
* 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 <sjg@chromium.org>
OpenPOWER on IntegriCloud