Newer kernels had a slight change in the random number API so the OCF
patchset requires a slight tweak to build and run properly.
Affected kernels are, per series:
>=3.0.41, >=3.2.29, >=3.4.9, >=3.5.2 and any newer version.
The fix is applied by detecting the API change rather than guessing the
kernel version.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The Xtensa architecture had been removed because it required special
handling and depended on additional directories and files that became
obsolete over time. This change is more aligned to other architectures.
[Thomas: rebased on top of the "arch: improve definition of gcc mtune,
mcpu, etc." patch].
Signed-off-by: Chris Zankel <chris@zankel.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
As stated in commit 555c2585bf, the
Xtensa architecture has been introduced in 2009 and never changed
since its initial introduction. It requires some special handling that
is a bit annoying, and despite our call to the initial developers, and
the announcement of the deprecation of the architecture during the
2012.05, nothing has happened. Therefore, drop support for this
architecture.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: me
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Consist with other architectures.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This patch adds support for the ARM-only appended device tree
mechanism present in the kernel.
This option allows to add at the end of the kernel image the
device tree blob so that we can still boot device tree enabled
kernels with old bootloaders.
This patch also adds the needed logic to genereate such an image
when building zImages or uImages, also adding the necessary parts
to rebuild the uImage.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This patch introduces the BR2_LINUX_KERNEL_UBOOT_IMAGE boolean to
factorize more code that will be shared in the next patches that
introduces other uImage-like targets.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This patch introduces some support for device tree-enabled kernels.
It replaces the former BR2_LINUX_KERNEL_DTS_FILE option that was
microblaze-only, that was quite limited. This option was quite
limited, first obviously because it was restricted to microblaze,
but also because it targetted only external device tree source files,
and allowed only to build simpleImages using the custom image name
mechanism.
This patch adds a much more generic one, that can work on basically
every architecture that supports device tree. It allows to build
both device tree source file that comes with the kernel source or to
set the path to the device tree file to use so that one can use a
custom device tree.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This is way too specific to microblaze-only. Remove this support to
introduce a more generic way to do support device tree kernels.
This reverts commit aaed42d156.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The help text of BR2_LINUX_KERNEL_DEFCONFIG is confusing: it seems to
point to the defconfigs in the buildroot tree. So explicitly refer to
the kernel tree in the help text.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Having dtc as a host tool can be useful for users that have a custom
boot scenario where the device tree is not embedded in the kernel.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Add the ocf-linux package and linux kernel extension.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This patch improves two things:
* It makes sure that the linux-menuconfig and al. commands can be
executed even if the user hasn't executed 'make' before. Until now,
the commands were depending on the .configured stamp, which is not
sufficient since the linux package has been converted to the
GENTARGETS infrastructure. Instead, depend on the linux-configure
phony target.
* It makes sure that those commands are not available when the Linux
package is not selected, just like we do for Barebox.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
test should exit with Exit-Code 0 if no .ub-File present and copy the
file if Exit-Code 1, otherwise make fails
Signed-off-by: Markus Kaindl <markus.kaindl@stusta.mhn.de>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This patch adds the options needed to build the SimpleImage containing
the device tree structure needed for the Microblaze architecture.
Handling Device Tree and SimpleImage will be handled in a general way
in the future.
I provide this patch to be able to build the system in the meantime.
Signed-off-by: Stephan Hoffmann <sho@relinux.de>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This modifies the definition of DOWNLOAD to receive two arguments:
the first one is the full URL of the file to download, whereas the second
(and optional) is the name the file will have once downloaded.
Same thing with the SOURCE_CHECK_WGET and SCP functions.
All calls to these functions have been changed to the shortest form of
the new API, except for toolchains acquisition. Since there is quite a
number of different toolchains this call to DOWNLOAD is better set to the
generic one.
Signed-off-by: Alvaro G. M <alvaro.gamez@hazent.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: Stephan Hoffmann <sho@relinux.de>
Downloading Microblaze LE toolchain works on a clean install
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Drop the patch for kernel >= 3.3
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
There already is a default kernel version, so it makes little sense to have
a default custom kernel version as well. This default breaks the 'make
savedefconfig' if we want to force a specific version.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The 'vmlinux' target in the linux build directory is a generic target. It may
not be directly bootable for all architectures, but for projects where a custom
bootloader is used, it can be of value.
Previously, this target was only available for mips architectures. This patch
removes this restriction.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
In analogy to build targets uclibc-update and busybox-update, add
extra targets to copy the current configuration to the custom
configuration file set in buildroot. These targets facilitate the
work of developers adding support for a specific board.
linux-update-config copies .config directly.
linux-update-defconfig first creates a defconfig and copies that.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Kelvin Cheung <keguang.zhang@gmail.com>
Acked-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The vmlinux kernel target is valid for powerpc kernels too.
In fact this broke the qemu sample config.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Bump default kernel vesion to 3.1 to match headers.
Also implement downloads for 3.x series kernels.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Thanks to the pkgparentdir and pkgname functions, we can rewrite the
GENTARGETS macro in a way that avoids the need for each package to
repeat its name and the directory in which it is present.
[Peter: pkgdir->pkgparentdir]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
An initramfs is in fact the same as a cpio archive, but embedded in
the kernel. So instead of duplicating the cpio infrastructure,
we can simply build images/rootfs.cpio and link that into the
kernel.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The post extract hook point is not really correct as what RTAI and
Xenomai extensions are doing is patching the kernel.
The post patch hook point doesn't work, because RTAI and Xenomai
patches would be applied *after* all other patches, while it sounds
more logical to apply them first, and *then* allow the user to apply
some platform/board specific patches if needed.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
[Fixes by Thomas, including comments from Arnout:
* Use AUTOTARGETS instead of GENTARGETS
* Use $(KERNEL_ARCH) instead of $(BR2_ARCH) as argument to the
prepare-kernel.sh script. This allows the arch name to be fixed
with the usual sed expressions and the quotes to be stripped.
* Add the --verbose option to prepare-kernel.sh. This allows to get
some clear error message when no Xenomai patch has been found for
the current kernel version.
* Improve the help texts as suggested by Arnout, and remove the
now useless README file.
* Add a BR2_PACKAGE_XENOMAI_SMP option, instead of poking inside the
kernel configuration to find out whether SMP is enabled or
not. This cannot work because: 1) the kernel might be built
outside of Buildroot and 2) if the kernel is built inside
Buildroot, it is built *after* Xenomai, so the kernel
configuration file is typically not yet present.
* Simplify the ARM subarchitecture selection as suggested by Arnout.
* Remove the documentation and development files according to
Buildroot standards (using BR2_HAVE_DOCUMENTATION and
BR2_HAVE_DEVFILES).
* Simplify the /etc/ld.so.conf modification logic.
]
[Peter: whitespace fixes]
Signed-off-by: Benoit Mauduit <benoit.mauduit@openwide.fr>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Add a kernel sub-menu (called "Linux Kernel Extensions"), which makes
possible to patch it or tweak the kernel build step.
* All linux/linux-ext-*.mk files will be read by the make process.
* The menu can be customized in "linux/Config.ext.in".
[Peter: small fixes]
Signed-off-by: Benoit Mauduit <benoit.mauduit@openwide.fr>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The name "patch-kernel.sh" is a bit stupid, since this script is used
to patch everything in Buildroot, not only kernel trees.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Move fw_printenv / fw_setenv options from the uboot bootloader build to
the uboot-mkimage package, and rename it to uboot-tools.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
The assumption that all kernels are in
http://www.kernel.org/pub/linux/kernel/v2.6/ is no longer true:
versions 3.x are in separate directories.
We now compute the directory name from the major and minor versions of
the version provided by the user. This assumes that the 3.1 version
will be in a /v3.1/ directory, which we don't know yet because the 3.1
cycle hasn't started yet.
At the same time, we add support for the official -rcX versions.
Patch tested by compiling 3.0-rc6, which Buildroot has successfully
downloaded and built.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
As the kernel and bootloaders do not use the normal BR2_PACKAGE_*
Kconfig options, their target name was not automatically added to the
global TARGETS variable. Each bootloader .mk and the linux.mk had to
add their own target manually to TARGETS, and the package
infrastructure was making tests on non-existing Kconfig variables.
This commit improves the package infrastructure so that it looks at
BR2_PACKAGE_<pkg> for packages, BR2_TARGET_<pkg> for bootloaders and
at the special BR2_LINUX_KERNEL for the linux package.
This allows to simplify a little bit the bootloaders and linux .mk
files.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
[Peter: always copy to output/images as requested by Luca]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Four methods for the creation of device files in /dev are now
proposed:
- static method uses device table as before
- devtmpfs method enables this feature in kernel
- mdev method adds mdev starting script to the file system
and selects mdev itself for installation
- udev method selects udev for installation
All dynamic methods are based on devtmpfs, so one doesn't need to care
about /dev folder.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This is useful for ARCHes like PowerPC that have a whole lot of
special targets for each different board. The kernel image target
tells make which OpenFirmware machine description file is combined into
the kernel binary.
[Peter: fix long lines]
Signed-Off-By: Martin Hicks <mort@bork.org>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>