grub2: add a configuration option to embed a config file

Add an option for embedding a config file directly in grub.

Signed-off-by: Dima Zavin <dmitriyz@google.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
yaffs2utils: new package

[Thomas: remove target variant of the package, use labelled version
0.2.9 instead of latest.tar.gz, use 'make install' instead of doing
manual installation, add license informations.]

Signed-off-by: Will Wagner <willw@carallon.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
yaffs2: new filesystem type

[Thomas: remove BR2_TARGET_ROOTFS_YAFFS_PATH option, rename to yaffs2
instead of yaffs.]

Signed-off-by: Will Wagner <willw@carallon.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
python: do not rely only on LIBRARY_PATH for old compilers

The cross-compilation improvements integrated in Python rely on the
compiler exposing a line starting with LIBRARY_PATH when called with
-E -v. This is used by Python setup.py to find the installation
locations of libraries.

However, this LIBRARY_PATH line is not shown by very old compilers,
such as the gcc 4.2.x compiler used on the AVR32 architecture. This
causes libraries installed in the sysroot, such as libffi, to not be
detected by the setup.py script.

To fix this problem, this patch adds addtional logic to setup.py,
which consists in deriving the library paths from the sysroot
location, if no LIBRARY_PATH field was found.

Fixes:

  http://autobuild.buildroot.org/results/1aa/1aad2d677dbf7b0a3cb0120a35f45123124f51ab/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
python3: do not rely only on LIBRARY_PATH for old compilers

The cross-compilation improvements integrated in Python rely on the
compiler exposing a line starting with LIBRARY_PATH when called with
-E -v. This is used by Python setup.py to find the installation
locations of libraries.

However, this LIBRARY_PATH line is not shown by very old compilers,
such as the gcc 4.2.x compiler used on the AVR32 architecture. This
causes libraries installed in the sysroot, such as libffi, to not be
detected by the setup.py script.

To fix this problem, this patch adds addtional logic to setup.py,
which consists in deriving the library paths from the sysroot
location, if no LIBRARY_PATH field was found.

Fixes:

  http://autobuild.buildroot.org/results/7a6/7a65e381cc04bf8f74fd63a6dcda502f3c26aeef/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
python: fix readline extension compilation with readline 6.3

Signed-off-by: Ivan Sergeev <vsergeev@kumunetworks.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
postgresql: new package

Based on suggested new package by Marco Trapanese ([1]).

[1] http://lists.busybox.net/pipermail/buildroot/2014-February/090661.html

[Thomas: make it only available with glibc toolchains.]

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
pkg-utils: introduce a make-based LOWERCASE function

Until now, our UPPERCASE function was implemented purely in make for
performance reasons, but our LOWERCASE function was implemented by
calling "tr", which was reasonable due to the fact that LOWERCASE was
rarely used, but future changes might make a more heavy usage of the
LOWERCASE macro.

We want this LOWERCASE function to turn a "_" into a "-" and not a
".", so we slightly adjust the existing FROM and TO lists to make this
possible. This doesn't change the behavior of the UPPERCASE macro
because both "-" and "." are converted into "_" by this function.

This change takes advantage of suggestions made by Arnout
Vandecappelle, who said they further improve the performance of
UPPERCASE and LOWERCASE by 30%/40%.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
pkg-cmake.mk: replace "echo -en" with printf

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
pkg-cmake.mk: remove unneeded quotes in the generated toolchainfile.cmake

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
pkg-cmake.mk: do not hardcode absolute path in toolchainfile.cmake

The patch allows sharing or moving the toolchains.

This is a step toward making the toolchain/sdk relocatable.

Closes #6818

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: Uwe Strempel <u.strempel@googlemail.com>

---
changes v1 -> v2:
- use CMAKE_CURRENT_LIST_DIR instead of get_filename_component()
pkg-cmake.mk: enable ccache for cmake packages

This patch updates the generated toolchainfile.cmake to use ccache.

When toolchainfile.cmake is used inside Buildroot, using ccache during
the build is driven by a CMake knob: USE_CCACHE, automatically set by
the cmake-package infrastructure and reflecting the BR2_CCACHE value.

Since this toolchainefile.cmake file can be used outside Buildroot, and
this file also set a couple of things (among these: the sysroot cflag,
some pkg-config environment variables), it is important to set the
compiler variables as well to keep the consistency of the
cross-compilation configuration.
So, when it is used outside Buildroot, using ccache for the build is
driven by the ccache program availability.

Note that using ccache for the build is achieved by setting the *_ARG1
CMake variables to let CMake use ccache without failing in detecting
the compiler.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Luca Ceresoli <luca@lucaceresoli.net>

---
changes v2 -> v3 (Samuel):
- inline the -DUSE_CCACHE=... in the configure commands.
- always set the compiler variables, even when called for outside
  Buildroot.
- update commit message

changes v1 -> v2 (Luca):
- totally reimplemented based on Samuel's suggestion;
- added dependency on host-ccache for cmake packages if ccache is
  enabled.
pkg-cmake.mk: cosmetic changes in the generated toolchainfile.cmake file

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
pkg-cmake.mk: set additional variables in toolchainfile.cmake

Set binutils programs CMake variables in the toolchainfile.cmake file.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
pkg-cmake.mk: globally disable BUILD_TESTING flag

This CMake flag is used to enable tests. It may not disable the test
programs from being built, but it controls the test execution.

Since we don't care about building the tests (and usually disable them
when possible), make sure Buildroot won't try to run them.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
pkg-cmake.mk: globally drive the CMAKE_BUILD_TYPE flag using BR2_ENABLE_DEBUG

This CMake flag is usually used to adjust compiler flags (like: -Ox, -g,
etc).

So, it makes sense for Buildroot to globally drive this CMake flags in
the cmake-package infrastructure.

However, if a package prefer overriding this default setting, it still
can via the <PKG>_CONF_OPT variable.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
openpowerlink: do not override CMAKE_BUILD_TYPE

This flag is already correctly set by the cmake-package infrastructure.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
opencv: do not override CMAKE_BUILD_TYPE

This flag is already correctly set by the cmake-package infrastructure.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
flann: do not override CMAKE_BUILD_TYPE

This flag is already correctly set by the cmake-package infrastructure.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
qhull: do not override CMAKE_BUILD_TYPE

This flag is already correctly set by the cmake-package infrastructure.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>