Move the code that retrieves the SPDX licenses into a function instead of
doing it top-level.
This allows to pass the CycloneDX version as a function argument instead
of defining it as a top-level constant.
The next commit introduces support for different CycloneDX spec versions.
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
Commit [1] introduced a code block that references
'urllib.error.URLError'. There is no explicit import of 'urllib.error'.
While this is not an issue in practice, ruff complains that the import
is not explicit.
[1] 17c9deb115 utils/generate-cyclonedx: hint at missing Buildroot host package on a specific error
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
The commit [1] fixed a formatting bug with the SCP style git sites
declaration.
Add this style of link to the test case to keep a track of it.
[1] ebcfdb8b0a utils/generate-cyclonedx: fixup scp-style git sites
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
The Linux kernel exposes a CEC API since v4.10. Support only grows the
library with ~3%, so unconditionally enable support for it when building
with new enough kernel headers:
-rwxr-xr-x 1 peko peko 594K Oct 10 18:53 usr/lib/libcec.so.8.1.7.without
-rwxr-xr-x 1 peko peko 614K Oct 10 18:53 usr/lib/libcec.so.8.1.7.with
Reported-by: Stefan Ott <stefan@ott.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
fexecve was added to uClibc in 2019 in commit
858ffad217076227089cc17eb832db0bd1497792.
Also containerd and docker can be used with uClibc.
Runtime tested on a Raspberry PI4 (64 Bit).
System compiled with Bootlin Toolchain.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
iproute2's configure script enables HAVE_RPC as soon as libtirpc is
found, and misc/ss.c then calls getrpcbynumber() from its RPC service
resolver. Since the bump of libtirpc to version 1.3.7 in Buildroot
commit 3f3d6e43de, which includes upstream
commit:
https://git.linux-nfs.org/?p=steved/libtirpc.git;a=commit;h=7cea8ad66aecc21e6caae330b5d31075af399193
that symbol is only exported when libtirpc is configured with
--enable-rpcdb. On non-glibc toolchains there is no libc fallback
either, so linking ss fails:
ld: ss.o: in function `init_service_resolver':
ss.c:(.text+0x2558): undefined reference to `getrpcbynumber'
Select BR2_PACKAGE_LIBTIRPC_RPCDB when libtirpc is enabled, like lsof
and other users of these functions already do.
Fixes:
https://autobuild.buildroot.org/results/390b7ed00da20c2349fe069ade4a65404834a484/
Fixes: 3f3d6e43de ("package/libtirpc: bump to version 1.3.7")
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Assisted-by: Claude:claude-opus-5
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
iproute2's configure script probes for libtirpc through pkg-config and,
when found, enables HAVE_RPC and links ss against it. libtirpc was never
listed in IPROUTE2_DEPENDENCIES though, so whether the feature ends up
enabled depended on whether libtirpc happened to be built before
iproute2.
Add the missing optional dependency to make the build reproducible.
iproute2's configure script checks for libtirpc availability since
v5.18.0 of iproute2, which Buildroot started using in commit
10990c576b ("package/iproute2: bump version to 5.18.0")
Fixes: 10990c576b ("package/iproute2: bump version to 5.18.0")
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Assisted-by: Claude:claude-opus-5
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Buildroot commit 8dad17ea06 bumped the
package from 0.27.0 to 0.37.2. This bump includes upstream commit
464867a9ce
which added WebSocket support to version 0.33.0 and causes a build error
detected by the Gitlab pipelines for bootlin-sparc-uclibc:
/builds/bkuhls/buildroot/br-test-pkg/bootlin-sparc-uclibc/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/14.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld:
/tmp/cciyXsAR.ltrans6.ltrans.o: in function
`httplib::ws::WebSocket::close(httplib::ws::CloseStatus,
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)':
<artificial>:(.text+0x6408): undefined reference to `__atomic_exchange_1'
To fix the problem we add -latomic to LDFLAGS when needed.
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Users will ultimately need the BR2_LINUX_KERNEL_CUSTOM_DTS_DIR config to
import custom dts files for custom versal2 hardware. Improve the post-image.sh
to support either the default device tree which comes from u-boot or a
custom device tree for custom hardware.
To keep the example post-image script as simple as possible, it assumes that
the first DTB in the LINUX_DTBS list is the one for creating the system.dtb
filename that u-boot will use for booting. Users are free to implement their
own post-image scripts for use cases with multiple DTBs or overlays.
Signed-off-by: Neal Frager <neal.frager@amd.com>
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
By switching to the LINUX_DTBS variable, the post-image.sh script can now
work regardless of whether a user is using BR2_LINUX_KERNEL_INTREE_DTS_NAME
or the BR2_LINUX_KERNEL_CUSTOM_DTS_DIR for custom hardware. This simplifies
the transition users will make when migrating from a versal evaluation board
to a versal custom platform.
To keep the example post-image script as simple as possible, it assumes that
the first DTB in the LINUX_DTBS list is the one for creating the system.dtb
filename that u-boot will use for booting. Users are free to implement their
own post-image scripts for use cases with multiple DTBs.
Signed-off-by: Neal Frager <neal.frager@amd.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
By switching to the LINUX_DTBS variable, the post-image.sh script can now
work regardless of whether a user is using BR2_LINUX_KERNEL_INTREE_DTS_NAME
or the BR2_LINUX_KERNEL_CUSTOM_DTS_DIR for custom hardware. This simplifies
the transition users will make when migrating from a zynqmp evaluation board
to a zynqmp custom platform.
To keep the example post-image script as simple as possible, it assumes that
the first DTB in the LINUX_DTBS list is the one for creating the system.dtb
filename that u-boot will use for booting. Users are free to implement their
own post-image scripts for use cases with multiple DTBs.
Signed-off-by: Neal Frager <neal.frager@amd.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
Buildroot commit [1] introduced the check-package error:
boot/edk2/Config.in:19: line contains trailing whitespace
This commit fixes the issue by removing those extra spaces.
[1] ea0f27d64f
Signed-off-by: Julien Olivain <ju.o@free.fr>
When running iperf3 with Linux 6.18.51 on VisionFive 2, one CPU core
stays at 100% load during the test, while network throughput is limited
to approximately 793 Mbits/sec:
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.01 sec 945 MBytes 793 Mbits/sec receiver
The regression was introduced in Linux 6.14 by commit df542f669307
("net: stmmac: Switch to zero-copy in non-XDP RX path"). It leads to
misaligned access exceptions when parsing packet headers. During the
iperf3 test, perf stat reported approximately 9.6 million alignment
faults over 5 seconds:
$ perf stat -a -e alignment-faults -- sleep 5
Performance counter stats for 'system wide':
9620073 alignment-faults
5.029337000 seconds time elapsed
The kernel must emulate these unaligned accesses, resulting in
significant overhead.
The issue was fixed in Linux 6.18.52 [1]. Bump Linux to 6.18.55, the
latest stable release at the time of writing, to include the fix.
[1] https://lore.kernel.org/all/2026091704-CVE-2026-90059-36e6@gregkh
Fixes: 98aa14a186 ("configs/visionfive2: bump Linux to 6.18.51, U-Boot to 2026.07, and OpenSBI to 1.8.1")
Assisted-by: LLM
Signed-off-by: Fengwei Tan <tfx2001@outlook.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Codeberg has changed the way it generate hashes for at least some of
the generated tarballs (see [1]). Since we cannot update the hash
without changing the file name, we switch to Git download in order to
have a different file name.
[1]: https://codeberg.org/Codeberg/Community/issues/2861
Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Since the bump to version 2.13.0 in Buildroot commit [1],
atop fails to build with musl:
drawbar.c:2336:33: error: implicit declaration of function 'waddwstr'; did you mean 'waddstr'? [-Wimplicit-function-declaration]
(Before 2.13.0, the same configurations already failed earlier on
uClibc because _POSIX_C_SOURCE was defined without a value. Upstream
fixed that in 2.13.0 by giving it an explicit value, but the same
pattern remains for _XOPEN_SOURCE.)
ncurses only declares its wide-character API, including waddwstr(),
when NCURSES_WIDECHAR is set. If the application does not set it,
curses.h derives it from the feature test macros:
#if defined(_XOPEN_SOURCE_EXTENDED) || \
(defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE - 0 >= 500))
drawbar.c defines _XOPEN_SOURCE with an empty value, which makes the
check evaluate as 0 >= 500 and fail.
This only breaks with musl because of the C library's <features.h>,
which curses.h pulls in through <stdio.h> before doing the check.
glibc and uClibc both redefine _XOPEN_SOURCE to 700 and define
_XOPEN_SOURCE_EXTENDED whenever _GNU_SOURCE is set, which drawbar.c
does, so the empty definition gets fixed up. musl never modifies the
application's feature test macros, so the empty value reaches
curses.h and the wide-character prototypes are left out.
Add a patch that defines _XOPEN_SOURCE as 700, matching the
_POSIX_C_SOURCE value of 200809L that is already used.
Fixes:
- https://autobuild.buildroot.org/results/914c1d8fa0fc8bbef64e4a64d58e5941d0077a3e
- https://autobuild.buildroot.org/results/b91ea0722202de0d1fdeeaeea167fd1b21b6d5d6
[1] 2110131cab
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Tested-By: Thomas Perale <thomas.perale@mind.be>
[Julien: add link to Buildroot commit introducing the issue]
Signed-off-by: Julien Olivain <ju.o@free.fr>
The last package depending on libplatform, libcec, removed its
dependency:
332bca975a
The maintainer of both libcec and libplatform has put libplatform into
maintenance mode: "Don't use this library in new projects."
97332651dd
so we can safely remove the package from buildroot.
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
[Peter: move the COnfig.in.legacy entry under 2026.11]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Add support for pzstd, the multi-threaded implementation of zstd.
The pzstd build requires C++ and threads support. On some architectures
(e.g., Microblaze, SPARC), it also requires linking against libatomic
due to the use of atomic operations.
Ensure that -latomic is passed in LDFLAGS during both the build and
install phases. Consistently passing LDFLAGS is necessary because the
pzstd Makefile re-links the binary during the 'install' target due to
its dependency on the static library.
Fixes build failures reported with bootlin-microblazeel-uclibc and
bootlin-sparc-uclibc toolchains:
Pzstd.cpp:(.text+0x17e8): undefined reference to '__atomic_compare_exchange_1'
Pzstd.cpp:(.text._ZN5pzstd15BufferWorkQueue3popERNS_6BufferE): undefined reference to '__atomic_fetch_sub_4'
For host-zstd, always build pzstd. It just adds a few seconds of
build time.
Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
Reviewed-by: Joseph Kogut <joseph.kogut@gmail.com>
Tested-by: Joseph Kogut <joseph.kogut@gmail.com>
[Arnout: unconditionally build pzstd for the host]
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
This was added in commit 2d4fd5d358 ("pkg-infra: also set PKGDIR for the
download step") for the DOWNLOAD macro, which was reworked in commit
155f752d8a ("core/download: do not hard-code the path to the package hash
file") to instead use <FOO>_HASH_FILE, so drop it.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This was added in commit 604d261fb0 ("infra: remove variable
FOO_DIR_PREFIX") to figure out where to find patches, but this was reworked
in commit 99d4180eda ("package/pkg-generic.mk: factor out patch
directories") to instead use <FOO>_PKGDIR, so drop it.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This was added in commit 7a41cbf938 ("package: fix patching procedure for
host packages") to figure out where to find patches, but this was reworked
in commit 99d4180eda ("package/pkg-generic.mk: factor out patch
directories") to instead use <FOO>_RAWNAME, so drop it.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Since the bump to version 1.9.15 in commit
2a28d25d0c ("package/haveged: bump to version 1.9.15"), haveged
unconditionally includes <semaphore.h> and uses named semaphores
(sem_open() and friends) to synchronize command instances. As a
result, the build fails with toolchains without threads support:
haveged.c:37:10: fatal error: semaphore.h: No such file or directory
Add a dependency on BR2_TOOLCHAIN_HAS_THREADS. Since threads are now
always available, unconditionally pass --enable-threads.
Fixes:
https://autobuild.buildroot.org/results/814cb7b5537d8b7b2c23f3d90e37b2b41de7ee3f
Fixes: 2a28d25d0c ("package/haveged: bump to version 1.9.15")
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
We usually put the metadata variables at the beginning of the file and
the variables related to how to build it (like _CONF_OPTS) later. Apply
this principle.
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
Fixes:
https://autobuild.buildroot.org/results/e6159cee14f84569c85a61f77824b2b58d68a4bc/
Libtool 2.6.x is starting to be used by upstreams when generating
release tarballs (e.g. cryptsetup-2.8.8). As LIBTOOL_PATCH_HOOK does
not know about it, ltmain.sh is left unpatched, so libtool relinks
libraries at install time and adds -L/usr/lib, which is rejected by
the toolchain wrapper:
i686-buildroot-linux-gnu-gcc: ERROR: unsafe header/library path used in cross-compilation: '-L/usr/lib'
The v2.4.4 patch no longer applies cleanly, so add a v2.6 variant,
rebased on libtool 2.6.2, and use it for 2.6.x versions.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Assisted-by: Claude:claude-opus-5
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Commit 8b651fd817 added a dependency on
gcc >= 4.9 and as part of that updated the Config.in comment to
mention C++11 instead of C++. This is not consistent with Buildroot
convention, where we only mention C++, and separately the GCC version
requirement. This commit aligns the Config.in comment with the
Buildroot convention.
Fixes: 8b651fd817 ("package/sqlitecpp: require C++11")
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
SQLiteCpp has an internal setting for stack protection which defaults
to "on". Since Buildroot handles stack protection itself this is not
needed and more importantly it causes problems as the option enables
stack protection support even when the toolchain doesn't support it,
as can be reproduced using the following defconfig:
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_MUSL_BLEEDING_EDGE=y
BR2_PACKAGE_SQLITECPP=y
Fixes:
br-test-pkg/bootlin-x86-i686-musl
https://gitlab.com/heinemml/buildroot/-/jobs/16865965418
Oddly enough, there are no autobuilder failures recorded for this
issue.
Fixes: e74059b39c ("package/sqlitecpp: new package")
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
build and run an SQLiteCpp example to check database writes and queries.
Assisted-by: GitHub Copilot:GPT-6 Sol
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
It is sometimes useful to be able to do an offline build, to make sure
the build works properly without network access, so this commit adds a
NO_NETWORK environment variable to our docker-run script, which for
example allows to do:
$ ./utils/docker-run make source
$ NO_NETWORK=1 ./utils/docker-run make
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>