aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2018-10-10wic: Support for changing the imager.Davis, Michael
Signed-off-by: Michael Davis <michael.davis@essvote.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-04qemux86-directdisk: remove mem= parameterAnuj Mittal
Remove usage of a specific amount of memory and let it be controlled by users. This was the default behaviour before it was changed by commit 3b79d9a78 that switched the wks file to be used for qemux86. Also fixes the bitbake parsing issues seen because of memory starvation using build appliance images. Fixes [YOCTO #12894] Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-10-03scripts/yocto-check-layer: Don't abort when layer fails to get signaturesAníbal Limón
When execute in multiple layers like meta-openembedded the execution is aborted when some sublayer fails to get world signatures, so mark it as an error and continue the execution in the remaining sublayers. Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-25checklayer: avoid recursive loop in add_layer_dependenciesNicolas Dechesne
When Layer A and Layer B depend on each other, then we will end up in a recursive loop in function recurse_dependencies(). To avoid such situation before making the recursive function call we check whether or not we have already processed this layer. e.g. without this patch, running this script on layers with dependency loops, we are seeing: $ yocto-check-layer -d /srv/work/oe/meta-openembedded/ INFO: Detected layers: INFO: meta-python: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-python INFO: meta-filesystems: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-filesystems INFO: meta-gnome: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-gnome INFO: meta-xfce: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-xfce INFO: meta-networking: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-networking INFO: meta-initramfs: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-initramfs INFO: meta-oe: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-oe INFO: meta-multimedia: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-multimedia INFO: meta-perl: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-perl INFO: meta-webserver: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-webserver INFO: INFO: Setting up for meta-python(LayerType.SOFTWARE), /srv/work/oe/meta-openembedded/meta-python DEBUG: Processing dependencies core openembedded-layer for layer meta-python. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. ... ... ... [keep repeating] This patch fixes this situation. Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-25runqemu: fix handling of SIGTERM and the problem of line wrappingChen Qi
The current handling of SIGTERM is incorrect as the process pid returned by Popen call with shell setting to True is actualy the shell instead of the qemu process. So use shlex to split cmd so that we can avoid using shell=True. This ensures the child process is the actual qemu process. Also, as we install a SIGTERM handler, we need handle the situation of qemu terminated by SIGTERM, otherwise we will get ERROR message in such case. Besides, we have a problem that after running qemu, the terminal's behavior is incorrect regarding long lines or long commands. Long commands or long outputs should appear in multiple lines, but they appear in the same line, overriding previous output. Use `tput smam' to fix this problem. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-25scripts/autobuilder-worker-prereq-tests: Add to todo listRichard Purdie
Note further tests needed after encountering issues. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-19isoimage-isohybrid: don't include cpio in cpio imageIoan-Adrian Ratiu
Because the find | cpio processes execute in parallel connected via the pipe, and the cpio outputs in the same dir find searches for source files, the cpio will be included in itself partially, depending on how fast the build machine creates the cpio file before cpio gobbles it up. This bloats the ISO image, though compression reduces the .iso file size, once the kernel decompresses the cpio image and boots it live, it uses up to double the RAM memory. Fix this by creating the initrd.cpio file directly inside cr_workdir. Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-12wic: Introduce the --use-label partition parameterKevin Hao
We can use this parameter to make the wic use the label to name a partition in /etc/fstab. Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-12update_gtk_immodules_cache: update for multilibKai Kang
Postinstall script update_gtk_immodules_cache calls ${bindir}/gtk-query-immodules-${version}. When multilib is enabled, both packages foo and lib32-foo call ${bindir}/gtk-query-immodules-${version} and one of them will fail to run obviously. Duplicate install files gtk-query-immodules-${version} to ${libexecdir} with ${MLPREFIX}. And update update_gtk_immodules_cache calls proper binary. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-12update_font_cache: update script for multilibKai Kang
Packages which inherit fontcache.bbclass call postinstall script update_font_cache. And in update_font_cache, it calls ${bindir}/fc-cache by qemuwrapper. When multilib is enabled, both packages foo and lib32-foo will call ${bindir}/fc-cache and one of them will fail to run obviously. Duplicate install file fc-cache to ${libexecdir} with ${MLPREFIX} and call proper fc-cache in update_font_cache. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-11wic: squashfs does support partition uuid.Emmanuel Roullit
wic allows the user to create disk image and reference each created partitions via its partition UUID. squashfs does not support filesystem UUID but it does offer support for partition UUID. $ lsblk -o NAME,FSTYPE,UUID,PARTUUID NAME FSTYPE UUID PARTUUID sda |-sda1 vfat 6078-ACD0 95aa4ffb-741d-4d99-adf6-0358bc890046 |-sda2 squashfs 7d46da2d-29cc-4d5a-9e39-d0381c4abb0c |-sda3 squashfs d4a3e24e-410a-4f2c-8ad5-8f8321de177b |-sda4 ext4 d72ec529-78e4-4cd3-b39b-781b6b1cb47c f3edc990-f4f6-4536-9587-44dae4ceb99f `-sda5 ext4 a0b265aa-e935-40b8-9c6b-e9e58ad3890f 6e72ebaa-29ed-41cd-844c-3f76976cf41d Modifying this constrain allows a user to create squashfs-based rootfs and boot from them with such kernel argument 'root=PARTUUID=7d46da2d-29cc-4d5a-9e39-d0381c4abb0c' Fixes: 2fbdcf4e59c8 ("wic: kparser.py: Check for SquashFS and use-uuid") Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-09-06build.py: add clean option to 'devtool build' commandChen Qi
Add -c (--clean) optiont to 'devtool build' command so that users could easily clean things up when using devtool. I encountered a problem about do_prepare_recipe_sysroot failure when using `devtool build' command and I found myself in a situation where I either have to use `bitbake' command to clean things up or use `rm' to remove the directories under ${WORKDIR}. So add a clean option as it would be helpful when users want to clean things up to prepare an environment for a clean build. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-05scripts/autobuilder-worker-prereq-tests: Extend todo listRichard Purdie
Add a couple of missing items to the TODO list that this script needs to handle. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-05oe-pkgdata-util: add option for lookup-recipe to not fatally failRoss Burton
It is often useful to run lookup-recipe on a list of packages and get notifications that there were failures, instead of a fatal error on the first failure. This makes it possible to pass long lists of packages to oe-pkgdata-util and process the output. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-29isoimage-isohybrid: Fix variable namesAlexandru Vasiu
initrd.cpio is created in initrd_dir, not in cr_workdir. Gzip will let initrd.cpio uncompressed if the path is not found. Also, grub_image variable doesn't exist, grub_src_image should be used instead. Signed-off-by: Alexandru Vasiu <alexandru.vasiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-29isoimage-isohybrid: Fix creating initrd.cpioAlexandru Vasiu
Only bsdcpio works with numbers for option -R to specify user:group, while GNU cpio doesn't. Debian use GNU cpio so without this change, you cannot create ISO images without installing bsdcpio. Signed-off-by: Alexandru Vasiu <alexandru.vasiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-24scripts: Add autobuilder worker test scriptRichard Purdie
Add a script which can be run on new autobuilder workers to check all needed configuration is present. Designed to be run in a repo where bitbake/oe-core are already present. This means when we add new autobuilder workers, we can quickly test whether all the needed funcationality to support the standard yocto project autobuilder (ie. the standard OE-Core tests) are present. It uses images prebuilt in a previous release to cut build/testing time. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-23oe-run-native: Add *-native directories under STAGING_BINDIR_NATIVE to PATH ↵Jagadeesh Krishnanjanappa
environment It helps to find/use native tools under ${STAGING_BINDIR_NATIVE}/*-native. Solving below error: $ oe-run-native python3-native python3 Running bitbake -e python3-native Error: Unable to find 'python3' in .../tmp/work/x86_64-linux/python3-native/3.5.5-r1.0/recipe-sysroot-native/usr/bin:.../tmp/work/x86_64-linux/python3-native/3.5.5-r1.0/recipe-sysroot-native/bin:.../tmp/work/x86_64-linux/python3-native/3.5.5-r1.0/recipe-sysroot-native/usr/sbin:.../tmp/work/x86_64-linux/python3-native/3.5.5-r1.0/recipe-sysroot-native/sbin Error: Have you run 'bitbake python3-native -caddto_recipe_sysroot'? -- snip -- After this change we have native python3 to be found: $ oe-run-native python3-native python3 Running bitbake -e python3-native Python 3.5.5 (default, Aug 8 2018, 17:45:49) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> -- snip -- [YOCTO #12889] Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-21wic: bootimg-partition: Select a preferred type if multi kernel images are ↵Kevin Hao
installed Automatically select one kernel type image based on a predefined precedence list if there are multi kernel images installed. Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-21wic: bootimg-partition: Add support to specify a custom extlinux.confKevin Hao
Add support to specify a custom extlinux.conf via something like: bootloader --configfile="extlinux.conf" Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15wic: bootimg-partition: Add support to create the u-boot boot config fileKevin Hao
By leveraging the distro boot command feature in the u-boot, we can compose the corresponding extlinux.conf when creating the wic image, and let u-boot boot the kernel automatically. For more detail about the u-boot distro boot command feature, please see doc/README.distro in u-boot source files. Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15wic: bootimg-partition: Add do_configure_partition() methodKevin Hao
We want to add some u-boot specific config file. Before doing this, we need know what files will be installed into this partition. So move the codes about parsing the IMAGE_BOOT_FILES into do_configure_partition(). No function change. Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15wic: bootimg-partition: Use the relative path in the install_taskKevin Hao
Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15wic: Remove the unused variable Partition.sourceparams_dictKevin Hao
We choose to pass the source parameters to the source plugins' hooks via a local variable srcparams_dict. So the Partition.sourceparams_dict is not used by anyone and seems pretty confused. So drop it. Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15runqemu: exit gracefully with an error message if qemu system is not evaluatedJagadeesh Krishnanjanappa
It solves below error: -- snip -- return 'qemu-system-%s' % qbsys UnboundLocalError: local variable 'qbsys' referenced before assignment -- snip -- [YOCTO #12846] Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14devtool: Use ConfigParser instead of SafeConfigParserKhem Raj
The SafeConfigParser class has been renamed to ConfigParser in Python 3.2+ see http://bugs.python.org/issue10627 This alias will be removed in future versions.So we can use ConfigParser directly instead. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14multilib_header: recognize BPF as a targetDaniel Díaz
When building with `clang -target bpf` using the multilib_header, a recursion was unavoidable because bits/wordsize.h would #include itself, still lacking a definition for __MHWORDSIZE or __WORDSIZE. Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-02wic/qemux86: don't pass ip parameter to kernel in wksAnuj Mittal
Images that rely on dhcp being used won't have network setup properly otherwise. Fixes [YOCTO #12804] Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-26wic/engine: improve error reporting when using rm with wicAnuj Mittal
When trying to delete something from an ext partition using debugfs, we don't show any error to the user when that operation fails. Change this behavior to show the error generated by debugfs. Also, fallback to use rmdir in case we are trying to delete a directory. However, unlike mdeltree that is used for a FAT partition, there's no easy way to delete a non empty directory. Show an error instead when that happens so user can take appropriate action. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-26logging: use warning instead warnChen Qi
The warn method is deprecated. We should use the documented warning instead. Quoting from the python's official doc: """ Note: There is an obsolete method warn which is functionally identical to warning. As warn is deprecated, please do not use it - use warning instead. """ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-25Revert "relocate_sdk.py: remove hardcoded SDK path"Richard Purdie
This reverts commit 6671a4d980c8bef8f402780a308f6c43a25044aa. This breaks uninative tarball since the call of relocate_sdk.py from uninative.bbclass wasn't updated to account for this change. It isn't clear what value that code could pass in and this isn't simple to fix so revert until a better fix can be found that doesn't break uninative. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24scripts/contrib/mkefidisk.sh: RemoveRichard Purdie
This has been printing a deprecation warning for a while, now remove it in favour of wic's efi functionality. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24relocate_sdk.py: remove hardcoded SDK pathRuslan Bilovol
This patch removes hardcodes added to relocate_sdk.py during SDK build, making it flexible and reusable. Now default SDK path is passed to the script as parameter rather then harcoded inside it. This allows to reuse this script for multiple relocations, and adds possibility to relocate SDK multiple times Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24oe-find-native-sysroot: drop message if pseudo is not foundPaul Eggleton
pseudo won't always be in the native sysroot for a recipe, so we shouldn't be complaining if it isn't there. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24oe-run-native: ensure arguments get quotedPaul Eggleton
If you pass quoted arguments to oe-run-native, they need to be passed as-is to the underlying tool. Putting quotes around $@ ensures each argument is quoted individually. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-18wic/engine: use up all free space when expanding partitionsAnuj Mittal
Currently we just divide up the free space by the number of partitions that need to be re-sized. This leads to problems when a user has explicitly specified a subset of partitions (but not all) that need to re-sized along with the sizes. As an example, for an image with 3 partitions, if we use: wic write image.wic /dev/sdb --expand 1:10G This would lead to paritions 2 and 3 each being re-sized to one thirds of the free space instead of half. Change the behavior to use up all the free space. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-18wic/engine: fix errors when expanding partitionsAnuj Mittal
The UEFI spec implies that GPT partitions should be assumed to be on a 2048 sector boundary (for a 512 byte sector) and the current logic just divides the free sectors available by the number of partitions that need re-sizing, which may or may not align and the final result might overshoot the limits imposed after alignment. Since we are expanding already aligned partitions, just divide up the free space in multiples of 2048. Also use the exec_cmd wrapper instead of the subprocess call directly. Fixes [YOCTO #12840] Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-10scripts/runqemu: fix qemumips qemumips64 memory detection kernel panicHe Zhe
$ runqemu qemumips64 core-image-minimal nographic qemuparams="-m 512" ... [ 0.000000] Call Trace: [ 0.000000] [<ffffffff801268c0>] clear_page+0x0/0x128 [ 0.000000] [<ffffffff80238158>] get_page_from_freelist+0xab8/0xc00 [ 0.000000] [<ffffffff80238964>] __alloc_pages_nodemask+0xdc/0xf68 [ 0.000000] [<ffffffff80239808>] __get_free_pages+0x18/0x70 [ 0.000000] [<ffffffff80122a4c>] setup_zero_pages+0x1c/0xb8 [ 0.000000] [<ffffffff80c7c998>] mem_init+0x54/0xa0 [ 0.000000] [<ffffffff80c74904>] start_kernel+0x204/0x4d8 [ 0.000000] [<ffffffff8091dfb0>] kernel_entry+0x0/0x40 [ 0.000000] Code: 02002025 1000f8d9 8e634d7c <34860f80> cc9e0000 cc9e0020 cc9e0040 cc9e0060 cc9e0080 [ 0.000000] [ 0.000000] ---[ end trace 0000000000000000 ]--- [ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task! [ 0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ... OE uses qemumips to simulate a Malta board by default. As upstream qemu introduced: https://git.qemu.org/?p=qemu.git;a=commit;h=94c2b6aff43cdfcfdfb552773a6b6b973a72ef0b The Malta board can support up to 2GiB of RAM which should be able to boot a Linux kernel built with CONFIG_HIGHMEM enabled and passing "-m 2048" to QEMU and appending the following kernel parameters: ... mem=256M@0x0 mem=256M@0x90000000 mem=1536M@0x20000000 ... But the following commit in kernel broke above mem=X@Y setting which added the memory as reserved memory area. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=73fbc1eba7ffa3bf0ad12486232a8a1edb4e4411 ... commit 73fbc1eba7ffa3bf0ad12486232a8a1edb4e4411 Author: Marcin Nowakowski <marcin.nowakowski@imgtec.com> Date: Wed Nov 23 14:43:49 2016 +0100 MIPS: fix mem=X@Y commandline processing ... So remove `mem=*' to disable user-defined physical RAM map which let kernel itself caculates memory ranges. Author: Hongxu Jia <hongxu.jia@windriver.com> [ Merge the two fixes for qemumips32 and qemumips64 into one patch, and make it support all mips cases ] Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-04send-error-report: Fix test for name > 50 charsRichard Purdie
A name > 50 chars causes a 500 internal server error and should be warned to the user but the code to do so currently doesn't work. Fix the logic. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-04send-error-report: Fix dubious error reportingRichard Purdie
Currently this code prints things like: ERROR: OK which is unhelpful at best. After this change it would print: ERROR: HTTP Error 500 which at least gives us something to work on. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-03recipetool: add 'edit' subcommandChristopher Larson
This edits the recipe and any bbappends for the specified target. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-06-28wic: isoimage-isohybrid: debloat image of redundant rootfsIoan-Adrian Ratiu
There's no reason to have that rootfs.img filesystem in the image: it's not used for anything because both the EFI and legacy boot paths use the /initrd which contains the same contents as the rootfs.img, only compressed. It was probably forgotten in there :) My iso went down from 224 to 94 mb. Tested using UEFI/legacy boots on CD-roms, usb dongle and qemu VM's. Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-28wic: isoimage-isohybrid: fix UEFI spec breakageIoan-Adrian Ratiu
It's really good that OE supports multiple EFI_PROVIDERs and that commit 9a1709278de87 ("wic: isoimage-isohybrid: use grub-efi from deploy dir") makes re-use of the grub-efi built image, but we should still respect the standard otherwise the ISO will not boot, so install grub images as boot[x64|ia32].efi not ${PN}-boot[x64|ia32].efi. Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-27oe.scriptutils.run_editor: ditch the error-prone argument quotingChristopher Larson
Rather than trying to construct a string by quoting the files in an error-prone way, parse $EDITOR to pass a list to subprocess rather than a string. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18runqemu-ifdown: ensure to clean up TAPChen Qi
In runqemu-ifup, ip command is used to add TAP; in runqemu-ifdown, we should do the reversed logic, using ip command to delete TAP, to make sure TAP is cleaned up by ourselves. I can see that in runqemu-ifdown script, 'tunctl -d' and 'iptables' commands are used to deal with TAP, but these two commands cannot make sure that the TAP is cleaned up. runqemu-ifup uses 'ip' to set up TAP, we really need to do the opposite in runqemu-ifdown. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18runqemu: add SIGTERM handler to make sure things are cleaned upChen Qi
Add SIGTERM handler so that runqemu could clean things up correctly when receving such signal. This problem was originally observed when running testimage. On some hosts, after running testimage task, the user has to manually operate on the tap interface (e.g. `sudo ip link del tap0') in order for the next runqemu command to launch successfully. The problem is about runqemu, SIGTERM and network manager on the host. In testimage task, the runqemu process will receive SIGTERM. In such situation, its cleanup() function is not run, resulting in tap interface not cleaned up. On some hosts, the network manager will bring down the tap interface automatically, thus this problem. I saw this problem on Fedora21. I think we'd better just clean up the tap interface ourselves. So this patch adds to runqemu a SIGTERM handler, in which the actual qemu process is terminated and other things cleaned up. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18qemuwrapper-cross: enable multilib and nativesdk variants of the scriptAlexander Kanavin
Previously only one global variant of the script was created, which caused numerous issues: 1) multilib was not properly supported due to multilib variants each needing their own version of the qemu binary and library paths to be set 2) nativesdk was not properly supported for the same reason This patch also moves setting LD_LIBRARY_PATH directly into the recipe, as passing it down from other recipes did not work when said recipes were allarch, and adjusts calls to qemuwrapper from postinst-intercepts, so that its correct variant is selected. Also, the various qemu fallbacks in qemuwrapper script are all removed, as they are no longer necessary. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18gtk-immodules-cache.bbclass: convert cache creation to postinst_intercept ↵Alexander Kanavin
mechanism This has the following benefits: - consistent with how the other caches are created into target rootfs - only runs once per package manager transaction, instead of once per every immodule package - correctly postpones to first boot if qemu is not working; from postinst itself this would've required special arrangements to avoid what is now a do_rootfs failure. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18runqemu-extract-sdk: fix whitespace errorsDennis Menschel
Indentation using a mix of whitespaces and tabs has been unified in favor of tabs. Signed-off-by: Dennis Menschel <menschel-d@posteo.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18runqemu-extract-sdk: support tar.xz formatDennis Menschel
As the format "tar.xz" is included in the IMAGE_TYPES bitbake variable as defined in meta/classes/image_types.bbclass, it should also be possible to extract a rootfs that has been built using that format. Signed-off-by: Dennis Menschel <menschel-d@posteo.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>