init-install.sh: support multiple kernels and don't assume vmlinuz
Since kernels will not necessarily be installed as vmlinuz anymore,
don't assume that's its name for either the bootloader config or the
copy of the kernel.
Also, allow installing multiple kernels by searching for common kernel
names.
Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
packagegroup-core-boot: add kernel for EFI systems
Previously this wasn't needed because the kernel was added at image
creation time to the boot partition. Now that the boot partition is
created from the /boot/ partition of the rootfs, it needs to be
installed there.
Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
If the EFI_PROVIDER is systemd-boot, install as boot(x64|ia32) as per
convention. If its not the EFI_PROVIDER, install as
systemd-boot(x64|ia32), as to not collide with other possible
bootloaders.
Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
init-install-efi.sh: Update to support installing multiple kernels
We can no longer rely on the kernel having a static name of "vmlinuz".
This means we can't use it as a sentinel value in our sed commands, and
we can't just copy vmlinuz to the boot directory.
Instead, we'll use "root=" as the sentinel value for our sed commands,
and we'll search for common kernel names to copy into our boot
directory.
Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
wic: add wks file to make use of exclude-path functionality
Using --exclude-path and a wks.in file we can create an image that takes
the /boot/ directory for the boot partition, has an empty /boot/
directory in the rootfs partition. The boot partition gets mounted to
/boot/ after startup.
Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rather than renaming the kernel to vmlinuz and assuming the name is
vmlinuz in the grub.cfg, copy to ${KERNEL_IMAGETYPE} and also use that
value in the grub.cfg file.
Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
packagegroup-core-boot: add bootloader to EFI systems
Since the bootloader is now installed instead of added at image creation
time, this is necessary for booting.
Also set the default to grub-efi. This is done because a default of
grub-efi is already used by live-vm-common.bbclass, and in the event
that EFI_PROVIDER isn't defined errors would occur.
Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Khem Raj [Sat, 3 Mar 2018 20:24:39 +0000 (12:24 -0800)]
glibc: Compile using thumb2 for arch > armv5 if user chooses
For arm we enforce ARM mode regardless of ARM_INSTRUCTION_SET
choice from config metadata, glibc works fine with thumb2 for
armv7+ so limit the restriction to armv5 and lower, tested on
rpi3 works equally well as arm mode glibc and sheds about 0.5MB
in size for main package alone. Other glibc build packages also
gets smaller
ARM: 2696 KiB libc6
Thumb2: 2132 KiB libc6
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Also, take over the other recipes that were just enabled for
ptest:
- liberror-perl
- liburi-perl
- libxml-parser-perl
- libxml-perl
- libxml-simple-perl
Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Ross Burton [Fri, 2 Mar 2018 20:52:54 +0000 (20:52 +0000)]
populate_sdk_base: depend on nativesdk-glibc-locale
If we're building a SDK and we're using glibc so may be installing locales,
add a build-dependency on natiesdk-glibc-locale so the locales we need will
exist.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Ross Burton [Fri, 2 Mar 2018 14:06:49 +0000 (14:06 +0000)]
xcb-proto: solve python cache collision
Because I didn't really want python3-native to be at the bottom of the
entire X11 stack this recipe jumps through a small hoop to use the host
Python to run some modules it installs into the sysroot.
The Makefile compiles the Python module, which is good as the cache file
is recorded in the sstate manifest so when the package is removed from the
sysroot all of it is removed.
However in an enviroment where the sstate is shared between multiple hosts
it is possible that a different Python is used and this will generate a
new cache when the code is executed, which is not recorded in the manifest.
Eventually you'll end up with ownerless cache files in a sysroot which
conflict with the same file coming from a sstate upgrade.
Solve this with a SSTATE_INST_POSTRM which is ran when sstate is removed
to ensure that there are no Python cache files left behind.
[ YOCTO #11809 ]
Signed-off-by: Ross Burton <ross.burton@intel.com>
busybox: separate inittab into own package, due to SERIAL_CONSOLES being machine-specific
* Create busybox-inittab recipe to produce machine-specific package with /etc/inittab
and necessary getty calls for a machine, based on SERIAL_CONSOLES, similar to how
sysvinit-inittab was done
* Since CONFIG_FEATURE_USE_INITTAB is controlled by VIRTUAL-RUNTIME_init_manager, make
main busybox package RDEPENDS on busybox-inittab when init_manager is set to busybox
Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Fri, 2 Mar 2018 18:17:40 +0000 (18:17 +0000)]
base: Handle backfilling in anonymous python code, not event handler
Handling of backfilling is trickier than you'd think. We need this to execute
early enough that the user will see the changes in bitbake -e and other output
yet late enough that the virtclass extensions have changed the tunes before
it executes.
It makes more sense to execute this at anonymous python time now bitbake -e
correctly handles this and that unbreaks multilib corruption of these variables.
[YOCTO #12373]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Sat, 3 Mar 2018 08:39:37 +0000 (08:39 +0000)]
image: Remove the do_package_write_* tasks
Now we're filtering tasks in the rpm indexing code so that tasks can only
see the packages they really depend upon, having noexec package_write tasks
around is causing problems since the tasks exist but don't have manifests.
Removing the tasks entirely solves this problem and streamlines the
task execution graph too.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Fri, 2 Mar 2018 18:18:04 +0000 (18:18 +0000)]
base: Don't print LICENSE warning for non-recipe context
Now bitbake is executing anonymous python fragments in bitbake -e,
ensure we don't show the error in that context (where PN would be
unchanged from default).
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Juro Bystricky [Thu, 1 Mar 2018 22:53:18 +0000 (14:53 -0800)]
libjpeg-turbo: improve reproducibility
Build date ends up embbedded in binary images, breaking reproducibility
of jpeg-tools and libturbojpeg. To enable reproducible builds, build date can be
specified during configuration, via "--with_build_date=<date>".
If SOURCE_DATE_EPOCH is specified we configure libjpeg-turbo with this value as
build date. Although the build date is a generic string, we keep it in the same
format YYYYMMDD.
[YOCTO #12526]
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Ross Burton [Thu, 1 Mar 2018 22:20:39 +0000 (22:20 +0000)]
libepoxy: improve musl patch
dlvsym() is used by the libepoxy test suite, but this is glibc-specific and
isn't present in musl.
Instead of adding an option to control whether dlvsym is available (which could
be detected by Meson), as we don't install the test suite simply add an option
to disable the entire test suite (and submit the patch upstream).
Also remove the build dependency on util-macros as that is a remnant of the
autotools build.
Signed-off-by: Ross Burton <ross.burton@intel.com>
libepoxy 1.4.3 did not compile successfully because of
implicit symbol definitions and link-time errors.
Patch to disable 'dlvsym' has also been forward-ported
to be applicable to version 1.5.0.
The patch 'Add-fallback-definition-for-EGL-CAST.patch' is
mainline now; thus it can be safely removed.
Also, the patch
0001-Define-MESA_EGL_NO_X11_HEADERS-before-including-eglp.patch
is no longer required since mainline fixed this too.
Signed-off-by: Francesco Giancane <francescogiancane8@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Martin Jansa [Thu, 1 Mar 2018 10:11:38 +0000 (10:11 +0000)]
libpam: be more strict about user's sanity
* replace do_pam_sanity function with distro_features_check inherit
* fixes:
WARNING: libpam-1.3.0-r5 do_pam_sanity: Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly
in world builds and prevents user to build libpam at all without pam
in DISTRO_FEATURES, I don't see any users of this which wouldn't respect
pam in DISTRO_FEATURES
* only libuser is depending on libpam without respecting DISTRO_FEATURES
* there are few recipes in meta-oe layers depending on libpam without
respecting DISTRO_FEATURES, I've sent patch for them:
samba, openwsman, pam-ssh-agent-auth, sblim-sfcb, passwdqc, python-pam, smbnetfs
and omxplayer in meta-raspberrypi, I've sent PR for that one:
https://github.com/agherzan/meta-raspberrypi/pull/192
* poky-lsb will need to add pam to DISTRO_FEATURES in order to build
packagegroup-core-lsb
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Bruce Ashfield [Wed, 28 Feb 2018 02:06:54 +0000 (21:06 -0500)]
linux-yocto/4.14/4.15: yaffs2 fixes
Integrating the following fixes for yaffs2:
9f9649fffac9 yaffs2: Adjust the timer callback and init functions 0ef24a829eee yaffs2: include rawnand.h instead of nand.h
Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Paulo Neves [Sun, 25 Feb 2018 16:49:25 +0000 (17:49 +0100)]
wic: partition plugin wrongly assumes it is rootfs
The partition plugin is used as the base for other plugins.
One of the methods the plugins use, is the prepare_rootfs
method.
The prepare_rootfs method wrongly assumes that the value
ROOTFS_SIZE from bitbake datastore is relevant to every
invocation of prepare_rootfs, which it clearly is not, for
example in the bootimg-partition case.
This commit adds an optional argument to prepare_rootfs
where a caller can tell prepare_rootfs if it is an actual
rootfs and whether related rootfs information retrieved from
bitbake is valid. The default behavior of this optional
argument is to assume that the invocation is an actual
rootfs, to maintain compatibility with previous
implementations.
Signed-off-by: Paulo Neves <ptsneves@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
do_post_partition hook is needed if some operations like security signing
the parition needs to be done. source plugins can make use of this to implement
post operatiosn in do_post_partition. do_post_partition is called after
do_prepare_partition if present.
Signed-off-by: Parthiban Nallathambi <pn@denx.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
André Draszik [Fri, 23 Feb 2018 14:50:13 +0000 (14:50 +0000)]
cmake: refactor compile and install for easier re-use
cmake_do_compile() and cmake_do_install() basically do the
same, except they use a different --target, and at the
moment this is copy/pasted code with a minor modification.
Other recipes which e.g. might want to support compilation
as part of ptest have to do the same. This is a bit
inconvenient.
By factoring out all of this into a common helper,
cmake_runcmake_build(), this is easily re-used. An
(imaginary) recipe can compile ptest support simply by
using
cmake_runcmake_build --target buildtest-TESTS
(assuming such a build target exists).
Also, this now is very similar to oe_runmake().
Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Robert Yang [Thu, 22 Feb 2018 09:19:42 +0000 (17:19 +0800)]
git: 2.15.0 -> 2.16.1
Add /usr/share/git-core/templates/hooks/fsmonitor-watchman.sample to PERLTOOLS to fix:
ERROR: git-2.16.1-r0 do_package_qa: QA Issue: /usr/share/git-core/templates/hooks/fsmonitor-watchman.sample contained in package git requires /usr/bin/perl, but no providers found in RDEPENDS_git? [file-rdeps]
ERROR: git-2.16.1-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Ross Burton [Thu, 1 Mar 2018 18:26:32 +0000 (18:26 +0000)]
populate_sdk: install UTF-8 locales in SDKs
As glibc 2.27 can't read older locale-archives, SDKs using glibc 2.27 on hosts
using glibc earlier than 2.27 won't be able to find any locales, so bitbake
won't start and Python can't use UTF-8.
So by default install all locales into the SDK. Special-case Extensible SDKs by
installing no locales as they ship glibc in a buildtools, and that will have the
locales.
Locale installation requires cross-localedef, so add that to DEPENDS.
Also remove the explicit en_US addition in buildtools-tarball as it is now
redundant.
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Ross Burton [Thu, 1 Mar 2018 18:26:27 +0000 (18:26 +0000)]
glibc: relocate locale paths in nativesdk
nativesdk is built with a specific prefix but this will be different at install
time, however glibc hard-codes the path to locale files. Expand these strings to 4K and move them to a magic segment which we can relocate when the SDK is installed.
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Juro Bystricky [Tue, 27 Feb 2018 20:19:26 +0000 (12:19 -0800)]
dbus-test_1.12.2: various fixes
The result of running dbus-test-ptest was a series of
various segfaults, interpreted as FAILs. This was a direct consequence
of the test suite loading the installed shared library libdbus-1.so, not the
one built along the test suite.
While we normally want to test against the installed libraries, we cannot
do this in this case as the test suite expects a library that is configured/compiled
differently from the installed one. We could configure the installed library
identically as the test suite expects, (and there should be no issues), however
this is not desirable for performance reasons.
Hence we need to use the library built along with the test suite.
Of course, running the test suite against its own library does not
test the installed library, however they are both built from the same
sources so that can give us some kind of indication.
The following changes were made:
1. Configure the test library as close as possible to the installed one,
with some additional configuration options that are needed for testing.
(Use dbus_1.12.2.bb recipe as a template)
2. Include the shared libraries in the package, use LD_LIBRARY_PATH during
testing to load them instead of the installed ones.
3. Add a few more tests. (There are still some additional tests built that
are not used, but they would have to be special-cased).
4. When evaluating the test results, differentiate between "FAIL" and "SKIP"