aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib
AgeCommit message (Collapse)Author
2017-09-04recipes-kernel: Skip kernel version check on kernel templatesLeonardo Sandoval
Currently, SRCREV is set to AUTOREV, causing mismatch between PV and the kernel version shown in the makefile (see below to see the bitbake log). The solution is to comment the lines which defaults SRCREV to AUTOREV, leaving the previous comment to replace the SRCREVs for real ones once kernel changes are done. ERROR: linux-yocto-4.8.12+gitAUTOINC+4fb6f24600_d4148a2064-r0.1 do_kernel_version_sanity_check: Package Version (4.8.12+gitAUTOINC +4fb6f24600_d4148a2064) does not match of kernel being built (4.8.21). Please update the PV variable to match the kernel source. ERROR: linux-yocto-4.8.12+gitAUTOINC+4fb6f24600_d4148a2064-r0.1 do_kernel_version_sanity_check: Function failed: do_kernel_version_sanity_check (log file is located at ../tmp/work/myqemu-poky-linux/linux-yocto/4.8.12+gitAUTOINC+4fb6f24600_d4148a2064-r0.1/temp/log.do_kernel_version_sanity_check.17509) [YOCTO #11064] (From meta-yocto rev: 51a42001c39d1b7c8170cc84904fa915295f1358) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez at linux.intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-29wic: fix calculation of partition numberEd Bartosh
Total number of partitions should be taken into account when calculating real partition number for msdos partition table. The number can be different for the 4th partition: it can be 4 if there are 4 partitions in the table and 5 if there are more than 4 partitions in the table. In the latter case number 4 is occupied by extended partition. [YOCTO #11790] (From OE-Core rev: a1d18c00b8c9ce800a5147eaa71372083b8ae91e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-29wic: partition: Run fsck on EXT file systemsDaniel Schultz
Mkfs may create EXT file systems which can only be optimized by fsck and not by itself, e.g. directory optimization (in Pass 3A). To prevent those optimizations during runtime, it will be performed after the creation of an EXT file system. (From OE-Core rev: b8af7c10637c14b2c226fb7063b736755ee46802) Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-14scripts/lib/bsp/kernel.py: force patching when branch is machine branch is ↵Leonardo Sandoval
re-use When a branch is re-used, the kernel tools turns off any patch pushing unless 'mark patching' is explicitly set. [YOCTO #10674] (From meta-yocto rev: 4f3cd59d76e3d8a43a4460528082c0086bdbba41) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-18wic: plugins: rawcopy: Fixed wrong variable typeDaniel Schultz
Without the int() function this variable will be a string. This will led to a error in Filemap on line 545 due wrong types. > [...] > File > ".../poky/scripts/lib/wic/filemap.py", line 545, in sparse_copy > if start < skip < end: > TypeError: unorderable types: int() < str() (From OE-Core rev: 5b9bcfef9086c19a4577d36729b7b339f959d5c4) Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 46b5814bcdc0e7e3cb293e877e2aa949baf5fef8) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-18wic: filemap: Fixed spared_copy skipDaniel Schultz
This patches removes the empty space in front of the copied file which was skipped. Without this reduction it's not possible to place a partition with rawcopy and skip parameter on a desired alignment. (From OE-Core rev: e29deac69ed29226b68001db2fcfb3ed24c0568a) Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 5c024d71f9413b81ee1707dbc41f0721f8f27bdb) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-11wic: Create a logical partition only when it is really mandatoryAlessio Igor Bogani
Don't worth bother with logical partition on MBR partition type (aka msdos) if disk image generated by wic should have 4 partitions. (From OE-Core rev: 36a558fbdc96094626e7de1a3510691e30885368) (From OE-Core rev: 98a3e096eaa6cfdf1532c7c03c57222ae8cd6533) Signed-off-by: Alessio Igor Bogani <alessio.bogani@elettra.eu> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-11recipetool: fix encoding-related errors creating python recipesPaul Eggleton
Yet another instance of us expecting a string back from subprocess when in Python 3 what you get back is bytes. Just decode the output within run_command() so we avoid this everywhere. (From OE-Core rev: 103faae78cdff5280c7b7cdb7ca01e0868d02ec9) (From OE-Core rev: f9e0267a64069fa2488ceb7ca1f6dbe5bfb66c18) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-11wic: fix function comment typosMaciej Borzecki
Fix typos in documentation of Image.add_partition() and Image.__format_disks(). (From OE-Core rev: f5bf7bf253224912c66bab89f48ff63a73e0d698) (From OE-Core rev: 44ce5b4bb0873d5a2dec25f2dc489a6ab8f7995e) Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-11wic: check that filesystem is specified for a rootfs partitionMaciej Borzecki
We explicitly check for --fstype if no source was provided for a partition. However, this was not the case for rootfs partitions. Make sure to raise an error if filesystem was left unspecified when preparing a rootfs partition image. (From OE-Core rev: b8c35fcad57810a87aa25ebeb533adf286eed565) (From OE-Core rev: dc4d1cfc4d6bd01432857448f66af5492cad7574) Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-11wic: make sure that partition size is always an integer in internal processingMaciej Borzecki
The size field of Partition class is expected to be an integer and ought to be set inside prepare_*() method. Make sure that this is always the case. (From OE-Core rev: a37838f995ae642b0b8bdd47a605a264fb3bf200) (From OE-Core rev: 4e869343952aef8748b40e538c14ad8b94221910) Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-11systemd-bootdisk.wks: use PARTUUIDEd Bartosh
Root device name in systemd-bootdisk.wks is 'sda'. This can cause images, produced using this wks to refuse booting if real device name is not 'sda'. For example, when booting MinnowBoard MAX from MicroSD card the boot process stucks with this message on the boot console output: Waiting for root device /dev/sda2... This happens because real device name of MicroSD card on this device is mmcblk1. Used --use-uuid option for root partition. This should make wic to put partiion UUID instead of device name into kernel command line. [YOCTO #10485] (From OE-Core rev: 5b73d5f484cc844affe91ec19d881d42e187f30c) (From OE-Core rev: 71a365d57359dd8d9bfce66985975b1533e983d7) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-25devtool: runqemu: work around runqemu script path assumptionPaul Eggleton
The new runqemu script assumes that if OECORE_NATIVE_SYSROOT is set then it shouldn't try to run bitbake to find out the values of various variables such as DEPLOY_DIR_IMAGE; this assumption is incorrect for the extensible SDK. To work around this, clear OECORE_NATIVE_SYSROOT in the environment when running runqemu. Fixes [YOCTO #10447]. (From OE-Core rev: abff69a48bf3076ce8e21356accdc8d85d2c8dbf) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-11canned-wks: use GPT partition tableEd Bartosh
According to UEFI specification all EFI platforms must support GUID Partition Table(GPT) disk layout. Here is a list of advantages of using GPT disk layout over the legacy MBR partitioning: - Logical Block Addresses (LBAs) are 64 bits (rather than 32 bits). - Supports many partitions (rather than just four primary partitions). - Provides both a primary and backup partition table for redundancy. - Uses version number and size fields for future expansion. - Uses CRC32 fields for improved data integrity. - Defines a GUID for uniquely identifying each partition. - Uses a GUID and attributes to define partition content type. - Each partition contains a 36 character human readable name. Used GPT partitioning in all EFI kickstart files. Tested result images on NUC, MinnowBoard MAX and MinnowBoard Turbot. (From OE-Core rev: 66d4efeb0face5fc8a1755dcd2ed3a611997a04d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-11systemd-bootdisk.wks: update kernel command lineEd Bartosh
Used ttyS0 console. Removed usage of ttyPCH0 (FRI2 leftover) Decreased bootloader timeout to 5 seconds Removed 'vmalloc=256MB snd-hda-intel.enable_msi=0' as it's not needed for any of reference BSPs. (From OE-Core rev: ee16a283d695112236906338887c6eba109c9fb5) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-09mkgummidisk.wks: update kernel command lineEd Bartosh
Used ttyS0 console. Removed usage of ttyPCH0 (FRI2 leftover) Decreased bootloader timeout to 5 seconds Removed 'vmalloc=256MB snd-hda-intel.enable_msi=0' as it's not needed for any of reference BSPs. (From OE-Core rev: 7b2443364a42c731bc9eefa6bb460262464e26b6) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-08machine.cfg: Unset CONFIG_64BIT for qemu i386 architectureLeonardo Sandoval
In modern kernels, ARCH=x86 defaults to 64 bits, so explicitly unset this word length for qemu i386 architectures. (From meta-yocto rev: 9750779bc78de3ea33d7f88e4972a5b21c3f811b) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-07mkefidisk.wks: update kernel command lineEd Bartosh
Used ttyS0 console. Removed usage of ttyPCH0 (FRI2 leftover) Decreased bootloader timeout to 5 seconds Removed 'vmalloc=256MB snd-hda-intel.enable_msi=0' as it's not needed for any of reference BSPs. (From OE-Core rev: b46825a6ce5cecd24fed814bae48f9cfd0b97568) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-07mkefidisk.wks: use MSDOS partition tableEd Bartosh
Stopped using GPT partition table in mkefidisk.wks as it's not supported by all reference hardware. (From OE-Core rev: 07bb11b097a67ff89ae633fa1992db5494d75c0c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-07wic: rewrite MBR disk identifierEd Bartosh
Disk identifier created by parted doesn't match the one we generated and used in bootloader config. We need to rewrite it to make our image bootable. Modified involved API and data structures to access previously generated disk identifiers after MBR is initialized. Written disk identifiers to MBR. (From OE-Core rev: 221d3bdd6e0ab8a4d25e2c96bd976cbec4e76681) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-07wic: generate PARTUUID for MDOS partitionsEd Bartosh
Added generation of partition UUIDs for MSDOS partitions. UUID for MSDOS partitions is <disk identifier>-<partition number>, where disk identifier is a random 4 bytes long number. It's usually generated when MBR/partition table is initialized. As UUID is used to point to the root partition in bootloader config we need to generate it before the MBR is initialized. After MBR is created we need to rewrite system identifier to match it with what is used in bootloader config. This will be implemented in the next commit. (From OE-Core rev: 6ecc6addf4080eda75a15af077816c81c6bf70a5) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-07wic: set PARTUUID only for gpt partition tableEd Bartosh
sgdisk fails to set PARTUUID for msdos partitions as it's only supported for GPT partitions. Checked partition table format to run sgdisk --partition-guid only for GPT partitions. (From OE-Core rev: 0c1804821917d6d3a062ca19b63667d030138f21) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-06devtool: modify command fails to ignore source filesStephano Cetola
With recent changes to recipeutils, the list of local files returned by get_recipe_local_files could possibly include source files. This only happens when the recipe contains a SRC_URI using subdir= to put files in the source tree. These files should be ignored when populating the list of local files for oe-local-files directory. [YOCTO #10326] introduced in OE-Core revision 9069fef5dad5a873c8a8f720f7bcbc7625556309 (From OE-Core rev: 31f1bbad248c36a8c86dde4ff57ce42efc664082) Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05yocto-bsp: linux-yocto recipes update (4.4 to 4.8) for x86-64 archLeonardo Sandoval
[YOCTO #10301] (From meta-yocto rev: 088662bd13fa7366cb471be4be746aa195defa3f) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05yocto-bsp: linux-yocto recipes update (4.4 to 4.8) for PowerPC archLeonardo Sandoval
[YOCTO #10301] (From meta-yocto rev: f9d795172ae18489eaf40af7d32f8402299b805c) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05yocto-bsp: linux-yocto recipes update (4.4 to 4.8) for qemu archLeonardo Sandoval
[YOCTO #10301] (From meta-yocto rev: b0e3518ffae3e72d7aad20860b3da79b70d74383) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05yocto-bsp: linux-yocto recipes update (4.4 to 4.8) for i386 archLeonardo Sandoval
[YOCTO #10301] (From meta-yocto rev: 0b58b90844c2898c604e7310c3fa5577044c0f08) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05yocto-bsp: linux-yocto recipes update (4.4 to 4.8) for MIPS64 archLeonardo Sandoval
[YOCTO #10301] (From meta-yocto rev: 586ff58a6a803539fd1cf6709dbcedf3ec88924e) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05machine.conf: Remove duplicate xserver choicesLeonardo Sandoval
All kernel choices today (linux-yocto_4.* and custom) have the same xserver options, so remove the duplicate lines. (From meta-yocto rev: c456b5cf172e5ee1fca078383cad189325ea05f5) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05yocto-bsp: linux-yocto recipes update (4.4 to 4.8) for MIPS archLeonardo Sandoval
[YOCTO #10301] (From meta-yocto rev: 01e16ff4d1df17daed184279868e151cbf35a1a8) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05yocto-bsp: linux-yocto recipes update (4.4 to 4.8) for arm archLeonardo Sandoval
[YOCTO #10301] (From meta-yocto rev: ad6e937db32721cfec8d4d85818d028878c5bc23) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05devtool: deploy-target: Avoid unnecessary dependency on awk on the targetPeter Kjellerstedt
Relying on that awk is installed on the target just to extract the fourth column (i.e., the free volume size) from `df -P` is an unnecessary dependency for devtool deploy-target. As it is already using sed to mangle the output from `df -P`, this can easily be modified to only extract the free volume size. (From OE-Core rev: 7bab454b0bf0075fbb2a5de06286a9da1df2adc6) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05devtool: add: build nodejs-native if npm is needed and not availablePaul Eggleton
If the user runs devtool add on an npm:// URL (or source tree that uses node.js), and npm is not available, just build nodejs-native instead of telling the user they need to do it; if that fails because there isn't any such recipe (which would be the default, since it's not in OE-Core) then produce a slightly more readable error message hinting at what the user needs to do. Note that this forces the use of nodejs-native rather than npm on the host - this makes sense for two reasons: (1) we need it to be compatible with nodejs for the target, and (2) we have to have a recipe for that anyway, so allowing you to avoid having a recipe for the native version isn't really beneficial. There's a bit of a hack in here in order to allow this - for node.js sources that aren't fetched via npm we don't know that they are that until we've fetched and unpacked them, by which time we're inside recipetool and have an active tinfoil instance that will prevent bitbake being run. To avoid this being an issue, we allow recipetool to get to the point where we know we need npm and then exit with a specific exit code, at which point devtool can try to build it and then if that succeeds, it will re-execute recipetool. This is definitely not ideal, but it can't really be refactored and done properly until we do the tinfoil2 refactoring; in the mean time though we still want to be helpful to the user. Fixes [YOCTO #10337]. (From OE-Core rev: f40662bde5aab158c4e4c3c3ff5e68665a4194a5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05devtool: add: display a warning for deprecated -f/--fetch optionPaul Eggleton
We want to remove the -f/--fetch option at some point (as you can now specify a URL as a positional argument instead) so display a warning that it's deprecated if it is used. (From OE-Core rev: 43476d77a91d50454ca26e016a3413b24e9f3aec) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05devtool: add: fix error message when only specifying a recipe namePaul Eggleton
We were supposed to be printing out the specified recipe name here but I forgot to specify a parameter for the string. (From OE-Core rev: 87f844e533adfc229a5d26857a82cc6b125216c8) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-01mkefidisk.wks: use partition UUID and GPT partition tableEd Bartosh
This is a preparation to use mkefidisk as a default wks for genericx86* BSPs. This change enables usage of partition UUID instead of device name to specify root partition in kernel command line. It should make images to boot on devices with boot device names that differ from what's mentioned in wks file. (From OE-Core rev: 23cca700870230b46d251086441136e99659ef12) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-01wic: rename and amend systemd-boot wks fileJianxun Zhang
Rename wks for systemd-boot per the suggestion from community. Also amend description to distinguish it from others when running "wic list images". (From OE-Core rev: 6303dbbaa08214a37caf38e3b6b5a30a108bd3b7) Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-28recipetool: newappend: drop _provide_to_pnChristopher Larson
This function was broken by the multi-config changes, and isn't needed anymore now that recipeutils.pn_to_recipe can handle provides. Without this, the newappend sub-command fails. (From OE-Core rev: 4a5028dc3d1ab2f97465e63db5b05de73daebdfa) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-24wic: remove partition imagesEd Bartosh
Preserving images for every partition doubles disk space consumed by an image build. As those images are not used, so it's better to remove them after assembling final image. (From OE-Core rev: 51171b4aa10f2218c5e27d785ca7bf4f3949a4b4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-22directdisk*.wks: add serial console supportEd Bartosh
Added serial console to kernel command line to to make it easier to boot wic images on devices without display. Tested on MinnowBoard MAX. (From OE-Core rev: 9a774e3bcd5dc4c85d642acc7bf26095b8c620e4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20devtool: add: drop superfluous validation for recipe namePaul Eggleton
Now that recipeutils.validate_pn() properly validates characters used in the name, we can drop this bit checking for '/' since that's not permitted by validate_pn(). (The FIXME comment here - that I myself apparently wrote - is questionable since that function was clearly never intended to allow '/', perhaps I was misled because it was broken and did so). (From OE-Core rev: e010d9be3709cf3c607ffc03c3188abe4e1e9eb4) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20recipetool: create: support git short form URLsPaul Eggleton
In keeping with making recipetool create / devtool add as easy to use as possible, users shouldn't have to know how to reformat git short form ssh URLs for consumption by BitBake's fetcher (for example user@git.example.com:repo.git should be expressed as git://user@git.example.com/repo.git;protocol=ssh ) - instead we should just take care of that automatically. Add some logic in the appropriate places to do that. (From OE-Core rev: 78c672a72f49c4b6cfd8c247efcc676b0ba1681a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20recipetool: create: tweak license crunchingPaul Eggleton
Filter out a plain "Licensed under the XXXX license" statement, as seen in the capnproto project (and no doubt others). (From OE-Core rev: ba4aa319fd49ee02ce2e30c2db0f3988c0e8833c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20recipetool: create: pick up AC_PROG_SWIGPaul Eggleton
AX_PKG_SWIG is not the only commonly-used macro for detecting swig - there's also AC_PROG_SWIG. As per AX_PKG_SWIG, add swig-native to DEPENDS if AC_PROG_SWIG is found in configure.ac. (From OE-Core rev: 847a1aa7153fc8a7b820353283a6f1e51d64f8de) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20recipetool: create: detect python autoconf macrosPaul Eggleton
If python is required then we need to inherit pythonnative (or python3native) otherwise do_configure will probably fail since it won't be able to find python. (From OE-Core rev: 63234cc45aee91b031657971f36997e1443f80ee) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20recipetool: create: fix error with git tree and no networkPaul Eggleton
When creating a recipe for an existing local git clone, we attempt to use the fetcher to determine if it supports the SRCREV variable. Unfortunately running this code does a network check to get the latest revision as a direct result of us using '${AUTOREV}' as a default value. If you don't have a network connection this will of course fail. Rather than have this block creating the recipe, catch the exception and just guess from the URL. Ultimately this should probably be fixed in the fetcher but for now this will at least resolve the issue on this end. (From OE-Core rev: f7e43f931d7d6019a3b2509b2b2635978fbbae36) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20recipetool: create: fix name/version extraction from filenamePaul Eggleton
I ran into an example where recipetool was getting the name/version completely wrong: https://bitbucket.org/sortsmill/libunicodenames/downloads/libunicodenames-1.1.0_beta1.tar.xz >From this it would create a libunicodenames-1.1.0-beta1_1.1.0-beta1.bb file (likely because it couldn't split the file name and therefore took all of it, then got the version from one of the files inside the tarball). When this happens it's just irritating because you then have to delete the recipe / run devtool reset and then run recipetool create / devtool add again and specify the version manually. This patch is the result of systematically running the determine_from_filename() function over the files on the Yocto Project source mirror and my local downloads directory and fixing as many of the generic issues as reasonably practical - it now gets the name and version correct much more often. There are still cases where it won't, but they are now in the minority. (From OE-Core rev: 7b018b1d493a8d10fd02b8cc220990b191c87fe5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20recipetool: create: improve python recipe license handlingPaul Eggleton
Try to ensure that for Apache, GPL and LGPL where the values extracted from the "Classifiers" field may not be version-specific, if there is a versioned license in the free-form license field then use that instead. Also insert the free-form license field as a comment in the recipe for the user's reference. (From OE-Core rev: 237f66042eedd906f654827b53bf9269738267ab) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20recipetool: create: fix picking up name from local python source treePaul Eggleton
Make use of the extravalues dict to send back other variable values from the python handling plugin, and enable passing back PV and PN. This not only places variable values in the final recipe a bit more consistently with other types of source, it also allows the name and version to be picked up fron a local source tree and not just when the recipe is fetched from a remote URL that happens to have those in it. (From OE-Core rev: 3e7029f28c6ea9bb1d283bcdc3fdfee11455af8e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-08recipetool: create: avoid extra blank lines in output recipePaul Eggleton
If we output extra blank lines (because of some automated editing) then it makes the output recipe look a bit untidy. You could argue that we should simply have the editing code not do that, but sometimes we don't have enough context there for that to be practical. It's simple enough to just filter out the extra blank lines when writing the file, so just do it that way. (From OE-Core rev: cbebc9a2edf7d7a422ee5c71219e79e3b349de3b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>