image_types.bbclass: only create links if the target exists

When creating images containing many partitions, rootfs.$type
may not be available.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
tcltk: Fix for ${B} != ${S}

This change allows ${B} != ${S} builds to work since otherwise
gnu-configise is executed in the wrong places and various source
paths aren't correct.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package: Add cachedpath optimisation

Currently, various standard library operations like os.walk(),
os.path.isdir() and os.path.islink() each call stat or lstat which
involves a syscall into the kernel. There is no caching since they could
conceivably have changed on disk. The result is that for something like
the do_package task of the kernel we're spending over two minutes making
868,000 individual stat calls for 23,000 files. This is suboptimal.

This patch adds lib/oe/cachedpath.py which are a set of replacement
functions for these operations which use cached stat data rather than
hitting the kernel each time. It gives a nice performance improvement
halving the build time of the kernel do_package.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
zaurusd: Update to new git version

Makefile fix (patch) was merged upsream
Out of tree builds were also fixed

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
mkefidisk.sh: create a proper ESP

The script was creating a FAT fs with EFI files in it, but wasn't setting the GPT GUID.

Using 'gummiboot install' natively failed because of the missing GPT GUID, so fix that. While we're there also set the name to "EFI System Partition".

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
neard: upgrade to 0.10

neard ver 0.10:
	Added initial WiFi handover support.
	Added Service Name Lookup support to nfctool.
	Added NDEF building unit tests.
	Added State support to Bluetooth handover agent.
	Added neard and neard.conf man pages.
	Added a copy of the NFC kernel header.
	Fixed handover validation tests failures.
	Fixed Tag and Device PropertyChanged signal.

Signed-off-by: Olivier Guiter <olivier.guiter@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
iptables: Turn ipv6 and libnfnetlink support into PACKAGECONFIG

Detection of libnfnetlink is automatic in configure which means
that when you have meta-networking in your cosmos, it would create
a race condition where if libnfnetlink is already staged then it
will be enabled otherwise disabled. The issue happens quite often
with sstate and high parallelism. Since the dependency libnfnetlink
is not part of OE-Core, this patch turns it into a PACKAGECONFIG
which is diabled by default and iptables is patched to provide
the knob.

If you want to enable libnfnetlink support then it can be done
in a bbappend where you are sure that you are also including
meta-networking in your distro.

While at it also turned ipv6 support into packageconfig

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
syslinux.bbclass: Add a default serial console option and real boot menu support

The previous syslinux menu code did not support using both a serial
and vga console, but this has worked for years in syslinux so there is
no reason not to take advantage of it.  The previous menu looked like:

-------------------------------------------------------
Linux Boot Menu
The following targets are available on this image:

             boot: None
             install: None
-------------------------------------------------------

This commit makes it look something more like a traditional grub menu
on both the serial console and vga console as well as providing the
option to continue on using either the serial or vga console with the
correct kernel arguments.

You can see the screen shots attached to the bugzilla.

https://bugzilla.yoctoproject.org/show_bug.cgi?id=3944

[ YOCTO #3944 ]

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>
qemu-testlib: Add python helper and simplify shell

The current code has a race since it greps for *any* qemu process
running, even if it isn't the one we started. This leads to some sanity
tests potentially failing on machines where multiple sets of sanity tests
are running.

To resovle this and some other ugly code issues, add a python script
to accurately walk the process tree and find the qemu process. We can
then replace all the shell functions attempting this which happen to
work in many cases but not all.

Also clean up some of the error handling so its more legible.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
tzcode & tzdata: update to 2013b versions

Rename and modifying existing recipes to use 2013b
versions of time zone.

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
python: fix on-target use of distutils/setuptools by removing references to buildpaths

Running 'python setup.py build' would fail due to the python Makefile having

CC=             i586-angstrom-linux-gcc  -m32    -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/home/koen/v2012.12/build/tmp-angstrom_v2012_12-eglibc/sysroots/fri2
CXX=            i586-angstrom-linux-g++  -m32    -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/home/koen/v2012.12/build/tmp-angstrom_v2012_12-eglibc/sysroots/fri2
'--with-libtool-sysroot=/home/koen/v2012.12/build/tmp-angstrom_v2012_12-eglibc/sysroots/fri2'

And more

Multiple users have reported this problem:

http://hipstercircuits.com/?p=499
http://www.gigamegablog.com/2012/09/09/beaglebone-coding-101-spi-output/

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
layer.conf: avoid unnecessary early expansion with :=

bitbake handles immediate expansions of LAYERDIR for us automatically.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
perf: make PKGV match kernel version

Have perf grab and use the kernel version it's built from for PKGV,
rather than the default perf recipe version, so the final packages get
the kernel version instead of the default 1.0, which represents a
backwards value from the previous recipe.

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
perf: Fix parsing error

Due to the use of ${@...} the code will try and expand this when
performing the initial parsing. If the sysroot doesn't exist with
an existing kernel, this will fail at parsing time.

Sinec we're already in python, just remove the ${@....} wrapping
and then we execute at do_package time which is what we want.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
harfbuzz: update the license information

harfbuzz is using the 'Modern Variants' of MIT License:
https://fedoraproject.org/wiki/Licensing:MIT?rd=Licensing/MIT#Modern_Variants

We can update the LICENSE as 'MIT & ICU'.

Fixes this warning:
WARNING: harfbuzz: No generic license file exists for: Old-MIT in any provider
WARNING: harfbuzz: No generic license file exists for: UCDN in any provider
WARNING: harfbuzz: No generic license file exists for: HarfBuzz-old in any provider

Signed-off-by: Maxin B. John <maxin.john@enea.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/qemutestlib: Add better process debugging and fix process group issue

In single testing with a shutdown scenario the processes are cleaned up correctly
but the manual cleanup fall back used for a minimal image do not work properly.
This patch fixes the kill commands to revert to non-process groups, fixing
the hung process issues that were occuring.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
qemuimage-testlib: Fix IP address handling

Remove some pointless code and also fix the return handling
for the function since it returns null, not 0 as the comments
would suggest.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
qemuimage-testlib: Add delay to work around races in qemu startup

Qemu changes pid when starting up. On a loaded machine, this can result
in the incorrect pid being returned. Since qemu will take a few seconds to
boot anyway, we might as well delay a short while and allow things to settle
which should fix various race issues being seen on the autobuilder.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
qemuimage-testlib: Add extra debugging and sanity check

Check for a zero IP address since its clearly incorrect if that value
is found. Also add debugging for cases where we can't find the qemu
process. A process listing is handy to help understand what the problem
might be.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
runqemu: Improve error handling/exit codes

runqemu-internal is sourced so should be returning with an error code in
case of errors. runqemu needs to deal with this.

This patch fixes up the various error paths so we're consistent and get
a sane exit status for runqemu which helps a lot in its use in the qemu
runtime testing on the autobuilder.

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