summaryrefslogtreecommitdiffstats
path: root/scripts/lib
Commit message (Collapse)AuthorAgeFilesLines
* wic: rawcopy: make source filenames uniqueEd Bartosh2016-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | Rawcopy plugin copies source files to build folder before using them to assemble result image. After assembling the image wic renames source files to <image>.p<partition number>. If the same source file is used in multiple partitions wic breaks trying to rename file that doesn't exist. Added <line number> suffix to the files when copying them to the build dir. This should make filename unique even if the same source file is used for multiple partitions. [YOCTO #9826] (From OE-Core rev: 6f7afd6f76c40e1b050e40bc4965cb5000df7088) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib/bsp/kernel.py: force patching when branch is machine branch is ↵Leonardo Sandoval2016-06-291-0/+1
| | | | | | | | | | | | | | | | | | | re-use When a branch is re-used, the kernel tools turns off any patch pushing unless 'mark patching' is explicitly set. [YOCTO #9120] (From meta-yocto rev: 427f5473722e15e288cbce251a9ce18989c23548) (From meta-yocto rev: e98cce42b8454545874a68979af70ca1813a7ad2) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: fix path parsing, use last occurrenceGeorge McCollister2016-06-291-1/+1
| | | | | | | | | | | | | | | If the path contains 'scripts' more than once the first occurrence will be incorrectly used. Use rfind instead of find to find the last occurrence. (From OE-Core rev: f30c486c17060d2f21618612804a692512ad6a57) (From OE-Core rev: d34a0fd910babe233d89ad9c1e9d61dcec1c4b63) Signed-off-by: George McCollister <george.mccollister@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: fix falling back to declared license for npm packagesPaul Eggleton2016-06-292-2/+2
| | | | | | | | | | | | | | | | | | | | Fix two problems falling back to the "license" field from package.json when no license file is present: 1) The function that was supposed to return the license field value was always explicitly returning None, and this was never noticed (because the test cases never exercised the fallback as they provided license files for each module). 2) Fix the main package not falling back because it had a default of an empty list, which evaluates to '' instead of 'Unknown'. (From OE-Core rev: 59381a9450949ce6b4b03adb717e950b999830f3) (From OE-Core rev: 2d96460f2dcac4263f43ebcb7556722ce55c9918) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: isoimage-isohybrid: fix splash file pathsIoan-Adrian Ratiu2016-06-291-2/+2
| | | | | | | | | | | | | | | os.path.join discards the cr_workdir var contents if the path of the second arguments is absolute. (From OE-Core rev: dba099d77dcc66b239523a55f3ed26784f9a662a) (From OE-Core rev: ef37c7d8e4abf896aa791ee01e52a74f24aadb99) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: isoimage-isohybrid: add grubefi configfile supportIoan-Adrian Ratiu2016-06-291-21/+32
| | | | | | | | | | | | | | | | | | | The latest wic kickstart refactoring introduced a bootloader option "--configfile" which lets wks' specify a custom grub.cfg for use while booting. This is very useful for creating stuff like boot menus. This change lets isoimage-isohybrid use --configfile; if this option is not specified in a wks, it generates a default cfg as before. (From OE-Core rev: bf673a769514b13558ad9c785ae4da3a5adfd1e0) (From OE-Core rev: e5e35d055b0a72f2204f9530a1ad39bc51e79217) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: Fix build-sdk when pn doesn't match filenameRandy Witt2016-05-171-5/+19
| | | | | | | | | | | | | | | | | | If an image with the filename foo.bb could be built using the name "bar" instead, then build-sdk would fail to create the derivative sdk. This was because the code assumed that the file name matched the target, which is not necessarily the case. (From OE-Core rev: d58a326b6960be14b8a049253559aec9582b7d0d) (From OE-Core rev: da9e793fd7497e63404c987d68e3b630a89fc1c2) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool.newappend: fix syntax error for 'not path_ok' errorChristopher Larson2016-04-291-1/+1
| | | | | | | | (From OE-Core rev: bdb5a6a5b3c31ed44bed8321f5febb6a09dfb9f2) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: sdk-update: fix handling of UNINATIVE_CHECKSUM changesPaul Eggleton2016-04-191-0/+26
| | | | | | | | | | | | | | | | | | | If UNINATIVE_CHECKSUM changes over an SDK update, bitbake within the extensible SDK will be broken because it will see that the matching uninative tarball doesn't exist and if there is a default value of UNINATIVE_URL it will attempt to download the file and will then fail because the checksums don't match up; alternatively if no UNINATIVE_URL is set then it'll also fail with an error about misconfiguration. To fix this, add some logic to devtool sdk-update to download the matching uninative tarball(s) for the checksum(s) in the newly fetched SDK configuration. Fixes [YOCTO #9301]. (From OE-Core rev: 14ff58ad98a5afac08db77068d80f152d8875766) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: sdk-update: reset git metadata on updateStephano Cetola2016-04-181-2/+8
| | | | | | | | | | | | | | | | | Replace git pull with fetch and reset to avoid the merge logic in the event that the layers repo in the published SDK we're updating to isn't fast-forward merge from the local repo. Also add gitignore and committer info during publish to avoid errors and to be sure that the first commit has a dummy user in it. [ YOCTO #9368 ] (From OE-Core rev: 4657bc9d165e51981e034e73e7b92552e873eef7) Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: upgrade: handle recipes where source is not first entry in SRC_URIPaul Eggleton2016-04-151-1/+9
| | | | | | | | | | | | | | It is unusual but not impossible to find recipes whose first entry is not the main source URL but instead some patch or other local file, for example python-cryptography in meta-python (which sets SRC_URI before inheriting pypi). There's nothing inherently wrong with this, and we shouldn't assume that the first entry is the main source URL, so just take the first non-local entry instead. (From OE-Core rev: c868198c1f6006789707b497c2ae34d7cc5e706f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: fix bug in handling fsoptionsEd Bartosh2016-04-141-19/+17
| | | | | | | | | | | | | | | | | Partitions specifying --fsoptions were silently skipped by wic due to the old bug introduced when removing code related to subvolume handling: - if mountpoint == "/" or not fsopts or fsopts.find("subvol=") == -1 + if mountpoint == "/" or not fsopts: [YOCTO #9396] (From OE-Core rev: be7ff1741e8ab5f2724b3f64da1bed8b0d3dcb7c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "wic/utils/partitionedfs.py: assemble .wic images as sparse files"Ross Burton2016-04-131-1/+1
| | | | | | | | | | | | | | It turns out that dd's conv=sparse doesn't look at the file extents, but simply checks if a "block" is all zero. If the block of zero was meaningful it gets lost and if the image is subsequently written to media using a sparse-aware writer then the block of zeros won't be written at all. This reverts commit 5fd592fbae2e046bcb8c3a6c3ef4993fe0400676. (From OE-Core rev: 63d15764cc2014dba9fee2186f0c8b97c2ac5682) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/utils/partitionedfs.py: assemble .wic images as sparse filesJoshua Lock2016-04-091-1/+1
| | | | | | | | | | | | | | | | The individual partitions created by wic are sparse but without this change the assembled image is written as one (potentially very) large file. Preserve sparseness in the assembled image by passing the sparse conversion symbol. [YOCTO #9099] (From OE-Core rev: 5fd592fbae2e046bcb8c3a6c3ef4993fe0400676) Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib/bsp/help.py: Typo in help for yocto-bsp createHumberto Ibarra2016-04-051-3/+3
| | | | | | | | | | | | | | | Fix typo of the word "parameter" in for 'yocto-bsp create'. Typo appears in both, usage and help. Also, the word "description" is mispelled. [Yocto #9282] (From meta-yocto rev: 12c7243abd91b374b1b62c6a1ad13b0d25aa0e4c) Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/isoimage-isohybrid.py: change cpio generated uid&gid to rootIoan-Adrian Ratiu2016-04-031-2/+2
| | | | | | | | | | | | By default cpio preserves the uid&guid's of the original user which leads to host contamination and boot failures because commands like mount from initramfs expect to be run by root and the original host user might not even exist on the target. (From OE-Core rev: 28910ee2eacc15cf42b5e58bd43b3bd15c34eb97) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/isoimage-isohybrid.py: use glob to find initramfs locationIoan-Adrian Ratiu2016-04-031-2/+2
| | | | | | | | | | | Some filenames can omit 'initramfs', or use other names. This makes detection more flexible by using only the image name, machine arch and image type in a glob wildcard. (From OE-Core rev: ca516f5907a661606c35e1ca5c2ece9fc79c77ea) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-bsp: Set correct default branches and branches base for i386, qemu and ↵Humberto Ibarra2016-04-017-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | x86_64 archs Kernel recipes for linux-yocto_4.* and greater have outdated branches as default, making it impossible to find the right branch if the user picks the default value. The branches_base property uses these outdated branches also. This updates standard/common-pc and standard/common-pc-64 branches to standard/base. The fix was tested using 'yocto-bsp create' with each one of the following archs: -i386 with kernels 4.1 and 4.4 -x86_64 with kernels 4.1 and 4.4 -qemu (i386 and x86_64) with kernels 4.1 and 4.4 After the layer was created, it was added to local.conf and the MACHINE was set accordingly. 'bitbake linux-yocto' ran successfully with each configuration tested. [YOCTO #9160] (From meta-yocto rev: d471e3dd7c5080a29f64b60b554f17ee706ee772) Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: modify: call shutdown on tinfoil when donePaul Eggleton2016-03-311-0/+2
| | | | | | | | | | | | | Strictly speaking we ought to explicitly shut down a tinfoil instance when we're done with it. This doesn't affect modify's operation but is important if you want to be able to call into modify() from another plugin (though anyone doing so should be advised that the function is by no means a stable API and is subject to change in future releases). (From OE-Core rev: 626dbadf22b57a22a8f8b9d1957937120f4ba4d5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: fix type of no-table optionEd Bartosh2016-03-281-1/+1
| | | | | | | | | | | | | | Type of --no-table option was incorrectly set in new wks parser. It causes parser to require argument for this option, which makes wic to fail with wks files that use --no-table: Error: argument --no-table: expected one argument Changed action parameter to 'store_true' to fix the issue. (From OE-Core rev: d483724cf3515f76e1b798a2018e2f3fa2bad0ba) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib/bsp/help.py: Add missing options to yocto-bsp help and usageHumberto Ibarra2016-03-261-0/+2
| | | | | | | | | | | | | Add the options --codedump and --skip-git-check to the yocto-bsp help and yocto-bsp usage, since they are currently missing. [YOCTO #8322] (From meta-yocto rev: dfdf97b4239639affc8ce22e338a291d4b0dfc76) Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add: create git repository if URL specified as positional argumentPaul Eggleton2016-03-251-1/+1
| | | | | | | | | | | | | | | When we add from a fetched URL we are supposed to turn the resulting source tree into a git repository (if it isn't already one). However, we were using the older deprecated option name here instead of the positional argument, so "devtool add -f <url>" resulted in the repo being created but "devtool add <url>" didn't, which was wrong. Also update the oe-selftest tests to check that this worked. (From OE-Core rev: a7b6b1f8cc1c096724f794ac9dee312b0f771f66) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add: delete externalsrc files on npm recipe do_installPaul Eggleton2016-03-251-0/+11
| | | | | | | | | | | | | | The npm class just installs whatever is in ${S}; if you're using externalsrc in conjunction with it the symlinks (oe-workdir and oe-logs by default) plus singletask.lock will end up in the final package, which isn't really right. Introduce a variable so we know the path the files will be installed into within npm.bbclass, and append to do_install within the workspace bbappend to delete the files. (From OE-Core rev: 766845e06db9d7d595e836ea1364c16fa132a413) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: configure-help: fix error if do_configure not already runPaul Eggleton2016-03-251-1/+1
| | | | | | | | | | The code here for running do_configure if it hadn't already been run was using the wrong string substitution parameters; fix it and test it. (From OE-Core rev: b2677a4448dbc42e523c731b953b44006749252c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: sdk-install: add option to allow building from sourcePaul Eggleton2016-03-251-1/+20
| | | | | | | | | | | | | | By default the sdk-install subcommand expects to restore the requested items from sstate and fails if it can't. If the user is OK with building from source, add a -s/--allow-build option to allow them to do that. In the process, ensure we show the status output while we're installing. Also add the missing header to the top of the file. (From OE-Core rev: a86b426cdd465ec5cb08bb5fa7729e4e673d94bb) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: change config symlink name to .config.newMarkus Lehtonen2016-03-201-2/+2
| | | | | | | | | | | | | Otherwise (if the symlink is named .config) kernel build considers source tree as dirty and fails. [YOCTO #9270] (From OE-Core rev: d36699b28c661880957d744420df9e23cdd76957) 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>
* recipetool: create: don't create extra files directory unconditionallyPaul Eggleton2016-03-201-7/+8
| | | | | | | | | | | | | | | | | | The extra directory next to the recipe should only be created if there are files to put into it; currently only the npm plugin does this. I didn't notice the issue earlier because the test was actually able to succeed under these circumstances if the recipe file came first in the directory listing, which was a fault in my original oe-selftest test; apparently on some YP autobuilder machines the order came out reversed. With this change we can put the oe-selftest test that highlighted the issue back to the way it was, with an extra check to reinforce that only a single file should be created. (From OE-Core rev: b8b778345eb0997c2cd952a1f61fdd2050b6b894) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: shrinkwrap and lockdown npm modulesPaul Eggleton2016-03-091-0/+57
| | | | | | | | | | | | | | | "npm shrinkwrap" creates a file that ensures that the exact same versions get fetched the next time the recipe is built. lockdown is similar but also includes sha1sums of the modules thus validating they haven't changed between builds. These ensure that the build is reproducible. Fixes [YOCTO #9225]. (From OE-Core rev: 277377f13b2b771915eb853e336ca24b84523ed1) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: support creation of additional files by pluginsPaul Eggleton2016-03-092-1/+16
| | | | | | | | | | | | | | | | Allow plugins to create additional files to go alongside the recipe. The plugins don't know what the output filename is going to be, so they need to put the files in a temporary location and add them to an "extrafiles" dict within extravalues where the destination filename is the key and the temporary path is the value. devtool add was also extended to ensure these files get moved in and preserved upon reset if they've been edited by the user. (From OE-Core rev: 334b9451111b7e3efbb43b3a4eecebcab8ec6f0e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: check if npm available if npm:// URL specifiedPaul Eggleton2016-03-091-0/+6
| | | | | | | | | | | If the user specifies an npm:// URL then the fetcher needs npm to be available to run, so check if it's available early rather than failing later. (From OE-Core rev: a08d12ad867c292f7474731a0fe5e51e712446d6) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: split npm module dependencies into packagesPaul Eggleton2016-03-092-3/+82
| | | | | | | | | | | | | | | | | | | | Rather than rolling all of an npm module's dependencies into the same package, split them into one module per package, setting the SUMMARY and PKGV values from the package.json file for each package. Additionally, mark each package with the appropriate license using the license scanning we already do, falling back to the license stated in the package.json file for the module if unknown. All of this is mostly in aid of ensuring all modules and their licenses now show up in the manifests for the image. Additionally we set the main LICENSE value more concretely once we've calculated the per-package licenses, since we have more information at that point. (From OE-Core rev: 8226805f83d21e7c1d2ba21969f3e8ee4b137496) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: add license file crunchingPaul Eggleton2016-03-091-1/+76
| | | | | | | | | | | | | | | | | | | | | | | | | Matching license texts directly to md5sums only goes so far. Some licenses make the copyright statement an intrinsic part of the license statement (e.g. MIT) which of course varies between projects. Also, people often seem to take standard license texts such as GPLv2 and reformat them cosmetically - re-wrapping lines at a different width or changing quoting styles are seemingly popular examples. In order to match license files to their actual licenses more effectively, "crunch" out these elements before comparing to an md5sum. (The existing plain md5sum matching has been left in since it's a shortcut, and our list of crunched md5sums isn't a complete replacement for it.) As always, this code isn't providing any guarantees (legal or otherwise) that it will always get the license correct - as indicated by the accompanying comments the LICENSE values it writes out to the recipe are indicative and you should verify them yourself by looking at the documentation supplied from upstream for the software being built if you have any concerns. (From OE-Core rev: 553bb4ea5d51be5179e7d8c019740cf61ece76ea) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: match *LICENSE* as a license filePaul Eggleton2016-03-091-1/+1
| | | | | | | | | For example, this picks up a file named MIT-LICENSE.txt. (From OE-Core rev: 103b4d26b340cbdf70bf43906e293f3497671fdc) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: improve mapping for autotools program macrosPaul Eggleton2016-03-092-8/+50
| | | | | | | | | | | | | | | | | | Make the following improvements to mapping items specified in AC_CHECK_PROG, AC_PATH_PROG and AX_WITH_PROG to recipes/classes: * Produce a map of native recipe -> binary for all binaries currently in STAGING_BINDIR_NATIVE and use this when mapping items * Add some more entries to the class map * Ignore autotools binaries since they are covered by the inherit of autotools * Ignore coreutils-native since that would almost always be a bogus dependency (From OE-Core rev: 5614c5ae6a004d4367eccc34dd3cc7ee61fb7e57) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: be more tolerant of spacing in configure.acPaul Eggleton2016-03-091-8/+8
| | | | | | | | | | | | | Allow for whitespace in appropriate places, and ensure we match all whitespace chars not just the space character. (This fixes extracting dependencies from tmux's configure.ac, for example.) (From OE-Core rev: 63524ac8093b734aa4f29f4ea47bcc036f748314) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-bsp: Update templates to 4.4 kernelMariano Lopez2016-03-0923-17/+530
| | | | | | | | | | | | | Add kernel 4.4 support. kernel 4.1 was left in the tree for user to choose between 4.1 and 4.4. [YOCTO #9047] (From meta-yocto rev: c04093ec9b3cd151cf857bca9ad35bc9a0d4a4b1) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: fix support for AX_CHECK_LIBRARYPaul Eggleton2016-03-071-1/+1
| | | | | | | | | | Clearly I didn't test this part of the code - lists don't have an "add" method. Needless to say I have tested it now. (From OE-Core rev: 063ed9058a14775f77e7875d4f6ef5719fa03f18) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add build-sdk subcommandPaul Eggleton2016-03-072-22/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a build-sdk command which is only available within the extensible SDK that builds a derivative extensible SDK. The idea is recipes in the workspace become a part of the new SDK - for example, this allows taking a vendor provided SDK, adding a few libs and then producing a new SDK with those included. When normally building the extensible SDK, the workspace is excluded; here we need to copy into the new SDK (renaming it in the process); the recipes' task signatures become locked and thus the sources are no longer needed, so they are removed along with the workspace bbappends which would interfere with the locked signatures. Additionally we need to just copy the configuration files (i.e. local.conf and auto.conf) rather than filtering and appending to them since that work has already been done when constructing the original SDK. The extra sstate artifacts from workspace recipes are also determined and copied into the new SDK in minimal mode (on the assumption that you won't set up a new sstate mirror). This reuses some code from build-image, so that needed to be generalised to allow that. Implements [YOCTO #8892]. (From OE-Core rev: 59e207ff6dd4b50a8905e14bc9292cf2794f4e7a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: build-image: rename modulePaul Eggleton2016-03-071-0/+0
| | | | | | | | | | Hyphens aren't allowed in python identifiers, so you shouldn't use them in module names or they are more difficult to import. (From OE-Core rev: e8f6db9436dfc923e236f2cbc08f357e3b24fd5d) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk.py: Fix undefined variableJuro Bystricky2016-03-031-0/+1
| | | | | | | | | | | | | | | | | | | | "sdk_update" uses a variable newsdk_path, which was never declared. This would cause the command: devtool sdk-update <poky-sdk-latest> to fail with an error: NameError: global name 'newsdk_path' is not defined The remedy is to declare newsdk_path as it was no doubt intended, corresponding to the argument specifying <poky-sdk-latest>. [YOCTO#9042] (From OE-Core rev: 6ac589a4a9290665f8c5295e2e2a03a2b187b957) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: add basic support for new npm fetcher/classPaul Eggleton2016-03-021-0/+48
| | | | | | | | | | | | | | | | | | | Add detection for npm modules and support for extracting the name and version from package.json as is usually part of an npm module contents. Note: this will likely only produce a buildable recipe if you use an npm:// URL; simply pointing to a node.js source repository isn't going to fetch the module's dependencies. It also doesn't set up the shrinkwrap/lockdown automatically, so there is some room for improvement later. Implements [YOCTO #8690]. (From OE-Core rev: 41d0e4d75f13b53a6c1b6a8df9be4742be7534e0) 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>
* recipetool: create: add basic support for generating linux kernel recipesPaul Eggleton2016-03-021-0/+99
| | | | | | | | | | | | | | Add support for detecting a Linux kernel source tree and generating a basic kernel recipe using meta-skeleton's linux-yocto-custom recipe as a base. Implements [YOCTO #8981]. (From OE-Core rev: 39cab544b80ca4450106c9ede3180929ba24703c) 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>
* recipetool: create: add support for out-of-tree kernel modulesPaul Eggleton2016-03-021-0/+152
| | | | | | | | | | | | | | | Detect kernel modules by looking for #include <linux/module.h>, and handle the various styles of Makefile that appear to be used. I was able to use this code to successfully build a number of external kernel modules I found. Implements [YOCTO #8982]. (From OE-Core rev: a85604f2eb2438b4caf0832c2ea15b5822f7e9a1) 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>
* wic: don't throw away our created swap partitionChristopher Larson2016-02-281-0/+1
| | | | | | | | | | | | | We were creating the partition, mkswap'ing it, and then not dd'ing it into place in the final image, as source_file wasn't being set for swap partitions. This would result in a swap partition that couldn't be enabled on target until mkswap was run. (From OE-Core rev: 7580942a66f84c2120763c2d9665e2cec8e25138) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: upgrade: print new recipe namePaul Eggleton2016-02-281-0/+1
| | | | | | | | | | | Make this consistent with "devtool add" so that the user knows where to find the new recipe. (From OE-Core rev: 28fea4a104ba85aded2ecfe891e9bf997d72a103) 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>
* devtool: upgrade: drop PR on upgradePaul Eggleton2016-02-281-3/+4
| | | | | | | | | | | The PR value should be reset to the default when upgrading, so we need to drop it from the newly created file. (From OE-Core rev: 4acf8a6912106dd3da5ceee9e30ccce86211d04b) 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>
* devtool: upgrade: eliminate unnecessary datastore copyPaul Eggleton2016-02-281-4/+3
| | | | | | | | | | | We aren't modifying the datastore copy here, so we don't need a copy at all. (From OE-Core rev: 9f05bf98d4dbcb991b684a2ab480c6638c6be292) 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>
* devtool: upgrade: fix several issues with extraction of new sourcePaul Eggleton2016-02-281-2/+12
| | | | | | | | | | | | | | | | | Fix several issues when extracting the new version source over the top of the old one (when the recipe is not fetching from a git repo): * Delete the old source first so we ensure files deleted in the new version are deleted. This also has the side-effect of fixing any issues where files aren't marked writeable in the old source and thus overwriting them failed (harfbuzz 1.1.3 contains such files). * Fix incorrect variable name in abspath statement that made it a no-op (From OE-Core rev: 4f7595a514661f0e2418393286849a1cb6c46f0d) 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>
* devtool: upgrade: fix constructing new branch from tarball releasesPaul Eggleton2016-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | When we do an upgrade from one tarball version to another we want to: 1) Check out the old version as a new branch 2) Record the changes between the old and new versions as a commit 3) Check out the old version with patches applied 4) Rebase that onto the new branch Where we went wrong was step #1 where instead we checked out the old version with patches applied as the new branch, which meant the rebase didn't do anything and any changes made by the patches to files still in the new version were wiped out. (From OE-Core rev: a4f3e6d5f4c549e36cce1e18801a565a3a3c9b0a) 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>
* devtool: upgrade: fix renaming of recipe if PV is not in namePaul Eggleton2016-02-281-11/+11
| | | | | | | | | | | | | If the actual value of PV isn't in the name of the recipe (for example, a git or svn recipe) there's no point trying to rename it. Additionally, we already have the original filename, there's no need to guess it - just pass it in. (From OE-Core rev: e144db3650b4a7c0a59066621905f34a5400303e) 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>