summaryrefslogtreecommitdiffstats
path: root/scripts/lib
Commit message (Collapse)AuthorAgeFilesLines
* resulttool/log: Add ability to dump ltp logs as well as ptestRichard Purdie2020-06-052-15/+28
| | | | | | | | | | | | Currently only ptest logs are accessible with the log command, this adds support so the ltp logs can be extracted too. (From OE-Core rev: 0b513274a0ae722065cf1a605090000e854e2f81) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 64a2121a875ce128959ee0a62e310d5f91f87b0d) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool/report: Remove leftover debuggingRichard Purdie2020-06-051-1/+0
| | | | | | | | | | | | I've long since wondered why there was some odd output in result reports, remove the leftover debug which was causing it. (From OE-Core rev: 10d1d2ffa0906561d65886caee44652242139913) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 66e96bf70753933714ff8edcc13a1f35a052656f) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* checklayer: Skip layers without a collectionJoshua Watt2020-06-051-0/+3
| | | | | | | | | | | | | | | As in other places in the file, skip layers that don't define a collection when searching for a layer to resolve a dependency. Fixes KeyError exceptions when attempting to access the layer collections later (From OE-Core rev: ae65adf471a9ad04c6a44bf020a28f1006db106a) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 26090a2861ebe21224aaf89d7be0c0a89ca58e48) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "wic: Fix permissions when using exclude or include path"Richard Purdie2020-04-071-19/+3
| | | | | | | | | This reverts commit 36993eea89d1c011397b7692b9b8d61b499d0171. After discussion on the mailing list it was felt these changes were not ready yet. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "wic: Add --embed-rootfs argument"Richard Purdie2020-04-074-31/+1
| | | | | | | | | This reverts commit efdcf94801f6abe8e4099e324d9a3deccd8d4384. After discussion on the mailing list it was felt these changes were not ready yet. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add --embed-rootfs argumentRicardo Ribalda Delgado2020-04-064-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | This option adds the content of a rootfs on a specific location on the rootfs. It is very useful for making a partition that contains the rootfs for a host and a target Eg: / -> Roofs for the host /export/ -> Rootfs for the target (which will netboot) Although today we support making a partition for "/export" this might not be compatible with some upgrade systems, or we might be limited by the number of partitions. With this patch we can use something like: part / --source rootfs --embed-rootfs target-image /export --embed-rootfs target-image2 /export2 on the .wks file. (From OE-Core rev: efdcf94801f6abe8e4099e324d9a3deccd8d4384) Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Fix permissions when using exclude or include pathRicardo Ribalda Delgado2020-04-061-3/+19
| | | | | | | | | | | | | | | | | | | | | When parameters include_path or exclude_path are passed to the rootfs plugin, it will copy the partition content into a folder and make all the modifications there. This is done using copyhardlinktree(), which does not take into consideration the content of the pseudo folder, which contains the information about the right permissions and ownership of the folders. This results in a rootfs owned by the user that is running the wic command (usually UID 1000), which makes some rootfs unbootable. To fix this we copy the content of the pseudo folders to the new folder and modify the pseudo database using the "pseudo -B" command. (From OE-Core rev: 36993eea89d1c011397b7692b9b8d61b499d0171) Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: align layer plugin pathLee Chee Yang2020-04-022-6/+8
| | | | | | | | | | | | | | | | wic look for external layer source plugin under scripts/lib/ while other tools look for lib/. allow wic to check for source plugin at both scripts/lib/ and lib/ to align with other tools while avoid breaking any existing source plugin in external layer. [YOCTO #13056] (From OE-Core rev: 986baff26bd96a6265f5fe2d631818fff9f66374) Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/direct: reserve 2 sector for extended partitionChee Yang Lee2020-03-241-3/+3
| | | | | | | | | | | | | extended partition should reserve at least 2 unallocated sectors between the start of the extended partition and the start of a logical partition. [YOCTO #13658] (From OE-Core rev: 884c8a0e50a49bdca5e048197a9dc0ff37cc8d1a) Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/engine: lets display an error not a tracebackArmin Kuster2020-03-021-1/+4
| | | | | | | | | | | | If the requested partition does not exist in this request "wic ls {path}:pnum" display a nice message not a trackback Also fix displaying the pnum and not "%s" (From OE-Core rev: 15d1722950a22649905cf8a5789d3cfe48a2a892) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/engine: dump the partition table in JSON format onlyPierre-Jean Texier2020-03-011-1/+1
| | | | | | | | | | | | | | | | | | | since commit 03154d2cf25c1d5ce908da9e72d324004b8d5722 ("sfdisk: add -J between mutually exclusive options") in util-linux [1], the '-J' can't be used with the '-d' option anymore. So, since we're using json format output, drop the '-d' option. Fixes: ERROR: _exec_cmd: <snip>/usr/sbin/sfdisk -dJ <snip>/core-image-minimal-qemux86-64.wic returned '1' instead of 0 output: sfdisk: mutually exclusive arguments: --list-free --json --dump [1] - https://github.com/karelzak/util-linux/commit/03154d2cf25c1d5ce908da9e72d324004b8d5722#diff-31d5cc325380dbdafe64d0e019846f12 (From OE-Core rev: 49e7f3e8e3a775510d8b0e2826a06d000934706b) Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemux86: do not add vga=0 to kernel parametersAlexander Kanavin2020-02-181-1/+1
| | | | | | | | | | | | | | | | | | | This was added ages ago to enable GL passthrough with vmware driver, and is no longer relevant, as std or virgl is used instead nowadays. Original commit: commit 072545b1111c5efb66289a4866897429f5fcd969 Author: Richard Purdie <rpurdie@linux.intel.com> Date: Wed Jan 21 17:40:51 2009 +0000 scripts/poky-qemu-internal: Add support for GL passthrough in qemux86 images (From OE-Core rev: 857078ba8eda153f4a097683db551a7d310ecc01) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Honor APPENDKevin Hao2020-02-151-0/+5
| | | | | | | | | | | | | | | | | | APPEND is used to add additional parameters to kernel by features, such as read-only-rootfs. So we should honor this variable when we compose the kernel parameter in wic. I know we also can resolve this kind of issue by using the .wks.in template introduced by commit 42e870c5ed4b ("image_types.bbclass: support template .wks.in files for wic"), but the APPEND is needed by all the wks, it would seems pretty ridiculous to me to change all the .wks to .wks.in and then foist the APPEND into them. So the APPEND is definitely deserved to export to the wic directly. [Yocto #12809] (From OE-Core rev: 18981b8a457104391dfd94938c247eac04e4ed50) Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool/resultutils: Fix unicode error handlingRichard Purdie2020-02-151-4/+1
| | | | | | | | | | | | | | | | | | | | | | This error handling didn't work as expected since upon failure it would inject bytestreams back into the code leading to tracebacks. Instead, ignore the decode errors. Fixes: Traceback (most recent call last): File "/home/pokybuild/yocto-worker/a-full/build/scripts/resulttool", line 78, in <module> sys.exit(main()) File "/home/pokybuild/yocto-worker/a-full/build/scripts/resulttool", line 72, in main ret = args.func(args, logger) File "/home/pokybuild/yocto-worker/a-full/build/scripts/lib/resulttool/store.py", line 70, in store resultutils.save_resultsdata(results, tempdir, ptestlogs=True) File "/home/pokybuild/yocto-worker/a-full/build/scripts/lib/resulttool/resultutils.py", line 178, in save_resultsdata f.write(sectionlog) TypeError: write() argument must be str, not bytes (From OE-Core rev: 3aa0d0fd0bbf8c9c13719251a2fd1e85a22c7336) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib/resulttool/report: Enable report selected test case resultYeoh Ee Peng2020-02-131-5/+28
| | | | | | | | | | | | Enable reporting selected test case result given the user provided the selected test case id. If both test result id and test case id were provided, report the selected test case result from the selected test result id. (From OE-Core rev: 7161310ce32d6e0c397d0132808d556bdc80d183) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool/standard.py: Allow recipe to disable menuconfig logicTom Hochstein2020-02-021-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | u-boot.inc supports u-boot recipes with or without menuconfig [1]. However, running devtool on a u-boot recipe that does not support menuconfig results in an error: cp: cannot stat '/home/r60874/upstream/fsl-xwayland/tmp/work/imx8mmevk-fsl-linux/u-boot-imx/2018.03-r0/u-boot-imx-2018.03//.config': No such file or directory The problem is the devtool logic assumes that any recipe with a do_menuconfig task will generate a .config in do_configure(). Fix the problem by removing the assumption with a flag that the recipe can control, like this: do_configure() { if [ menuconfig-supported ]; then ... else DEVTOOL_DISABLE_MENUCONFIG=true fi } [1] https://github.com/openembedded/openembedded-core/commit/11278e3b2c75be80645b9841763a97dbb35daadc (From OE-Core rev: 6cc17e658c3dbadc772353f0f200561d2d988658) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool/create: npm: remove the 'noverify' url parameterJean-Marie LEMETAYER2020-01-271-2/+0
| | | | | | | | | | | This commit removes the 'noverify' parameter which was added to the url to fix warnings with the shrinkwrap / lockdown file generation. This is not needed anymore with the new npm fetcher. (From OE-Core rev: 401a9818c633373854d3c7dec032b9f455f2b2b4) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool/standard: npm: update the append fileJean-Marie LEMETAYER2020-01-271-8/+4
| | | | | | | | | | | | | | | | | When creating a recipe using devtool, a workspace is created to store the new recipe, the recipe source and some append files. These append files are used by devtool to build the recipe using externalsrc (to use the source which are in the workspace). They can also have some additional actions according to the class of the recipe. This commit updates the append file for the npm recipes. The devtool / externalsrc files are removed in the npm package directory instead of the install directory. (From OE-Core rev: a213a76e56e9bc215a61399ae35a3602863f5850) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool/create_npm: handle the licenses of the dependenciesJean-Marie LEMETAYER2020-01-271-0/+46
| | | | | | | | | | | | | | | | | | As usual the 'LICENSE' and the 'LIC_FILES_CHKSUM' values reflects all the license files discovered in the source tree (including the dependencies). For npm recipes the 'LIC_FILES_CHKSUM' value contains also the status of the 'package.json' file of every packages as it contains license informations. Finally each package has a separate 'LICENSE_${PN}-package-name' value which describes its license. (From OE-Core rev: 9a70d4996c84b277f423eda5aac4acbe344599f4) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool/create_npm: refactor the npm recipe creation handlerJean-Marie LEMETAYER2020-01-271-290/+178
| | | | | | | | | | | | | | This commit refactors the npm recipe creation handler to use the new npm behavior. The process is kept as simple as possible and only generates the shrinkwrap file. To avoid naming issues the recipe name is now extracted from the npm package name and not directly mapped. (From OE-Core rev: 1deccb0f0c204cd02fb8606f180d8a13df9f31db) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: npm: rename npm command line optionsJean-Marie LEMETAYER2020-01-272-8/+6
| | | | | | | | | | This commit renames the '--fetch-dev' option into '--npm-dev' as it is a npm only option. (From OE-Core rev: 2b75cc848ceebee4067788a621299bfd5fb62231) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: fix images build in parallelMaxim Uvarov2020-01-191-1/+1
| | | | | | | | | | | | | | | | OE wic plugins create temporary file with the index of the line tmp file name. This causes race in case several builds run in time. If source_params['file'] is an absolute path, the cr_workdir prefix is not applied by os.path.join(). So instead it writes to a ".1" file next to the original image - this is outside the WORKDIR and at risk of collision. (From OE-Core rev: c68d8a37ba4348fe1c0e75c63b5668187d326ec2) Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Suggested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Suggested-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add --include-path argumentPaul Barker2020-01-104-2/+17
| | | | | | | | | | | | | | | This option adds the contents of the given path to a partition built with the rootfs source plugin. The path is relative to the directory in which wic is running not the rootfs itself so use of an absolute path is recommended. This option is most useful when multiple copies of the rootfs are added to an image and it is required to add extra content to only one of these copies. This option only has an effect with the rootfs source plugin. (From OE-Core rev: d4cd27a9837426e809190548a83c6c7c76505114) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Preserve intermediate filesPaul Barker2020-01-101-3/+1
| | | | | | | | | | | | | | | | | | | | When debugging issues or trying to add new features in wic it's useful to examine the intermediate files created by the tool such as images of the individual partitions. Previously these files were created in a subdirectory of IMGDEPLOYDIR and, deleted by wic itself and then the working subdirectory completely removed at the end of IMAGE_CMD_wic. Instead we should work in a staging directory named build-wic and leave behind intermediate files for analysis if necessary. This has the added benefit of allowing individual partition images to be preserved by adding commands to IMAGE_CMD_wic_append() in an image recipe if needed. This is useful where an update system requires exact sized and pre-formatted partition images for deployment. (From OE-Core rev: 07b6b284204e912b5d08bdd0ca51b766ab7dd9c1) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/filemap: If FIGETBSZ iotctl fail, failback to os.statKalle Lampila2020-01-021-2/+4
| | | | | | | | | | | Some file systems don't support fetching the block size (notably the file system Docker uses for containers), so if iotctl() fail, try to use failback via os.stat() to get block size. (From OE-Core rev: e219f5175177a640dd62833082ea19adc1c13d42) Signed-off-by: Kalle lampila <kalle.lampila@lempea.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: always use python 3 in recipe creationAlexander Kanavin2019-12-301-13/+4
| | | | | | | (From OE-Core rev: 59e63a2d22988ef11fe36200692b967b67ca8641) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scriptutils: remove the useless import lineChen Qi2019-12-061-1/+0
| | | | | | | | | | imp was replaced by importlib as it's deprecated, but the import line was left, so remove this useless line. (From OE-Core rev: 95574a7d18a8acfbed1b956677e72044bdfa7ebc) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: 'wic cp' to copy from imageChee Yang Lee2019-11-272-18/+46
| | | | | | | | | | | | | | | | currently 'wic cp' only works for copy file from local storage to wic image. enhance 'wic cp' to copy file/directory from wic image to local storage. include selftest and 'wic help' updates. [YOCTO#12169] (From OE-Core rev: bd669c1809a378f93580eb9e0679a26ec6746cb8) Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: fix devtool upgrade with reproducible_builds classPaul Eggleton2019-11-213-5/+14
| | | | | | | | | | | | | | | | | | If the reproducible_build class is inherited then there may be a "source-date-epoch" subdirectory in a fetched source tree; devtool upgrade was not expecting that in the upgraded source. Take a small snippet of code from recipetool create which already handles this, and make it a shared function that can be used in both places. Additionally, fix an assumption that the source is always in a subdirectory in the cleanup code that blocked debugging this. [YOCTO #13635] (From OE-Core rev: 0d642861cd9cf034b8d4951433980addc215d4fd) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "devtool/standard.py: Not filtering devtool workspace for devtool finish"Alexander Kanavin2019-11-211-1/+1
| | | | | | | | | | | | | This reverts commit 41d225f4a37d02e9f79bdbfb79caac8cd3d291ce. Unfortunately this change broke 'devtool upgrade' functionality, causing 'devtool finish' to write out an upgraded recipe that no longer includes the original upstream source in SRC_URI. (From OE-Core rev: 2d6e55192dba0bf7f6e23e5ab5b3dbc68835bb28) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool/create: Fix to work with reproducible_buildsRichard Purdie2019-11-211-1/+1
| | | | | | | | | | The extra diretory created by reproducibile_builds was confusing recipetool and hence devtool. Ignore this directory to restore the correct behaviour and allow it to work with the class. (From OE-Core rev: 188ba30ef290efab6d5a9b95fba8e991b779ab33) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: rm with -r flag supportChee Yang Lee2019-11-212-17/+49
| | | | | | | | | | | | | wic currently unable to remove non-empty directory in ext* partition. enable wic rm to remove non-empty directory and all the sub-content with -r flag. update help documents for 'wic rm'. [YOCTO #12404] (From OE-Core rev: 5cb7a329d0aaac8fe5328eb2001692c540aa5ade) Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool/store.py: Enable add extra test environment dataYeoh Ee Peng2019-11-141-1/+4
| | | | | | | | | | | | | | | Enable the option to add extra test environment data to the configuration of each test result (as optional). Example of optional test environment data include: - custom packages included for runtime test - detail machine specification used as target - detail host environment used for bitbake (From OE-Core rev: 3cc887a72c5726024c3699e6a3deb72fad4992a9) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/resulttool/report: Add total statistic to test result.Yeoh Ee Peng2019-11-142-1/+7
| | | | | | | | | Add total passed, failed, and skipped statistic to test result. (From OE-Core rev: 7ad74f99b6105f23bcf930712627aac279c6af10) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/resulttool/report: Enable output raw test resultsYeoh Ee Peng2019-11-141-2/+16
| | | | | | | | | | | | | In case of debugging, report user need to acccess the raw test result. Instead of going back to source file/directory/URL to manually pull out the raw result, provide alternative way to let report showing raw test results by providing the result id (optional). (From OE-Core rev: 8b2485bc0d0fa2f72b37e8bafbfa663d456ea98c) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/resulttool/report: Enable report to use regression_mapYeoh Ee Peng2019-11-142-7/+13
| | | | | | | | | | | | | | | | | | | | By default, report will use the store_map to generate the key to reference each result set. In some situation when using store_map with multiple set of tests sharing similar test configurations, the report will only showing partial result set for results that having identical result_id (use of multiconfig to run tests where it generate identical result_id). Enable report to have the option to use the regression_map (optional) instead of the default store_map, where it will take larger set of configurations to generate the key to reference each result set, this will prevent the report from only showing partial result set. (From OE-Core rev: 8577abce6feb1f529537da554d39e86a5b05ca2d) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: beautify 'wic help'Chee Yang Lee2019-11-141-0/+56
| | | | | | | | | | | | | | | | | The Wic help returned to the user is unreadable. Use a custom ArgumentParser to override argparse help message. change help message as suggest in https://bugzilla.yoctoproject.org/show_bug.cgi?id=12205 [YOCTO #12205] changes applies to 'wic help', 'wic -h', 'wic --h' and 'wic --help' (From OE-Core rev: d29d553cc096f4e1208c44dc595e1cf365c3dff3) Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* isoimage-isohybrid.py: Parameterize ESP partition sizeHaris Okanovic2019-11-101-2/+4
| | | | | | | | | | Add "esp_extra_blocks" plugin parameter so that caller may change ESP's free space from the default 100 blocks. (From OE-Core rev: db4be094b0d6741ca4f9e2cbb499fc9c224fa690) Signed-off-by: Haris Okanovic <haris.okanovic@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* isoimage-isohybrid.py: Parameterize ESP labelHaris Okanovic2019-11-101-2/+4
| | | | | | | | | | Add "esp_label" plugin parameter so that caller may override default ESP partition label 'EFIimg'. (From OE-Core rev: 6b3b9042a55d47205b16ef792f93a9bb240fd7cb) Signed-off-by: Haris Okanovic <haris.okanovic@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/engine: use 'linux-swap' for swap file systemChee Yang Lee2019-10-231-1/+1
| | | | | | | | | | | | | | [YOCTO #13312] see https://bugzilla.yoctoproject.org/show_bug.cgi?id=13312 wic/engine.Disk._get_part_image was looking at variable fstypes for supported fstype which is 'swap' but image build with 'linux-swap'. supported fstype should be 'linux-swap'. (From OE-Core rev: 7e6da22fe4faf841bcec02e55f376b4dae04d6a8) Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/help: change 'wic write' help descriptionChee Yang Lee2019-10-231-2/+2
| | | | | | | | | | | | | update the help desciption for 'wic write' command to match behaviour. see commit: https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/scripts/wic?id=74b44e59be89c738f702948f9e16e367c0ba43ba (From OE-Core rev: 521942bde1d49d987c85bf071275e8e7150d012a) Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add ssh key option to deploy-target paramEduardo Abinader2019-10-231-0/+8
| | | | | | | | (From OE-Core rev: 729da1414098c2dd103d9749cf39117881cafeec) Signed-off-by: Eduardo Abinader <eduardoabinader@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: Add --remove-work option for devtool reset commandSai Hari Chandana Kalluri2019-10-231-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | Enable --remove-work option for devtool reset command that allows user to clean up source directory within workspace. Currently devtool reset command only removes recipes and user is forced to manually remove the sources directory within the workspace before running devtool modify again. Using devtool reset -r or devtool reset --remove-work option, user can cleanup the sources directory along with the recipe instead of manually cleaning it. syntax: devtool reset -r <recipename> Ex: devtool reset -r zip devtool finish -r <recipename> <layer-name> Ex: devtool finish -r zip meta-yocto-bsp (From OE-Core rev: 0d6dd01b8633ad63d77c24568a4b20852aaa366f) Signed-off-by: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/rawcopy: Support files in sub-directoriesEugene Smirnov2019-10-191-0/+3
| | | | | | | | | | | | | | | If the source file is located in a subdirectory of DEPLOY_DIR rawcopy will currently fail in sparse_copy function on open(dst_fname, 'wb'), as the parent directory for destination file does not exist. This patch helps to avoid that by recursively creating parent directories. (From OE-Core rev: 073c435644091c2801e45c6d02afa917de575082) Signed-off-by: Eugene Smirnov <evgenii.smirnov@here.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/direct: Partition numbering is broken for MBR primary partition #4Michael Cooper2019-10-081-1/+2
| | | | | | | | | | | | | When wks describes extra partitions that aren't in the partition table (e.g. boot loader) and exactly four primary MBR partitions, the last partition gets added to fstab as partition #5 instead of #4. [YOCTO #13560] (From OE-Core rev: 7537580b3dd21bd512fb26e56e92b6553c549fa8) Signed-off-by: Michael Cooper <michaelcooper81@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool/standard.py: Not filtering devtool workspace for devtool finishJaewon Lee2019-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All devtool commands right now are filtering out the devtool workspace bbappends in build/workspace/appends when calling parse_recipe. While this may make sense for devtool add and modify, we need devtool finish to include those appends. A specific breakage that is caused because devtool finish filters devtool appends is the cmake/cml1 flow where a file is created in the WORKDIR that finish needs access to, to commit those files. Particularly for git packages with SRCPV in PV, SRCPV is only changed to 999 when using external source, hence when creating the cfg or cmake config files using for instance bitbake -c diffconfig, these files are created in the git999 workdir correctly (as in the devtool bbapends, we are inheriting externalsrc class). But when devtool finish is run, the devtool appends are not parsed, hence SRCPV is not changed to 999 and devtool is looking for the fragment files in the wrong WORKDIR. Changing the parse_recipe call just in devtool finish to not filter out the devtool workspace. Fixes [YOCTO #13533] (From OE-Core rev: aa94f00eec64ef936acc80dfa826fd309daa294f) Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/case.py: Encode binary data of logNathan Rossi2019-09-301-1/+5
| | | | | | | | | | | | | | | Do not decode the log content into a string only to re-encode it as binary data again. Some logs might un-intentionally contain bytes that do not decode as utf-8, as such preserve the log file content as it was on disk. Handle the decoding on the resulttool side, but also handle the failure to decode the data. (From OE-Core rev: 20531dc0b8f76a6e37cc856f36cd94077b6aba50) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: finish: Add suppport for the --no-clean optionPeter Kjellerstedt2019-09-271-1/+2
| | | | | | | | | | This works just like the already existing --no-clean option to the `devtool reset` command. (From OE-Core rev: 4433d3133ce53cdf7db17f5e7914fe8c4d78dba3) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: finish: Keep patches ordered when updating bbappendNiclas Svensson2019-09-271-4/+4
| | | | | | | | | | | | The _get_patchset_revs() function returns the patches in an OrderedDict to keep them ordered. However, this information was lost when the patches were added to the bbappend file. (From OE-Core rev: 69b7a2ba3af1280cc220ab236032f8466246ee93) Signed-off-by: Niclas Svensson <niclas.svensson@axis.com> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Using the right rootfs size during prepare_rootfsAlessio Igor Bogani2019-09-271-6/+17
| | | | | | | | | | | | | | | | The commit 8e48b4d6c4 makes wic ignores IMAGE_ROOTFS_SIZE for rootfs size and makes it uses the computed one only. Re-add support for IMAGE_ROOTFS_SIZE variable and compute roots size only if the former is not defined. Moreover the size of a provided directory with --rootfs-dir="" in the .wks file should always be computed on the fly, else every partition will be constrained to be the same size as what ever value was in ROOTFS_SIZE. (From OE-Core rev: 0217a0392b8cc534fcc0d760b7663a1845b306f5) Signed-off-by: Alessio Igor Bogani <alessio.bogani@elettra.eu> Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>