Commit Graph

318 Commits

Author SHA1 Message Date
Richard Purdie 7261f25a07 scripts/bitbake: We only need pseudo-native in the sysroot, we can ignore any other pieces of the dependency tree
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-28 10:44:15 +00:00
Darren Hart 4e23e8f9d0 send-pull-request: ensure a proper FROM header is included
Commit 94629f2521 removes the FROM header when
sending via sendmail to avoid sending mail as the original change committer (as
opposed to the local user). This resulted in mail going out without any FROM
header, which some mailing lists correct by adding the *bounce address as the
FROM.

Correct this by reading FROM from the environment, from a new -f argument, or
from the git user.name and user.email config settings, in that order of
preference. Also display the FROM that will be used prior to the send
confirmation.

This has no effect if the -g (send via git) argument is specified, other than
printing the git sendemail.from config setting.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Reported-by: Saul Wold <saul.wold@intel.com>
2011-01-26 09:49:07 -08:00
Darren Hart 94629f2521 send-pull-request: send all patches as the local user
When using sendmail to send patches, patches would appear to be from the
original author as git adds a From: header in the generated patches.  This patch
changes this behavior to match that of git-send-email, where the email From:
header is that of the current sender (according to sendmail) and a "From:
Original Author <email>" line is inserted into the body of the message.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2011-01-24 14:09:13 -08:00
Scott Garman 75748b6f09 send-pull-request: unset $TO and $CC from environment
Darren Hart and I discovered that when $CC is set (which
our meta-toolchain environment script sets up), the value
leaks into the use of this script. Unsetting $TO as well
just to be thorough.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2011-01-24 14:09:13 -08:00
Scott Garman 57392afdbb poky-extract-sdk: allow relative paths for extract-dir
psuedo needs a full path to its pid file, so convert
relative extract-dir paths to full ones.

The symptom of this bug is receiving the following error:

pseudo: Couldn't open relative/path/to/var/pseudo/pseudo.pid: No such file or directory

This fixes [BUGID #670]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2011-01-24 14:09:11 -08:00
Jiajun Xu 3e052919c9 qemuimagetest: Use same image during sanity testing instead of copying a new image for each case
To reduce the time on sanity testing, we remove variable SHARE_IMAGE and use
a new variable TEST_SERIALIZE in local.conf. It is by default set to 1. Poky
will copy and boot the to-be tested image for only once. It will not remove
or kill the image and test cases will be serialized executed against the same
image. If it is set to 0, image is always be copied for each cases, which takes
much time. I had a experiment that latest qemuppc sato only takes 7 minutes to
finish 9 sanity test cases, which takes more than 20 minutes before.

I also removed sanity case "boot" from sato/sdk/lsb because the other cases for
these targets already cover the check point of "boot".

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2011-01-20 21:36:57 +00:00
Jiajun Xu 2119274314 qemuimagetest: Use the same image in sanity testing to fix the timeout issue on autobuilder
Fixes [BUGID #595]

Because of the QEMU booting slowness issue(see bug #646 and #618), autobuilder
may suffer a timeout issue when running sanity test. We introduce variable
SHARE_IMAGE here to fix the issue. It is by default set to 1. Poky will copy
latest built-out image and keep using it in sanity testing. If it is set to 0,
latest built-out image will be copied and tested for each case, which will take
much time.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2011-01-14 08:09:26 -08:00
Darren Hart e5e3fb23a2 bbvars.py: add a script to look for undocumented variables
bbvars.py will compare recipes in meta directories with documentation files
and report on variables that don't appear to be documented. It reports the
number of times a variable is used as well as any doctags present in the
documentation config file.

The output of this is intended to aid in determining where documentation may
be lacking, but it is not perfect, and does generate some false positives. An
experienced eye and careful attention to count and doctag should be applied to
the results.

$ ./bbvars.py -d ../../documentation/poky-ref-manual/poky-ref-manual.html -m ../../meta -t ../../meta/conf/documentation.conf -T  | head -n 10
Found 1413 undocumented bb variables (out of 1578):
VARIABLE                              COUNT DOCTAG
===================================================
BUILD_ARCH                            4     The name of the building architecture. E.g. i686.
BUILD_CC_ARCH                         2     FIXME
BUILD_PREFIX                          4     FIXME
BUILD_SYS                             13    FIXME
BUILD_VENDOR                          2     FIXME
CACHE                                 1     The directory holding the cache of the metadata.
COMPATIBLE_HOST                       19    A regular expression which matches the HOST_SYS names supported by the package/file. Failure to match will cause the file to be skipped by the parser.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-12 00:55:49 -08:00
Jiajun Xu 601af9f8ea qemuimagetest: Remove connman test for lsb image and fix one warning in Test_Create_Qemu
There is no connman in LSB image. So we need to remove connman test from it.
And when we check if ip address fetched by Test_Fetch_Target_IP is valid,
we should use "==" operator for string comparison.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2011-01-06 10:06:32 +00:00
Lianhao Lu a47c6415bd scripts/bitbake: Skip building pseudo if necessary.
Fixed [BUGID# 625]. Skip building pseudo if necessary by parsing the
options to bitbake.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2011-01-05 14:24:00 +00:00
Jiajun Xu 2e3cdcb067 qemuimagetest: Add basic function check for connman
Add one case for connman sanity test. We check if connmand is running
in background after booting and if there is always one connmand process
running even connmand is executed by several times.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2011-01-02 01:25:40 -08:00
Jiajun Xu 62caed8237 qemuimagetest: Add basic function check for gcc/g++/make command in target
Add one case for compile tools sanity test in target, including gcc/g++/make.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2011-01-02 01:25:40 -08:00
Jiajun Xu bcf8853e45 qemuimagetest: Add basic function check for rpm command
Add one case for rpm query sanity test.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2011-01-02 01:25:40 -08:00
Jiajun Xu f6442e68cc qemuimagetest: Add basic function check for zypper command
Add two cases for zypper sanity test.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2011-01-02 01:25:40 -08:00
Richard Purdie cab983b0d0 qemuimage-testlib: Improve quoting causing problems under certain circumstances
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-24 01:03:47 +00:00
Richard Purdie 11833f7002 qemuimage-testlib: Fix the check for running qemu processes
Previously, any active command containing the word "qemu" including
in the command path would trigger a "success" result for detecting
the qemu process. This change fixes the check to search for commands
starting with "qemu" and ignores pathnames.

It also shortens the timeout for the qemu process to appear to 10
seconds. If it doesn't appear in that time there is always a problem.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-23 17:28:47 +00:00
Richard Purdie df74cf25f0 qemuimage-testlib: Ensure TOPDIR/BUILDDIR are set
The recent environment changes mean TOPDIR/BUILDDIR need to be exported
specifcially to the enviromnent so the qemu scripts can find the correct
build directory.

Without this, qemu can fail to run.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-23 17:27:14 +00:00
Jiajun Xu 236faced1d qemuimage-testlib: Add check for existence of image and correctness of ip address
Fixes [BUGID #612, #611]

Add check for existence of image to be tested in qemuimage-testlib.
This ensures that sanity test returns failure immediatly when there is
no image found. And also add check for the correctness of ip address.
If the ip address returned by function Test_Fetch_Target_IP is 0, it
means qemu starts up failed and no valid ip address found.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2010-12-23 15:52:37 +00:00
Zhai Edwin 983bd9a77e qemu: Add some checks before enabling KVM
Check the missing modules and permission with informative output.

[BUGID #599] got fixed.

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
2010-12-23 14:28:22 +00:00
Darren Hart 585c506cd8 send-pull-request: allow users to select git-send-email or sendmail
Some users find it easier to use their git sendmail setup over a local
MTA to deliver mail with the send-pull-request script. If you would
like to do this, please read the git-send-email man page and set
the relevant entries in your git config. In particular, be sure to
set sendemail.from to avoid being asked each time.

Reported-by: Khem Raj <raj.khem@gmail.com>
CC: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2010-12-23 14:20:50 +00:00
Darren Hart 703148fde6 send-pull-request: Use current date in mail headers
Some users experience problems viewing the pull requests as a sequential
mail series due to the script using the git commit date for the patches
and today's date for the cover letter.

Address this by renaming the email Date: header to Old-Date: and adding
a new Date: header with a current timestamp.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Reported-by: Gary Thomas <gary@mlbassoc.com>
Cc: Josh Lock <josh@linux.intel.com>
2010-12-21 09:29:12 +00:00
Mark Hatle 60ccdaa0ea poky-init-build-env: Enable all POSIX shells
Update the script so that it will work in more then just bash.  If bash
is not used, it will assume the PWD is the Poky location.  (This is because
BASH_SOURCE is a bash-ism, and equivalent functionality is not available in
other shells).

This has been verified with dash (see comment in the code), ksh, zsh and
of course bash.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-12-20 23:00:51 +00:00
Mark Hatle 86b6b09337 poky-init-build-env: Breakup the environment script
Break up the scripts/poky-env-internal into two parts:
  1) Chunk that is sourced and sets up the environment
  2) Chunk that is executed and configures the build directory

OEROOT configuration was moved into the initial poky-init-build-env script.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-12-20 23:00:25 +00:00
Richard Purdie 3abc81b798 bitbake.conf/poky-env-internal: Adjust PSEUDO variables to match pseudo enabled/disabled modes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-17 16:14:07 +00:00
Richard Purdie f04e6a59b4 scripts/bitbake: Add wrapper script which ensures pseudo is built and available
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-17 16:14:06 +00:00
Richard Purdie 68ddced930 poky-env-internal: Search scripts before the bitbake directory so we can override bitbake's main script
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-17 13:25:11 +00:00
Liping Ke ae4f5c942e Add extra parameters options for poky-qemu scripts
In order to support qemu user's flexibility requirement, we add extra
parameter options, user can add extra params such as "<-m 256>"
in poky-qemu script command.

Signed-off-by: Liping ke <liping.ke@intel.com>
2010-12-16 15:53:09 +00:00
Richard Purdie e497b89cf3 scripts/poky-qemu: Improve tmp layout assumption
If someone has changed TMPDIR in local.conf to a non-standard location, the
poky-qemu script currently doesn't handle this and assumes if BUILDDIR is set,
$BUILDDIR/tmp will exist.

Its simple to check if this exists and if not, to ask bitbake where the
directory is so this patch changes the code to do that.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-15 23:22:16 +00:00
Xiaofeng Yan f39dae9f15 creat-lsb-image: download lsb test suite and creat a image with lsb test suite
If we make a test with lsb test suite, then we must creat a large image with lsb test suite.
three function in this script:
1 download lsb test suite
2 creat a block file with 3G
3 install file system of poky-image-lsb, modules of driver and lsb test suite

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
2010-12-10 22:01:40 -08:00
Zhai Edwin a1175b8906 qemu: Enable KVM support on x86/x86-64 host
User need build kvm module for native kernel and install them by "modprobe
kvm_intel". Then add "kvm" option to poky-qemu to enable it.

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
2010-12-09 08:18:18 -08:00
Scott Garman ba5e0b9531 Make poky-qemu and related scripts work with arbitrary SDK locations
* No longer assume SDK toolchains are installed in /opt/poky
* [BUGFIX #568] where specifying paths to both the kernel and fs
  image caused an error due to POKY_NATIVE_SYSROOT never being
  set, triggering failure of poky-qemu-ifup/ifdown
* Cosmetic improvements to usage() functions by using basename

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-12-09 15:00:45 +00:00
Gary Thomas 7581654a03 poky-env-internal: Allow the environment variable POKYCONF to provide the basis for the working "conf" directory.
By using the POKYCONF variable, a meta layer can provide the basic setup for files to
be used during a build.  This is similar to the default values stored in the main meta
tree, .../meta/conf/local.conf.sample, etc

Signed-off-by: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-09 14:44:13 +00:00
Scott Garman 9d0d2b044e Remove unused tunctl-src/Makefile from scripts/
Removing leftover cruft

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-12-07 00:48:39 -08:00
Scott Garman 01da08097a Add sanity test scenarios for -lsb images
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-12-07 00:48:03 -08:00
Richard Purdie 971fc21b8e scripts: Remove obsolete stage-manager scripts
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-28 13:14:21 +00:00
Richard Purdie e1ab1e9ae1 scripts/poky-env-internal: Further cleanups
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-28 13:11:57 +00:00
Richard Purdie f5e142abd6 scripts/poky-env-internal: Remove unset variables
These variables are not on any bitbake environment whitelist so will never make it into
the environment. This is legacy code which is not required any more so remove it.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-28 12:57:27 +00:00
Richard Purdie bfa66493eb scripts/poky-env-internal/image-swab.bbclass: Remove OEROOT references
OEROOT isn't used outside the init script so stop exporting it into the environment
where it can "corrupt" sstate packages.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-28 12:41:09 +00:00
Scott Garman a4a896165c poky-qemu: Fix issues when running Yocto 0.9 release images
This fixes two bugs with poky-qemu when it is run from a
standalone meta-toolchain setup.

[BUGFIX #535] and [BUGFIX #536]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-11-14 21:08:28 -08:00
Jiajun Xu d64c7ae88c imagetest-qemu: Add sanity test cases for scp/shutdown in target
scp test is to check if file copying via network work or not in target.
shutdown test is to check if target can be poweroff with qemu process off.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2010-11-14 21:08:22 -08:00
Darren Hart 2e0ab8c18f git-pull: add send-pull-request script
send-pull-request facilitates sending pull requests generated by
create-pull-request. The primary role of this script is to harvest email
addresses from the patches and send them out. A working installation of sendmail
(exim, postfix, msmtp, etc.) is required to use this script.

You can explicitly specify To addresses with the -t option. As this can be
tedious, the -a option will scan all the patches for To, CC, and *-by lines and
the collected addresses to the To and CC headers for each patch.

This script uses an identical recipients list for every patch, including the
cover letter. This is by design. Existing tools will auto-generate the CC header
for individual patches, but since they don't apply it to the other patches, the
recipients can lack the necessary context to provide a meaningful review. This
is especially true of the cover letter.

The pull directory generated by the create-pull-request script is specified
using the -p option.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Nitin A Kamble <nitin.a.kamble@intel.com>
CC: Richard Purdie <rpurdie@linux.intel.com>
CC: Saul Wold <saul.wold@intel.com>
CC: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-10 21:22:27 +08:00
Darren Hart 1f0e2cf16a git-pull: add the new create-pull-request script
The previous create-pull-request only generated a cover letter. When used to
send to the list, it did not include the patches, which made it difficult
to perform peer review. A pull request without patches is typically only sent
by a maintainer. As we are not all maintainers, we need a means to easily
submit patches for review.

As we are accustomed to making pull requests, this script retains a
git-pull-style cover letter, while sending the relevant patches as responses
to the pull. This will provide the necessary context for peer review, and still
allow people to collapse threads and see no more mail than they were previously.

This version retains the relative_to, commit_id, and contrib_branch arguments
from the original, along with their default values. It adds several more,
resulting in a highly flexible tool.

The script creates a pull directory (pull-$$ by default, configurable via the -o
option) and populates it with a git-format-patch generated patch series and
cover letter. The cover letter is modified to include the git and http pull URLs
and branch name, as well as a basic signature from the author pulled from git's
user.name and user.email config. git-format-patch provides the shortlog and
diffstat of the series.

Breaking a bit from the original, this script maintains the [PATCH] subject
prefix in the cover letter (as opposed to [GIT PULL]. This is better suited to
the majority of developers (who are not maintainers). This prefix is
configurable with the -p option, allowing you to create an [RFC PATCH]
prefix, for example.

By default, the generated cover letter with contain "*** SUBJECT HERE ***" and
"*** BLURB HERE ***" tokens which you should replace with something
appropriate prior to sending the messages.

When developing multiple versions of a patch series, it can save time to
maintain a message.txt file, rather than having to retype the message body of
the cover letter every time. The -m option allows you to specify a message file
and replace the "*** BLURB HERE ***" token of the cover letter with the contents
of the message file.

Finally, the -s option will replace the "*** SUBJECT HERE ***" token in the cover
letter with the specified subject.

The generated patches are suitable for sending via sendmail.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Nitin A Kamble <nitin.a.kamble@intel.com>
CC: Richard Purdie <rpurdie@linux.intel.com>
CC: Saul Wold <saul.wold@intel.com>
CC: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-10 21:22:27 +08:00
Darren Hart 09ee361d42 git pull: remove the existing create_pull_request script
The patches to follow completely rewrite the existing create-pull-request.
Rather than have an initial diff of the two files (which are not at all
similar) remove the original, and then create the new one.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Nitin A Kamble <nitin.a.kamble@intel.com>
CC: Richard Purdie <rpurdie@linux.intel.com>
CC: Saul Wold <saul.wold@intel.com>
CC: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-10 21:22:27 +08:00
Bruce Ashfield e0194e3c91 qemumips: re-enable wacom and standard USB UI options
Fixes [BUGID #394]

Now that the qemu/mti mips kernel branches have been fixed
for wacom USB interaction, we can re-nable the standard set
of qemu UI options for qemumips.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-10 21:22:26 +08:00
Jiajun Xu 12a861359a imagetest-qemu: Add test case for dmesg check in target
Add a test case for error log check with command dmesg in target. The
case introduces a new folder in target, "/opt/test", which holds test
scripts running in target.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2010-11-10 21:09:22 +08:00
Scott Garman 9a2ae44380 poky-qemu-internal: make the -no-reboot qemu option mandatory
This fixes [BUGID #100]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-10-14 20:12:04 +01:00
Scott Garman 7d7d35f369 poky-qemu: miscellaneous bugfixes
In scenarios where the POKY_NATIVE_SYSROOT env variable hasn't been
set up, bug #427 can still be triggered. This fixes it by running
setup_tmpdir(). This fixes [BUGID #427].

Also, the qemu tap dev lock directory needs to be chmod 777 so that
multiple users can create and delete lock files.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-10-14 20:12:04 +01:00
Scott Garman af404b1372 poky-qemu: add nographic option for disabling video console
This fixes [BUGID #408]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-10-14 20:12:03 +01:00
Scott Garman d393edda26 poky-qemu-internal: enforce a 128M memory limit for qemuarm
This fixes [BUGID #433]

Also set a sane default for the ifconfig command, which simplifies
our autobuilder sanity test setup.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-10-12 17:21:39 +01:00
Scott Garman 364aaa6dfa poky-qemu: fix for handling full path to rootfs
This fixes [BUGID #427]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-10-11 22:24:23 +01:00
Scott Garman c805a6ed28 poky-qemu-internal: implement file locking in bash
There does not appear to be a universal lockfile utility that
meets our needs. For example:

* 'lockfile' is part of the procmail pacakge in Ubuntu, a
  requirement we don't want to impose on our users
* lockfile-[create|remove] from the Ubuntu lockfile-progs
  package does not appear to be available in Fedora/openSUSE

So, the most portable way to do this is just to implement it
in bash. The likelihood of race conditions is minimal for
what we need this for.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-10-08 14:48:20 -07:00
Scott Garman 7cd824a538 poky-qemu: fix handling of some rootfs types
This allows the user to specify a rootfs type
(e.g, poky-image-sato) without typing out the full filename
and path (assuming we can infer a valid MACHINE and FSTYPE).

This fixes [BUGID #415]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-10-08 14:47:54 -07:00
Scott Garman 7b079e1d08 Update meta-ide-support dependencies
Using poky-qemu with our new tap networking and/or unfs support
required too many additional build steps. This updates the
meta-ide-support dependencies so all features are built and
available to use.

Specifically, this adds psuedo-native, qemu-helper-native, and
unfs-server-native to the dependency chain for meta-ide-support.

This fixes [BUGID #392]

Also add poky-gen-tapdevs and remove runqemu-nfs from the
qemu-helper-native recipe, and update some qemu control script
error messages to suggest building meta-ide-support.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-10-07 22:07:45 +01:00
Scott Garman 0f973ed665 Merge runqemu features into poky-qemu
This merges the functionality of the runqemu script into poky-qemu.
It also removes the requirement to order command line args to poky-qemu
in any particular order.

This fixes a slew of runqemu-related bugs by making the runqemu script
obsolete (and fixing the issues in the new poky-qemu), including
[BUGID #294] [BUGID #295] [BUGID #371] and [BUGID #324].

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-10-07 19:57:34 +01:00
Scott Garman e70c8981f2 Allow running of multiple QEMU nfs instances
These changes allow multiple instances of the userspace NFS server
to run, when brought up by consecutive instances of the poky-qemu
control script.

This fixes [BUGID #393]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-10-07 19:55:50 +01:00
Scott Garman 8532405c1d poky-gen-tapdevs: script to create a 'bank' of tap interfaces
This script can be used to create and configure a 'bank' of tap
interfaces that can be used by the poky-qemu script.

It is useful in locked-down enterprise environments where developers
do not have sudo access, but need to be able to run QEMU with
networking. A sysadmin would then use this script to bring up a
number of tap interfaces for the user to make use of.

This fixes [BUGID #391]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-10-07 19:53:46 +01:00
Scott Garman 62625d0ca0 poky-qemu-internal: use lockfile-progs for network interface locking
The 'lockfile' utility originally used comes from the procmail
package, which users shouldn't have to install. This uses the
more general lockfile-progs utilities to acheive the same end.

This fixes [BUGID #389]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-10-07 19:52:32 +01:00
Scott Garman fcbd67c047 poky-qemu: integrate userspace nfsroot support
This is the first phase of some refactoring the poky-qemu control
scripts are getting. This integrates userspace nfsroot support into
poky-qemu, making runqemu-nfs obsolete.

This fixes [BUGID #295]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-10-07 19:51:36 +01:00
Scott Garman c8a181e847 poky-qemu-ifup/ifdown: Require root privileges to run
This fixes [BUGID #232], requiring root privileges to run these scripts
and giving an error prompt when that requirement is not met.

The tunctl uid fallback code has also been removed, as we can rely on
the specific version of tunctl run from the native sysroot.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-10-07 19:48:17 +01:00
Darren Hart 0a20caf090 Export ALL_PROXY for bitbake commands
We already export http,ftp,https proxy environment variables. Some environments,
GNOME for instance, place the socks proxy in ALL_PROXY and all_proxy. Export it
as well.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2010-10-07 10:18:25 +01:00
Richard Griffiths ce7101b1f0 qemumips: override default UI options.
Fixes [BUGID #99]

The mouse, usb and cursor devices don't work for the
qemumips machine. There's no easy way to 'undo' the
defaults, or dynamically remove them, so we simply
don't use the default UI options for this machine type.

Mouse and pointer are provided via ps/2 and not via
the usb and wacom tablet driver.

Signed-off-by: Richard Griffiths <rgriffit@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-10-04 09:40:58 +01:00
Joshua Lock b9369741db poky-qemu-internal: only check mmap_min_addr when running arm images
No need to force users to poke /proc/sys when they don't need to.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-10-01 16:47:38 +01:00
Joshua Lock 7f7c185cf1 Revert "Drop vm_mmap_min_addr checks from scripts and sanity class"
This reverts commit 138df217ef.

We still need the vm_mmap_min_addr set to 0 to run locale generation for
qemu-arm

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-09-29 17:10:41 +01:00
Dongxiao Xu 5c8fad6544 poky-qemu-internal: Add userspace nfs support for mips and ppc
Add userspace nfs support for mips and ppc architecture.
This fixes [BUGID #343]

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
2010-09-27 08:59:15 -07:00
Darren Hart 1cf456611d Wrap output at 80 columns for poky-env-internal
The output of:

$ source poky-init-build-env

would wrap on 80 character terminals, making the output difficult to read.
Replace the somewhat clumsy repeated usage of "echo" with bash here documents,
limiting line length to 80 characters. The use of here documents simplifies this
by removing any leading commands or indentation from the output being generated.
A bash'ism should be acceptable here as poky-init-build-env already aborts if
the shell is not bash.

Signed-off-by: Darren Hart <darren@dvhart.com>
2010-09-21 23:38:00 +01:00
Saul Wold 0be92981b3 poky-qemu-internal: fix locking of tap lockfile
Signed-off-by: Saul Wold <Saul.Wold@intel.com>
2010-09-17 11:30:44 -07:00
Zhai Edwin 566de26cf5 bitbake: Add proxy variables to standard export list
With "no_proxy" exported to bitbake, both internal and externel file mirror can
be used. "https_proxy" enable fetching "https://" file through proxy.

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
2010-09-10 11:47:38 +01:00
Richard Purdie f7f044c220 scripts/runqemu: Drop broken toolchain symlink code
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-10 10:45:55 +01:00
Richard Purdie c4ff5f3038 scripts/poky-qemu-ifup: Ensure the host has a route to it
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-10 10:45:55 +01:00
Richard Purdie 8e43883f97 scrtips/poky-qemu: Fix network interface device numbering
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-10 10:45:55 +01:00
Richard Purdie 3dd36ababd poky-qemu-internal: Fix ifdown script to use the correct variable
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-10 10:45:55 +01:00
Joshua Lock 9b800fe261 scripts: use the exported POKY_NATIVE_SYSROOT variable
Rather than trying to determine things through guess-work use the newly
exported variables to determine where the native binaries reside and
whether we are running in a build directory or not.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-09-07 11:22:54 +01:00
Joshua Lock 13ef707ab1 runqemu-nfs: check for required programs
The unfs server requires either rpcbind or portmap to be installed and
running to start so check for their presence in the script.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-09-07 10:48:21 +01:00
Jeff Polk d2febcce2b siteconfig: generate configuration data caches for autoconf
siteinfo: Use configuration caches when available

Generate cached configuration data for autoconf for the package
based on a list of header, types, and functions to eliminate the
need for all subesequent package builds to do the actual tests
via the cross compiler and sysroot.  The cache files are
stored in the sysroot in ${STAGING_DATADIR}/${TARGET_SYS}_config_site.d.
Siteinfo appends any files it finds in that directory to the normal
CONFIG_SITE.  All of the cache values set the variables only if not
already set so they may be overridden by any of the normal site files.

Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
2010-09-03 10:50:02 +01:00
Jiajun Xu 80993c4e1b qemuimage-testlib: kill qemu process according to its pid, instead of process name
poky-qemu-internal will set up a tap lockfile when creating tap device. The lockfile
will be released when a TERM signal is received. In previous code, function
Test_Kill_Qemu uses pkill to kill all process named "qemu". This may cause lockfile
release function not work in poky-qemu-internal. Then poky-qemu-internal will be
hang when user start QEMU the second time. To prevent the issue, the new function
Test_Kill_Qemu kills all child pid with a given parent process ID.

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2010-09-02 11:00:08 +01:00
Saul Wold 8cbf96aeaf runqemu: add poky-image-basic and poky-image-lsb to recognized images
Signed-off-by: Saul Wold <Saul.Wold@intel.com>
2010-09-02 09:50:48 +01:00
Richard Purdie caab7fc509 Drop chroot usage as its not well used, tested and is broken
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-01 15:08:45 +01:00
Jiajun Xu 7303807ef1 test: Add scenario file for each target and support single case running
Different test cases are needed for different targets. A folder "scenario"
is created under scripts/qemuimage-tests to hold scenario files for different
targets.

Single case running is supported now. User can run single case together with
a whole test suite by setting variable TEST_SCEN in local.conf.

By default test cases in sanity suite will be ran. If you want to run other
test suite or specific test case(e.g. bat or boot test case under sanity suite),
list them like following.
TEST_SCEN = "sanity bat sanity:boot"

Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2010-08-27 13:04:37 +01:00
Joshua Lock 66790ecb4a poky-qemu: check for existence of required libraries
We need some libraries installed to run the built qemu, check for their
existence before trying to run the program. Fixes [BUGID #201]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-08-25 11:15:16 +01:00
Dexuan Cui e8231e0950 poky-qemu-internal: fix the echo of KERNCMDLINE
Without the fix, when the commandline is printed with the "echo" command,
it loses the quotes and this confuses people.

Thanks Richard for pointing this out.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2010-08-20 16:20:13 +01:00
Scott Garman d7d803fa1c poky-qemu-internal: fix broken call to poky-qemu-ifup
The poky-qemu-ifup script now requires a path to the native
sysroot as an argument. This fixes a case where the argument
was missing.

Also, set up NATIVE_SYSROOT_DIR when running runqemu.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-08-20 16:20:12 +01:00
Scott Garman 070096ec70 runqemu-nfs: boot QEMU using nfsroot and local unfs export
This script automates the booting of QEMU using an nfsroot exported
by our userspace NFS tools. The rootfs should be created using
poky-extract-sdk.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-08-20 16:20:11 +01:00
Scott Garman 313bda1d87 poky-export-rootfs: script for exporting userspace nfsroots
This script automates the exporting of a root filesystem (created
with the poky-extract-sdk utility) using pseudo and the native
userspace NFS server. That filesystem can then be booted using
nfsroot with either QEMU or the target hardware using one of our
kernels.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-08-20 16:20:11 +01:00
Scott Garman c23da3d37e poky-extract-sdk: script for extracting sdk images using pseudo
This script automates the creation of a rootfs area using pseudo so
it can be used by a QEMU nfsroot boot.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-08-20 16:20:11 +01:00
Scott Garman f203df83a5 poky-qemu-internal: fixes for userspace NFS booting
Including a number of cases where the script could exit before
releasing a tun/tap lockfile.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-08-20 16:20:11 +01:00
Jeff Dike 81ff1ee237 poky-qemu-internal: Support use of a preconfigured tap device
This patch makes poky-qemu-internal check for the existence of an
available preconfigured tap device before running poky-qemu-ifup to
make a new one.

Locking is handled with a lockfile in /tmp/qemu-tap-locks/.  This uses
the lockfile utility, so that needs to be present on the host.  On
exit, this script removes the lock file so that the tap device may be
reused.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
2010-08-20 16:20:10 +01:00
Jeff Dike 4df9f11171 poky-qemu-internal: Support NFS boots better
The image specification can now be in the form nfs-server:directory.
This makes it possible to nfs-boot from servers other than the host.
poky-qemu-internal will properly construct the kernel command line
given such a specification.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
2010-08-20 16:20:10 +01:00
Jeff Dike 6ea1ed5f7b poky-qemu-[ifup|ifdown]: Use native tunctl
poky-qemu-ifup can run standalone by root in order to configure a bank
of tap devices for later qemu use.

These devices will, if possible, be owned by a specified group to
which qemu users must belong.

If the kernel is too old to support TUNSETGROUP, then it falls back to
setting the tap device to be owned by a particular user, and that user
will be the only one allowed to use it.

Also overall usability improvements to the scripts, usage() help, etc.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-08-20 16:20:10 +01:00
Scott Garman f35a8d4079 poky-find-native-sysroot: helper script for locating the native sysroot path
Various poky scripts make use of binaries from the native sysroot.
This helper script can be used to reduce code duplication, and sets
up some environment variables you can use to identify and obtain
the correct filesystem path to the native sysroot.

It works for both in-tree Poky setups as well as toolchain
installations.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2010-08-20 16:20:10 +01:00
Jeff Dike d9aa25a337 poky-qemu-ifup: allow multiple tap devices
This patch bases the tap IP address on the device number, providing
each device with its own IP address.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
2010-08-20 16:20:09 +01:00
Jeff Dike c791544bb0 qemu: Use a TAP device instead of slirp for networking
With this patch, a persistent TAP device is set up by poky-qemu-ifup,
which is now run before qemu.  The qemu command line now uses the
device that was constructed (rather than the hard-coded tap0) and it
is told not to run any networking scripts.

When qemu shuts down, poky-qemu-ifdown removes the TAP device.

sudo use - sudo is used to run poky-qemu-ifup.  sudo is no longer used
to run qemu, as qemu no longer needs privileges to set up networking.
poky-qemu-ifdown is run without privileges, as you can remove a TAP
device which you own.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
2010-08-20 16:20:09 +01:00
Joshua Lock e624b2700a build/conf: move sample conf files to meta/conf
Currently rm -fr build breaks things badly but will work if we move the sample
configuration files to meta/conf - this patch does so.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-08-17 17:41:20 +01:00
Jiajun Xu 8c498e5338 testlib: Add support for qemumips/qemuppc/qemux86-64, and add support for testing with images from autobuilder
Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
2010-08-13 23:42:03 +01:00
Joshua Lock fa8c028fd0 scripts: add qemux86-64 support to the qemu scripts
Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-08-02 17:54:20 +01:00
Mark Hatle d668b80e86 meta/classes/rootfs_rpm.bbclass: re implement base on rpm5
Re implement the rootfs generation using rpm5.  This also gets rid of the
need for yum, and handles all dep resolving internal to the script itself.

The new file scripts/rootfs_rpm-extract-postinst.awk comes from the original
yum integration work.  It has been unchanged, but since yum is no longer used
we needed to move the script somewhere else.

Signed-off-by: Mark Hatle <mhatle@windriver.com>
2010-07-24 00:46:57 +01:00
Joshua Lock b98e3e9c3f poky-env-internal: re-add OEROOT to the whitelisted environment variables
We don't want Bitbake to clean OEROOT from the environment as users may have
old layer configurations which require it set.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-07-23 12:50:25 +01:00
Nitin A Kamble 7459068915 scripts/poky-env-internal: preserve the git proxy env var
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2010-07-22 17:11:54 +01:00
Richard Purdie 83cc54944e poky-env-internal: Print some further information for the user
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-22 13:21:13 +01:00
Richard Purdie 9832fd3e22 poky-env-internal: Cleanup after the recent layer improvements
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-22 13:19:24 +01:00
Richard Purdie c2f71a86f5 poky-env-internal/runqemu: Move BUILD_SYS handling which is runqemu specific into runqemu
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-22 13:14:24 +01:00