Dracut is the tool used by desktop distributions to build initrds.
In the embedded world, it can be very useful, too, for instance when
wanting to create an initramfs for a system recovery mode.
Whereas it is definitively possible to achieve this with buildroot, the
process is to have a dedicated buildroot configuration for that, and
perform a full build. Instead of doing that, dracut can pick the needed
binaries/shared libraries, configuration files, or kernel modules from
the 'target' directory.
The advantage is to save build time, and also to have a consistency
between the packages versions taken for the recovery and the production
filesystem.
The principle of dracut is based on the so-called 'dracut modules'. The
modules determine what will be included in the initramfs. For example,
one of dracut's modules checks the kernel modules that are included and
also includes the corresponding firmware blobs.
On the host, they are on host/lib/dracut/modules.d
Each directory as a prefix number for the order of execution, and
at least a "module-setup.sh" script.
Dracut sources all of them, and typically calls the "check()" function,
which is the placeholder for required binaries (that are aimed to be
polulated in the initrd), then the "depends()" function, that lists
other modules to depend on, and the "install()" function, that makes
the actual work.
Dracut was initially thought to work with systems using systemd,
but it can also work without it. Do to so, every "systemd-xxx"
module must be disabled in the dracut configuration file. For
convenience, the 05busybox-init module is provided, to support
busybox init system. Note that this module should *not* be enabled when
using systemd init. It is therefore only installed if busybox init is
selected.
Musl and uClibc make assumptions about the existence of some symlinks
that are not discoverable with readelf. Therefore, another module
05libc-links is provided that creates those links. The module is
installed regardless of which libc is used - the script itself discovers
if the links need to be installed based on which libc is found.
Signed-off-by: Thierry Bultel <thierry.bultel@linatsea.fr>
[arnout@mind.be: many changes]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Adam Duskett <aduskett@gmail.com>
[yann.morin.1998@free.fr: some additional fixups]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This is perhaps the most controversial change for Buildroot that can
be written in a two-liner.
Historically, we have used uClibc as our default C library, as
Buildroot was created initially as a test-bed for uClibc, and also
because uClibc made a lot of sense for embedded Linux systems, due to
its smaller size and fine-grained configurability.
Since then, the landscape of embedded Linux systems has changed. Even
though Buildroot happily supports really low-end devices, the vast
majority of Buildroot users are quite certainly running the resulting
system on a reasonably powerful platform, with significant amount of
RAM and storage. In this context, the benefits of uClibc are no longer
that much relevant, and glibc causes less "troubles". Therefore, this
patch proposes to use glibc as our default C library when using the
internal toolchain backend instead of uClibc.
Of course, we will keep the support for uClibc, which remains an
important C library choice, for space-constrained systems, or simply
for architectures that are not supported by glibc.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Yann E. MORIN <yann.morin.1998@free.fr>
Acked-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
The Freescale extract helper was introduced before Freescale was part
of NXP. Nowadays, we also have NXP packages, and they do use the same
archiving format.
Rename the helper under the now more generic NXP name, so that it is
more logical to also use it for NXP packages. We do not retain the old
Freescale-based name, because we should no longer add Freescale-named
packages; they would most probably be introduced under the NXP name.
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
[yann.morin.1998@free.fr:
- provide the rationale in the commit log
- keep referring to Freescale in comment
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This helper was introduced before Freescale was part of NXP. Nowadays,
we have NXP packages, and they do use the same archiving format.
Move the Freescale-specific extract helper to a common location, so
that it can be used by other packages in the future.
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
[yann.morin.1998@free.fr: provide the rationale in the commit log]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Go 1.19 is a major release with changes to the implementation of the toolchain,
runtime, and libraries.
Dropped patch 0002-cmd-dist-use-gohostarch... as it was merged upstream.
https://go.dev/doc/go1.19
Signed-off-by: Christian Stewart <christian@paral.in>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
mips64 is supported since bump to version 1.6.9 in commit
cb648d12fa and
7f185d29aa
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
zstd is an optional dependency since bump to version 1.7.0 in commit
bbc52f3ff3 and
afd0a6db2a
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This option was needed to build versions of GDB < 10.x. As we just
dropped support for GDB 9.x, this logic can now be removed.
The special case to configure just gdbserver was only valid for gdb<10,
but was guarded by !GDB_TOPLEVEL (which was equivalent to gdb<10).
GDB_TOPLEVEL is now always true, so we can't hit that special case
anymore.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[yann.morin.1998@free.fr: add little blurb about gdbserver]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Now that GDB 12.x has been added, and GDB 9.x removed, we can make GDB
11.x the default version.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[yann.morin.1998@free.fr: split off to its own patch]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
The handling of the GMP dependency needs a bit of change. Until now,
the GMP dependency was needed when building full GDB (host or target)
in version 11.x or 12.x, so we were explicitly checking whether those
versions were enabled.
Now that only GDB 10.x and the ARC-specific version of GDB are the
only remaining ones not needing GMP, we invert the logic: only those
two versions do not trigger the addition of the GMP dependency.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[yann.morin.1998@free.fr: split off to its own patch]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Update hash for license file to account for an update in the (C) years.
Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
[yann.morin.1998@free.fr: update the license hash]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Commit 7ff21f8d4b (package/binutils: handle gprofng as an optional
feature) introduced the typo. Although it was noticed, the commit was
not amended before being pushed...
Fix that now...
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
It includes an option to build a command line program that can be used
to replace git in simple cases.
The upcoming sha256 repository support made them steal the sha256 code
from RFC6234, hence the license change.
Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
libgit2 is currently a library without any reverse dependencies so the
missing atomic symbols do not cause build failures yet.
libgit2 uses the atomics intrinsics on gcc >= 4.7 and the sync
intrinsics on previous gcc versions. Since gcc 4.9 is the new
minimum, ignore the sync intrinsics requirements.
The next version of libgit2 will also build a binary, which will
expose the problem.
Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
The new releases mostly contain bug fixes. The build system has been
prepared to use AppArmor library, but since actual support is still
missing it is not worth yet to enable build infrastructure in
Buildroot.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
binutils 2.39 added support for gprofng, a new profiler (see
https://www.phoronix.com/news/GNU-Profiler-gprofng).
This new profiler is enabled by default, but it requires bison on the
host.
In order to handle this, this commit:
- Adds a new option BR2_BINUTILS_GPROFNG, which allows to
enable/disable gprofng in host-binutils
- Unconditionnally disables gprofng for the target binutils, based on
the idea that in a Buildroot context the analysis of profiling data
is generally done on the host system. This can of course always be
revisited later by adding a new option to the target binutils
package.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Fix the following build failure raised since the addition of the package
in commit 736c4c1655:
Makefile:575: *** mysql is in the dependency chain of freeradius-server that has added it to its _DEPENDENCIES variable without selecting it or depending on it from Config.in. Stop.
Fixes:
- http://autobuild.buildroot.org/results/c3a9c3822b4599c1b16d27840b5663506e37a41f
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Pass LDFLAGS to avoid the following musl static build failure raised
since the addition of the package in commit
814911aecb:
/home/autobuild/autobuild/instance-5/output-1/host/lib/gcc/sh4eb-buildroot-linux-musl/11.3.0/../../../../sh4eb-buildroot-linux-musl/bin/ld: /home/autobuild/autobuild/instance-5/output-1/host/lib/gcc/sh4eb-buildroot-linux-musl/11.3.0/libgcc.a(unwind-dw2.o): in function `size_of_encoded_value':
/home/autobuild/autobuild/instance-5/output-1/build/host-gcc-final-11.3.0/build/sh4eb-buildroot-linux-musl/libgcc/../../../libgcc/unwind-pe.h:89: undefined reference to `abort'
Fixes:
- http://autobuild.buildroot.org/results/bf041723ed813746c61892262630a3ac2bc43b14
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Fix the following build failure without threads raised since bump to
version 0.6.0 in commit 017dbc770c and
4a4331f2f2:
CMake Error at /home/giuliobenetti/autobuild/run/instance-1/output-1/build/glog-0.6.0/CMakeFiles/CMakeTmp/CMakeLists.txt:18 (add_executable):
Target "cmTC_ed950" links to target "Threads::Threads" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
Fixes:
- http://autobuild.buildroot.org/results/bf0846a51da69169286c7af38089d204d3d242d1
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
luajit supports aarch64_be since commit
28e5c2f2bd
However this raise a build failure with ljsyscall because aarch64_be
directory does not exist so use arm64 instead
/usr/bin/install: cannot stat '/home/buildroot/autobuild/instance-1/output-1/build/ljsyscall-0.12/syscall/linux/aarch64_be/*.lua': No such file or directory
Fixes:
- http://autobuild.buildroot.org/results/78397c83e84dbfc09990f92be93e0b8a10d014c5
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Bump the kernel version for all riscv nommu configs from 5.18 to 5.19.
That way, we can remove the one and only riscv nommu patch,
since this patch is included in kernel 5.19.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This series fixes a fatal error at link time on m68k, xtensa,
and riscv64, caused by a bad upstream elf2flt commit.
Without this patch, m68k, xtensa, and riscv64 would result in
a fatal error:
ERROR: text=0x3bab8 overlaps data=0x33f60 ?
With this patch, qemu_m68k_mcf5208_defconfig,
qemu_riscv64_nommu_virt_defconfig, and
qemu_xtensa_lx60_nommu_defconfig builds properly.
riscv64 and m68k boots to login prompt.
xtensa crashes when loading init, the same behavior as when
reverting the bad upstream elf2flt commit completely.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Remove broken elf2flt patch:
package/elf2flt/0003-elf2flt-fix-.eh_frame-section-handling.patch
The patch modifies main(), but does not perform a similar change in
output_relocs(), which might cause sectionp in output_relocs() to be
initialized with an invalid address, causing random memory to be
overwritten.
This leads to a segfault when linking e.g. busybox for m68k.
We cannot perform a similar change in output_relocs(), since at this
point in time, data_len will always be non-zero.
Revert this patch completely, so that we can add a working patch.
Note that even with this patch reverted, elf2flt is still broken
on archs like m68k and xtensa, resulting in the fatal error:
ERROR: text=0x3bab8 overlaps data=0x33f60 ?
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
From the release notes:
================================================================================
Redis 7.0.4 Released Monday Jul 18 12:00:00 IST 2022
================================================================================
Upgrade urgency: SECURITY, contains fixes to security issues.
Security Fixes:
* (CVE-2022-31144) A specially crafted XAUTOCLAIM command on a stream
key in a specific state may result with heap overflow, and potentially
remote code execution. The problem affects Redis versions 7.0.0 or newer.
Signed-off-by: Titouan Christophe <titouanchristophe@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>