aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2012-09-28runqemu-internal: don't append an empty element to PATHScott Garman
Bitbake fails to run when an empty element exists in $PATH. Avoid creating this situation when $CROSSPATH is not set. This fixes bug [YOCTO #3101] Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-28oe-find-native-sysroot: show bitbake errors to userScott Garman
Ran into another bug that was masked by hiding a bitbake error message. This catches this situation and displays the error to the user. Also includes whitespace fixes. Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-27sstate-cache-management: hide error message when one of possible layer ↵Martin Jansa
location doesn't exist * fixes [YOCTO #3116] Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-26SDK: trap any IO errors in the relocate scriptLaurentiu Palcu
If the files being relocated are already used by other processes the relocate script will fail with a traceback. This patch will trap any IO errors when opening such a file and gracefully report them to the user. Also change the exit code from 1 to -1 for a better adt-installer user experience (like pointing the user to the adt_installer.log). [YOCTO #3164] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24runqemu: work with tap device names that end with a colonScott Garman
On Fedora systems (and likely others), ifconfig returns interface names that end with a colon. Make sure we strip the colon off the tap device name before using it. This fixes [YOCTO #3028] Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20qemux86-64: Support for KVM, paravirt and virtio addedCristian Iorga
KVM, paravirtualization and virtio drivers are now activated in runqemu using the kvm option flag for qemux86-64. Host CPU features are also exported to guest OS (Yocto Linux). Usage example: runqemu qemux86-64 core-image-x11 kvm Implements [YOCTO #2550]. Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-20qemux86: Support for KVM, paravirt and virtio addedCristian Iorga
KVM, paravirtualization and virtio drivers are now activated in runqemu using the kvm option flag for qemux86. Host CPU features are also exported to guest OS (Yocto Linux). Usage example: runqemu qemux86 core-image-x11 kvm Implements [YOCTO #2550]. Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-20runqemu: show bitbake errors to userScott Garman
In certain edge cases, bitbake may fail to run and cause setup_tmpdir() within runqemu to fail, and not give the user a helpful error message. Catch this case and show the user the output of bitbake -e. This fixes [YOCTO #3112] Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-20mkefidisk.sh: Add script to do an EFI install on the hostDarren Hart
Sometimes it is convenient to prepare a bootable image from the host rather than using a live-image to install to a disk on the target. This script takes a live image as input, partitions a device, and performs the installation just as the installer would if run on the target. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-20Replace "echo -e" with "printf" to have the same behavior in dash or bashAndrei Gherzan
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] Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14scripts/combo-layer: ensure we validate branch/revision on initPaul Eggleton
If both branch and last_revision are specified for a component when combo-layer init is run, ensure that the specified revision is actually on the specified branch and error out if not. Also ensure that the error message mentions the component. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-14scripts/combo-layer: use last_revision if specified in initPaul Eggleton
If last_revision is specified for a component when running combo-layer init, then use that revision instead of the latest revision on the branch. Also, remove unnecessary git checkout during init since we specify the revision to all calls to git when dealing with the component repositories. Fixes [YOCTO #3040]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-14runqemu: Explicitly specify MACHINE when calling bitbakeKhem Raj
When using runqemu with distros outside oe-core then MACHINE may not be there in local.conf so use the one thats available in environment of runqemu which is actually the correct one. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-10runqemu-internal: New qemu calls it qemu-system-i386 for x86Khem Raj
New qemu calls the x86 system emulator to be qemu-system-i386 which is consistent now so change it in scripts Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-10qemuimagetest: modifying the scenario file as per new test casesVeerabrahmam vr
modified scenario files. Signed-off-by: veerabrahmam <veerabrahmamvr@huawei.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-10qemuimagetest: add basic function to check syslogdVeerabrahmam vr
one test case to check syslogd is executing on target. Signed-off-by: veerabrahmam <veerabrahmamvr@huawei.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-10qemuimagetest: add basic function to check enough disk spaceVeerabrahmam vr
one test case to check disk space availability. Signed-off-by: veerabrahmam <veerabrahmamvr@huawei.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-10qemuimagetest: basic function to check bash existsVeerabrahmam vr
one test case to check bash command availability on qemu target. Signed-off-by: veerabrahmam <veerabrahmamvr@huawei.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-04scripts/cleanup-workdir: change autoconf-nativesdk to nativesdk-autoconfJack Mitchell
the autoconf-nativesdk package name was recently changed to nativesdk-autoconf which in turn broke the cleanup-workdir script. Changed the package to the correct name. Signed-off-by: Jack Mitchell <jack.mitchell@dbbroadcast.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-03sstate-cache-management.sh: fix remove_duplicated when multiple archs were builtMartin Jansa
* The problem is that you're looking for duplicates across all available archs, so armv4t and armv7a populate_sysroot are considered duplicate and only last one is kept, but to rebuild from sstate-cache you need both! Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-03sstate-cache-management.sh: add option to enable debug outputMartin Jansa
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-03sstate-cache-management.sh: don't hardcode available machines only to qemu*Martin Jansa
* find them dynamically in layers like AVAILTUNES Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-03sstate-cache-management.sh: look in meta* above oe-core dir when looking for ↵Martin Jansa
available tunes * many layouts have other layers on the same level as oe-core checkout Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-03sstate-cache-management.sh: fix regexp in AVAILTUNES grepMartin Jansa
* it was also picking line openembedded-core/meta/conf/machine/include/README:AVAILTUNES - This is a list of all of the tuning definitions currently filling all_archs with wrong entries Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-03sstate-cache-management.sh: fix regexp in checksum grepMartin Jansa
* using checksum without recipe/task name doesn't seem like good idea IMHO Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-03Rename task to packagegroupPaul Eggleton
"Package group" is a much more appropriate name for these than task, since we use the word task to describe units of work executed by BitBake. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-02crosstap: new scriptTom Zanussi
This script makes it easy to run a systemtap script on a remote target from a build host. The script itself contains documentation on basic setup and usage - see that for details. In a nutshell, if you have a systemtap script on the build host, this script allows that systemtap script to be compiled and run on the target host and for the output appear on the host terminal. The crosstap script requires to an sdk build of the target (or a build with 'tools-profile' added to EXTRA_IMAGE_FEATURES) because it needs to be able to run the native systemtap built by the systemtap recipe, which in turn needs access to the kernel built for the target in order to build the kernel modules that implement the systemtap probe specified by the systemtap script and which ultimately get shipped to the target and insmod'ed there. The crosstap script also needs to be able to ssh to the target host in order insert the modules on the target, so the target system needs to support incoming ssh connections. Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-08-30sstate-cache-management.sh: fix it for downloaded fileRobert Yang
Fix it for the downloaded sstate cache file * The downloaded sstate cache file is in SSTATE_DIR, and there is a symlink points to it, the sstate cache file should not be removed if the corresponding symlink is kept, it would be removed when the symlink is removed (with -L option). * Fix a comment line. [YOCTO #2897] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-28runqemu-export-rootfs and friends: don't put pseudo db in target fsPeter Seebach
In a few places, we have scripts which use <rootfs>/var/pseudo for the pseudo state directory controlling a given filesystem. This seems possibly risky because it means that stuff running under qemu or whatnot could wipe out the data being used to handle that rootfs. Move this to: <rootfs>/../$(basename_rootfs).pseudo_state to avoid problems. This also solves at least one case (not directly hit by yocto's tree) wherein you could end up trying to remove a rootfs while pseudo was using a database inside that rootfs, and thus the remove would fail. Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
2012-08-28bitbake: compile tar-replacement firstlyRoy.Li
Compiling tar-replacement or not is decided by version of host tar, if the host tar version is lower than 1.23, Compiling tar-replacement is needed. When doing popoluate tar-replacement sysroot to write the tar to sysroot, but writing is not finished. other packages probably use the being written tar to unzip file, which will lead to failure and report the below error: "bitbake_build/tmp/sysroots/x86_64-linux/usr/bin/tar: Text file busy" Now we compile tar-replacement firstly to ensure that a being written tar command will not be used. Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-08-25runqemu: Move the KVM check after the MACHINE/KERNEL ChecksSaul Wold
The MACHINE/KERNEL Checks setup MACHINE is it's unset, the KVM checks valid MACHINE is qemux86 or qemux86-64 and fail if it's unset! [YOCTO #2970] Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-08-23scripts/combo-layer: specify branch when getting current revisionPaul Eggleton
Handle the case during update where the configured branch is not currently checked out in the component repository by just specifying it in the places where it was not previously. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-08-23runqemu: Honor KERNEL and ROOTFS settings from environmentKhem Raj
Expand the usage to be able to specify KERNEL and ROOTFS on commandline. This helps in using the script for booting images that are essentially not part of OE-Core Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-08-20sstate-cache-management.sh: update for the SSTATE_MIRRORSRobert Yang
Several fixes: * We have put the sstate file to SSTATE_DIR/??/ currently, but the sstate file on the SSTATE_MIRRORS or the obsolete one is still in SSTATE_DIR/ (no subdir), update the script to support manage them. * Remove the related ".done" file in the SSTATE_DIR. * Add a "-L, --follow-symlink" which will remove both the symbol link and the destination file * Change the "ls -u file_list" (access time) to "ls -t file_list" (change tiem), since the "ls -u" and readlink will change the symlink's access time, which would make the result inconsistent. A solution is save the access time before every "ls -u" and "readlink", save it back after the command, but this would cause performance lost since it needs check each file and modify the symlink's status. Use the "-t" doesn't cause much different. [YOCTO #2897] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-20scripts/runqueue-internal: Drop enable-gl optionRichard Purdie
This is no longer necessary since we've dropped the GL passthrough patches. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-19runqemu: work with yocto-bsp created kernel filenamesScott Garman
The yocto-bsp tool generates kernels with additional strings within the filename, e.g. zImage-myqemuarm.bin. Loosen the MACHINE detection regex to work with these filenames. Fixes [YOCTO #2890]. Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-08-17runqemu: support booting ramfs-based imagesScott Garman
Added support for booting ramfs-based images (e.g, poky-tiny) which do not have block device support. This fixes [YOCTO #2612]. Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-08-15sstate-cache-management.sh: update it for the new layoutRobert Yang
Update it for the new layout of sstate-cache. Note: It doesn't handle the old sstate-cache/sstate-xxx.tgz (or siginfo), the user should remove it manually (rm -fr sstate-cache/sstate-* would be OK). [YOCTO #2897] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02runqemu-gen-tapdevs: add UID to CL optionsElizabeth Flanagan
runqemu-if* now requires UID as a command line option which means runqemu-gen-tapdevs needs to take it as an option. Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02scripts: add script for relocating the SDKLaurentiu Palcu
This script will be embedded in the SDK tarball and will be called by the SDK installer. It replaces the interpreter path in all binaries and it also changes the ld.so.cache and SYSDIRS in dynamic loader. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02send-pull-request: Make -a really imply -cDarren Hart
The switch statement does not fall through as the comment suggests. This results in -a not implying -c as was intended. Add the two lines from -c to -a to achieve the intended behavior. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-01createrepo 0.4.11: add rpm-createsolvedb.pyRobert Yang
Move scripts/rpm-createsolvedb.py to meta/recipes-support/createrepo/createrepo/ since we should wrap it to use the native python. [YOCTO #2822] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31scripts/oe-pkgdata-util: exclude unpackaged in glob outputPaul Eggleton
Check for .packaged file and exclude packages if this file does not exist - this avoids attempting to install empty packages during complementary package installation within do_rootfs that didn't end up being created (and failing as a result). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31combo-layer: ensure init works with split local configPaul Eggleton
If the local configuration is already split out, ensure the init action works properly and does not error in the case that last_revision is not set. Additionally, if the local configuration is within the repository, prevent it from being committed and add it to .gitignore. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31scripts/bitbake: unbreak the git version comparisonChristopher Larson
With the current code, we're calling awk to do a floating point comparison between '1.7.0.4' and '1.7.5' (on an ubuntu 10.04 LTS machine). These clearly aren't proper floating point numbers, and the comparison is incorrect. It's returning true for 1.7.0.4 >= 1.7.5. Instead of using a floating point comparison for this, call out to python and let it do it. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31combo-layer: allow splitting out local configPaul Eggleton
Allow splitting the local parts of the configuration (mostly local_repo_dir and last_revision, although there is no limitation) to a side-by-side -local.conf file, with component sections optionally tagged with the combo layer branch name. This effectively allows you to: * avoid polluting the history by committing the updated last revision to the combo repository for every update * avoid putting local repo paths into the combo repository * manage multiple branches of the combo repository whilst avoiding the possibility of mixing the configuration for one branch with another. An example split configuration (note, values may be artificial): ------------------- combo-layer.conf ------------------- [bitbake] src_uri = git://git.openembedded.org/bitbake dest_dir = bitbake hook = scripts/combo-layer-hook-default.sh [oe-core] src_uri = git://git.openembedded.org/openembedded-core dest_dir = . hook = scripts/combo-layer-hook-default.sh -------------------------------------------------------- ---------------- combo-layer-local.conf ---------------- [bitbake] local_repo_dir = ../repos/bitbake [oe-core] local_repo_dir = ../repos/oe-core [bitbake|master] branch = master last_revision = db689a99beffea1a285cdfc74a58fe73f1666987 [oe-core|master] branch = master last_revision = 121a1499a81706366acc0081272a6bff634d4d62 [bitbake|denzil] branch = 1.12 last_revision = 24b631acdaa143a4de39c6e1328849660c66f219 [oe-core|denzil] branch = denzil last_revision = 741146fa90f28f7ce8d82ee7f7e254872d519724 -------------------------------------------------------- It is assumed that the local config file will be added to .gitignore. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31combo-layer: check that last_revision is validPaul Eggleton
If the user edits the configuration file by hand and sets last_revision, we need to ensure that the revision is valid and on the specified branch. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31combo-layer: improve patch list handling and outputPaul Eggleton
* Ignore blank lines in patch list * Don't fail in interactive mode if patch list is deleted * Show patch counter * Show relative path for patches * Print headings before applying patch list for each component Also change to using a "with" block to read the patch list so it gets closed properly when we're finished. Fixes [YOCTO #2455]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31combo-layer: drop to a shell when apply fails during updatePaul Eggleton
If applying a patch fails during the update process, drop to a shell instead of exiting; at that point the user can manually apply the patch, do nothing and "exit" to skip it, or "exit 1" to abort the process. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31combo-layer: ignore patch-* temp directories in dirty checkPaul Eggleton
Make the dirty repo check somewhat less strict by ignoring old patch directories created by this tool. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>