Commit Graph

46073 Commits

Author SHA1 Message Date
Ming Liu 673999ac76 lib/oe/terminal.py: use an absolute path to execute oe-gnome-terminal-phonehome
A flaw was found on my Ubuntu 14.04.5 LTS, on which that gnome-terminal is
the default terminal, when I run any of the tasks:
bitbake busybox -c menuconfig/devshell/devpyshell
bitbake virtual/kernel -c menuconfig/devshell/devpyshell

I got a error as follows:
"Failed to execute child process "oe-gnome-terminal-phonehome" (No such file or directory)"

Seems the environment of the process calling Popen is not passed to the
child process, this behaviour is a known issue in Python bug tracker:
http://bugs.python.org/issue8557

It could be fixed by using an absolute path instead per test.

(From OE-Core rev: 6dcafdc6754f9eda22dfe93609401d75e8626c05)

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 2117c148ef07d84bc605768e3b3671b0126b9337)
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Florin Sarbu 6d7fe76005 gcc: Use libssp_nonshared linker specs only for ppc/musl
Link libssp_nonshared.a only for ppc/musl because glibc already
provides the content for libssp_nonshared in libc_nonshared.a and
therefore we dont need to make it universal.

(From OE-Core rev: c08247e3c7c004a40281d4010186a9ace86e0e47)

(From OE-Core rev: ac2aad028daca6ea3aa0c0ccea8d528e896f8349)

Signed-off-by: Florin Sarbu <florin@resin.io>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:58 +00:00
Tom Rini 8f7b65de99 dpkg: Add missing RDEPENDS for dpkg-perl
In order to be able to use dpkg-perl on a system various stock perl
modules must also be installed on the system.  Create the list of
required modules based on a read of the code and testing with additional
utilities and list them in RDEPENDS_${PN}-perl.

(From OE-Core rev: 31949633788f9c2283bcdf1c5374313c8be84923)

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:57 +00:00
Tom Rini cf105e1360 dpkg: Fix perl modules by moving them to the versioned perl directory
In order for the dpkg perl modules to be used the must reside in the
versioned perl library directory (as to be in the default include path).
Be explicit about this location in our FILES_${PN}-perl directive, so
that if this breaks in the future, the recipe will fail).  We can now
drop the custom do_configure as it wasn't fixing this problem.

(From OE-Core rev: e360911f51f37b426ed65a8a6783ee1b5542cc91)

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:57 +00:00
Tom Rini 557884aeca cpan-base.bbclass: Move PERLVERSION and get_perl_version to a new file
It is possible for non-CPAN recipes to contain perl modules.  These perl
modules must reside in the versioned perl library directory in order to
work in normal circumstances..  Export this logic to a separate class so
that it can be reused without the rest of the cpan logic.

Without this, dpkg will not export its perl code to the correct location
and will not be found by utilities that expect to use it.

(From OE-Core rev: 6907280335dd47f2fd3a3f4cf809357c3caff65d)

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 22:02:57 +00:00
Richard Purdie b366f7eccc populate_sdk_ext: Use prebuilt uninative tarball
For uninative to work, it relies on it being updated to new versions as
newer glibcs are built. This means the uninative generated by the current
build may not be as recent as the uninative that is being downloaded by
uninative.bbclass.

If this occurs, we can get symbol mismatch errors.

Ultimately, the sstate and the uninative versions need to match so we
should use the same tarball as uninative.bbclass is using, not the one
we built.

[YOCTO #12405]

(From OE-Core rev: 1bde969058f7e832db0e7eb9c6f7ef00f027628c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-11 21:47:34 +00:00
David Reyna 2021e95bcd bitbake: toaster: allow dots in user path names
The dot '.' character should be allowed in the user paths for
local non-git layers, DL_DIR, and SSTATE_DIR.

[YOCTO #10650]

(Bitbake rev: ca9b9ffc250eb3ece5af3d64ff5febef69d555b0)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:41:27 +00:00
David Reyna ecb828a68f bitbake: toaster: reserve HEAD from imported layers
The HEAD reference in Toaster layers are reserved for the
"Local Yocto Project" layers, stored at the top directory.
Imported layers are not allowed to use this since they are
managed differently - for example the 'remotes' will collide.

Fix the add layer handler to not drop the data fields when it
is a git repo.

Explicitly inform the user when an internal Toaster error is
returned via AJAX, so that they know why clicking the layer add
button did not do anything.

[YOCTO #9924]

(Bitbake rev: 90fb89e5e3ada9e36ab0b2a5a0dbfd74f9be279f)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:41:27 +00:00
Armin Kuster 99656fecf4 ruby: Security fix for CVE-2017-14064
affects ruby < 2.4.1

(From OE-Core rev: 2db9d0854239bca9d5c4efde808a1931c4c0ca0e)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:49 +00:00
Armin Kuster 1e98c0ec2f curl: Security fix for CVE-2017-1000101
Affected versions: curl 7.34.0 to and including 7.54.1
Not affected versions: curl < 7.34.0 and >= 7.55.0

(From OE-Core rev: a12cc7500a224d4be91f67f7921e1f16fcf880d4)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:49 +00:00
Armin Kuster 0037dd8d8d curl: Security fix for CVE-2017-1000100
Affected versions: libcurl 7.15.0 to and including 7.54.1
Not affected versions: libcurl < 7.15.0 and >= 7.55.0

(From OE-Core rev: eafbe104727d79643c1738360789ae455fff116c)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:49 +00:00
Rajkumar Veer a2ad903fa9 tiff: Security fix for CVE-2017-7593
(From OE-Core rev: b6ec8ab42befaa07c859a5c5cc14611b821a1304)

Signed-off-by: Rajkumar Veer <rveer@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:49 +00:00
Rajkumar Veer 2aed68963f tiff: Security fix for CVE-2017-7602
(From OE-Core rev: 957e9f92b17c6b268e6c037666d2f32ef23f7bf9)

Signed-off-by: Rajkumar Veer <rveer@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:49 +00:00
Rajkumar Veer a05828ec79 tiff: Security fix for CVE-2017-7601
(From OE-Core rev: 7423b8318a381d139590f6ab2c50874d0eb775a6)

Signed-off-by: Rajkumar Veer <rveer@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:49 +00:00
Rajkumar Veer 599438440e tiff: Security fix for CVE-2017-7598
(From OE-Core rev: 13704be6d172eef2459bb3a5ceed47711ef08b99)

Signed-off-by: Rajkumar Veer <rveer@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:49 +00:00
Rajkumar Veer 2b6b802cd5 tiff: Security fix for CVE-2017-7596
(From OE-Core rev: e22d6cab6dcfa020408b541242c26a994958831f)

Signed-off-by: Rajkumar Veer <rveer@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:49 +00:00
Rajkumar Veer 8e0f6c5ae5 tiff: Security fix for CVE-2017-7595
(From OE-Core rev: 7af2f595a595533356ddef42e542825faab3382a)

Signed-off-by: Rajkumar Veer <rveer@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:49 +00:00
Rajkumar Veer 2e37f28552 tiff: Security fix for CVE-2017-7594
(From OE-Core rev: ac828e5620430cff207ac5dc14dc5e2dbf99f9de)

Signed-off-by: Rajkumar Veer <rveer@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:49 +00:00
Rajkumar Veer 9f2bab8493 tiff: Security fix for CVE-2017-7592
(From OE-Core rev: 4c918f46c40878ae91d8de4223c6370f8c10ec66)

Signed-off-by: Rajkumar Veer <rveer@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:49 +00:00
Rajkumar Veer 7af530d449 tiff: Security fix for CVE-2016-10270
(From OE-Core rev: 9600bca011fe5fd2837606ab05e64325b3f12114)

Signed-off-by: Rajkumar Veer <rveer@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:48 +00:00
Rajkumar Veer 6a2f7581c5 tiff: Security fix for CVE-2016-10269
(From OE-Core rev: f9efc9fc8d26784c7a2017efc771e809e6471911)

Signed-off-by: Rajkumar Veer <rveer@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:48 +00:00
Rajkumar Veer dbd47a912b tiff: Security fix CVE-2016-10267
(From OE-Core rev: 91aff69faa7861f9872331ea386145667607550c)

Signed-off-by: Rajkumar Veer <rveer@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:48 +00:00
Rajkumar Veer 3b7576ac22 tiff: Security fix CVE-2016-10266
(From OE-Core rev: aa1dc0afd99970f474f38a671e6c49aa2090fbe3)

Signed-off-by: Rajkumar Veer <rveer@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:48 +00:00
Rajkumar Veer 46ee394865 tiff: Security fix CVE-2016-10268
(From OE-Core rev: a384e06b6ac12541b9928ecbc5834ef1d505ac0f)

Signed-off-by: Rajkumar Veer <rveer@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:48 +00:00
Rajkumar Veer ca16811eed tiff: Secruity fix CVE-2016-10093
(From OE-Core rev: a34da9ea14275d0bf8e9f2b7df7416fe622770cb)

Signed-off-by: Rajkumar Veer <rveer@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:48 +00:00
Rajkumar Veer 18a0ad760c tiff: Security fix for CVE-2016-10271
(From OE-Core rev: d358e9bda3dcbdcfff7008804099f89f97f8bf79)

Signed-off-by: Rajkumar Veer <rveer@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:48 +00:00
André Draszik 0d5277acc3 valgrind: enable on mips soft-float
Valgrind support for mips soft-float hosts has been fixed
in the 3.12 [1] and 3.13 [2] releases, so let's start
building it on those, too.

[1] https://sourceware.org/git/?p=valgrind.git;a=commit;h=8f0070d31daea6f0ed18f8fe69498a67530bfcbb
[2] https://sourceware.org/git/?p=valgrind.git;a=commit;h=3172936d63da4b6257099bc05aee5793978269cb

(From OE-Core rev: fe734c3adddef18e1dade182eb77c6d3c923e498)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit 82dbad6aa1390668aa86d28c8a3125b68d6072fa)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:48 +00:00
Jose Perez Carranza 595c92e204 oeqa/sdk: Replace buildiptables for buildlzip tests
Buildiptables test cases are conflicting with images built with “musl”
as standard C library, in order to avoid those issues lzip package was
selected to be used on the tests as this does not have any "musl"
dependency.

[YOCTO #11713]

(From OE-Core rev: b798284f62b3cb171373716b1ee84403439314aa)

(From OE-Core rev: 0699de9efe40029a6c5e799bb8c9616337fd163e)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:48 +00:00
Jose Perez Carranza a6e7401378 oeqa/runtime: Replace buildiptables for buildlzip on runtime tests
Buildiptables test cases are conflicting with images built with “musl”
as standard C library, in order to avoid those issues lzip package was
selected to be used on the tests as this does not have any "musl"
dependency.

This patch is applicable for testimage tests

[YOCTO # 11713]

(From OE-Core rev: 41683e0ab316049e28b1f4ceaf39f0fe17722d92)

(From OE-Core rev: d40bcafb574788ed26855c5d1a072523893c1b4b)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:48 +00:00
Tom Rini d096d7e850 image_types.bbclass: Make u-boot signed images more versatile
With the introduction of chaining compression/conversion support we can
convert the old image_types_uboot.bbclass code that did a hand-chaining
of a set of ${filesystem}.${compression} into generic and arbitrary
support to sign whatever the user wants to sign for their image.

This, for the record, does remove setting a valid compression type in
the record in favour of just saying none.  This is not a generally
useful feature in U-Boot and I believe being versatile in terms of being
able to pass in arbitrary compressions is more important.

(From OE-Core rev: 979ff606d8c4c6f66c6dc533a92212f18708089e)

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:48 +00:00
Joshua Watt ebb625a140 openssh: Fix key generation with systemd
106b59d9 broke SSH host key generation when systemd and a read-only root file
system are in use because there isn't a way for systemd to get the optional
weak assigment of SYSCONFDIR from /etc/default/sshd and still provide a default
value if it is not specified. Instead, move the logic for determining if keys
need to be created to a helper script that both the SysV init script and the
systemd unit file can reference.

This does mean that the systemd unit file can't check for file existence to
know if it should start the service, but it wasn't able to do that correctly
anyway anymore. This should be a problem since the serivce is only run once per
power cycle by systemd, and should exit quickly if the keys already exist

(From OE-Core rev: 73f1397d86f33abace089cc9a28e859b47bb7b6c)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit 7e49c5879862253ae1b6a26535d07a2740a95798)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:48 +00:00
André Draszik 9f981b48cf json-c: backport patch to fix gcc7 compilation
(The native version might be being built using gcc-7)

We can't cherry-pick a commit from master, as master
has upgraded json-c at the same time as applying
this patch, see commit
ccf630e78aad ("json-c: Upgrade to 0.12.1 release")

(From OE-Core rev: 9b0cb8149ce82c0e6fa3054b54d35e9bf1353bf0)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:48 +00:00
André Draszik 7ca04fef1b useradd-staticids: don't create username-group if gid is specified
Adding distcc to an image, and having staticids enabled,
doesn't work as it causes a a superfluous 'distcc' group
being added using a conflicting  GID, thus failing the
build:
 | ERROR: distcc-3.2-r0 do_prepare_recipe_sysroot: distcc: groupadd command did not succeed.

Compared to other recipes, the distcc recipe only
specifies --gid for the primary group, and doesn't specify
--no-user-group, but when --gid is given, it doesn't make
sense to create a matching username-group in addition,
even if --no-user-group was not specified, and 'useradd'
actually complains if --gid and --user-group are given
both.

If only --gid is given, the current code in here
effectively behaves as if --user-group was specified,
taking the group-id of the username-group from the
--gid parameter. This causes the error above, as we try
to add a new group (distcc) with an existing group-id
(nogroup).

This is contrary to the comment in this file just above,
contrary to what useradd can do, contrary to behaviour
without the useradd-staticids bbclass, and non-intuitive.

Change the code such that a username-group is only created
- if a primary group using --gid was not specified, or
- if --no-user-group was not specified

To be in line with useradd, if gid is not given, and
--no-user-group is given, we add the user to the group
'users', which mimics useradd's behaviour.

(From OE-Core rev: b1843e60ebe534243b49f3685540fa5ea49d5f35)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

(cherry picked from commit fc3a86ae68919cec72c1a8ae0f9ba1f98ae13f0d)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:48 +00:00
André Draszik 8c3ea68812 curl: enable threaded resolver
Multi-threaded applications using libcurl crash
on DNS timeouts when built using OE.

The reason is as follows:
By default, libcurl implements DNS timeouts using a
timer (alarm()) and a pair of setjmp()/longjmp().
This approach is unsafe in multi-threaded applications
for various reasons, as e.g. explained in the relevant
man-pages.

To avoid this, libcurl can be compiled with a built-in
threaded resolver, or against the c-ares asynchronous
resolver library.

To keep extra dependencies to a minimum, and to mimic
other distributions (debian at least), and because
c-ares is not available in OE-core, add a PACKAGECONFIG
to be able to enable use of of the built-in threaded
resolver and enable it by default.

(From OE-Core rev: f4dbb4ce29fcd03e64c83efea39f32df437c21cc)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

(cherry picked from commit 41f1e44fce976c4140cda62a41349e91e69d04ef)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:48 +00:00
André Draszik 47d26eef52 kernel-fitimage: support MIPS (compressed)
On MIPS, the compressed kernel image target is vmlinuz.bin

(From OE-Core rev: ed459bc971697fdd46e5204f625cde7afcdef6eb)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit 74d97569aa4e0f82e094a539dec302076103affa)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
André Draszik 431cb72138 kernel-uboot: support compressed kernel on MIPS
MIPS generates vmlinuz.bin when compression in the kernel build is
enabled, including any necessary objcopy so we can leverage that
and skip our manual invocation of objcopy here. We just have to
put the file into the right place for the rest of the build to
find it.

(From OE-Core rev: 3db4004b2982a297a02ebeb6b0cb90cebdb44a0a)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit 00bc7682473c2558d72ba42c182f8e3bd445f8af)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
André Draszik 1e69586439 kernel-uimage: optimise UBOOT_ENTRYSYMBOL support
This is the remaining local change to a fix similar to
commit e0b4f018d1c2 ("kernel-uimage.bbclass: Fix up
generation of uImage from vmlinux"):

Make awk exit on match to save a few CPU cycles so as
to make this similar to kernel-fitimage.bbclass

(From OE-Core rev: d60b3d02949ba318e30627131fd38f74c74cf590)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit 614e8be7a89a2f2113fa40b11e7a05b9e8155f6a)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
André Draszik 01e24eb47b kernel-fitimage: unbreak UBOOT_ENTRYSYMBOL support
- vmlinux is located in ${B}, not ${S}.
- parsing of nm output got broken completely in commit
  b406a89935f148779569fa3770776e009dd51f13 ("kernel-fitimage: add
  initramfs support"), commit ec755d2524
  in yocto

While at it, make awk exit on match to save a few CPU cycles.

(From OE-Core rev: 1353892f3a130bcfa4e9c5b36b3ed7eb4a2c872d)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit 9d2ec9c046c4a9c6a842d28133d40639f5a65297)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
André Draszik 637fec385a kernel-fitimage: sanitize dtb section name (unbreak MIPS)
We can't build fitImages for MIPS any more:
| Error: fit-image.its:21.27-28 syntax error
| FATAL ERROR: Unable to parse input tree
| uboot-mkimage: Can't read arch/mips/boot/fitImage.tmp: Invalid argument

Since commit cd2ed7f80b555add07795cc0cbaee866e6c193a3
("kernel-fitimage: dtb sections named by their filenames
and one config section for each dtb"), commit
1ec405ef5d in yocto, dtb
sections are named by the DTB filename, but the filename
can legally be in a subdirectory below
arch/$arch/boot/dts/, and on MIPS all DTBs are actually
in a subdirectory.

If so, mkimage fails with the above error message.

Unbreak this by replacing the offending character
(directory separator /)

(From OE-Core rev: feb78cb536a5e5cc9f1c36014b1a1ae1c147f45c)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit 335fc50cf54e47db4e3d5c35a9846484faf0270f)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
Nathan Rossi 8deaf6612a kernel-uimage.bbclass: Fix up generation of uImage from vmlinux
Fix up the generation of uImage from vmlinux when KEEPUIMAGE != 'yes'.
This fixes up the working directory that do_uboot_mkimage is run from,
such that it is run from the ${B} directory to access built artefacts.

Simplify the logic in the task so that the parse step either adds the
task or not if the conditions are met. This reduces the need for the
task to run in cases when it is not used. The task is also changed to
depend on the kernel_link_images task as arch/<arch>/boot/* is not
available until after kernel_link_images in certain cases (e.g.
vmlinux/uImage only KERNEL_IMAGETYPES).

Fix up the use of ${S}/vmlinux when pulling the entry symbols
address so that it accesses the vmlinux in ${B}.

(From OE-Core rev: 60f0e4b18c7d77d7be2b22573b7d0c7ad3d0832f)

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit e0b4f018d1c2a65e66c81e5be1da8894e9a6c132)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
Richard Purdie b286ba24f4 ca-certificates: Fix postinst dependency issues
We were relying on running ca-certificates from the -native version. This
meant the host and target path layouts had to match which might not be true,
it certainly isn't true for the sdk builds.

There was a dependency on run-parts which wasn't represented (we can get it
from busybox or debianutils).

Since this is an allarch script, call the script directly, making sure debianutils
and openssl are available as postinst rootfs time to resolve the issues.

(From OE-Core rev: a406704fd68d08c3916b7986f96175be34affc50)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

(cherry picked from commit d9575e05f2cb8bf293534c036ddc0d0336701256)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
Richard Purdie cfa154ec74 debianutils: Add a native version (for run-parts)
(From OE-Core rev: 4c8be205c317eaa649d034de22b960409bb3fa3b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

(cherry picked from commit 46985e66c193ad2aa9b575aeab5c78740bc5a4ed)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
André Draszik 5399eb5636 copyleft_filter.bbclass: restore possiblity to filter on type
Since the changes introduced in ae9102bda3
("copyleft_filter.bbclass: Allow to filter on name"), it is
impossible to filter on the recipe type, all recipes are
treated as though they should be included if the license
matches, irrespective of the COPYLEFT_RECIPE_TYPES
variable.

Fix this.

(From OE-Core rev: 23b520c42e93e47e3a19037877281af673144b31)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit e612dfa520c7d7ecf58006e82189be601204f38d)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
André Draszik 0c9925f229 selftest/archiver: only execute deploy_archives task
There should be no reason to execute a full build, as we're
just interested in the deployment of the archives.

The newly added tests already do the same.

(From OE-Core rev: 89a00238c45b0457bdf7add3629124901bc72f4b)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit 78c2897dff7cd9fe2cab511549cb146d5231e573)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
André Draszik edae320ef5 selftest/archiver: add tests for recipe type filtering
The archiver used to be able to filter based on COPYLEFT_RECIPE_TYPES.

Unfortunately, this got broken with the fix for
  https://bugzilla.yoctoproject.org/show_bug.cgi?id=6929
in commit ae9102bda3 ("copyleft_filter.bbclass: Allow to filter on name")

Add two tests to prevent that from happening again.

(From OE-Core rev: 11064f15d7fc10b99eac4084af48a91d8b212932)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit 709f02c5cb25983090251c6237bac4fc0a295c4f)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
André Draszik 28b8850356 openssh: allow to override OpenSSL HostKeys when read-only-rootfs
With these changes it is possible to have a .bbappend that
- sets SYSCONFDIR to some persistent storage
- modifies SYSCONFDIR/sshd_config to use ssh host keys from
  the (writable) sysconfdir

(From OE-Core rev: 79c7c8342859306750f0af17210a183fdc543caf)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Reviewed-by: Stephane Ayotte <sayotte@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit 106b59d9f96f70d133fa1421091ad280d27a5b6a)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
André Draszik cd28daadfd busybox: add backported patch to support iproute 'scope'
This is needed for avahi-autoipd, which attempts to
create a link-scope route as part of its work.

Without iproute scope support in busybox, the route is
not created due to an error message, and hence we
aren't accessible by, and can't access ourselves,
IP addresses outside the link-local scope
(169.254.0.0/16) unless we also have a proper
non link-local IP address, which somehow defeats the
purpose of zeroconf.

(From OE-Core rev: d0047eb364b5e38c3fbd349c40c71f6c50a1a22d)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Reviewed-by: Stephane Ayotte <sayotte@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit bd06a1cbe8e97b7f66979b12d4d248092379df4a)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
Ming Liu 5cb078a086 busybox: fix a linking issue
A following linking error was observed:
| ==========
| archival/lib.a(tar.o): In function `tar_main':
| archival/tar.c:1168: undefined reference to `unpack_Z_stream'
| archival/tar.c:1168: undefined reference to `unpack_Z_stream'
| ld: busybox_unstripped: hidden symbol `unpack_Z_stream' isn't defined
| ld: final link failed: Bad value

this happened with clang compiler, with the following configs:
| CONFIG_TAR=y
| # CONFIG_FEATURE_SEAMLESS_Z is not set

which can be fixed by adding IF_FEATURE_* checks in.

(From OE-Core rev: 5e9e8b336931335c660733a269c59ae0547019bd)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit 789254b5ae983a94346f53de18286713b80eb5f2)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
André Draszik 7deed8ff4e gdb: fix gdbserver not working in musl/mips context
Similar to
  https://bugs.lede-project.org/index.php?do=details&task_id=637&openedfrom=-1%2Bweek

(From OE-Core rev: c33426e2011054043c276c72b8af651a9aa179ad)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Acked-by: Sylvain Lemieux <slemieux@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

(cherry picked from commit 0b9d94a5e54191f93659f7b4e7a3cb4376487823)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00
Peter Kjellerstedt b085162a8e oe-pkgdata-util: package-info: Allow extra variables to be displayed
By specifying the -e <var> option one or multiple times, extra
variables available in the pkgdata can be displayed, e.,g,
`oe-pkgdata-util package-info -e SUMMARY -e LICENSE ...`. The extra
variables displayed are quoted since some of them may contain
whitespace.

(From OE-Core rev: 265db40c75b6a4b9a666e49dd1739423eb711695)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05 22:39:47 +00:00