summaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2020-05-15resulttool/resultutils: Fix unicode error handlingRichard Purdie
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 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-19wic: align layer plugin pathLee Chee Yang
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] Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 986baff26bd96a6265f5fe2d631818fff9f66374) Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-03-26wic/direct: reserve 2 sector for extended partitionChee Yang Lee
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> (cherry picked from commit 590555e3b8ccbd94b628aa6778adea7f4538d966) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2020-03-10wic/engine: lets display an error not a tracebackArmin Kuster
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" Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 15d1722950a22649905cf8a5789d3cfe48a2a892) Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-02-11devtool/standard.py: Allow recipe to disable menuconfig logicTom Hochstein
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 Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2020-01-18scripts/oe-build-perf-report: Avoid buildstats warningRichard Purdie
When a comparision branch is set we see warnings. If two branches are used, look for buildstats information from both to avoid this kind of warning: INFO: Parsing buildstats from 'refs/notes/buildstats/perf-centos7.yoctoproject.org/master-next/qemux86' WARNING: Buildstats not found for perf-centos7.yoctoproject.org/master/qemux86/56808-g08220028e52992dcba667fc97bf3afe8be1949fb/0 WARNING: Buildstats not found for perf-centos7.yoctoproject.org/master/qemux86/56808-g08220028e52992dcba667fc97bf3afe8be1949fb/1 INFO: Buildstats were missing for some test runs, please run 'git fetch origin refs/notes/buildstats/perf-centos7.yoctoproject.org/master-next/qemux86:refs/notes/buildstats/perf-centos7.yoctoproject.org/master-next/qemux86' and try again (the warning is due to stats being looked for in both branches, choose the other branch and different warnings would be shown) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit af58c18fcd0451540dd77ee862956b2b9dee17c4) Signed-off-by: Armin Kuster <akuster808@gmail.com>
2020-01-18wic/filemap: If FIGETBSZ iotctl fail, failback to os.statKalle Lampila
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. Signed-off-by: Kalle lampila <kalle.lampila@lempea.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e219f5175177a640dd62833082ea19adc1c13d42) Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-11-25Revert "devtool/standard.py: Not filtering devtool workspace for devtool finish"Alexander Kanavin
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> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-29wic/engine: use 'linux-swap' for swap file systemChee Yang Lee
[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'. Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7e6da22fe4faf841bcec02e55f376b4dae04d6a8) Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-10-25wic/rawcopy: Support files in sub-directoriesEugene Smirnov
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. Signed-off-by: Eugene Smirnov <evgenii.smirnov@here.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 073c435644091c2801e45c6d02afa917de575082) Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-10-25runqemu: Remove disabling of high resolution timerJoerg Vehlow
The option 'highres=off' sneaked itself into the runqemu script for all configurations, where the root filesystem type is not 'cpio' or 'cpio.gz'. See: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13590 Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-10-25runqemu: unset another environment variable for 'egl-headless'Alexander Kanavin
Some host distributions (opensuse for example) are using 'pkgconf', which, unlike the original pkg-config, appends PKG_CONFIG_SYSROOT_DIR to every directory from the .pc file. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-10-09scripts/gen-lockedsig-cache: Don't list paths which don't existRichard Purdie
This avoids failures seen on the autobuilder when generating eSDKs and release sstate copies. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-07wic/direct: Partition numbering is broken for MBR primary partition #4Michael Cooper
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] Signed-off-by: Michael Cooper <michaelcooper81@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-07devtool/standard.py: Not filtering devtool workspace for devtool finishJaewon Lee
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] Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-02gen-lockedsig-cache: Replace glob lookup with hash to filename lookupKonrad Scherer
Using the glob function to map signatures to sstate files is very slow when the sstate is large and accessed over nfs. The lookup now only loads the necessary prefixes and doesn't use glob as all. Unfortunately I don't have access to the systems where the performance isse was noticed and on my test system the glob is fast enough that the performance numbers aren't useful. I could verify that file list returned by the new code is the same. [YOCTO #13539] Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27oeqa/core/case.py: Encode binary data of logNathan Rossi
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. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27devtool: finish: Add suppport for the --no-clean optionPeter Kjellerstedt
This works just like the already existing --no-clean option to the `devtool reset` command. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27devtool: finish: Keep patches ordered when updating bbappendNiclas Svensson
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. 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>
2019-09-27wic: Using the right rootfs size during prepare_rootfsAlessio Igor Bogani
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. 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>
2019-09-18runqemu: Mention snapshot in the help outputRichard Purdie
This is a useful option but not documented in the help text. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-16runqemu: decouple gtk and gl optionsAlexander Kanavin
This will allow not having to multiply these options for the sdl frontend, instead combining them as needed. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-09-15oe-git-proxy: fix dash "Bad substitution"Henning Schild
The script claims it works with dash, make sure that is actually the case. Signed-off-by: Henning Schild <henning.schild@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-09-15oe-git-proxy: NO_PROXY suffix matching without wildcard for match_hostHenning Schild
NO_PROXY can also contain just suffixes that do not start with a "*". We failed to match those so far. Just add an extra "*" to also match those suffixes. If one was there we get "**" which does not hurt. Signed-off-by: Henning Schild <henning.schild@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-09-15oe-git-proxy: disable shell pathname expansion for the whole scriptHenning Schild
This truly fixes the issue that cbc148d5d93d5f3531434fee7b234a16196b3088 wanted to solve, without breaking the iteration over multiple entries. Signed-off-by: Henning Schild <henning.schild@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-09-15Revert "oe-git-proxy: Avoid resolving NO_PROXY against local files"Henning Schild
This reverts commit cbc148d5d93d5f3531434fee7b234a16196b3088. The quoting causes H to be one string with spaces, so looping over multiple entries does not work anymore. Signed-off-by: Henning Schild <henning.schild@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-09-15oe-git-proxy: allow setting SOCAT from outsideHenning Schild
This allows to write selftests where we can mock the real socat. Signed-off-by: Henning Schild <henning.schild@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-09-11oeqa/core/case.py: Add OEPTestResultTestCase for ptestresult helpersNathan Rossi
Add the OEPTestResultTestCase class as a mix-in class to provide helper functions for interacting with ptestresults within the extraresults object generated by the test case. This class also provides default compression of log text and log files. Also add support to resulttool for decoding/decompressing log files embedded in the test results. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-11resulttool: Handle multiple series containing ptestresultsNathan Rossi
Handle multiple results series having ptestresults content. The contents are merged on a per-result basis where duplicates are ignored (with a warning message printed). The 'ptestresults.sections' collection is also merged on a per-suite basis. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06resulttool: Add reproducible log extractionJoshua Watt
Adds an argument to the log subcommand to extract the raw logs from the reproducible selftest. To prevent ambiguity, the "--raw" argument has been renamed "--raw-ptest", although the old "--raw" argument is kept around for compatibility. [YOCTO #13324] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-09-06runqemu: Fix typo in help text.Drew Moseley
Signed-off-by: Drew Moseley <drew.moseley@northern.tech> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-09-06oe-selftest: Implement console 'keepalive' outputNathan Rossi
Similar to bitbake, implement a 'keepalive' output to the console to ensure CI systems do not kill the process. The default timeout for bitbake is 5000s. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-01qemuriscv: Generate a wic rootFS with a larger filesystemAlistair Francis
This allows us to generate a rootFS with a large filesystem for use with QEMU. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-31devtool: Avoid failure for recipes with S == WORKDIR and no local filesPeter Kjellerstedt
When extracting the sources for a recipe that has S == WORKDIR and no local files in the SRC_URI (which, e.g., can happen for a recipe with a URI that has the unpack=false attribute), the extraction fails with the following backtrace: Traceback (most recent call last): File ".../scripts/devtool", line 344, in <module> ret = main() File ".../scripts/devtool", line 331, in main ret = args.func(args, config, basepath, workspace) File ".../poky/scripts/lib/devtool/standard.py", line 762, in modify initial_rev, _ = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil, no_overrides=args.no_overrides) File ".../poky/scripts/lib/devtool/standard.py", line 647, in _extract_source bb.process.run('git %s commit -a -m "Committing local file symlinks\n\n%s"' % (' '.join(useroptions), oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree) File ".../poky/bitbake/lib/bb/process.py", line 178, in run raise ExecutionError(cmd, pipe.returncode, stdout, stderr) bb.process.ExecutionError: Execution of 'git commit -a -m "Committing local file symlinks %% ignore"' failed with exit code 1: On branch devtool nothing to commit, working tree clean This is because no files were found in the oe-local-files directory and consequently no symbolic links were added using `git add`, but the `git commit` command was still executed. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-30qemu: switch to '-vga std' emulated hardware from vmware/cirrus for x86/mipsAlexander Kanavin
This is the qemu default since qemu 2.2, is generally supported better, and is recommended by upstream. It also has already been in use for arm/risc and ovmf. Additional information: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13466 https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful/ '-vga virtio' emulated hardware remains in use when virgl is enabled via a runqemu override. Also, adjust the error whitelist, as there is a number of new messages coming from the drivers that are not actual errors. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-30yocto-check-layer: Allow any case for README file detectionMark Hatle
It's become more commone for files to be named "readme" or "Readme" on github servers in recent time. So adjust the scanning to allow any mix of case. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-29qemu: set default RAM to 256M for all machinesAlexander Kanavin
There was a discussion about what amount of RAM is appropriate for a default; the outcome was that for now it is still 256M. Some qemu machine definitions have however set this to 512M so for the sake of treating all architectures fairly, they are reset back to 256M. Also runqemu is adjusted to use 256M if QB_MEM is not set at all. http://lists.openembedded.org/pipermail/openembedded-core/2019-August/285900.html Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-28scripts/lib/resulttool/report.py: Add more result typesNathan Rossi
Add additional result types into the dictionary to handle dejagnu style test results. These include PASS, FAIL, XPASS, XFAIL, UNSUPPORTED, UNTESTED, UNRESOLVED and ERROR. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-21devtool: build: Also run deploy for devtool build if applicableJaewon Lee
Right now `devtool build` runs populate_sysroot and packagedata tasks. Adding deploy to this list, if the recipe has the deploy task, so that the newly built artifacts are available in the deploy directory. Applicable only for packages with deploy task, such as kernel. [YOCTO#13382] Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-08-21resulttool: Prevent multiple results for the same testJon Mason
Currently, if a test occurs multiple times over different series, the code will sum these. This can lead to confusion over the desired results. Change the code to report the redundant tests and skip adding an additional values. Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-08-21scripts/runqemu: Add support for the BIOS variableAlistair Francis
Add support for specifying a BIOS the same way that the KERNEL variable is specified. This includes specifying a QB_DEFAULT_BIOS variable. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-21yocto-check-layer: Ensure we use OEBasicHash as the signature handlerRichard Purdie
The layer checks are designed to work with OEBasicHash so ensure that handler is in use rather than the new hash equivalency one as an example. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-08wic: Make disk partition size consistently computedJason Wessel
When using different root directories with a wks file wic is using the value from the original ROOTFS_SIZE which is not correct. Example: Number Start End Size File system Name Flags 1 20.5kB 318MB 318MB fat16 otaefi legacy_boot, msftdata 2 318MB 636MB 318MB ext4 otaboot 3 636MB 1709MB 1074MB ext4 otaroot 4 1709MB 2027MB 318MB ext4 otaboot_b 5 2027MB 3101MB 1074MB ext4 otaroot_b 6 3101MB 5249MB 2147MB ext4 fluxdata The partitions 1, 2, and 3 incorrectly inherit the size, instead of using a computed size. With the patch applied it is working properly: Number Start End Size File system Name Flags 1 20.5kB 14.5MB 14.5MB fat16 otaefi legacy_boot, msftdata 2 14.5MB 65.3MB 50.8MB ext4 otaboot 3 65.3MB 1139MB 1074MB ext4 otaroot 4 1139MB 1190MB 50.8MB ext4 otaboot_b 5 1190MB 2264MB 1074MB ext4 otaroot_b 6 2264MB 4411MB 2147MB ext4 fluxdata As for the removal of the bb.warn, if the size is not specified, it is not something to warn the end user about. Some of my default images make use of the head room + a computed directory size or while generating images. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-08wic: Add partition type for msdos partition tablesJason Wessel
In order to create a msdos partition table disk image that can auto expand after the image is copied to an SD card, wic needs the ability to have a primary partition as the last entry. The desired use case is to be able to create an A/B update partition image scheme with a /var volume that can be auto expanded to the remainder of the SD card at run time. The typical .wks file will look similar to the following: bootloader --ptable msdos part / --source rawcopy --sourceparams="file=u-boot.imx" \ --ondisk mmcblk --no-table --align 1 --size 1 part /boot --source bootimg-partition \ --ondisk mmcblk --fstype=vfat --label boot --active --align 4 --size 16 part / --source rawcopy --sourceparams="file=imx6_boot.otaimg" \ --ondisk mmcblk --fstype=ext4 --label otaboot --align 4 --type logical part / --source rawcopy --sourceparams="file=imx6.otaimg" \ --ondisk mmcblk --fstype=ext4 --label otaroot --align 4 --type logical part / --source rawcopy --sourceparams="file=imx6_boot.otaimg" \ --ondisk mmcblk --fstype=ext4 --label otaboot_b --align 4 --type logical part / --source rawcopy --sourceparams="file=imx6.otaimg" \ --ondisk mmcblk --fstype=ext4 --label otaroot_b --align 4 --type logical part /var --source rawcopy --sourceparams="file=imx6_var.otaimg" \ --ondisk mmcblk --fstype=ext4 --label fluxdata --align 4 Without the patch applied, wic will generate an SD card image that looks like: Disk boot.img: 890940s Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 2056s 48001s 45946s primary fat16 lba 2 48008s 132467s 84460s primary ext4 3 132472s 454467s 321996s primary ext4 4 454471s 890939s 436469s extended lba 5 454472s 538931s 84460s logical ext4 6 538936s 860931s 321996s logical ext4 7 860936s 890939s 30004s logical ext4 boot With the patch applied a primary partition can be created at the end of the image which can be expanded to fill the free space on the media where the image has been copied, which looks like: Disk boot.img: 890940s Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 2056s 48001s 45946s primary fat16 lba 2 48007s 860931s 812925s extended lba 5 48008s 132467s 84460s logical ext4 6 132472s 454467s 321996s logical ext4 7 454472s 538931s 84460s logical ext4 8 538936s 860931s 321996s logical ext4 3 860936s 890939s 30004s primary ext4 boot Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-08runqemu: Add support to handle EnrollDefaultKeys PK/KEK1 certificateRicardo Neri
The EnrollDefaultKeys.efi application (distributed in ovmf-shell-image) expects the hypervisor to provide a Platform Key and first Key Exchange Key certificate. For QEMU, this is done by adding an OEM string in the Type 11 SMBIOS table. The string contains the EnrollDefaultKeys application GUID followed by the certificate string. For now, the string is passed in the command line until QEMU understands OEM strings from regular files (please see https://bugs.launchpad.net/qemu/+bug/1826200). If runqemu detects it is given an OVMF binary with support for Secure Boot (i.e., ovmf.secboot* binaries), extract the certificate string from the OvmfPkKek1.pem certificate and modify the command-line parameters to provide the key. Such certificate is created when building OVMF with support for Secure Boot. Cc: Ross Burton <ross.burton@intel.com> Cc: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
2019-08-03runqemu: fix get portlock fail for multi usersChangqing Li
when runqemu with slirp option on same host with different users, it will report PermissionError: [Errno 13] Permission denied: '/tmp/qemu-port-locks/2222.lock' and during handle this exception, another exception happened since key not exist. Fix by check if key exist first Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-29scripts/create-pull-request: fix putting subject containing / into cover letterPaul Eggleton
If a single-commit series had a shortlog containing a "/" character then that prevented putting the shortlog into the subject of the cover letter message. Use a different separating character with the sed command (one much less likely to appear) in order to fix it. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-29scripts/create-pull-request: improve handling of non-SSH remote URLsPaul Eggleton
When attempting to create a pull request, we look at the remote URL in order to extract information to include in the cover letter. However, the assumption was that the remote is an SSH URL i.e. containing '@' which is not always the case (the pull and push URLs might be different, or we might be pushing via https) - if it wasn't the script just gave up leaving you to manually edit the URLs in the email. With a few minor tweaks to the regexes the script will work for these cases as well. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-26runqemu: add lockfile for port used when slirp enabledChangqing Li
There is race condition when multi qemu starting with slirp, add lockfile for each port to avoid problem like: runqemu - ERROR - Failed to run qemu: qemu-system-x86_64: Could not set up host forwarding rule 'tcp::2323-:23' [YOCTO #13364] Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-26image_types: Remove remnants of hdddirectDaniel Ammann
hdddirect was removed in commit 929ba563f1bc7195c4981b8e139c432b2cc388ea. Signed-off-by: Daniel Ammann <daniel.ammann@bytesatwork.ch> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>