Commit Graph

20 Commits

Author SHA1 Message Date
Richard Purdie 022a8b58c8 meta/scripts: Various getVar/getVarFlag expansion parameter fixes
There were a few straggling expansion parameter removals left for
getVar/getVarFlag where the odd whitespace meant they were missed
on previous passes. There were also some plain broken ussages such
as:

d.getVar('ALTERNATIVE_TARGET', old_name, True)
path = d.getVar('PATH', d, True)
d.getVar('IMAGE_ROOTFS', 'True')

which I've corrected (they happend to work by luck).

(From OE-Core rev: 688f7a64917a5ce5cbe12f8e5da4d47e265d240f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-09 13:39:11 +00:00
Joshua Lock c4e2c59088 meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Ross Burton 6d59c5cd61 cml1: fix tasks after default [dirs] changed
These tasks relied upon [dirs] being ${B} by default.  As the functions are not
simple, add back [dirs] so they work again.

[ YOCTO #10027 ]

(From OE-Core rev: 614d976ee97d6386c37afb54add5b83741ca401e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-04 15:22:22 +01:00
Richard Purdie 78b6109440 cml1/sstate: Fix missing getVar parameter
(From OE-Core rev: 84065e9b33e6d401e4e50436665838be2d0267ad)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-19 15:33:02 +00:00
Markus Lehtonen a3b996ae6d cml1.bbclass: fix do_menuconfig
The functionality got broken after bitbake commit
8bf33a8e92c0e188fa392030025756196c96fcbb
which disabled the (bitbake) variable expansion inside python functions.

(From OE-Core rev: 51c6ea30060eeddf93e4255cbd3847fc6aedaf9f)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-19 01:01:24 +00:00
Stefan Müller-Klieser 69790b007f cml1.bbclass: make menuconfig task configurable
Menuconfig is sometimes not the most convenient way to configure a
kernel, as the default color scheme can be hard to read. This variable
gives you access to the MENUCONFIG_COLOR variable or lets you select
nconfig, e.g. by setting it in your local.conf:

KCONFIG_CONFIG_COMMAND = "MENUCONFIG_COLOR=mono menuconfig"
or
KCONFIG_CONFIG_COMMAND = "nconfig"

(From OE-Core rev: fd8880aee4f0f8a535616ef312b283f401f64c7c)

Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-11 09:28:50 -07:00
Jason Wessel da6a4f6c2b ncurses, busybox, cml1.bbclass: Fix menuconfig display corruption
Previously there was a change to the ncurses compile to make it more
like the typical way it was compiled on a host system.  This fixed a
whole class of host machines, but masked the real underlying problem
with the display corruption issues and menuconfig.

The corner case that led to the discovery that the wrong curses.h file
was getting used was when there was no curses libraries at all on one
of the development hosts.  What had happened before was that
/usr/include/curses.h on the host system had to match closely enough
to the curses.h in the sysroot and then linking against the sysroot
version of curses.so was ok (meaning no display corruption).  But on
some systems with ncurses.h vs curses.h such as SuSE hosts, there were
still issues.

If we fix the root of the problem and force the mconf and lxdialog to
use the correct headers and libraries from the sysroot there is no
further issues and the menuconfig target works properly.  It also
means we can back out the custom compilation flags to the ncurses
recipe because they are no longer needed.

For the kernel part of the menuconfig / nconfig changes it will be
merged separately and this is all based on:

https://lkml.org/lkml/2013/3/3/103

(From OE-Core rev: 889e02659dd396feba24f0b0ee6b4043c3f3735a)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-09 10:21:23 +00:00
Maciej Borzecki a346777b83 cml1.bbclass: fix diffconfig diff command
Commit 6a7b989933 introduced a typo in
command, a whitespace was missing between --new-line-format and path to
original file. As a result, diffconfig task did not work, diff failed
with exit status 2, resulting in empty fragment.cfg.

(From OE-Core rev: 8c75aa7c30cc5a796962d099896ca2a9a16c3a06)

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:47 +01:00
Stefan Müller-Klieser 6a7b989933 cml1: correct diffconfig output format
If used with some packages using kconfig mechanism, the diffconfig
command generates wrong output format. Diff provides all options to
format the output correctly. This method formats as intended, is more
robust and works with the merge_config.h script from yocto-kernel-tools.

(From OE-Core rev: 1d9d035f07be1cef2764949d84cecbff7dd428dd)

Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-29 09:58:27 +01:00
João Henrique Ferreira de Freitas 4166062ea7 cml1.bbclass: Add diffconfig task to cml1
diffconfig() is a new task that makes a diff between the
old and new config files and writes to the fragment.cfg result file.
menuconfig() always copy the original config file, so the user
doesn't need to copy it.

(From OE-Core rev: f0dcbbdcc37da12f84f730b8235f50be8c150c50)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-20 14:28:10 +00:00
Jacob Kroon 7bbaf8b149 cml1.bbclass: Fix return code handling in do_menuconfig()
On my system, doing "bitbake -c menuconfig busybox" pops up
a gnome-terminal, I can see that the compilation starts but then the
terminal automatically exits.

It turns out I don't have ncurses development package installed on my host,
and OE's host sysroot isn't being passed to gcc, so compilation fails.
The window automatically closes before I can read the error message
since the '$' in the return code check needs to be escaped.

Make sure the user can read the error message by properly checking the
return code.

(From OE-Core rev: a2241a92fc48e4286de17b23124a9e2f0fd8185b)

Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-28 11:41:21 +00:00
Fahad Usman 7d450fb74a cml1: set and export TERMINFO, to handle ncurses-native relocation
ncurses library looks at the compiled-in search path for the terminfo
database, and that path no longer exists, when using cached binaries (sstate).
Export TERMINFO pointing at the current sysroot, so the attempt to run mconf
is able to find the correct terminfo db.

(From OE-Core rev: b036adfb868c042245cd8fba8ecc2ba53169bfea)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>

the patch was imported from meta-mentor layer on yoctoproject git server
http://git.yoctoproject.org/cgit/cgit.cgi/meta-mentor as of commit id
0cae284f294e3a2c99d9a4d79c95c25103cd8f8b

Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-26 11:34:07 +00:00
Jason Wessel 3d25fc9aeb cml1.bbclass: Convert tab indentation in python functions into four-space
Based on the previous commit 604d46c686d06d62d5a07b9c7f4fa170f99307d8
(Convert tab indentation in python functions into four-space), the
cml.bbclass was not converted, and in order to properly extend it
with external bbappend's it needs to be converted.

(From OE-Core rev: e4c1c37bb37e9eba635bc0a9308ab593abd299ec)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27 15:21:53 +01:00
Andrei Gherzan 42d91a7db4 Replace "echo -e" with "printf" to have the same behavior in dash or bash
oe-core removed the prerequisite to have sh as bash. POSIX doesn't define
any options and furthermore allows 'echo -e' to be the default behavior.
This means that in dash 'echo -e' will actually print '-e' and interpret
backslashes by default. We use instead 'printf' builtin command with or
without '\n' to simulate 'echo -e' or 'echo -n'.
'printf' needs format while 'echo' can be used without any arguments. So
'echo >' was replaced by 'printf "" >'.
'echo' without '-n' flag adds a new line by default so to keep the same
behavior of two new lines while using 'echo "\n"', 'printf "\n\n"' is
used.

[YOCTO #3138]

(From OE-Core rev: a19880ad10ccb5d7d909dcf9de5c3dc58a0ebcd3)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 13:33:50 +01:00
Darren Hart 288dcf4238 cml1.bbclass: Only delay exit if the command fails
Rather than pause for 5 seconds, test the return code of the command and
require user input before exiting on failure. This avoids pausing after
successful command execution as well as possibly not waiting long enough
if the user happens to be doing something else for 5 seconds.

(From OE-Core rev: d99cc2b70bbda9a0cbc09a4430b871c287113041)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 16:35:52 +01:00
Paul Eggleton 66123b9255 classes/cml1: ensure -c menuconfig forces a rebuild next time
Ensure the following results in the kernel being rebuilt, repackaged and
re-deployed in the final step:

bitbake virtual/kernel
bitbake -c menuconfig virtual/kernel
[ make changes to the kernel configuration and save ]
bitbake virtual/kernel

If there are no changes to the configuration saved, the rebuild will not
be triggered.

Note that this relies on a function recently added to BitBake and
requires full hashing (i.e. BB_SIGNATURE_HANDLER must be set to a
signature handler that inherits from BasicHash) - if this is not the
case or the function is not available in the version of BitBake being
used this change will do nothing.

Fixes [YOCTO #2256].

(From OE-Core rev: 9bf6b60e1599cf5dd87089d42584583cdfd6807a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:03:02 +01:00
Richard Purdie 7e62e24b6c cmd1.bbclass: Ensure ncurses is built and used for menuconfig tasks
Currently, the task just exits if something goes wrong. This adds the
ncurses-native dependency. It also adds a small delay before closing the
window so any messages displayed there can be seen.

Trying to get the kernel build system to correctly find and link with
our copy of ncurses is some kind of nightmare. I ended up having to add
it to HOST_LOADLIBES globally for this task which is rather nasty but I
couldn't find any other way.

[YOCTO #2513]

(From OE-Core rev: fe417e8a4d625c6933de72163d2fee52ac47f571)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-12 16:34:30 +01:00
Richard Purdie 04c66de8ab cml1/kernel: Update do_menuconfig to use oe.terminal()
The recent environment fixes broke the menuconfig task since it couldn't access
variables like DISPLAY. This patch updates it to use oe.terminal instead
allowing it to work again.

(From OE-Core rev: e876a44fa8ed0aa2e09084c1e7ddfc876c3f981b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-15 11:23:59 +01:00
Noor, Ahsan b77f1f327b kernel,cml1.bbclass: Move menuconfig to cml1
* The menuconfig target exists in places other than the kernel that use kernel style config.

(From OE-Core rev: 1ceaf45f634d11b65aab0f591a86865df49c8c90)

Signed-off-by: Noor, Ahsan <noor_ahsan@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-04 15:04:32 +01:00
Richard Purdie b2f192faab Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-07-21 10:10:31 +00:00