Khem Raj [Tue, 17 Mar 2020 07:04:17 +0000 (00:04 -0700)]
musl: Add support for multilib
ldso is always stored in /lib regardless of multilib
add ld-musl-${MUSL_LDSO_ARCH}.path to aid ldso finding default library
loading paths, it helps when using multilib, where system libraries are
moved to lib32 or lib64 paths under / or /usr
[YOCTO #11971]
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Khem Raj [Tue, 17 Mar 2020 07:04:16 +0000 (00:04 -0700)]
linuxloader: Add get_musl_loader_arch function
get_musl_loader_arch returns the arch part of ldso for musl, this is
used in get_musl_loader() as well as independently usable, which is
needed for multilib support in musl. Musl stores all ldso in /lib
be it multilib or not, therefore do not use base_libdir instead directly
use /lib
[YOCTO #11971]
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Wang Mingyu [Tue, 17 Mar 2020 07:16:48 +0000 (00:16 -0700)]
base-passwd: LICENSE changed to GPLv2
The source code such as update-passwd.c states the license to be under
GPL v2 only and does not contain the "or later" clause so correct the
recipe LICENSE field to match.
Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Daniel Dragomir [Wed, 18 Mar 2020 16:42:35 +0000 (16:42 +0000)]
lttng-modules: update to 2.11.2
Upgrade to version 2.11.2 in order to fix some build errors
with latest 5.4 kernel.
- conflicting types for 'trace_fast_page_fault'
Reproductible on kernel greater than v5.4.19, starting with commit 8a1cd01bee ("KVM: x86: Use gpa_t for cr2/gpa to fix TDP support on
32-bit KVM")
Error messages:
lttng-modules-2.11.1/probes/../probes/lttng-tracepoint-event-impl.h:130:6:
error:
130 | void trace_##_name(_proto);
tmp/work-shared/axxiax86-64/kernel-source/include/linux/tracepoint.h:233:21:
note: previous definition of 'trace_fast_page_fault' was here
233 | static inline void trace_##name(proto)
- conflicting types for 'trace_rcu_dyntick'
Reproductible on kernel greater than v5.4.22, starting with commit 6cf539a87a ("rcu: Fix data-race due to atomic_t copy-by-value")
Error messages:
lttng-modules-2.11.1/probes/../probes/lttng-tracepoint-event-impl.h:130:6:
error: conflicting types for 'trace_rcu_dyntick'
130 | void trace_##_name
tmp/work-shared/axxiax86-64/kernel-source/include/linux/tracepoint.h:233:21:
note: previous definition of 'trace_rcu_dyntick' was here
233 | static inline void trace_##name(proto)
Signed-off-by: Daniel Dragomir <Daniel.Dragomir@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Adrian Freihofer [Tue, 17 Mar 2020 15:26:50 +0000 (16:26 +0100)]
runqemu: support multiple NICs
Emulating more than one network interface with runqemu is a bit tricky,
but possible. For example, the following leads to an emulated device with
eth0 and eth1:
When booting Qemu with two NICs, the kernel does not know which
interface the specified ip=192.168.7.... command line argument
should be applied. This delays the boot process for a very long
time and a guest wihtout IP configuration.
This add two new configuraton parameters to runqemu:
QB_CMDLINE_IP_SLIRP and QB_CMDLINE_IP_TAP to explicitely specify the ip=
kernel command line arguments for tap and slirp mode.
Note: Simply adding "::eth0" broke some builds on the Yocto autobuilder.
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Jan Kaisrlik [Fri, 13 Mar 2020 19:44:51 +0000 (12:44 -0700)]
musl: removes aliases for glibc provided libraries
Based on the recommendation in musl mailing list[1] All symlinks have
been removed from musl recipe.
Move stub libraries into -dev package
having them treated as normal .a which they are not, is not correct and
packages shoves them into static archives, which are not installed on
target usually unless asked for
this should help in linking with -lm, -lpthread etc. on target
initramfs-framework: fix boothang when console=null
If console=null systemd-udevd throws an assertion which prevents the
system from booting. This patch redirects stdin, stdout and stderr to
/dev/null in case that the console can't be opened so that udevd still
boots.
A systemd issue was reported here. However, they will not fix this
specific use-case:
https://github.com/systemd/systemd/issues/13332
Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Anuj Mittal [Fri, 13 Mar 2020 01:09:38 +0000 (09:09 +0800)]
bluez: fix CVE-2020-0556
It was discovered that BlueZ's HID and HOGP profiles implementations
don't specifically require bonding between the device and the host.
This creates an opportunity for an malicious device to connect to a
target host to either impersonate an existing HID device without
security or to cause an SDP or GATT service discovery to take place
which would allow HID reports to be injected to the input subsystem from
a non-bonded source.
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Khem Raj [Thu, 12 Mar 2020 07:50:14 +0000 (00:50 -0700)]
oeqa/qemuarm64: Ignore logind: failed to get session seat
When booting weston images this error is seen commonly, but Qemu boots
the image fine, session seat error is thrown by libweston perhaps using
--seat option or setting XDG_SEAT variable in weston.ini could fix it
[YOCTO #13828]
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Andreas Müller [Thu, 12 Mar 2020 14:43:31 +0000 (15:43 +0100)]
libsdl2: upgrade 2.0.10 -> 2.0.12
* checked all hunks: backported patches can go
* for machines with neon in TUNE_FEATURES enable new configure option
--enable-arm-neon. If enabled, license must be extended to MIT
* license checksum changed by copyright year
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
There seems to be some problem with atomics in libdrm, until that gets
diagnosed, simple solution is to not use it on musl when drm backend is used
thats why WESTON_DISABLE_ATOMIC=Y is set in environment file for such
cases
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Mingli Yu [Wed, 11 Mar 2020 13:49:33 +0000 (21:49 +0800)]
babeltrace2: initialize the other_entry pointer
When add below line to local.conf to enable debug build:
DEBUG_BUILD = "1"
There comes below failure when run "bitbake babeltrace2"
| ../../../../../git/src/plugins/ctf/fs-src/fs.c: In function 'ds_index_insert_ds_index_entry_sorted':
| ../../../../../git/src/plugins/ctf/fs-src/fs.c:702:5: error: 'other_entry' may be used uninitialized in this function [-Werror=maybe-uninitialized]
| 702 | !ds_index_entries_equal(entry, other_entry)) {
So initialize the other_entry pointer to fix the above error.
Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Domarys Correa [Wed, 11 Mar 2020 16:52:21 +0000 (13:52 -0300)]
weston-init: Allow use of weston without input devices
Don't force users to have input device in your targets. As the default
option require-input is set to true, Weston only starts if we have a
device in /dev/input/event* and this not a requirement for all applications,
e.g. kiosk browser.
Signed-off-by: Domarys Correa <domarys.correa@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Jeremy Puhlman [Wed, 11 Mar 2020 22:25:42 +0000 (15:25 -0700)]
qemu: Fix reproducibilty issues
tests/qemu-iotests/common.env is generated from configure which
we pass ${HOSTTOOLS_DIR}/python3 as our python to use, which gets
copied into the ptests. Correct python3 path.
Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Kai Kang [Tue, 10 Dec 2019 09:35:34 +0000 (17:35 +0800)]
base.bbclass: extend PACKAGECONFIG for conflict package configs
There are mutually exclusive PACKAGECONFIGs in recipes. Though it
declares that package configs are exclusive, it can't prevent users to
set them at same time. Extend PACKAGECONFIG to support specifying
conflicted package configs.
Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Ross Burton [Tue, 10 Mar 2020 14:07:01 +0000 (14:07 +0000)]
gcc: don't ship build host information in the target gcc-plugins package
The build host configuration isn't reproducible as it varies depending
on the gcc version of the build host. This information isn't useful on the
target anyway so remove it.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Sun, 8 Mar 2020 14:35:58 +0000 (14:35 +0000)]
coreutils: Fix -dev package dependencies
The new ptest dependencies present some challenges, in particular libmodule-build-perl
which effectively depends on gcc. In multilib images, this results in both
libXX-gcc-symlinks and libYY-gcc-symlinks being installed which conflict. This also
makes little sense.
The easiest way to fix this is to disable the automatic -dev package dependencies
and manually specify the correct ones.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Trevor Gamblin [Wed, 11 Mar 2020 11:32:34 +0000 (04:32 -0700)]
coreutils: add ptest
coreutils has a large number of tests, including some added by the
Makefile flags RUN_EXPENSIVE_TESTS and RUN_VERY_EXPENSIVE_TESTS that
significantly increase runtime (and that have been disabled). Note
that the coreutils ptest directory is given blanket permissions at
runtime with chmod -R 777 to ensure that the user created for the
tests will be able to run the test scripts and create the necessary
files in the process.
There is still room to improve the results of this ptest without
the aforementioned additions. Of the tests marked SKIP, there are
30 tests that are currently counted as SKIP because they require
sudo permissions, and another 21 that require membership in
multiple user groups. It is important to know that coreutils has
tests for both root and non-root users. Testing showed that 42
tests are skipped when running as root versus 30 when running as a
non-root user, so the decision was made to run the suite as the
latter. Additionally, gdb, valgrind, and strace could be included
in the RDEPENDS list to increase pass rate, but their total
contribution is 13 tests, so they were omitted to reduce image size.
Finally, note that at least one ptest (misc/head-write-error.sh) is
prone to ERROR on builds of core-image-minimal if extra space is
not provided with IMAGE_ROOTFS_EXTRA_SPACE.
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rich Persaud [Mon, 9 Mar 2020 22:44:57 +0000 (18:44 -0400)]
grub-efi-cfg: enable per-label APPEND override
For legacy bios boot configurations, syslinux supports multiple
labels with per-label APPEND definitions. grub-efi-cfg supports
multiple labels, but only a single APPEND definition.
Enable optional per-label APPEND definitions for grub EFI, with
variable names prefixed by "grub_" to isolate grub definitions from
syslinux defintions.
Example use from an ISO image recipe that inherits grub-efi-cfg:
image-prelink: remove assumption of sysconfdir presence
If sysconfdir is not present in the image filesystem then the temporary
creation of a prelink.conf will fail. Fix this by creating sysconfdir
temporarily if needed beforehand and then remove any directories that
were created afterwards.
fixes: OpenXT OXT-1751
Signed-off-by: Christopher Clark <christopher.w.clark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Khem Raj [Tue, 10 Mar 2020 01:19:38 +0000 (18:19 -0700)]
ruby: Use arm32 for coroutines on 32bit-arm
in 2.7 [2] ruby enabled ucontext for coroutines on arm32 but it does not
work for musl since it uses glibc specific functions e.g.
getcontext/swapcontext/swapcontext also see [1]
This patch reverts back to using arm32 implementation for coroutines on
arm
Richard Purdie [Mon, 9 Mar 2020 21:09:43 +0000 (21:09 +0000)]
buildtools-extended-tarball: Add locale command
The eSDK installation code checks installed locales with the locale command which is
from glibc-utils. Add this so that we find the correct locales from the buildtools.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Mon, 9 Mar 2020 20:59:11 +0000 (20:59 +0000)]
glibc: Update nativesdk locale relocation patch
The locale binary reported incorrect locale lists in relocated toolchains
as some path references were not relocated by this patch. Fix this missing
relocations so the locale binary correctly reports the locales.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Trying to create a clean PATH breaks cases where we install a buildtools tarball
on hosts to provide newer versions of gcc. Rework the fix for #8698 to clean up
directories in PATH which don't exist isntead. Do it with python as the shell
version was too fraught with corner cases.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Sun, 8 Mar 2020 10:20:12 +0000 (10:20 +0000)]
oeqa/testsdk: Use original PATH
We want to test the SDK with PATH from the original host, not with our own
tools injected via HOSTTOOLS. It even uses some tools which aren't in
HOSTTOOLS.
This is necessary after changing the SDK to not reset PATH to the system
default which is bad for other reasons and brings the testing into sync
with that change.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Tue, 10 Mar 2020 13:02:07 +0000 (13:02 +0000)]
oeqa/selftest: Ensure buildtools in environment variables isn't replaced
This avoids the seeing broken replacements like:
oe-selftest-centos/build/build-st-926tools/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt
which understandably break builds.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Anuj Mittal [Mon, 9 Mar 2020 00:45:02 +0000 (08:45 +0800)]
e2fsprogs: backport upstream patch
Fixes a bug wherein a use after free could potentially be used to run
malicious code if a user can be tricked into running e2fsck on a
maliciously crafted file system.
Also see:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=948517
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kernel.bbclass: fix SOURCE_DATE_EPOCH for non-git kernel builds
The source directory is not always a git repository, so when querying
git for data to set SOURCE_DATE_EPOCH, specify ${S}/.git as the git
directory to prevent retrieving incorrect data from any parent directory.
Fixes the following errors with the prior logic when building a kernel
that is not obtained from a git repository:
1. With TMPDIR set to a directory outside any git repository on a
mounted filesystem, reproducible builds fail in do_compile with this git
error:
fatal: not a git repository (or any parent up to mount point <abspath>)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
aborting before the error handling logic.
2. With TMPDIR located within a subdirectory of a git repository, the
SOURCE_DATE_EPOCH timestamp would be that of said repository rather than
that of the kernel.
Signed-off-by: Christopher Clark <christopher.w.clark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Paul Barker [Mon, 9 Mar 2020 14:21:39 +0000 (14:21 +0000)]
kernel-yocto.bbclass: Support config fragments with externalsrc
The merging of config fragments is performend in the do_kernel_configme
task and so config fragments will not be supported when this task is
removed from the dependency tree.
kernel-yocto adds additional tasks which may modify the source directory
to SRCTREECOVEREDTASKS so that they are removed when using externalsrc.
However, do_kernel_configme should be safe to use, the only modification
to the source tree is the potential creation of the '.kernel-meta'
directory and the '.metadir' file.
Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Paul Barker [Mon, 9 Mar 2020 14:21:38 +0000 (14:21 +0000)]
perf: Fix externalsrc support
When the externalsrc class is used the tasks listed in
SRCTREECOVEREDTASKS are deleted to prevent them being executed. If
externalsrc is used for the kernel then this will include
virtual/kernel:do_patch.
We can depend on do_shared_workdir instead as this will survive when
externalsrc is used.
Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Paul Barker [Mon, 9 Mar 2020 14:21:37 +0000 (14:21 +0000)]
kernelsrc.bbclass: Fix externalsrc support
When the externalsrc class is used the tasks listed in
SRCTREECOVEREDTASKS are deleted to prevent them being executed. If
externalsrc is used for the kernel then this will include
virtual/kernel:do_patch.
We can depend on do_shared_workdir instead as this will survive when
externalsrc is used.
Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Sat, 7 Mar 2020 18:03:40 +0000 (18:03 +0000)]
reproducibile_build: Fix SDE file generation when unpack reruns
Currently, if an existing TMPDIR is rebuilt, do_fetch/do_unpack can rerun
but SDE would remain unchanged. This leads to different results compared
to a fresh build. An example change which triggered this is:
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=cb4e69e6346a9fbeebf83a5d5397cacbd41d48b5
Instead, delete any existing SDE and recalculate if we're reunning.
Also rename and drop the do_ prefix since these are for tasks,
not functions.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Martin Jansa [Sat, 7 Mar 2020 13:30:06 +0000 (14:30 +0100)]
openssl: fix perl shebang in c_rehash
* passing PERL=perl breaks c_rehash calls from dash (works fine with bash)
dash doesn't like
#!perl
shebang
PERL="/usr/bin/env perl"
unfortunately just passing PERL like this doesn't pass do_configure:
Creating Makefile
sh: 1: /usr/bin/env perl: not found
WARNING: exit code 1 from a shell command.
But passing it as:
HASHBANGPERL="/usr/bin/env perl" PERL=perl
seems to work.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
André Draszik [Fri, 6 Mar 2020 09:35:15 +0000 (09:35 +0000)]
linux-firmware: TI: fix wl18xx support
wl1271-nvs.bin belongs to the wl18xx driver (and respective
package created here), see kernel source.
Due to the way packages are assembled here it ends up in the
wrong package, though.
Fix by placing it in the -common package as it's merely a
symlink to wl127x-nvs.bin (which does belong to the wl12xx),
so that both drivers have access to it.
Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
André Draszik [Fri, 6 Mar 2020 09:35:14 +0000 (09:35 +0000)]
linux-firmware: drop remnants of pre-2.6.37 support (TI)
Now that this recipe uses make install, we don't manually
create symlinks for firmware files for older kernel in
do_install(). As such, the FILES statement can be updated
as well.
Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Alex Kiernan [Fri, 6 Mar 2020 14:35:18 +0000 (14:35 +0000)]
linux-firmware: Fix usrmerge builds
FIRMWAREDIR defaults to /lib, failing when usrmerge is enabled:
ERROR: linux-firmware-1_20200122-r0 do_install: Execution of '/home/akiernan/poky/build/tmp/work/core2-64-poky-linux/linux-firmware/1_20200122-r0/temp/run.do_install.31218' failed with exit code 1:
mkdir -p /home/akiernan/poky/build/tmp/work/core2-64-poky-linux/linux-firmware/1_20200122-r0/image/lib/firmware
./copy-firmware.sh /home/akiernan/poky/build/tmp/work/core2-64-poky-linux/linux-firmware/1_20200122-r0/image/lib/firmware
cp: target '/home/akiernan/poky/build/tmp/work/core2-64-poky-linux/linux-firmware/1_20200122-r0/image/usr/lib/firmware/' is not a directory
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
On the system whose cpu doesn't support rdrand,
there comes below message when start rngd service
#systemctl status rngd
[snip]
Feb 25 05:08:14 qemux86-64 rngd[133]: [rdrand]: Initialization Failed
[snip]
Actually the failed message doesn't matter as it
only indicates one entropy source as rdrand fails
to initialize and won't affect rngd function.
So add to ignore the failure message to fix below
error during do_testimage:
NOTE: ======================================================================
NOTE: FAIL: test_parselogs (parselogs.ParseLogsTest)
NOTE: ----------------------------------------------------------------------
NOTE: Traceback (most recent call last):
File "/buildarea/layers/oe-core/meta/lib/oeqa/core/decorator/__init__.py", line 36, in wrapped_f
return func(*args, **kwargs)
File "/buildarea/layers/oe-core/meta/lib/oeqa/runtime/cases/parselogs.py", line 370, in test_parselogs
self.assertEqual(errcount, 0, msg=self.msg)
AssertionError: 1 != 0 : Log: /buildarea/tmp/work/qemux86-64-wrs-linux/wrlinux-image-std/1.0-r5/target_logs/daemon.log
Central error: 2020-03-06T09:45:12.774286+00:00 qemux86-64 rngd[134]: [rdrand]: Initialization Failed