summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/wic.py
Commit message (Collapse)AuthorAgeFilesLines
* selftest: wic: add test for zerorize option of empty pluginLukas Funke2023-12-061-0/+36
| | | | | | | | | | | Add test for empty plugin which tests whether the plugin creates partitions with actual data which is 'zero'. (From OE-Core rev: 6c6b236b34b35d0e2c020e0f9c447ac35adf8faf) Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: Add tests for kernel image installationKareem Zarka2023-12-041-0/+68
| | | | | | | | | | | | | | | | | | | | - test_skip_kernel_install: This test verifies that the kernel is not installed in the boot partition when the 'install-kernel-into-boot-dir' parameter is set to false. - test_kernel_install: This test verifies that the kernel is installed in the boot partition when the 'install-kernel-into-boot-dir' parameter is set to true. Both tests use a WKS (Kickstart) file to specify the desired configuration, build a disk image using WIC, and extract the disk image to a temporary directory to verify the results. (From OE-Core rev: a99bc5ed8bf67f171be24c0e2220aae6cccf230e) Signed-off-by: Kareem Zarka <kareem.zarka@huawei.com> Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add test for partition hidden attributesLee Chee Yang2023-11-271-0/+24
| | | | | | | | | | Add test for the --hidden argument introduced in Oe-Core rev 7a111ff58d7390b79e2e63c8059f6c25f40f8977. (From OE-Core rev: 819286cdce6471ca3dd048d3950b943b28e6d222) Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: Improve assertTrue callsRichard Purdie2023-09-201-18/+18
| | | | | | | | | | | | | | assertTrue is a problematic call use in test cases since when it fails, you just get an unhelpful "False is not True" message. Replace some uses with assertIn/assertNotIn which will give more helpful results and for the rest, add msg entries which given more helpful debugging. For example, this patch would help debugging of #15176. (From OE-Core rev: 35d4c39e0df1a304f557471151a03d1e4b0f30c7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: wic: Add test for --no-table optionMarkus Niebel2023-08-291-0/+17
| | | | | | | | | | Add basic test for the --no-table wic part option. (From OE-Core rev: ad89d7e6039da2d79c1d55fe7fdc8bb9c235dacf) Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: Fix host contamination issueRichard Purdie2023-06-061-3/+5
| | | | | | | | | | If wic.Wic2.test_gpt_partition_name is run on a system without sfdisk, the test will currently fail. As done in another test, it needs to use sfdisk from the wic-tools sysroot. This patch fixes that host contamination issue. (From OE-Core rev: 6f9200cc30d50888b9b63103824880abaf8b5eea) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: wic.py respect IMAGE_LINK_NAMEMartin Jansa2023-05-291-4/+5
| | | | | | | | | | | | * use IMAGE_LINK_NAME instead of hardcoding core-image-minimal-${MACHINE} assumption [YOCTO #12937] (From OE-Core rev: e34d7617b00ec9423221c9c7b96be6f9e5358e6a) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: wic: Add test for --part-name argumentDit Kozmaj2023-04-131-0/+23
| | | | | | | | | | | | | | | | | | | Add test for wic --part-name argument in .wks file. Test three different cases: - Set only the --part-name argument. - Set only the --label argument. In this case the GPT partition label is set to the value of --label for compatibility reasons. - Set both. In this case the code has been changed to set the GPT partition label to the --part-name value. The test uses a test_gpt_partition_name.wks file created for this purpose. (From OE-Core rev: 06af6795cf6f079362303bddb39a14459e228e72) Signed-off-by: Dit Kozmaj <dit.kozmaj@kynetics.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: wic: respect IMAGE_LINK_NAME also in test_rawcopy_plugin_qemuMartin Jansa2023-03-221-1/+5
| | | | | | | | | | | | | | | | * this one is more tricky, because the test_rawcopy_plugin.wks.in file is used while building core-image-minimal-mtdutils, but the image filename inside wks.in is from core-image-minimal, so we cannot just let bitbake expand IMAGE_LINK_NAME, use separate variable set in the same config fragment IMAGE_LINK_NAME_CORE_IMAGE_MINIMAL [YOCTO #12937] (From OE-Core rev: 8864ee825fdc52fe7a8cf93876c81c639fba66f4) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: wic: respect IMAGE_LINK_NAMEMartin Jansa2023-03-221-19/+19
| | | | | | | | | | | | | * use IMAGE_LINK_NAME instead of hardcoding core-image-minimal-${MACHINE} assumption [YOCTO #12937] (From OE-Core rev: d6151aeb1e8f6162113b1123fa0f162536e48a44) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: Add test for uefi-kernel loaderPavel Zhukov2023-02-261-0/+20
| | | | | | | | | | This is regression test for [1]. [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=15033 (From OE-Core rev: d8ef15bb9ef652bf85002fe523ff5060b47bca6a) Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: use skipIfNotArch instead of custom decoratorRoss Burton2022-11-111-38/+19
| | | | | | | | | | There's now a shared decorator for architecture skipping, so use that. (From OE-Core rev: 1ce83c6b22e5835d8fe3f733f40207526c6771d4) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: skip more tests on aarch64Ross Burton2022-11-111-2/+4
| | | | | | | | | | | | | test_rawcopy_plugin_qemu and test_wic_image_type are x86-specific currently as the .wks uses x86-specific bootloaders. This can be fixed, but that can come later. (From OE-Core rev: 93525809a1ecb01ae7218558c0d6c1b0344606c5) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/wic: Tweak test case to not depend on kernel sizeRichard Purdie2022-08-081-1/+1
| | | | | | | | | | The current test assumes the kernel size leaves a certain amount of whitespace in the output. Improve this constraint so a slightly larger kernel doesn't fail the test. (From OE-Core rev: bd60c44bef4a1b5d3c8fe77a9e6d3a8f43b0dea4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic.py: Repaired test_qemu()Tobias Schmidl2022-05-271-1/+1
| | | | | | | | | | The grep is too wide, so it falsely fits additional lines that have a UUID (i.e, `/`). (From OE-Core rev: f72fdea1c890ddd793aa63bb9c1c0857962161cc) Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: use self.td instead of get_bb_var to save on bitbake callsRoss Burton2022-04-011-16/+12
| | | | | | | | | | | | | | | | When a test case starts, self.td is populated with all the variables in the data store. Typically this can be used instead of get_bb_var(), which saves a bitbake call per variable lookup. The only catch is that in parallel runs the build directory is moved after td is populated, so paths in the build directory are wrong: these still need to be fetched in the test. (From OE-Core rev: 884201c6c1bbf7c1b958bab7d7c91e27577eeaac) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: use os.path.join to join pathsRoss Burton2022-04-011-46/+46
| | | | | | | | | | Instead of using string concatenation, use os.path.join. (From OE-Core rev: 73d1b7163792ec089ffb3bf99f1b4f8760beaea7) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: rearrange testsRoss Burton2022-04-011-77/+77
| | | | | | | | | | | | Split the tests into further classes: one which exercises the CLI and doesn't need to build images at all, and another which is just the tests that manipulate existing images. (From OE-Core rev: c9bc4def71325dba7b7ad93001f7fe1acced0bea) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: cleanup WicTestCase.setUpLocalRoss Burton2022-04-011-8/+4
| | | | | | | | | | | Use os.path.join to construct paths, and invoke bitbake once instead of three times. (From OE-Core rev: 27953d4cf6edc86cd505826c3da21222864c7760) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: tag tests that use runqemuRoss Burton2022-04-011-0/+7
| | | | | | | | | | | There may be environments or machines which don't have working runqemu, so tag all of the tests which use runqemu() so that they can be skipped. (From OE-Core rev: 3f45ce6d2b1dfde8bc3d554397d55f81846c52d5) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: add more arch-specific annotationsRoss Burton2022-04-011-4/+10
| | | | | | | | | | | | Some tests which are marked as x86-specific will actually work on aarch64 (e.g. use EFI), whilst some other tests really are x86-specific (e.g. use syslinux). (From OE-Core rev: 1285bdaa4f472519083c03946ee34c7d8c204e27) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: don't hardcode kernel image type in test_wic_rmRoss Burton2022-04-011-4/+6
| | | | | | | | | | Don't assume bzImage, resepct KERNEL_IMAGETYPE. (From OE-Core rev: f03d47833593734489e73f054f41c3dbbe423204) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: clean up only_for_arch decoratorRoss Burton2022-04-011-9/+5
| | | | | | | | | | | | There's no need to pass a recipe name when determining the target architecture, there's no need to cap the size of the lru_cache as it will only have one entry, and __name__ is set by @wraps. (From OE-Core rev: e8e6c679f6eb74cb25c124a18af88dd5c2e2c833) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: remove redundant assertsRoss Burton2022-04-011-12/+12
| | | | | | | | | | | By default bitbake() will raise an assertion if it fails, so there's no need to wrap it in a further assert. (From OE-Core rev: de3c8994dc482cf5e9f3317c4762fe4ac35d9f31) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: use os.rename instead of bb.utils.renameRoss Burton2022-04-011-3/+4
| | | | | | | | | | | bb.utils.rename() only exists to handle moves across filesystems. As these moves are within the same directory we can just use os.rename(). (From OE-Core rev: 450e09b6d4ca019848aec4c62fce280a09395b97) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: wic: Disable graphic of qemu to support WSLStefan Herbrechtsmeier2022-02-161-6/+8
| | | | | | | | | Disable graphic support of qemu to support qemu tests in WSL. (From OE-Core rev: 797af95eb272bd12eac193cdfe72ddffe8aa39ca) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: wic: Add rawcopy plugin unpack testStefan Herbrechtsmeier2022-02-161-3/+15
| | | | | | | (From OE-Core rev: 0e4a030948707ef74f9c977d2d02d9f92c119f7e) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: wic: Remove requirement of syslinux from test_rawcopy_pluginStefan Herbrechtsmeier2022-02-161-4/+2
| | | | | | | | | | | | Remove bootimg-pcbios from wks to eliminate requirement of syslinux from test_rawcopy_plugin to avoid the following error. ERROR: Couldn't find correct bootimg_dir, exiting (From OE-Core rev: 99e2321e049fa63b83f3daa076eeff7f6791986b) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/bootimg-efi: Add Unified Kernel Image optionKristian Klausen2021-10-041-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "A unified kernel image is a single EFI PE executable combining an EFI stub loader, a kernel image, an initramfs image, and the kernel command line. [...] Images of this type have the advantage that all metadata and payload that makes up the boot entry is monopolized in a single PE file that can be signed cryptographically as one for the purpose of EFI SecureBoot."[1] This commit adds a create-unified-kernel-image=true option to the bootimg-efi plugin for creating a Unified Kernel Image[1] and installing it into $BOOT/EFI/Linux/ with a .efi extension per the the Boot Loader Specification[1][2]. This is useful for implementing Secure Boot. systemd-boot is the only mainstream bootloader implementing the specification, but GRUB should be able to boot the EFI binary, this commit however doesn't implement the necessary changes to the GRUB config generation logic to boot the Unified Kernel Image. [1] https://systemd.io/BOOT_LOADER_SPECIFICATION/#type-2-efi-unified-kernel-images [2] https://systemd.io/BOOT_LOADER_SPECIFICATION/ (From OE-Core rev: b0573f240525df561ddef6e47cb285b217d38487) Signed-off-by: Kristian Klausen <kristian@klausen.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add extra-space argumentKristian Klausen2021-09-061-0/+11
| | | | | | | | | | | | | This allows extra space to be added after the last partition and is especially useful when free space is needed for ex: adding partitions on first boot with ex: systemd-repart[1] and the image is tested in QEMU. [1] https://www.freedesktop.org/software/systemd/man/systemd-repart.html (From OE-Core rev: f81b188bcf5aa18746fd622eb7b5c0dcb0b5c93d) Signed-off-by: Kristian Klausen <kristian@klausen.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: wic: Add tests for --no-fstab-updateDaniel Gomez2021-08-201-0/+58
| | | | | | | | | Add tests for the --no-fstab-update wic part command. (From OE-Core rev: 90141d41a370ff377d95fb3dd144b63a85e22f8e) Signed-off-by: Daniel Gomez <daniel@qtec.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Manual override fixesRichard Purdie2021-08-021-2/+2
| | | | | | | | | | The automated conversion of OE-Core to use the new override sytax isn't perfect. This patches some mis-converted lines and some lines which were missed by the automation. (From OE-Core rev: 4e9a06b64b43131b731fb59a0305f78a98e27fbd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert to new override syntaxRichard Purdie2021-08-021-7/+7
| | | | | | | | | | | | This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib/scripts: Use bb.utils.rename() instead of os.rename()Devendra Tewari2021-05-061-3/+3
| | | | | | | | | | | | | | | | | | Incremental build in Docker fails with: OSError: [Errno 18] Invalid cross-device link when source and destination are on different overlay filesystems. Rather than adding fallback code to every call site, use a new wrapper in bitbake which detects this case and falls back to shutil.move which is slower but will handtle the overlay docker filesystems correctly. [YOCTO #14301] (From OE-Core rev: 656a65b2b84e7d529b89cf5de7eb838f902d84a2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/wic: Fix dependency issue in rawcopy testRichard Purdie2021-03-201-7/+11
| | | | | | | | | | | | | The current test code contains a subtle race. It is building an ext4, then trying to reuse that image in a wic build for the same recipe. Whilst this happened to work, the code is within its rights to clean up the output before the wic code runs. Avoid this by using separate image targets instead. (From OE-Core rev: 590398080e81fb5e2f81e12b8900858837dfe25f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: debug mode to keep tmp directoryLee Chee Yang2021-02-091-0/+2
| | | | | | | | | | | | | | | files in wic tmp directory can be usefull for debugging, so do not remove tmp directory when wic create run with debugging mode (-D or --debug). also update wic.Wic.test_debug_short and wic.Wic.test_debug_long to check for tmp directory. [YOCTO#14216] (From OE-Core rev: a122e2418b67d38f691edcf8dd846c167d6b4fa9) Signed-off-by: Lee Chee Yang <Chee.Yang.Lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/selftest: test_permissions also test bitbake imageLee Chee Yang2021-02-051-0/+16
| | | | | | | | | | | | | existing test case test_permissions use Wic command as standalone tools to create wic image and check that wic image for permissions. add extra steps to the test case to also check against image build using bitbake do_image_wic. (From OE-Core rev: 551ce73a90757ba43501fe5cf9ac84a7b77de549) Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Introduce empty plugin to create unformatted empty partitionsDiego Sueiro2020-12-151-0/+20
| | | | | | | | | | | | | | | | | | The empty wic plugin is used to create unformatted empty partitions for wic images. To use it you must pass "empty" as argument for the "--source" parameter in the wks file. For example: part foo --source empty --ondisk sda --size="1024" --align 1024 Also adds a selftest for this plugin where the 'Fstype' column from 'wic ls' should be empty for the second partition as listed in test_empty_plugin.wks. (From OE-Core rev: 77d174fc80663403ef76c5b808aafc1117d3545c) Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/bootimg-efi: IMAGE_EFI_BOOT_FILES variable added to separate bootimg-efi ↵Khairul Rohaizzat Jamaluddin2020-09-151-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | and bootimg-partition Due to recent changes in bootimg-efi to include IMAGE_BOOT_FILES, when both bootimg-partition and bootimg-efi occur in a single .wks and IMAGE_BOOT_FILES are defined, files listed in IMAGE_BOOT_FILES will be duplicated in both partition. Since IMAGE_BOOT_FILES are crucial for bootimg-partition, but optional for bootimg-efi, hence allowing bootimg-efi to have the option to ignore it. The new variable, IMAGE_EFI_BOOT_FILES, was added to help handle this issue. Its basic usage is the same as IMAGE_BOOT_FILES. Usage example: ${IMGDEPLOYDIR}/${IMAGE_BASENAME}-${MACHINE}.ext4;rootfs.img \ This commit is also squashed with the updated testcase to cover for this change. [YOCTO #14011] (From OE-Core rev: 945339e06b273df1935cfd784f548ef57e0b7f4c) Signed-off-by: Khairul Rohaizzat Jamaluddin <khairul.rohaizzat.jamaluddin@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add 512 Byte alignment to --offsetJoshua Watt2020-08-221-0/+24
| | | | | | | | | | | | | Allows the --offset argument to use the "s" or "S" suffix to specify that it is reporting the number of 512 byte sectors. This is required for some SoCs where the mask ROM looks for an item at a sector that isn't aligned to a 1KB boundary. (From OE-Core rev: 938595d1dc4abaf5f7f3a7900add3f0492b805d0) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Fix --extra-space argument handlingJoshua Watt2020-06-121-0/+15
| | | | | | | | | | | 467f84e12b ("wic: Add --offset argument for partitions") broke the --extra-space argument handling in wic. Fix the option and add a unit test for the argument. (From OE-Core rev: 87722a92c18f94917c8f70afc8cd0763462a5c25) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add --offset argument for partitionsJoshua Watt2020-06-041-25/+93
| | | | | | | | | | | | | | | | | | | | Add support for an --offset argument when defining a partition. Many SoCs require that boot partitions be located at specific offsets. Prior to this argument, most WKS files were using the --align attribute to specify the location of these fixed partitions but this is not ideal because in the event that the partition couldn't be placed in the specified location, wic would move it to the next sector with that alignment, often preventing the device from booting. Unlike the --align argument, wic will fail if a partition cannot be placed at the exact offset specified with --offset. Changes in V2: * Fixed a small typo that prevented test_fixed_size_error from passing (From OE-Core rev: 467f84e12b96bc977d57575023517dd6f8ef7f29) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: wic: Add more tests for include_pathRicardo Ribalda Delgado2020-04-261-1/+62
| | | | | | | | | | | | Make sure permissions are respected. Add new test for orig/destination option. Cc: Paul Barker <pbarker@konsulko.com> (From OE-Core rev: 33785be3c7eb4d5684cded08f955412a0c008929) Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: wic: Add tests for permissions and change-directoryRicardo Ribalda Delgado2020-04-261-0/+90
| | | | | | | | | | | | | Make sure that the permissions and username are respected when using all the rootfs modifiers. Add tests for change-directory command Cc: Paul Barker <pbarker@konsulko.com> (From OE-Core rev: 4aad9531df44d1b0637bd559161702ad86861b46) Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: wic: Add APPEND to the optional variables listKevin Hao2020-02-151-1/+2
| | | | | | | | | | The APPEND is an optional variable, so add it to the optional variables list to make the wic selftest happy. (From OE-Core rev: 7c8b3a1b920fd4cc1598357985eef0e5e0e0ac79) Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add --include-path argumentPaul Barker2020-01-101-18/+55
| | | | | | | | | | | | | | | 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: 'wic cp' to copy from imageChee Yang Lee2019-11-271-0/+17
| | | | | | | | | | | | | | | | 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>
* selftest/wic: test wic rm with -r flagChee Yang Lee2019-11-211-0/+7
| | | | | | | | | | selftest to make sure wic rm with -r flag for ext partition could remove directory and all its content. (From OE-Core rev: d7ccbb393a71501424b7c0d4c1d78e4bac1ecccf) Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/wic: improve assert messages in test_fixed_sizeRoss Burton2019-09-161-2/+4
| | | | | | | (From OE-Core rev: ff4e6c71ac415de93b3abaa4e7f1727d72cd2971) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/lib/oeqa: Remove ext4 for bootimg-biosplusefiWilliam Bourque2019-07-261-10/+8
| | | | | | | | | | Remove "ext4" IMAGE_FSTYPES when generating core-image-minimal for the bootimg-biosplusefi unittests; "wic" type is enough. (From OE-Core rev: 73f69585e9f30819d8fb484d458e3408a04c0433) Signed-off-by: William Bourque <wbourque@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>