Go to file
Thomas De Schampheleire baae5156ce uboot: use local fdt headers
After commit b8c3e94173 ("package/dtc: qemu system build need libfdt")
changed the dtc install target from 'install-bin' to 'install', uboot
compilation failures occurred because libfdt related headers were now
suddenly taken from output/host/include rather than from the uboot sources
itself.

Commit 3a6573ccee ("uboot: use local libfdt.h") solved this by patching
one specific uboot source file, tools/fdtgrep.c, to replace '<...>'-style
includes by '"..."'-style includes.

However, depending on the uboot version, this may not be enough: there may
be other references to fdt header files. In particular taking into account
that it is not uncommon to have vendor-provided uboot trees which have
custom changes.

The root of the problem is that the uboot.mk file passes the host compiler
as follows:
	UBOOT_MAKE_OPTS += \
		...
		HOSTCC="$(HOSTCC) $(HOST_CFLAGS)" \
		...
where HOST_CFLAGS contains the string '-I$(HOST_DIR)/include'
The uboot makefiles then use constructs of the form:
	$(CC) $(CPPFLAGS) $(CFLAGS) .....
where CPPFLAGS may contain -I references pointing to local directories.

On the expanded compiler command-line, Buildroot's '-I$(HOST_DIR)/include'
is thus present _before_ any -I to local directories, and thus takes
precedence.  And that becomes a problem for header files present both
locally as in the Buildroot host directory, which is the case for libfdt.

To fix this problem without having to patch u-boot sources, use '-idirafter'
rather than '-I' to pass the Buildroot host include directory. '-idirafter'
is basically the same thing, but adds the specified directory at the end
of the include precedence chain, rather than at the beginning.

Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-02-25 22:40:17 +01:00
arch
board qemu_x86: use kernel 4.15 2018-02-03 08:25:25 +01:00
boot uboot: use local fdt headers 2018-02-25 22:40:17 +01:00
configs configs: add pylibfdt where necessary 2018-02-13 23:16:55 +01:00
docs website: update package number text 2018-02-25 21:54:57 +01:00
fs fs: pass EXTRA_ENV to post-fakeroot script 2018-01-15 21:37:39 +01:00
linux linux: bump default to version 4.15.5 2018-02-22 23:18:05 +01:00
package libglib2: don't override ac_cv_func_strerror_r_char_p 2018-02-25 22:32:16 +01:00
support support/testing: fix job check-gitlab-ci.yml 2018-02-13 23:12:00 +01:00
system system: only expose getty options for busybox and sysvinit 2018-01-12 22:07:59 +01:00
toolchain toolchain: add 4.15.x choice for headers 2018-01-28 23:48:21 +01:00
utils utils/genrandconfig: check core-dependencies 2018-02-08 22:20:08 +01:00
.defconfig
.flake8
.gitignore
.gitlab-ci.yml support/testing: fix job check-gitlab-ci.yml 2018-02-13 23:12:00 +01:00
.gitlab-ci.yml.in gitlab-ci: use new, tagged image 2018-02-05 22:38:30 +01:00
CHANGES Update for 2018.02-rc2 2018-02-15 23:03:43 +01:00
Config.in security hardening: add RELFO, FORTIFY options 2018-01-28 15:21:14 +01:00
Config.in.legacy linux-headers: drop old unsupported 3.x versions 2018-02-04 00:02:35 +01:00
COPYING
DEVELOPERS DEVELOPERS: Free Electrons is now Bootlin 2018-02-14 21:30:22 +01:00
Makefile Update for 2018.02-rc2 2018-02-15 23:03:43 +01:00
Makefile.legacy
README

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on Freenode IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches