Adrian Bunk [Fri, 12 Apr 2019 21:09:12 +0000 (00:09 +0300)]
Set XZ_COMPRESSION_LEVEL to -9
It is consistent with other compressors also using their
best compression.
xz is currently the option that offers best compression,
using settings even lower than the default is surprising
and makes it harder to choose the best available compression.
For anyone who cares about compression time using a different
option like gzip or bzip2 is the logical choice.
For decompression, better compressed is actually faster
to decompress.
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
uboot-sign: add support for different u-boot configurations
This is done by concatenating the DTB with the kernels public key
to all built u-boot binaries. Furthermore the installation of all
the binaries is required.
Signed-off-by: Andreas Obergschwandtner <andreas.obergschwandtner@skidata.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This should never have merged as the change was rejected upstream and adding a library
to the ptest package resulted in it providing that SONAME which led to being
included in images like core-image-sato.
This in turn led to a ton of ptest failures in the 2.7 r1 QA report.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Changelog:
- Fix issue with handling invalid gateway addresses.
- Fix issue with handling updates of default gateway.
- Fix issue with DHCP servers that require broadcast flag.
- Add support for option to use gateways as time servers.
- Add support for option to select default technology.
- Add support for Address Conflict Detection (ACD).
- Add support for IPv6 iptables management.
Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Michael Scott [Fri, 12 Apr 2019 05:46:25 +0000 (22:46 -0700)]
kernel-fitimage: support RISC-V
Support RISC-V kernel image, using the "Image" target.
This change allows RISC-V support for fitImage via the following
flow: OpenSBI -> u-boot (as payload) -> Linux kernel (as fitImage
with ramdisk and dtb).
This was tested using QEMU RISC-V 64-bit.
Signed-off-by: Michael Scott <mike@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Remove dlopen-test.patch which originally used
to fix the test dlopen-test, but autually the
patch didn't resolve the issue as dlopen-test.patch
supposes the file /usr/lib/libnettle.so exists.
Instead deploy ${D}${PTEST_PATH}/libnettle.so to
fix the dlopen-test failure.
Update the initialization for the salt to fix
below Segmentation fault and also nettle-pbkdf2-test
failure.
# echo -n passwd| nettle-pbkdf2 -i 1 -l 16 salt
[65534.886509] nettle-pbkdf2[708]: segfault at 1f594260 ip 00007f3332256998 sp 00007fff60d44410 error 4 in libnettle.so.6.5[7f3332244000+1d00]
[65534.887525] Code: e8 6d db fe ff 44 01 6d 68 48 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f c3 66 2e 0f 1f 84 00 00 00 00 00 49 89 dc e9 68 ff f
Segmentation fault
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The subprocess.run was replaced by subprocess.check_call because
of compatibility support down to python 3.4. But we really don't
care about whether that command succeeds. Some user reports that
in some tmux environment, this command fails and gives some
unpleasant traceback output. So we use 'call' instead of 'check_call'
to avoid such problem.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
image_types.bbclass: fix a race between the ubi and ubifs FSTYPES
The ubi, ubifs and multiubi FSTYPES calls `mkfs.ubifs' to create UBIFS
images.
In do_image_ubi, $vname is empty, the name of UBIFS image conflicts with
the one in do_image_ubifs, and it's a race risk.
[do_image_ubi]
mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs ${mkubifs_args}
[do_image_ubi]
Richard Purdie [Thu, 11 Apr 2019 21:34:57 +0000 (22:34 +0100)]
e2fsprogs: Skip slow ptest tests
The slow tests run unreliably with our current setup/infrsstructure/timeouts.
There are only five slow ones and having the other ~250 run reliably without timeouts
is the priority right now. We can revisit the slow tests at some later date if wanted.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Dengke Du [Thu, 4 Apr 2019 09:02:33 +0000 (17:02 +0800)]
perf: workaround the error cased by maybe-uninitialized warning
When enable DEBUG_BUILD, the perf build failed by the following error:
libbpf.c:727:36: error: 'data' may be used uninitialized in this function [-Werror=maybe-uninitialized]
This is ok until Khem commit a patch in oe-core: 16643b03227466e2c80a24c2d079fe36e89553c1
This commit import "-Og" option to "DEBUG_OPTIMIZATION", result in this error.
Actually, the warning was misinformation. We explore the code in libbpf.c:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/lib/bpf/libbpf.c#n640
--------------------------------------------------------------------------
if (scn)
data = elf_getdata(scn, NULL);
if (!scn || !data) {
pr_warning("failed to get Elf_Data from map section %d\n",
obj->efile.maps_shndx);
return -EINVAL;
}
......
using data...
......
--------------------------------------------------------------------------
If the 'scn' was not null, the data will be initialized. if the data was null,
the function will return -EINVAL, so the data must be not null, but compiler
can't see it in 'if' code block, so treat it as 'maybe-uninitialized'.
Signed-off-by: Dengke Du <dengke.du@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Changqing Li [Thu, 11 Apr 2019 08:20:46 +0000 (16:20 +0800)]
cogl: fix compile error caused by -Werror=maybe-uninitialized
When enable DEBUG_BUILD, cogl compile failed with error:
| ../../cogl-1.22.2/cogl/driver/gl/gles/cogl-driver-gles.c:217:17: error: 'gltype' may be used uninitialized in this function [-Werror=maybe-uninitialized]
| *out_gltype = gltype;
| ~~~~~~~~~~~~^~~~~~~~
| ../../cogl-1.22.2/cogl/driver/gl/gles/cogl-driver-gles.c:213:22: error: 'glintformat' may be used uninitialized in this function [-Werror=maybe-uninitialized]
| *out_glintformat = glintformat;
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
Source: https://gitlab.gnome.org/GNOME/cogl/blob/master/cogl/driver/gl/gles/cogl-driver-gles.c
it can handle correctly, so fix with -Wnoerror
Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kernel-devsrc: check for localversion files in the kernel source tree
The kernel-devsrc rework doesn't take into account localversion
files in the kernel source tree. This might result in modules with an
incomplete version magic when building out-of-tree using the SDK.
Before:
root@qemux86:~# insmod hello.ko
[ 42.000212] hello: version magic '5.0.3-yocto-standard SMP preempt
mod_unload PENTIUMM ' should be '5.0.3-my-custom-release-yocto-standard
SMP preempt mod_unload PENTIUMM '
[ 42.008200] hello: version magic '5.0.3-yocto-standard SMP preempt
mod_unload PENTIUMM ' should be '5.0.3-my-custom-release-yocto-standard
SMP preempt mod_unload PENTIUMM '
insmod: can't insert 'hello.ko': invalid module format
Changqing Li [Thu, 11 Apr 2019 07:02:32 +0000 (15:02 +0800)]
ruby: make ext module fiddle can compile success
ext module fiddle depend on libffi, in ruby source tree,
there is in internal libffi in case target platfrom don't
install libffi, but autotools.bbclass delete configure
under libffi and not run autoreconf to regenerate one.so
we met this error:
ruby-2.5.3/ext/fiddle/libffi-3.2.1/configure: No such file or directory
the fix is add depend and extra_oeconf to use libffi in the system
Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Fix Python3 TypeError error in check_perl_modules:
Executing bitbake, the following error message will be throwed:
File ".../poky/meta/classes/sanity.bbclass", line
979, in check_sanity_eventhandler
check_sanity(sanity_data)
File ".../poky/meta/classes/sanity.bbclass", line
943, in check_sanity
check_sanity_version_change(status, sanity_data)
File ".../poky/meta/classes/sanity.bbclass", line
637, in check_sanity_version_change
status.addresult(check_perl_modules(d))
File ".../poky/meta/classes/sanity.bbclass", line
563, in check_perl_modules
errresult += e.output
TypeError: must be str, not bytes
So here, transfer e.output from bytes to str.
Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Andreas Müller [Fri, 5 Apr 2019 06:37:25 +0000 (08:37 +0200)]
gobject-introspection: auto-enable/-disable gobject-introspection for meson
* the class sets defaults used most common which can be overriden by recipes
* UNKNOWN_CONFIGURE_WHITELIST was removed for autotools (and not added for meson)
as suggested by Alexander Kanavin [1]
362 The license is now GPLv2/LGPLv3+ for the libraries and GPLv3+ for stand-alone
363 programs. There is now also a formal CONTRIBUTING document describing how to
364 submit patches.
libasm, libdw and libelf are thus covered optionally by GPLv2 license.
Richard Purdie [Mon, 8 Apr 2019 22:14:12 +0000 (23:14 +0100)]
python3: Fix ptest output parsing
A previous fix to python added -W and removed -v. This reverts that part of the change
since we're no longer getting ptest results at all. This change back to more
verbose output means we start getting test results again.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Sun, 7 Apr 2019 22:15:04 +0000 (23:15 +0100)]
python3: Avoid hanging tests
There are python tests which hang with recent kernels, 5.0 onwards. This causes
ptest to timeout for python3. Disable the problematic test until we better understand
the real cause and fix of the issue (discussions are happening with upstream).
See the patch for details/links.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Wed, 10 Apr 2019 23:07:02 +0000 (00:07 +0100)]
pseudo: Update to gain key bugfixes
Newer distros are using new versions of glibc and coreutils which use the new glibc
renameat2 function. We need to intercept this for correct functioning of pseudo. This
is essential to ensure new distros continue to work with the project.
Also, this version has a fix for path/inode cross corruption problems which
may explain our mysterious locale permissions issues.
Many thanks to Otavio and Peter Seebach for the help in figuring this out and
fixing it.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This will generate the symlinks in the ptest binary directory using the
ptest class functionality instead of generating them manually. Because
the ptest class uses update-alternatives to get the metadata for the
symlinks it will respect the use of BUSYBOX_SPLIT_SUID automatically.
[YOCTO #12597]
Signed-off-by: Mariano Lopez <just.another.mariano@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Some binaries generated by util-linux will be replaced by core-utils
in the final image by update-alternatives, so use a dedicated directory
with symlinks to avoid using a binary generated by another package.
This will solve the issue with the ptest runner timing out when
running the kill ptests for util-linux.
[YOCTO #13238]
Signed-off-by: Mariano Lopez <just.another.mariano@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
ptest.bbclass: Add feature to populate a binary directory
This adds the functionality to create a binary directory within
PTEST_PATH directory. This directory will be populated with
symlinks pointing to the binaries installed by the package and
then renamed by update-alternatives. This way the ptest only needs
to source this binary directory in order to use the expected
binaries.
To enable this feature just add PTEST_BINDIR = "1" to the recipe.
[YOCTO #12597]
[YOCTO #13238]
Signed-off-by: Mariano Lopez <just.another.mariano@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
update-alternatives.bbclass: Add function to get metadata
This adds update_alternatives_alt_targets function to get the metadata
for a package. This is for code reuse because the metadata would help
other classes that needs to be aware of how update-alternatives modify
the final package.
[YOCTO #12597]
[YOCTO #13238]
Signed-off-by: Mariano Lopez <just.another.mariano@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Mark Asselstine [Mon, 18 Mar 2019 15:21:53 +0000 (11:21 -0400)]
goarch.bbclass: use MACHINEOVERRIDES and simplify go_map_arm()
Per https://github.com/golang/go/wiki/GoArm we need to set GOARM when
cross building for ARMv5, ARMv6 and ARMv7. The current approach of
using TUNE_FEATURES can be error prone, as we can see today when
attempting to build for Cortex-A7 which results in GOARM=''.
Since the value of MACHINEOVERRIDES already consolidates the values of
TUNE_FEATURES into something more consistent we can use the overrides
mechanism to set GOARM, leaving just a little bit of logic in
go_map_arm() to trigger off the arch (basically target vs host)
for the setting of GOARM.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Mark Asselstine [Mon, 18 Mar 2019 15:21:52 +0000 (11:21 -0400)]
go.bbclass: Export more GO* environment variables
Currently we are not doing a good job of consolidating GO environment
variables used by the go build system in the go.bbclass, instead we
are relying on the individual GO recipe authors to perform the
exports. This can result in inconsistent build results and often
binaries that are not properly cross compiled, resulting in segfaults
when the applications are run on the target.
For example the GO documentation recommends that the environment
include a value assigned to GOARM when cross building for ARMv5, ARMv6
and ARMv7 (https://github.com/golang/go/wiki/GoArm).
In order to avoid polluting the build scripts with unnecessary
exports, such as run.do_compile, we attempt to only export variables
when they apply to a specific arch.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
systemd: fix predictable network interface names in initrd
https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
says, that udev is responsible for predictable network interface names,
so udev package is a better place for its configuration file.
Signed-off-by: Tomasz Meresiński <tomasz.meresinski@comarch.pl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
resulttool/manualexecution: Enable creation of configuration option file
Allow the creation of configuration option file based on user inputs.
Where this configuration option file will be used by the the manual
execution to display options for configuration rather than user
need to inputs configuration manually.
Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Current manualexecution required user to input configuration manually
where there were inconsistent inputs and human typo issues.
Enable manualexecution to have the optional feature where it
will use pre-compiled configuration options file where user will
be able to select configuration from the pre-compiled list instead
of manual key-in the configuration. This will eliminate human error.
Expect the pre-compiled configuration options file in json format below
All but one of these contain one of the strings, "Unix Makefiles" or "Ninja".
In each of these cases, cmake generates the Makefiles (or ninja files respectively),
and also the appropriate project files, eg. .project and .cproject for Eclipse.
A user can set OECMAKE_GENERATOR in their local.conf to any
one of these strings, except "Watcom WMake" (not supported).
Signed-off-by: Nikhil Pal Singh <nikhilpal.singh@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This patch tried to address a gcc problem when -Og is used, but it did
cause regressions on normal compiles when using clang e.g. the real
problem is to fix the compiler until then disable the warning in
DEBUG_FLAGS