Age | Commit message (Collapse) | Author | Files |
|
This seems to be an obsolete check - we don't have any problems with
image creation under selinux, so remove it.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
This global variable is no longer present, so pass in the value
specified via the command line.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Fixes [YOCTO #5388]
These scripts can be useful when working to reduce the size of the Linux
kernel and the root filesystem.
ksize.py displays the kernel build size by the built-in.o files.
dirsize.py displays the various sizes of the components of the root
directory.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Add a "lookup-recipe" command to show which recipe produced a particular
package.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
|
Add a "lookup-pkg" command to oe-pkgdata-util that can be used to find
the runtime name of a package (after e.g. Debian library package
renaming).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
|
Add ability to search for a target path in produced packages, in order
to find which package provides a specific file.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
|
Show an error if the specified paths don't exist.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
|
* Use optparse to parse command line
* Make help text actually helpful by describing what each command does
* Drop comment at the top listing the commands which is now superfluous
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
|
OE-Core commit 1b8e4abd2d9c0901d38d89d0f944fe1ffd019379 removed the
vendor-os argument from the command line, and the code using the package
architectures, so clean these items up.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
|
Python 2.4 does not support the 'b' string literal or the
keyword 'as' in exception handling. Python 3 does not accept
the old method of exception handling and defaults to unicode.
The b() function converts strings to bytes on Python 3 and
using sys.exc_info() avoids the exception handling syntax.
Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
If the same username exists on both target and the build host, but
the uids differ, and we start target via NFS, then the uid for the
user will be incorrect on target.
For example, if postfix's uid on host is 119 and on target is 1024,
then if we start target via NFS, the uid for postfix will be 119.
The root cause is that when we use runqemu-extract-sdk to generate
the NFS rootfs for later use, the tar command will respect the username
instead of uid. So if PSEUDO_PASSWD environment is not set correctly,
the host /etc/passwd will be used, resulting in wrong uids.
The situation for gid is completely analogous to that of uid.
It's almost impossible for the runqemu-extract-sdk to guess the correct
location of the needed password file merely based on the target tarball
name.
This patch solves this problem by adding the '--numeric-owner' option
to the tar command so that the uid/gid will be used when extracting the
tarball using runqemu-extract-sdk. In this situation, we'll always get
the correct uid/gid after extracting the tarball.
[YOCTO #5364]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
Add a -v/--report-ver option to report changes in PKGE/PKGV/PKGR even
if the value is the same as the default from PE/PV/PR.
Also add a -a/--report-all option to report all changes instead of just
the default significant ones.
Addresses [YOCTO #5263].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
Remove unnecessary pseudo exports i.e. PSEUDO_DISABLED and move the
setup to the top-level prepare_rootfs().
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
find_binary_path() is useful, but if the binary isn't found, it prints
a stacktrace and a less-than-useful message. Users complain when they
get stacktraces for things they can act on, so remove the stacktrace
and tell the user what the problem is.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Current functionality doesn't make use of kpartx, mount, or unmount,
and we use native mkswap, so remove the binary checks for those.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We don't currently use LiveCDImageCreator, but it makes calls when
initialized via the plugin interface to rpmmisc module functions,
which we don't want the dependency on.
To make it (and LiveUSBImageCreator) happy, we give it the dummy
"i386" value for now.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
BaseImageCreator is a base class for DirectImageCreator and others,
and imports rpm and grabber (which imports rpm).
The various plugins e.g. DirectPlugin import the creators and
therefore these dependencies, which manifest at run-time as e.g.:
Warning: Failed to load plugin imager/direct_plugin: No module named
rpm
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We don't currently use rpm functionality, so we don't need to silence
rpm warnings.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
mylrlgrab is in grabber, which imports rpm. For current
functionality, we don't need to grab urls or import rpm, so remove the
dependency.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
rpmmisc imports rpm and contains misc rpm utilities related to
packaging and determining arches based on the packaging. We should
never run across this in the initial version of wic, so remove the
dependency.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We're removing all external dependencies including rpm and urlgrabber,
so we don't need this check.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
rt_util contains bootstrap_mic(), which imports rpm and other things
we don't need because we don't do bootstrap i.e. runtime (set in
wic.conf) is always set to 'native', which means use what's on the
local host.
bootstrap mode is for downloading and installing rpms that wic needs,
which we may want to implement later; for now, we just want to use
what's local.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Without this, files in the generated filesystem pick up the wrong
ownership.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If one of these isn't found, it won't be initialized and will throw an
UnboundLocalError.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If a user uses the -e option and specifies a machine that hasn't been
built or uses the wrong .wks script for the build artifacts pointed to
by the current machine, we should point that out for obvious cases.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Since eight unique files import rpm, perform a check at the top level
for the existence of the rpm module print a sensible error message if it
is not. This may be able to be removed if some of the core rpm
dependencies are removed from the mic libs.
Also check for urlgrabber.
This avoids a bracktrace in the event the modules are not installed
which can be very off-putting to would-be users.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If fat16 is specified to the mkpart parted command, parted will
default to setting the lba flag which causes certain EFI firmware
to fail to detect the filesystem. lba shouldn't be necessary for
FAT16 filesystems anyway, explicitly disable it.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Make sure they exist - complain if they don't.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
wic needs to be given one form of build artifacts or another -
complain if the user doesn't do that.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Reuses the mic/livecd infrastructure but heavily subclasses and
modifies it to adapt to the special needs of building images from
existing OpenEmbedded build artifacts.
In addition to the OE-specific mic objects and modifications to the
underlying infrastructure, this adds a mechanism to allow OE kickstart
files to be 'canned' and made available to users via the 'wic list
images' command.
Two initial OE kickstart files have been added as canned .wks files:
directdisk, which implements the same thing as the images created by
directdisk.bbclass, and mkefidisk, which can essentially be used as a
replacement for mkefidisk.sh. Of course, since creation of these
images are now driven by .wks files rather than being hard-coded into
class files or scripts, they can be easily modified to generate
different variations on those images. They also don't require root
priveleges, since they don't use mount to create the images. They
don't however write to media like mkefidisk.sh does, but rather create
images that can be written onto media.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This is the starting point for the implemention described in [YOCTO
3847] which came to the conclusion that it would make sense to use
kickstart syntax to implement image creation in OpenEmbedded. I
subsequently realized that there was an existing tool that already
implemented image creation using kickstart syntax, the Tizen/Meego mic
tool. As such, it made sense to use that as a starting point - this
commit essentially just copies the relevant Python code from the MIC
tool to the scripts/lib dir, where it can be accessed by the
previously created wic tool.
Most of this will be removed or renamed by later commits, since we're
initially focusing on partitioning only. Care should be taken so that
we can easily add back any additional functionality should we decide
later to expand the tool, though (we may also want to contribute our
local changes to the mic tool to the Tizen project if it makes sense,
and therefore should avoid gratuitous changes to the original code if
possible).
Added the /mic subdir from Tizen mic repo as a starting point:
git clone git://review.tizen.org/tools/mic.git
For reference, the top commit:
commit 20164175ddc234a17b8a12c33d04b012347b1530
Author: Gui Chen <gui.chen@intel.com>
Date: Sun Jun 30 22:32:16 2013 -0400
bump up to 0.19.2
Also added the /plugins subdir, moved to under the /mic subdir (to
match the default plugin_dir location in mic.conf.in, which was
renamed to yocto-image.conf (moved and renamed by later patches) and
put into /scripts.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Initial implementation of the 'wic' command.
The 'wic' command generates partitioned images from existing
OpenEmbedded build artifacts. Image generation is driven by
partitioning commands contained in an 'Openembedded kickstart' (.wks)
file specified either directly on the command-line or as one of a
selection of canned .wks files (see 'wic list images'). When applied
to a given set of build artifacts, the result is an image or set of
images that can be directly written onto media and used on a
particular system.
'wic' is based loosely on the 'mic' (Meego Image Creator) framework,
but heavily modified to make direct use of OpenEmbedded build
artifacts instead of package installation and configuration, things
already incorporated int the OE artifacts.
The name 'wic' comes from 'oeic' with the 'oe' diphthong promoted to
the letter 'w', because 'oeic' is impossible to remember or pronounce.
This covers the mechanics of invoking and providing help for the
command and sub-commands; it contains hooks for future commits to
connect with the actual functionality, once implemented.
Help is integrated into the 'wic' command - see that for details on
usage.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
It should be possible to generate a disk to a file using a loopback
device with mkefidisk.sh, which is useful for booting simulators. To
make this possible the partitions for the loop back need to work
similarly to the mmc devices. The mkfs.vfat also requires and
additional argument to force it to write to something other then a
real disk.
Example:
qemu-img create -f raw bigdisk 4G
dev=`sudo losetup -f`
sudo losetup $dev bigdisk
mkefidisk.sh $dev tmp-eglibc/deploy/images/qemux86/core-image-minimal-qemux86.hddimg /dev/sda
sudo losetup -d $dev
Note:
Also a bug was fixed in the mkefidisk.sh where if the disk you are
writing to initially has an invalid label the size of the first
partition will be computed incorrectly. For the simulator disk
creation this is generally always the case, but this can happen with
real hardware as well.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The existing -cpu host option caused kernel panics when people attempted to use
the kvm option. After research and discussion, the best options appear to
be the kvm32/kvm64 cpu types so lets use these instead. These resolve
the kernel issues for me.
[YOCTO #3908]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Strings in Python 3, by default, are assumed to contain unicode
characters. In previous versions of python (<3), unicode strings are
explicitly declared with u"abc". If not, than they're automatically
converted to bytes. This doesn't happen anymore in Python 3.
Since we're dealing with binary files, opened in byte mode, make sure
that we explicitly convert all strings to bytes to make both python 2
and 3 happy.
Other changes:
* add a safety check to make sure relocation did not change the file
size;
* a couple of cosmetic changes (wrap long lines so that we don't have
to scroll to reach the end of them);
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We want the temporary file to be written in /tmp not the current
directory.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The following commit, 6ccd4d6, increased the RAM size for qemu machines
to 256MB due to some smart sanity tests failing on autobuilder because
more memory was needed.
Unfortunately this leads to various, potentially dangerous, issues like
the one observed during sudoku-savant project compilation:
collect: relinking
collect2: error: '_ZNK6sudoku5ClearINS_6SquareEEclERS1_' was assigned to
'board.rpo', but was not defined during recompilation, or vice versa
board.o:(.rodata+0x8): undefined reference to
`sudoku::Clear<sudoku::Square>::operator()(sudoku::Square&) const'
board.o:(.rodata+0x20): undefined reference to
`sudoku::Clear<sudoku::Sequence>::operator()(sudoku::Sequence&) const'
board.o:(.rodata+0x34): undefined reference to `typeinfo for
sudoku::Action<sudoku::Sequence>'
...AND THE LIST CONTINUES...
collect2: error: ld returned 1 exit status
make: *** [sudoku-savant] Error 1
After some tests, I found that the maximum amount of memory needed for
sudoku to compile properly is 146MB(!?!).
My attempts to create a simpler test case (using templates), in order to
replicate and isolate the issue failed. All the tests compiled just
fine.
So, my guess is that this problem is certainly memory related but the
cause might be hidden in any of the following: qemu versatile hw model,
in the kernel or, highly unlikely but not impossible, the toolchain
itself. The reason I don't really think the cause is in the toolchain is
the fact that the compilation completes just fine for 128MB on qemuarm but
also on other qemu machines (with 256MB of memory).
Since this issue might need lots of time to have a proper fix, I'll revert back
to using 128MB for qemuarm for the time being.
[YOCTO #5133]
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This has now been superseded by testimage.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
|
The pkgdata stamps now need to be wiped away if the sysroot is destroyed.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
directory
Currently we have a hierarchy of pkgdata directories and the code has to put together
a search path and look through each in turn until it finds the data it needs.
This has lead to a number of hardcoded paths and file globing which
is unpredictable and undesirable. Worse, certain tricks that should be
easy like a GL specific package architecture become problematic with the
curretn search paths.
With the modern sstate code, we can do better and construct a single pkgdata
directory for each machine in just the same way as we do for the sysroot. This
is already tried and well tested. With such a single directory, all the code that
iterated through multiple pkgdata directories and simply be removed and give
a significant simplification of the code. Even existing build directories adapt
to the change well since the package contents doesn't change, just the location
they're installed to and the stamp for them.
The only complication is the we need a different shlibs directory for each
multilib. These are only used by package.bbclass and the simple fix is to
add MLPREFIX to the shlib directory name. This means the multilib packages will
repackage and the sstate checksum will change but an existing build directory
will adapt to the changes safely.
It is close to release however I believe the benefits this patch give us
are worth consideration for inclusion and give us more options for dealing
with problems like the GL one. It also sets the ground work well for
shlibs improvements in 1.6.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This allows a clean seperation between image outputs from different
machines, and makes it possible to have convenience symlinks to make
the output ready to deploy.
This did require some surgery in runqemu; if explicit paths to the image
and kernel are not supplied then DEPLOY_DIR_IMAGE needs to be determined
from bitbake or set in the environment. However the script does try to
avoid requiring it unless it really is needed. Corresponding changes
were made in the automated testing code as well.
Based on an RFC patch by Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If not every combination of BB_NUMBER_THREADS and PARALLEL_MAKE have
been tested by bb-matrix.sh, e.g., by using BB_RANGE="04 08 10 12 16"
and PM_RANGE="04 08 10 12 16", then the graph that gnuplot generates by
default looks very jagged due to the missing data points. By using
splines to interpolate the missing data the graph looks a lot better.
This should not change graphs where all data points are available in any
way, only improve sparse graphs.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This makes sure the the first build starts from a clean state. Otherwise
one could have the first build affected by any leftover state from
a previous build.
This also leaves a working state behind after the final build.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
In the target sysroot of an SDK we can have target system absolute links
which don't make sense. This adds a script which fixes them up to become relative
paths instead.
[YOCTO #5020]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
When runqemu tries to determine the MACHINE variable from a
kernel or vmdk filename that doesn't contain any known machine
name, the variable gets set to the filename. It should remain
unset and cause an error.
[YOCTO #2890]
Signed-off-by: Mihai Prica <mihai.prica@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Set memory size to 256M for qemuarm, qemux86, qemux86-64, qemumips,
qemumips64, and qemuppc.
This allows the smart automated tests to run on machines with a GUI
environment (such as Sato) running at the same time, for which 128M is
too limiting. Setting this in runqemu allows users manually using
runqemu to avoid the same out-of-memory issues under similar conditions
using smart, on-target compilation or other uses.
Fixes [YOCTO #5045].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The previous changes were totally broken as quoting globs doesn't work. Remove
the quotes so the rm commands actually delete the stamps.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This avoids the following new behavior resulting from the create_wrapper
fixes:
llc[11]$ ../poky/scripts/oe-setup-rpmrepo
/usr/bin/env: nativepython: No such file or directory
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
The iptables rules for the tap interface are added by runqemu-ifup
everytime we use runqemu to start a qemu target. But it's not cleaned
up when runqemu exits.
This patch cleans up the remaining iptables rules for the tap interface
in runqemu-ifdown.
[YOCTO #5047]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|