Age | Commit message (Collapse) | Author | Files |
|
Mixing PACKAGE_ARCH with BUILD_* has always seemed somewhat odd. This
comes into play when building different SDKMACHINES as the PN space
for the recipes did once overlap. With the modern build process we
use, this overlap is a thing of the past since PN has SDK_SYS appended
to it.
cross.bbclass sets PACKAGE_ARCH == BUILD_ARCH so this change only affects
crosssdk.bbclass where PACKAGE_ARCH == SDK_ARCH.
The current structure is quite confusing and this removes this artefact
of history, allowing other gcc cleanups rather than meaning we futher
complicate the code.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The code was making an assumption that the only PACKAGE_ARCH in use
was TUNE_PKGARCH. This is incorrect so iterate over the list from
PACKAGE_EXTRA_ARCH instead.
We also need to change allarch to preserve this variable, else the
staging code doesn't function. We do this in a way which clears the
variable history so that the task hashes remain unaffected.
[Thanks to Andrew Goodbody <andrew.goodbody@cambrionix.com> for
testing/fixing]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If you use subprocess.check_output() the traceback will contain the output
when the command fails which is very useful for debugging. There is no
good reason not to use this everywhere.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
With the recipe specific sysroots, we need a clean tmpdir, else pseudo-native,
openssl-native, subversion-native and serf-native need to be manually cleaned.
After these there are probably more places where software doesn't rebuild correctly
even if we pass in new parameters to it.
The simplest solution is to force people to start from a clean TMPDIR since
everything would rebuild anyway.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
kernel-fitimage:fitimage_assemble() was calling copy_initramfs from
kernel.bbclass which decompresses the initramfs cpio. Assume that if
INITRAMFS_FSTYPES includes a compressed cpio, that is what it desired in
the FIT image.
Signed-off-by: Rick Altherr <raltherr@google.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Add blank lines in comments to make it easy for readind and updating.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
|
|
Fixed:
- Add QB_NETWORK_DEVICE to set network device, it will be used by both
slirp and tap.
- Set QB_NETWORK_DEVICE to "-device virtio-net-pci" in qemuboot.bbclass
but runqemu will default to "-device e1000" when QB_NETWORK_DEVICE is
not set, this is because oe-core's qemu targets support
virtio-net-pci, but the one outside of oe-core may not,
"-device e1000" is more common.
- Set hostfwd by default: 2222 -> 22, 2323 -> 23, and it will choose a
usable port when the one like 222 is being used. This can avoid
conflicts when multilib slirp qemus are running. We can forward more
ports by default if needed, and bsp.conf can custom it.
- Use different mac sections for slirp and tap to fix conflicts when
running both of them on the same host.
[YOCTO #7887]
CC: Nathan Rossi <nathan@nathanrossi.com>
CC: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
|
|
This migrates current testexport implmentation to use the
new OEQA framework.
[YOCTO #10686]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
|
|
This allows to use the package install feature with
the new OEQA framework.
[YOCTO #10234]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
|
|
testimage support the installation of packages without a package
manager in the target. This adds support for package extraction
required to support the installation feature.
[YOCTO #10234]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
|
|
This migrates the smart test from the old framework to
the new one. This has its own commit because smart
test was using bb and oe libraries that are available
when exporting the test cases to run in a different host.
Because of the removal of bb and oe libraries index and
packages feeds creation will be managed in testimage bbclass.
[YOCTO #10234]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
|
|
This migrates testimage class to use the new framework. Most of
the code added here is to get rid off the data store dependency.
[YOCTO #10234]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
|
|
To avoid getVar calls inside a utils module, also moves
get_host_dumper import inside testexport isn't needed.
[YOCTO #10231]
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
|
|
Common files was move to oeqa/files from oeqa/runtime/files
because the same files are used across Runtime,SDK,eSDK tests.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
|
|
TargetBuildProject was refactored to avoid bitbake dependency so
the instance don't allow to pass data store anymore.
classes/testimage: Export proxies before run tests
The TargetBuildProject based tests download archives from network.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
|
|
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
|
|
The TEST_LOG_DIR was used for store sdk_target_log this log
contains the output of the run of build commands now that information
could be found also on log.do_testsdk under WORKDIR.
The log will continue to store into SDK_DIR instead of TEST_LOG_DIR.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
|
|
The functionality provided is the same with imporvements on code
reuse and better interfaces.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
|
|
This function will generates testdata.json per SDK type.
[YOCTO #10231]
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
|
|
This function will generates testdata.json by image type.
[YOCTO #10231]
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
|
|
As STAGING_DIR_TARGET started to point to a recipe specific
sysroot wic is not able to add .env files when .wks file refers
to multiple rootfs recipes.
Used STAGING_DIR instead of STAGING_DIR_TARGET to make the
directory with .env files the same for all recipes.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Added RECIPE_SYSROOT_NATIVE to the WICVARS for wic
to be able to access it when run from bitbake.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Added dependency do_image_wic -> wic-tools:do_build to ensure
that all required tools are ready to use by wic.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
This patch is comparatively large and invasive. It does only do one thing, switching the
system to build using recipe specific sysroots and where changes could be isolated from it,
that has been done.
With the current single sysroot approach, its possible for software to find things which
aren't in their dependencies. This leads to a determinism problem and is a growing issue in
several of the market segments where OE makes sense. The way to solve this problem for OE is
to have seperate sysroots for each recipe and these will only contain the dependencies for
that recipe.
Its worth noting that this is not task specific sysroots and that OE's dependencies do vary
enormously by task. This did result in some implementation challenges. There is nothing stopping
the implementation of task specific sysroots at some later point based on this work but
that as deemed a bridge too far right now.
Implementation details:
* Rather than installing the sysroot artefacts into a combined sysroots, they are now placed in
TMPDIR/sysroot-components/PACKAGE_ARCH/PN.
* WORKDIR/recipe-sysroot and WORKDIR/recipe-sysroot-native are built by hardlinking in files
from the sysroot-component trees. These new directories are known as RECIPE_SYSROOT and
RECIPE_SYSROOT_NATIVE.
* This construction is primarily done by a new do_prepare_recipe_sysroot task which runs
before do_configure and consists of a call to the extend_recipe_sysroot function.
* Other tasks need things in the sysroot before/after this, e.g. do_patch needs quilt-native
and do_package_write_deb needs dpkg-native. The code therefore inspects the dependencies
for each task and adds extend_recipe_sysroot as a prefunc if it has populate_sysroot
dependencies.
* We have to do a search/replace 'fixme' operation on the files installed into the sysroot to
change hardcoded paths into the correct ones. We create a fixmepath file in the component
directory which lists the files which need this operation.
* Some files have "postinstall" commands which need to run against them, e.g. gdk-pixbuf each
time a new loader is added. These are handled by adding files in bindir with the name
prefixed by "postinst-" and are run in each sysroot as its created if they're present.
This did mean most sstate postinstalls have to be rewritten but there shouldn't be many of them.
* Since a recipe can have multiple tasks and these tasks can run against each other at the same
time we have to have a lock when we perform write operations against the sysroot. We also have
to maintain manifests of what we install against a task checksum of the dependency. If the
checksum changes, we remove its files and then add the new ones.
* The autotools logic for filtering the view of m4 files is no longer needed (and was the model
for the way extend_recipe_sysroot works).
* For autotools, we used to build a combined m4 macros directory which had both the native and
target m4 files. We can no longer do this so we use the target sysroot as the default and add
the native sysroot as an extra backup include path. If we don't do this, we'd have to build
target pkg-config before we could built anything using pkg-config for example (ditto gettext).
Such dependencies would be painful so we haven't required that.
* PKDDATA_DIR was moved out the sysroot and works as before using sstate to build a hybrid copy
for each machine. The paths therefore changed, the behaviour did not.
* The ccache class had to be reworked to function with rss.
* The TCBOOTSTRAP sysroot for compiler bootstrap is no longer needed but the -initial data
does have to be filtered out from the main recipe sysroots. Putting "-initial" in a normal
recipe name therefore remains a bad idea.
* The logic in insane needed tweaks to deal with the new path layout, as did the debug source
file extraction code in package.bbclass.
* The logic in sstate.bbclass had to be rewritten since it previously only performed search and
replace on extracted sstate and we now need this to happen even if the compiled path was
"correct". This in theory could cause a mild performance issue but since the sysroot data
was the main data that needed this and we'd have to do it there regardless with rss, I've opted
just to change the way the class for everything. The built output used to build the sstate output
is now retained and installed rather than deleted.
* The search and replace logic used in sstate objects also seemed weak/incorrect and didn't hold
up against testing. This has been rewritten too. There are some assumptions made about paths, we
save the 'proper' search and replace operations to fixmepath.cmd but then ignore this. What is
here works but is a little hardcoded and an area for future improvement.
* In order to work with eSDK we need a way to build something that looks like the old style sysroot.
"bitbake build-sysroots" will construct such a sysroot based on everything in the components
directory that matches the current MACHINE. It will allow transition of external tools and can
built target or native variants or both. It also supports a clean task. I'd suggest not relying on
this for anything other than transitional purposes though. To see XXX in that sysroot, you'd have
to have built that in a previous bitbake invocation.
* pseudo is run out of its components directory. This is fine as its statically linked.
* The hacks for wayland to see allarch dependencies in the multilib case are no longer needed
and can be dropped.
* wic needed more extensive changes to work with rss and the fixes are in a separate commit series
* Various oe-selftest tweaks were needed since tests did assume the location to binaries and the
combined sysroot in several cases.
* Most missing dependencies this work found have been sent out as separate patches as they were found
but a few tweaks are still included here.
* A late addition is that extend_recipe_sysroot became multilib aware and able to populate multilib
sysroots. I had hoped not to have to add that complexity but the meta-environment recipe forced my
hand. That implementation can probably be neater but this is on the list of things to cleanup later
at this point.
In summary, the impact people will likely see after this change:
* Recipes may fail with missing dependencies, particularly native tools like gettext-native,
glib-2.0-native and libxml2.0-native. Some hosts have these installed and will mask these errors
* Any recipe/class using SSTATEPOSTINSTFUNCS will need that code rewriting into a postinst
* There was a separate patch series dealing with roots postinst native dependency issues. Any postinst
which expects native tools at rootfs time will need to mark that dependency with PACKAGE_WRITE_DEPS.
There could well be other issues. This has been tested repeatedly against our autobuilders and oe-selftest
and issues found have been fixed. We believe at least OE-Core is in good shape but that doesn't mean
we've found all the issues.
Also, the logging is a bit chatty at the moment. It does help if something goes wrong and goes to the
task logfiles, not the console so I've intentionally left this like that for now. We can turn it down
easily enough in due course.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The exception handling in this function seemed mildly crazy. Python will
given perfectly good or in several cases better information if we let its
standard traceback/exception handling happen. Remove the pointless code.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The exception handling in this function seemed mildly crazy. Python will
given perfectly good or in several cases better information if we let its
standard traceback/exception handling happen. Remove the pointless code.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Currently if the dpkg-deb command fails you see an error message like this:
ERROR: nss-3.27.1-r0 do_package_write_ipk: opkg-build execution failed
ERROR: nss-3.27.1-r0 do_package_write_ipk: Function failed: do_package_ipk
which is pretty much useless. If we use subprocess.check_output, we see a
traceback and then:
Exception: subprocess.CalledProcessError: Command '<cmd>' returned non-zero exit status 1
Subprocess output:
<output>
which is much easier to debug from.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The exception handling in this function seemed mildly crazy. Python will
given perfectly good or in several cases better information if we let its
standard traceback/exception handling happen. Remove the pointless code
along with the duplicated key checking which was broken in the inner loop
by usage of the wrong variable.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Currently if the dpkg-deb command fails you see an error message like this:
ERROR: nss-3.27.1-r0 do_package_write_deb: dpkg-deb execution failed
ERROR: nss-3.27.1-r0 do_package_write_deb: Function failed: do_package_deb
which is pretty much useless. If we use subprocess.check_output, we see a
traceback and then:
Exception: subprocess.CalledProcessError: Command '<cmd>' returned non-zero exit status 1
Subprocess output:
<output>
which is much easier to debug from.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
wic-tools has tasks which would always rerun and not come from sstate
to ensure we have a correctly populated sysroot. This is low overhead
and can be ignored from an eSDK perspective.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Since Paul reverted the sstate.bbclass change which was checking the sstate
mirror test results, this change should also not be needed anymore.
This reverts commit e30f5002c4f216757ace27ad8d06164716ca46b5.
|
|
This code is already used in two places and we need it in others so
turn it into its own function.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The depmodwrapper dependency is not actually used by the class but
anyone using pkg_postinst_kernel-base() will need it.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
|
|
Qemu is used to run fc-cache on postinstall.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
|
|
gconftool-2 is used during postinstall.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
|
|
Qemu is used to run gio-querymodules on postinstall.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
|
|
glib-compile-schemas is needed during postinstall.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
|
|
Qemu is used to run gtk-query-immodules-* on postinstall.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
|
|
update-mime-database is used in postinstall.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
|
|
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
|
|
use_updatercd() will always return true in rootfs generation so
checking that is not required.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
|
|
The postinstall needs shadow-native, mark the dependency
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The postinstall needs systemd-systemctl-native, mark the dependency
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The postinstall needs qemu-native and gdk-pixbuf-native, mark these dependencies
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The postinstall needs kmod-native and depmodwrapper-cross, mark these dependencies.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
gdk-pixbuf-native and gtk-icon-utils-native are needed by the postinstall
scripts so mark the dependency. The utils may be needed at icon build
time too so DEPENDS is unchanged.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The dependencies of do_package_write_* tasks are either going to be packaging
tools needed to build the packages, or, native tools needed at postinst
time. Now we've formalised this dependency pattern, drop the hardcoded
list and work based on the rule. The package creation tools are usually
the same tools needed at rootfs/postinst time anyway so the difference is
moot.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Add a new variable to allow markup of postinstall (and preinst)
script dependnecies on native/cross tools.
If your postinstall can execute at rootfs creation time rather than on
target but depends on a native tool in order to execute, you need to
list that tool in PACKAGE_WRITE_DEPENDS.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This reverts commit 0ccb2efe9837e2915c093341a662dffc1df00866.
The OVS fails to function and the kernel modules cannot be found by
any of the kernel tools such as depmod because they are installed
into the wrong directory in multilib 64bit/32bit bulids.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
It turns out that this check cannot work. We don't have the information
to know whether an sstate package is really needed at this point in the
execution, so we check the availability for things that we won't
actually end up needing later on. Thus we can't fail if some of these
aren't found or we'll get needless failures.
This check was intended to give earlier more accurate errors when sstate
artifacts failed to download, but that's not practical so we'll rely
solely on the task execution check that was added within the runqueue.
This reverts most of commit 9e711b54487c3141d7264b8cf0d74f9465020190 (we
still need to allow BB_SETSCENE_ENFORCE through from the external
environment since the eSDK relies upon that.)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|