Commit Graph

1224 Commits

Author SHA1 Message Date
Paul Eggleton 8e7437b3f0 devtool: add/modify: add option to build in same directory
The default behaviour is to build in a separate directory to the source,
however some projects can't be built this way, so add an option to do
that (or override the automatic behaviour in the case of modify).

(From OE-Core rev: cf094ed2f616a581eb07d78db4366c83a441fde5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23 17:35:28 +00:00
Paul Eggleton 5eb9ffe1e0 recipetool: fix regression caused by previous commit
Option was renamed in the setup code but not in the code that used it.

(From OE-Core rev: 4b4f2d4f2869d6d5d564cc1b2d733f41ab5a3b9b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23 17:35:27 +00:00
Richard Purdie 68f4dcae68 runqemu: Specify rootfstype to qemu to avoid QA warnings
With the change to ext4 filesystems for qemu, we get boot warnings from where
it tried to mount the ext4 fileystem as ext2 and ext3 first.

Avoid these by specifying the rootfs type directly on the kernel commandline
for ext* images.

(From OE-Core rev: ad9f54a5014f2d997165d0cfd6ad7c05e62f315b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-21 22:05:37 +00:00
Richard Purdie 7dcf6c9d45 machine/qemu: Switch from ext3 to ext4
There is no good reason not to use ext4 at this point, it has advantages
and few drawbacks. Therefore switch the qemu machines over (and the default
runqemu script options).

(From OE-Core rev: 430b9ae71b1aa76f8421127d17e0e0723d4818d3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-21 22:05:37 +00:00
Tom Zanussi b4a936a938 wic: Fix kernel dir location
With the recent kernel staging changes, STAGING_KERNEL_DIR no longer
points to the kernel image, which can be found however in
DEPLOY_DIR_IMAGE.  This updates find_artifacts() to look there
instead.

Fixes [YOCTO #7307].

(From OE-Core rev: 453d0a9823665870e273a37657d6e27fb788d72e)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-21 22:05:35 +00:00
Paul Gortmaker 876015dbaf scripts: delete dummy help2man script
This was added to try and deal with the cross compile issue of
help2man ; one can not run an ARM binary "./chmod --help" on an
x86-64 host in order to get the help text to create a man page.
This has been primarily an issue with the coreutils package.

However, we have since fixed coreutils to have useful pre-made
manpages and we don't need this script anymore.  And if other
gnu packages are getting useless truncated "dummy" manpages,
we want the build to fail so we can fix those packages in a
similar way, vs. having the issue hidden via a help2man that is
a no-op.

(From OE-Core rev: 3fc812377baf95768cef0b7728a73a4b9e07f2ab)

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-17 22:35:02 +00:00
Paul Eggleton fdb5639e90 lib/oe/package_manager: support exclusion from complementary glob process by regex
Sometimes you do not want certain packages to be installed when
installing complementary packages, e.g. when using dev-pkgs in
IMAGE_FEATURES you may not want to install all packages from a
particular multilib. This introduces a new PACKAGE_EXCLUDE_COMPLEMENTARY
variable to allow specifying regexes to match packages to exclude.

(From OE-Core rev: d4fe8f639d87d5ff35e50d07d41d0c1e9f12c4e3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-17 14:20:45 +00:00
Martin Jansa 3d2d158e34 test-dependencies.sh: strip only .bb suffix
* we were stripping too much when stripping recipe name from line like this:
  ERROR: Task 12016 (/some/patch/something.dot.bar.bb, do_fetch) failed with exit code '1'
  where the recipe name contains dots and doesn't end with _<version>.bb

(From OE-Core rev: 8c9a25ae70d249b823ab2b0385d539eb8bbc1374)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-17 14:20:45 +00:00
Paul Eggleton cfc12dfc34 oe-pkgdata-util: add list-pkg-files subcommand
Adds a subcommand to list the files in a package, or list the files in
all packages for a recipe.

(From OE-Core rev: 380218d7b963e8931c72596852b1ed2a7f4df61d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-14 08:41:01 +00:00
Paul Eggleton 8d13d187b5 oe-pkgdata-util: add list-pkgs subcommand
Add a subcommand to list packages, with options to list packages
matching a specification, and packages produced by a particular recipe.

(From OE-Core rev: a6791526fec5b78ddefcf1b6b828bd376d0f2bc0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-14 08:41:01 +00:00
Paul Eggleton 4b33006379 oe-pkgdata-util: allow reverse package name lookups
Add a -r/--reverse option to the lookup-pkg subcommand to enable looking
up the recipe-space package name for one or more runtime package names.

Also make this subcommand into a function that can be reused elsewhere.

(From OE-Core rev: f0af7471e688047c7bac5130457e5f9cc2fd5107)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-14 08:41:01 +00:00
Paul Eggleton 0f77efe9ae oe-pkgdata-util: fix read-value to handle data with colons in the value
The read-value subcommand was truncating the value if it contained
colons, for example FILES_INFO.

(From OE-Core rev: 77411c775c4bf3fa7897985916c2d4a4af2dda47)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-14 08:41:01 +00:00
Paul Eggleton 1fb1caf15c oe-pkgdata-util: make find-path show a proper error if no package found
(From OE-Core rev: e13e53a30372a4cb3eabdb1b2199ff64c3e85cc3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-14 08:41:01 +00:00
Paul Eggleton 9f03969994 oe-pkgdata-util: improve command-line usage
* Use argparse instead of optparse for standardised help output, options
  and a much cleaner code structure
* Look up pkgdata directory automatically so the user doesn't have to
  specify it
* Use standard logging

NOTE: this does mean a slight change in syntax - if you do want to
specify the pkgdata directory (usually only necessary if you're calling
it from within the build process) you need to use the parameter -p (or
 --pkgdata-dir) and specify this before the command, not after it.

Examples:

oe-pkgdata-util find-path /sbin/mke2fs
oe-pkgdata-util lookup-recipe libelf1
oe-pkgdata-util read-value PKGSIZE libc6
oe-pkgdata-util -p /home/user/oe/build/tmp/sysroots/qemux86-64/pkgdata read-value PKGSIZE libc6

(From OE-Core rev: 04dc571ac7c26f0dcf1a1fcd466482e22519998d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-14 08:41:01 +00:00
Alexandre Belloni 8102bd0172 wic: add GPT support
Add GPT partition table support.

(From OE-Core rev: a3479ab45d89273b4474ca54517554fc5346da32)

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-14 08:40:59 +00:00
Alexandre Belloni fa818fbb7b wic: properly label filesystems
Use the partition label option, when available, to label the filesystem.

(From OE-Core rev: 93e2de4f4b71775d70ac2ccb7e2d26ca95b96186)

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-14 08:40:59 +00:00
Alexandre Belloni 5c056356bc wic: fix empty btrfs partitions
btrfs emtpy partition creation is currently not working because of the
usage of the non existant variables rootfs ans extra_imagecmd. It also
as an incorrect size.

(From OE-Core rev: 2624f30dd2d2a8f7fd97117c77a4d6aa2ba6f1f9)

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-14 08:40:59 +00:00
Alexandre Belloni 4dce5c44ab wic: remove useless calls to __write_fstab
__write_fstab() is already iterating over parts. There is now need to
call it fort each parts.

(From OE-Core rev: 0a6668f6e60b4195ff4163c00fc972bacdb27b4b)

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-14 08:40:59 +00:00
Alexandre Belloni cf3e21e71e wic: allow to configure overhead factor per partition
Introduce a new option --overhead-factor to replace
IMAGE_OVERHEAD_FACTOR.

(From OE-Core rev: 20fe0c7202724187dbe80eb2101d8ef69e86b94e)

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-14 08:40:58 +00:00
Alexandre Belloni d84742c39f wic: allow to configure extra space per partition
Introduce a new option --extra-space instead of using IMAGE_EXTRA_SPACE.
This is useful for boot partitions where the extra space is often
useless or for huge partition where 10MiB may not be enough.

(From OE-Core rev: 9f7fe71a10bcdd1864d2f838f3510e96810ef42e)

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-14 08:40:58 +00:00
Alexandre Belloni 605627bc9d wic: add rawcopy source plugin
(From OE-Core rev: 5f237238a1fab87668068d042ac86b67d2c5224b)

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-14 08:40:58 +00:00
Alexandre Belloni 0b156dac83 wic: allow creation of partitions not in table
For some architectures it is necessary to reserve space on disk without
it being present in the partition table.

For example, u-boot on i.mx is placed at an offset of 1kB on the sdcard.
While it would be possible to create a partition at that offset and
place u-boot there, it would then be necessary to update the default
u-boot environment to use partition 2 on the mmc instead of partition 1.

(From OE-Core rev: 233b631ece5ee14d057932c146327065064b5196)

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-14 08:40:58 +00:00
Ricardo Neri edde3e58da runqemu: Add option for BIOS binary filename
If we intend to use a custom BIOS binary file, it would be good to be
able to specify the name of the binary via the -bios option of qemu. The
name of the custom binary could be different from the default name used
by qemu. For instance, it was bios.bin in qemu 1.5.0 and changed to
bios-256k.bin for 2.1.0.

(From OE-Core rev: 29c9e6f44541b7f8731e21e9d1a0adca9da28e37)

Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-14 08:40:57 +00:00
Paul Eggleton a3dfb70b62 recipetool: improve command-line help
Based on feedback from Scott Rifenbark <scott.m.rifenbark@intel.com>

(From OE-Core rev: 2c59b2b20c32577085645056e4cbf4f9c259e4d7)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-08 08:00:27 +00:00
Paul Eggleton 943353707b devtool: improve command-line help
Based on feedback from Scott Rifenbark <scott.m.rifenbark@intel.com>

(From OE-Core rev: ec3378f3a7013e289daa0f5c52329488b861f99c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-08 08:00:27 +00:00
Alexandru DAMIAN 7d73324af3 scripts/oe-selftest: add command line option to list test classes
While trying to discover what tests are available, I felt the
need to be able to list all individual tests so I can run specific
tests.

This patch adds the "--list-classes" command line option that
lists the unit test classes and methods available.

(From OE-Core rev: f0ba400a398a172f9ebf953bb3a26e5d911a17d6)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-08 08:00:27 +00:00
Alexandru DAMIAN 336d28c413 scripts/oe-selftest: fix startup backtrace
Fixing a backtrace dump that happens if the script is started
without sourcing the oe-init-build-env first.

(From OE-Core rev: 0d769abcab272f41d74ed4d7915d26c7c309253a)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-08 08:00:27 +00:00
Alexandre Belloni eba9f8a16d wic: bootimg-partition: Stop removing whole workdir
Stop removing the whole working directory as this is also removing
eventual previously created partition images, leading to image creation
failures.

(From OE-Core rev: 2d3c9f89852bd009fc7accee495ede2fbcadc3bb)

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-08 08:00:27 +00:00
Alexandre Belloni 080e3e4f58 wic: print partition alignment when available
When printing a partition, the --align parameter was shown when present
but not its value.

(From OE-Core rev: 26280cf0199abb3266d620c8dee1194504a5a829)

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-08 08:00:27 +00:00
Alexandre Belloni 602d90d57a wic: use kB for the partitions size
Use kB instead of MB for the partition size to get a better granularity.

This is needed on some SoC (i.mx, omap) where it is necessary to create
partitions as small as 64kB.

Keep the backward compatibility by assuming MB when no unit is provided.

(From OE-Core rev: 3d4da9186016d54b76ad2fa710646de253f0f063)

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Tested-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Acked-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Tested-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-08 08:00:27 +00:00
Maciej Borzecki 09fba50cf3 wic: bail out on kickstart parse errors
Kickstart file errors are not emitted by the parser. In case errors, the
current code will continue to execute possibly creating a faulty or
incomplete image. The patch enables the parser to emit all encountered
errors. The error message is shown for the user and further execution is
ceased.

(From OE-Core rev: 0aa1221c16e65b3daac4aa9a9cfe1d5e9e6106c0)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-08 08:00:26 +00:00
Saul Wold dbfed41b76 create-pull-request: Fix git request-pull
(From OE-Core rev: 5ffa98a95317e6bea436e4372b9202f4da0ce2ae)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-08 08:00:25 +00:00
Maciej Borzecki 6b19a93f38 wic: fix extended/logical partition layout
The patch fixes an issue in laying out extended and logical partitions
by wic. The original code produced disk images in which the size 3rd
partition as described in MBR was incorrect. Depending on the type of
file system used for that partition and size of the partition, it would
be impossible to mount the partition correctly. For instance, kickstart
file in which the 3rd partition had size of 1GB and used ext4 fs, would
result in an image with an umountable partition. The root cause is
reservation of sectors for EBR through stealing of last sector from the
last primary partition.

(From OE-Core rev: a8b85f7878726503dbfa2e9ea86bd6fd961bf03b)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-08 08:00:24 +00:00
Tom Zanussi 02a1e01c00 yocto-bsp: Add branch to SRC_URI for custom kernels
Without 'branch' in the SRC_URI, a SRCREV specified for a non-master
KBRANCH will result in a fetch failure since the branch tested by the
fetcher will default to master, which doesn't contain the SRCREV.
This fixes the problem by adding branch=KBRANCH to the SRC_URI.

Fixes [Yocto #6518].

(From meta-yocto rev: 29a36d4c1146f38b4d204b5b4b89bd002074d47d)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-07 13:34:00 +00:00
Tom Zanussi bf6f35b214 yocto-bsp: Add missing conf dir to arm template
The /conf dir for arm was missed when committing the changes for the
'removing strange characters' patchset; this restores it.

(From meta-yocto rev: 0fe51b37c32569bd5a3e24c43dc4d16ab7b6d4e9)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-07 13:33:59 +00:00
Chen Qi f14e96a9cc runqemu-internal: get rid of annoying but harmless error message
If tap0 interface has been created by other users on the system, we would
get error messages when using runqemu. Error messages are like below.
     Acquiring lockfile for tap0...
     touch: cannot touch ‘/tmp/qemu-tap-locks/tap0.lock’: Permission denied
     /buildarea2/chenqi/poky/scripts/runqemu-internal: line 139: /tmp/qemu-tap-locks/tap0.lock: Permission denied
     flock: 8: Bad file descriptor

The system can still boot up because runqemu would try to create a new tap
interface. So the error message above is harmless, yet somewhat annoying.

This patch fixes the above problem. With this patch, the output would be as
follows.

Acquiring lockfile for tap0...
Acquiring lockfile for /tmp/qemu-tap-locks/tap0.lock failed
Setting up tap interface under sudo
Acquiring lockfile for tap1...
Running qemu-system-arm...

(From OE-Core rev: 039c57257c4180b0688fc2ec1b03948276009b04)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-03 14:53:53 +00:00
Paul Eggleton 3f739a86a9 recipetool: replace version in S value
If a versioned recipe filename is specified, replace the version in the
value of S with ${PV} just as we do with SRC_URI to make future upgrades
of the recipe easier.

(From OE-Core rev: 0b3c81ed5bcce9b608c4f804496d769288fe8c04)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-03 14:53:50 +00:00
Richard Purdie e2cffc00e1 scripts/send-error-report: Set exit code if error occurs
If an error occurs, set an error exit code so the world knows about it. This fixes
issues where the autobuilder doesn't notice these failures.

[YOCTO #7265]

(From OE-Core rev: b219377defc9517af360986352bd7da1a7906f10)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 15:36:52 +00:00
Markus Lehtonen 3592507a14 combo-layer: support updating up to arbitrary commit
Support defining the top commit up to which to update. In other words,
this makes it possible to update up to certain point other than the
branch head. The update point (git commitish) is given on the command
line by appending the component name(s) with a colon and the commitish,
e.g.
 $ combo-layer update my_component:sha1

Only the "update" action supports this.

(From OE-Core rev: b7ee7cf5bbfd0f305a75e4df9455f9968aa67878)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 15:36:52 +00:00
Markus Lehtonen 62d94a44ae combo-layer: minor refactor
Change get_repos() to assume a list of repository names instead of full
list of command line arguments.

(From OE-Core rev: d2d8f3c2a7570bb74db713ddc83059d3b3bd4b2e)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 15:36:51 +00:00
Philip Tricca 7f58a85337 python-2.7-manifest: Add package for contextlib module
This is required for python code using 'with' statements.

(From OE-Core rev: 27dbacdb88ee3e79f4c95a779d8a7e8c5c8f941d)

Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:36:31 +00:00
Christopher Larson 1b7b58ac97 recipetool: add python dependency scanning support
This uses a standalone python script named `pythondeps` which now lives in
scripts. It supports scanning for provided packages and imported
modules/packages, the latter via the python ast. It's not perfect, and
obviously conditional imports and try/except import blocks are handled
naively, listing all the imports even if they aren't all used at once, but it
gives the user a solid starting point for the recipe.

Currently `python_dir` from setup.py isn't being handled in an ideal way. This
is easily seen when testing the python-async package. There, the root of the
project is the async package, so the root has __init__.py and friends, and the
python provides scanning currently just assumes the basedir of that dir is the
package name in this case, which is not correct. Forthcoming patches will
resolve this.

(From OE-Core rev: cb093aca3b78f130dc7da820a8710342a12d1231)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:36:28 +00:00
Christopher Larson e490d79fb7 recipetool: add python buildsystem support
- Handles distutils & setuptools.
- Supports pulling metadata from PKG-INFO, .egg-info, & setup.py (via two
  different mechanisms).
- Doesn't handle python 3 yet.

(From OE-Core rev: 6ff693c71d97b4bcfde198c84cf9fac7185cccfd)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:36:28 +00:00
Kai Kang e3a623bfe3 runqemu-internal: increase memory for qemuarm64
Increase memory to 512M for qemuarm64. The original size 126M can't make
task testimage pass, neither 256M.

[YOCTO #7102]

(From OE-Core rev: 93979b2d025cf318fd0d867ed730721c7594d33b)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-25 08:27:13 +00:00
Maciej Borzecki 052c67c845 wic: account for mmcblk device partition naming
MMC block device partitions are named differently than other block
devices and use the scheme: mmcblk<devnum>p<partnum>, ex: mmcblk0p1,
mmcblk0p2. The current code generates incorrect parition names missing
'p' infix for fstab entries. The patch resolves this problem.

(From OE-Core rev: e2664f563921467fe38bb74f4dd2a41eb004ee9f)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-25 08:18:13 +00:00
Richard Purdie e1858932f9 runqemu-internal: Fix qemu networking for qemuarm64
This brings qemuarm64 into feature parity with the other qemu machines
and enables the automated testing on the autobuilder.

(From OE-Core rev: 31e259f2f2a83c26b8a62b6d7dbca010c6db16bf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:19 +00:00
Kai Kang f78f9d7adb runqemu: add qemuarm64 support.
Update scripts runqemu and runqemu-internal to support to boot
qemuarm64.

(From OE-Core rev: 2f020b53bdb8c262e432bc4df35101fa990c460c)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:18 +00:00
Maciej Borzecki 2ca18705bc python-2.7-manifest.inc: add stdlib argparse module
Adding argparse module from Python's standard library. The module has replaced
previous python-argparse package that was build using source that are not part
of Python 2.7 release.

(From OE-Core rev: 198c67c2f9407f9c36127ff5a0778ed981778410)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:17 +00:00
Junchun Guan 0d686ccc7c scripts/devtool: Support deploy/undeploy function
Deploy recipe output files to live target machine using scp
Store the files list and target machine info in localhost if deployment
is done
Undeploy recipe output files in target machine using the previous
deployment info

[YOCTO #6654]

(From OE-Core rev: cc10751aa3121218b21ec2058358f3ea02a4500a)

Signed-off-by: Junchun Guan <junchunx.guan@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:16 +00:00
Paul Eggleton cd5ca4a11d scripts/devtool: add development helper tool
Provides an easy means to work on developing applications and system
components with the build system.

For example to "modify" the source for an existing recipe:

  $ devtool modify -x pango /home/projects/pango
  Parsing recipes..done.
  NOTE: Fetching pango...
  NOTE: Unpacking...
  NOTE: Patching...
  NOTE: Source tree extracted to /home/projects/pango
  NOTE: Recipe pango now set up to build from /home/paul/projects/pango

The pango source is now extracted to /home/paul/projects/pango, managed
in git, with each patch as a commit, and a bbappend is created in the
workspace layer to use the source in /home/paul/projects/pango when
building.

Additionally, you can add a new piece of software:

  $ devtool add pv /home/projects/pv
  NOTE: Recipe /path/to/workspace/recipes/pv/pv.bb has been
  automatically created; further editing may be required to make it
  fully functional

The latter uses recipetool to create a skeleton recipe and again sets up
a bbappend to use the source in /home/projects/pv when building.

Having done a "devtool modify", can also write any changes to the
external git repository back as patches next to the recipe:

  $ devtool update-recipe mdadm
  Parsing recipes..done.
  NOTE: Removing patch mdadm-3.2.2_fix_for_x32.patch
  NOTE: Removing patch gcc-4.9.patch
  NOTE: Updating recipe mdadm_3.3.1.bb

[YOCTO #6561]
[YOCTO #6653]
[YOCTO #6656]

(From OE-Core rev: 716d9b1f304a12bab61b15e3ce526977c055f074)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:16 +00:00
Paul Eggleton b7d53f2ebb scripts: add scriptutils module
Add a utility module for scripts. This is intended to provide functions
only really useful before bitbake has been found (or only of particular
interest to scripts). At the moment this includes functions for setting
up a logger and for loading plugins.

(From OE-Core rev: a8f90528981127fbace3e901c6e3dfe8b45b98ab)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:15 +00:00
Paul Eggleton 5638ca2b94 scripts/recipetool: Add a recipe auto-creation script
Add a more maintainable and flexible script for creating at least the
skeleton of a recipe based on an examination of the source tree.
Commands can be added and the creation process can be extended through
plugins.

[YOCTO #6406]

(From OE-Core rev: fa07ada1cd0750f9aa6bcc31f8236205edf6b4ed)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:15 +00:00
Maciej Borzecki cff6c481aa wic: add globbing support in IMAGE_BOOT_FILES entries
Adding glob support for entries in IMAGE_BOOT_FILES. Files picked up by
glob are by default installed under their basename, as this is likely
most common use case. Target name for globbed entries specifies the
name of directory in which files will be installed withing the partition.

(From OE-Core rev: 2c9635bdb97ddc80750c11d356e153a99d61cf09)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-19 18:08:02 +00:00
Maciej Borzecki 90487dfbbb wic: IMAGE_BOOT_FILES format checks in bootimg-partition source
Check for malformed entries in IMAGE_BOOT_FILES, fail early if such
entries were found.

(From OE-Core rev: e56072aaaad6cfa222853a4e9e68dd8aa861de18)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-19 18:08:02 +00:00
Tom Zanussi fb760054d4 yocto-bsp: Get rid of 'strange' filenames in x86_64 templates
For the x86_64 templates, give all the 'strange' yocto-bsp template
filenames 'normal' names, adding new yocto-bsp-filename and
yocto-bsp-dirname tags for the new filename processing pass where
needed.

(From meta-yocto rev: d478b11db66795040009e9b7d7751300d4385018)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:09:01 +00:00
Tom Zanussi 82e8b73d78 yocto-layer: Get rid of 'strange' filenames in templates
For the yocto-layer templates, give all the 'strange' template
filenames 'normal' names, adding new yocto-bsp-filename and
yocto-bsp-dirname tags for the new filename processing pass where
needed.

(From meta-yocto rev: 0aa76b36ccb8262a7eec62845361c3d4b73ceb46)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:09:00 +00:00
Tom Zanussi 4b4eca1359 yocto-bsp: Get rid of 'strange' filenames in powerpc templates
For the powerpc templates, give all the 'strange' yocto-bsp template
filenames 'normal' names, adding new yocto-bsp-filename and
yocto-bsp-dirname tags for the new filename processing pass where
needed.

(From meta-yocto rev: c21329385f93bd876ef675ee453627910b4d5dec)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:08:59 +00:00
Tom Zanussi debb440be5 yocto-bsp: Get rid of 'strange' filenames in mips64 templates
For the mips64 templates, give all the 'strange' yocto-bsp template
filenames 'normal' names, adding new yocto-bsp-filename and
yocto-bsp-dirname tags for the new filename processing pass where
needed.

(From meta-yocto rev: 8bc26cbfe2da0d6ffd08ecdce36fd50622bb1fad)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:08:59 +00:00
Tom Zanussi 4b82dab822 yocto-bsp: Get rid of 'strange' filenames in arm templates
For the arm templates, give all the 'strange' yocto-bsp template
filenames 'normal' names, adding new yocto-bsp-filename and
yocto-bsp-dirname tags for the new filename processing pass where
needed.

(From meta-yocto rev: fb533fd98678671d319e52fc288783bbd0368218)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:08:58 +00:00
Tom Zanussi 6a103322f8 yocto-bsp: Get rid of 'strange' filenames in mips templates
For the mips templates, give all the 'strange' yocto-bsp template
filenames 'normal' names, adding new yocto-bsp-filename and
yocto-bsp-dirname tags for the new filename processing pass where
needed.

(From meta-yocto rev: afa61438aa31fbc5c87991c8b3ec88c228b9d2d1)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:08:57 +00:00
Tom Zanussi 37a6affc48 yocto-bsp: Get rid of 'strange' filenames in x86 templates
For the x86 templates, give all the 'strange' yocto-bsp template
filenames 'normal' names, adding new yocto-bsp-filename and
yocto-bsp-dirname tags for the new filename processing pass where
needed.

(From meta-yocto rev: 9fa30ad9cf1291a37d365515ec8d969fb4fd4aef)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:08:56 +00:00
Tom Zanussi cac5446989 yocto-bsp: Get rid of 'strange' filenames
Give all the 'strange' yocto-bsp template filenames 'normal' names,
adding new yocto-bsp-filename and yocto-bsp-dirname tags for the new
filename processing pass where needed.

(From meta-yocto rev: c66a5b2acb2e243b857e5eb31c1427af296b4c9d)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:08:37 +00:00
Tom Zanussi ed99aeeb68 yocto-bsp: Add a processing pass to get rid of 'strange' filenames
Operating systems that can't handle filenames containing anything but
uppercase letters don't like to see 'strange' characters in filenames
such as the file and directory names yocto-bsp uses as part of its
templating mechanism.  To fix this, we essentially add another level
of metadata into the template files themselves rather than into their
names, and add a processing pass that internally gives us what we had
before.  Specifically:

  - strange characters in filenames are moved inside the files they
    apply to, to the first line of the file prepended with '#
    yocto-bsp-filename {{...}} filename | this'

  - strange characters in directory names are moved inside a new file
    of the same name but ending in .noinstall and with the first (and
    only) line of the file prepended with '# yocto-bsp-dirname {{...}}
    dirname'

If the new filename contained in the yocto-bsp-* tag is 'this', the
filename is the existing name of the file.  For a dirname, this would
be the filename with .noinstall removed.

"Fixes" [YOCTO #5312].

(From meta-yocto rev: 3dad2decbd682713f717950fc39fa0f63f1b8c98)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:08:37 +00:00
Alejandro Hernandez 74d4a5cb90 python3-core: Fix minimal python3 install
Added additional runtime dependencies for python3-core needed
to run the interpreter with a minimal install (codecs,io,math,reprlib).

Created python3-reprlib package to avoid getting python3-misc bringing
lots of unneeded libraries.

Fixed FILES-python3-core, missing _sysconfigdata, renamed copyreg
undetected before due to previously needed installation of python3-misc.

[YOCTO #6967]

(From OE-Core rev: bafdfb28726d0a9b30b8283b2472727e8208059d)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-11 11:34:56 +00:00
Magnus Olsson 2b945a9544 python: add python-codecs runtime dependency for python-json
A piece of JSON initialization code that runs when you "import json"
tries to use the hex-decoder, thus breaks if you do not have
python-codecs installed. Example:

    >>> import json
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib/python2.7/json/__init__.py", line 108, in <module>
        from .decoder import JSONDecoder
      File "/usr/lib/python2.7/json/decoder.py", line 24, in <module>
        NaN, PosInf, NegInf = _floatconstants()
      File "/usr/lib/python2.7/json/decoder.py", line 18, in _floatconstants
        _BYTES = '7FF80000000000007FF0000000000000'.decode('hex')
    LookupError: no codec search functions registered: can't find encoding

This patch adds a runtime dependency on python-codecs for python-json and
re-generates the python manifests for Python v2.7. Solves [YOCTO #7020].

(From OE-Core rev: 90fd48144f146f455b18372a9b061314ab3a3857)

Signed-off-by: Magnus Olsson <magnus@minimum.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-11 11:34:56 +00:00
Maxin B. John 34995442a2 python: fix ssl import error
Fix this ssl import error:
Python 2.7.3 (default, Dec  5 2014, 16:24:17)
[GCC 4.9.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/ssl.py", line 92, in <module>
    import base64        # for DER-to-PEM translation
ImportError: No module named base64

(From OE-Core rev: dfa34e70a4c7543dc67835c2e9a270ccd011ac72)

Signed-off-by: Maxin B. John <maxin.john@enea.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-11 11:34:55 +00:00
Tom Zanussi bf0ec70284 yocto-bsp: Add mips64 support
mips64 support was recently added to the core BSPs; we should also
support it in yocto-bsp.  [YOCTO #5314]

(From meta-yocto rev: 3f3d29e2df6462c915d0763ab07f3be3c739ca4d)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-05 18:00:22 +00:00
Tom Zanussi 0cc9a12ff8 yocto-bsp: Update templates to 3.17 kernel
Add 3.17 kernel support.

(From meta-yocto rev: cdebafc6f87ae635769cf93787c97caa8e58e13e)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-05 18:00:21 +00:00
Ross Burton 77eebccb0b scripts: don't skip defaultval
This field is now internal and won't be seen.

(From OE-Core rev: b1e02de02b3e0e83d003d0030b97da06abcdfe87)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-03 12:23:56 +00:00
Martin Hundebøll c0dafd3101 scripts: use '/usr/bin/env' in shebangs with python
To support yocto on systems with python3 as default version, scripts
should use /usr/bin/env python in the shebang, as this allows the use of
a fake env to mimic python2 as default version.

This patch simply replaces occurrences of #!/usr/bin/python with
 #!/usr/bin/env python and was done with this oneliner:

     git grep -lE '^#!/usr/bin/python' | xargs \
         sed -i 's|/usr/bin/python|/usr/bin/env python|'

(From OE-Core rev: 6d3de22a19657a413e01d7bb5fd74d16c00dc696)

Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 15:38:29 +00:00
Tom Zanussi fcf56083b9 wic: Update bootimg-partition to use bootimg_dir
Update bootimg-partition to use bootimg_dir instead of img_deploy_dir,
to match similar usage in other plugins.

As mentioned elsewhere, plugins should use the passed-in value for
bootimg_dir directly if non-null, which corresponds to a user-assigned
value specified via a -b command-line param, and only fetch the value
from bitbake if that value is null.

(From OE-Core rev: 3822f8a7b33da56ecd9144b4bcae50734fb1af81)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:03:41 +00:00
Tom Zanussi 42d0334aa8 wic: Remove special-case bootimg_dir
The first iterations of wic very shortsightedly catered to two
specific use-cases and added special-purpose params for those cases so
that they could be directly given their corresponding boot artifacts.
(hdddir and staging_data_dir).

As more use-cases are added, it becomes rather obvious that such a
scheme doens't scale, and additionally causes confusion for plugin
writers.

This removes those special cases and states explicitly in the help
text that plugins are responsible for locating their own boot
artifacts.

(From OE-Core rev: 6ba3eb5ff7c47aee6b3419fb3a348a634fe74ac9)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:03:41 +00:00
Tom Zanussi 38400617fe Revert "wic: set bootimg_dir when using image-name artifacts"
This reverts commit 7ce1dc13f9.

This patch broke the assumption that a non-null boot_dir means a
user-assigned (-b command-line param) value.

Reverting doesn't break anything, since the case it was added for
doesn't use the boot_dir for anything except debugging anyhow.

Fixes [YOCTO #6290]

(From OE-Core rev: db90f10bf31dec8d7d7bb2d3680d50e133662850)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:03:41 +00:00
Tom Zanussi d1f8b8f5d0 wic: Update the help text to include -D (--debug)
The --debug option is missing from the wic help text; this adds it and
at the same time rearranges the usage into a more logical arrangement.

(From OE-Core rev: cf5144ef241d8f4ccaa3461ae5c9f89c2cf2f8d1)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:03:40 +00:00
Tom Zanussi 005d81da2b wic: Use overhead factor when creating partitions from rootfs directories
When creating partitions sized to given rootfs directories, filesystem
creation could fail in cases where the calculated target partition
size was too small to contain the filesystem created using mkfs.  This
occurred in particular when creating partitions to contain very large
filesystems such as those containing sdk image artifacts.

This same limition is present in the oe-core image creation classes,
which can be readily see by changing IMAGE_OVERHEAD_FACTOR from the
default 1.3 to 1.0 and building a sato-sdk image.

It should be possible to calculate required sizes exactly given the
source rootfs and target filesystem types, but for now, to address the
specific problem users are hitting in such situations, we'll just do
exactly what oe-core does and define and use an IMAGE_OVERHEAD_FACTOR
or 1.3 in those cases.

Fixes [YOCTO #6863].

(From OE-Core rev: bbaef3ff5833fc1d97b7b028d7770834f62789da)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:03:40 +00:00
Tom Zanussi 334f83a146 wic: Don't allow mkfs to fail silently in partition command
The return code from the mkfs command used by the partition creation
command was being ignored, allowing it to silently fail and leaving
users mystified as to why the resulting filesystem was corrupted.

This became obvious when failures occurred when creating large
e.g. sdk filesystems [YOCTO #6863].

(From OE-Core rev: 8cef3b06f7e9f9d922673f430ddb3170d2fac000)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:03:40 +00:00
Hongxu Jia 9c218a319e wic/bootimg-pcbios.py: checking the existance of syslinux
While syslinux not existed in $bootimg_dir, there was a error:

$ wic create directdisk -e core-image-minimal
...
|Creating image(s)...
|Error: exec_cmd: install -m 444 /home/jiahongxu/yocto/
build-20141010-yocto/tmp/deploy/images/qemux86-64/syslinux/
ldlinux.sys /var/tmp/wic/build/hdd/boot/ldlinux.sys
returned '1' instead of 0
...

Add checking for the existance of syslinux to fix this issue.
If syslinux didn't exist in anywhere, prompt user to build it.

[YOCTO #6826]

(From OE-Core rev: c2d4364d9fbbda64598f0a3eb0b0890932bb7742)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-18 16:14:03 +02:00
Ross Burton 1d00f3e0d9 oe-git-proxy: use SOCKS4a instead of SOCKS4
In some situations where a proxy is required the client can't even do DNS
lookups, so instead of using SOCKS4 use SOCKS4a which moves the name resolution
from the client to the proxy.

(From OE-Core rev: 984455a95b4302d527ff54e019d8ed00611f3664)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-10 16:44:31 +01:00
Maciej Borzecki 7291691d3f wic: add sdimage-bootpart kickstart file
Add kickstart for generating a SD card image that should cover most use
case scenarios. The layout is as follows:
- 16MB vfat partition that IMAGE_BOOT_FILES will be copied to, 4k
  alignment
- ext4 rootfs, 4k alignment

(From OE-Core rev: bb01a6be7b32aa675f5003a6012a60a081212e8c)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:35:56 +01:00
Maciej Borzecki 6b03fc214f wic: add new bootimg-partition plugin
This patch implements 'bootimg-partition source plugin class for 'wic'. The
plugin creates an image of boot partition, copying over files listed in
IMAGE_BOOT_FILES bitbake variable.

(From OE-Core rev: 4a3200d710d953956064c28188577fbd461d093d)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:35:56 +01:00
Maciej Borzecki 7ce1dc13f9 wic: set bootimg_dir when using image-name artifacts
Running wic with -e to use artifacts from a named image, bootimg_dir was
always passed as empty string to partition source plugins. The patch
sets bootimg_dir to current value of DEPLOY_DIR_IMAGE, as bootloader
artifacts end up in that location as well.

(From OE-Core rev: d7f69e6f0932a927b6ce289fb47ba575d7aaa1c8)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:35:56 +01:00
Maciej Borzecki 48ff3fa3a5 wic: fix vfat partition sector count only if needed
VFAT rootfs partitions sector count would get updated always even if
there is no need. Since parition size in wic is expressed in MB, any
sub MB change will cause the generated partition image to be larger
than allocated space within the disk image. Fortunately, partitions
sized in MB will most of the time have a proper sector count.

(From OE-Core rev: 99bee4cb489800d74dea4d2158ff834413685f04)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:35:56 +01:00
Maciej Borzecki 0b3f477616 wic: use IMAGE_EXTRA_SPACE for vfat rootfs
Functions for generating rootfs use IMAGE_EXTRA_SPACE rather than
BOOTDD_EXTRA_SPACE. The latter is used in boot image source plugins.

(From OE-Core rev: 44abf447f8e4ed11cbbe53a4fb0ecf10a20f0f9e)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:35:55 +01:00
Maciej Borzecki c94d8e93db wic: minor comment update
Update comment about types of generated partition images.

(From OE-Core rev: ba1503f77e0c03fe6c715b61983008b7a534ae20)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:35:55 +01:00
Richard Purdie c5cc4993f0 sstatesig/sstate: Add support for locked down sstate cache usage
I've been giving things some thought, specifically why sstate doesn't
get used more and why we have people requesting external toolchains. I'm
guessing the issue is that people don't like how often sstate can change
and the lack of an easy way to lock it down.

Locking it down is actually quite easy so patch implements some basics
of how you can do this (for example to a specific toolchain). With an
addition like this to local.conf (or wherever):

SIGGEN_LOCKEDSIGS = "\
gcc-cross:do_populate_sysroot:a8d91b35b98e1494957a2ddaf4598956 \
eglibc:do_populate_sysroot:13e8c68553dc61f9d67564f13b9b2d67 \
eglibc:do_packagedata:bfca0db1782c719d373f8636282596ee \
gcc-cross:do_packagedata:4b601ff4f67601395ee49c46701122f6 \
"

the code at the end of the email will force the hashes to those values
for the recipes mentioned. The system would then find and use those
specific objects from the sstate cache instead of trying to build
anything.

Obviously this is a little simplistic, you might need to put an override
against this to only apply those revisions for a specific architecture
for example. You'd also probably want to put code in the sstate hash
validation code to ensure it really did install these from sstate since
if it didn't you'd want to abort the build.

This patch also implements support to add to bitbake -S which dumps the
locked sstate checksums for each task into a ready prepared include file
locked-sigs.inc (currently placed into cwd). There is a function,
bb.parse.siggen.dump_lockedsigs() which can be called to trigger the
same functionality from task space.

A warning is added to sstate.bbclass through a call back into the siggen
class to warn if objects are not used from the locked cache. The
SIGGEN_ENFORCE_LOCKEDSIGS variable controls whether this is just a warning
or a fatal error.

A script is provided to generate sstate directory from a locked-sigs file.

(From OE-Core rev: 7e14784f2493a19c6bfe3ec3f05a5cf9797a2f22)

(From OE-Core rev: 884d4fa3e77cf32836f14a113c11489076f4a84d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-17 22:00:25 +01:00
Tom Zanussi 5bef32283f wic: Completely remove all urlgrabber references
The previous commit, 'wic: Remove 3rdparty/urlgrabber' didn't actually
remove all references to urlgrabber - this does however.

(From OE-Core rev: b4367af770611174d9de82c63c697d4347e30dcf)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-10 11:33:25 +01:00
Richard Purdie 957753b628 scripts/contrib/build-perf-test: Update eglibc -> glibc
(From OE-Core rev: 928fc6c3652ba5db87e1f1c7923972d85c31bc08)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-03 11:09:04 +01:00
Yi Zhao 60b8a574dc scripts/create-recipe: minor fixes
Fixed:
- Remove PR. We don't need the "PR = r0" in the bb file.
- Function length can't get the array's size correctly.
  Should use function scalar.

(From OE-Core rev: efb9f9f1d9a85a22991f99277f77b87784762cbb)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-03 11:09:03 +01:00
Maciej Borzecki 50fbf19a93 wic: do not realign aligned partitions
The change prevents additional realignment of already aligned
partition. Previously, even already aligned partitions would be pushed
forward by the amount of --align.

(From OE-Core rev: 92a1b83d928173a58280ca019ca81fdeb5ba72b5)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:26:09 +01:00
Maciej Borzecki 5686b2d5a7 wic: do not steal sectors from the first partition
In order to make up for space loss due to overhead located before the
first partition, same amount of bytes was extracted from the first
partition's size. This leads to unexpected change of first partition's
size, and is not matched by similar adjustment at the time the partition
image is generated. Thus it is possible that the first partition may
partially overwrite contents of the following partition, as the
partition image is larger than the allocated space.

This is also problematic on certain platforms such as OMAP, where the
first partition is required for have an even number of
sectors (typically already expressed by --size in kickstart
file). Subtracting an odd number of sectors lost for overhead, leads to
an odd number of sectors assigned for partition, preventing the board,
such as beaglebone, from booting correctly.

(From OE-Core rev: c3251d4191fb0b7c3477a3579e542729598f6aad)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:26:09 +01:00
Maciej Borzecki f12ac6101c wic: include partition label in fs image file name
Not including the label image but having multiple partitions of the same
type, the image file of one partition would overwrite the other.

(From OE-Core rev: acf2fb7c6dfa3217ffcbf9483c190057d9f41bbf)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:53 +01:00
Tom Zanussi 072657ce98 wic: Add mkgummidisk kickstart file
This is the same as mkefidisk but uses gummiboot instead of grub-efi.

(From OE-Core rev: 5979409ebfab0bb07b3c2b2fcf14a722c441f07b)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:52 +01:00
Tom Zanussi 32a5799b78 wic: Add sourceparams to mkefidisk.wks
The bootimg-efi plugin now requires a loader param, so supply it to
retain existing behavior.

(From OE-Core rev: ccef1385cb51ce2b9b75493b314e38599a8ae10e)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:52 +01:00
Tom Zanussi 6e328c94ae wic: Add gummiboot support to bootimg-efi
Add gummiboot support to bootimg-efi, which retains the existing
grub-efi support (though requires an update to the .wks file).

(From OE-Core rev: f1a81fcefa493540a9faac549fdd513b86f8f497)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:52 +01:00
Tom Zanussi 8d0185f4f8 wic: Parse and pass sourceparams to partition plugin methods
Add code to parse the sourceparams and pass them to the partition
plugin methods.

(From OE-Core rev: 769a6f920fb672c50d76bd4bdea4a65fdc18a7b3)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:52 +01:00
Tom Zanussi e00e902fc7 wic: Add sourceparam param to partition plugin methods
The sourceparam param allows source plugins to be parameterized
generically (via --sourceparams="key=val[,key=val], implemented
previously).

(From OE-Core rev: 2abbcc843ba888782f6d68748d930c81e6ae7040)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:52 +01:00
Tom Zanussi ef700ea11f wic: Add utility function for parsing sourceparams
Parses strings of the form key1=val1[,key2=val2,...] and returns a
dict.  Also accepts valueless keys i.e. without =.

(From OE-Core rev: 36f258ee6e60c26fd44b9bc71c318363cec71f42)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:52 +01:00
Tom Zanussi 3c90ee9bc2 wic: Add '--sourceparams' partition option
To go along with '--source' as a way to parameterize source plugins.

(From OE-Core rev: f5b9ef65453b3f66282c49f5e2584ad33ac6d2d7)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:52 +01:00
Martin Jansa d43b4392bb sstate-sysroot-cruft.sh: Improve to use it from CI
* strip tmpdir prefix, so that we have shorter paths which aren't
  builder specific
* use '#' for regexp delimiter so that we don't need to prefix
  forward slashes in paths
* extend default whitelist to cover typical cases
* add parameter for external whitelist file
* use number of found paths as return code, so that CI can easily
  report error when new untracked files are found
* use .txt suffix for all output files, so that they can be easily
  viewed in browser
* add populate_sysroot task, because somewhere between dora and daisy
  the populate-sysroot files in sstate-control were renamed to have
  underscore instead of dash
* only few entries not covered by this default whitelist were found
  in world build (but I'll leave these for people to whitelist, because
  they are not generated in most builds)
  * [^/]*/home/builder
    home directory from meta/recipes-graphics/builder/builder_0.1.bb
  * [^/]*/usr/src/kernel/patches
  * [^/]*/usr/lib/gdk-pixbuf-2.0/.*/loaders.cache
    3 places are using this, not sure which one creates it
    meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb:
      GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
    meta/recipes-gnome/gtk+/gtk-update-icon-cache-native_3.4.4.bb:
      GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
    scripts/postinst-intercepts/update_pixbuf_cache:
      >$GDK_PIXBUF_MODULEDIR/../loaders.cache && \
      sed -i -e "s:$D::g" $GDK_PIXBUF_MODULEDIR/../loaders.cache

(From OE-Core rev: b1bfec63949e16abe8c11c34530dfbfb176c04cd)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 12:30:51 +01:00
Martin Jansa a1fa222d48 test-dependencies, insane.bbclass: improve the message
(From OE-Core rev: b73e6159aed1a9768d02d12e7894ca0f1e72be69)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 11:27:32 +01:00