summaryrefslogtreecommitdiffstats
path: root/classes
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #440 from agners/mandate-usr-movePatrick Vacek2018-11-291-10/+2
|\ | | | | Use usrmerge
| * image_types_ostree: drop manual usrmove implementationStefan Agner2018-11-281-10/+0
| | | | | | | | | | | | | | | | | | OpenEmbedded's usrmerge implementation checks that nothing is installing in /bin, /sbin or /lib. Hence those directories are empty by default. There is no need for the manual usrmove anymore. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
| * image_types_ostree: make usrmerge mandatoryStefan Agner2018-11-281-0/+2
| | | | | | | | | | | | | | Make usrmerge a mandatory DISTRO feature when using the ostree class. This will allow to remove the "manual" usrmerge implementation. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* | aktualizr and image_types_ota: more curly braces.fix/more-curly-bracesPatrick Vacek2018-11-281-4/+4
|/ | | | | | | | Just trying to be careful and consistent. I didn't change every variable in places where it seemed like it was obvious that we were dealing with purely local variables. Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* image_types_ostree: use OSTree repo location for lockfilesStefan Agner2018-11-281-1/+1
| | | | | | | | | | | | | OSTree does not allow concurrent access to the repository. If two bitbake instances use the same OSTree repository, then they might access it simultanously. The lockfile to prevent such simultaneous access should really be in the same location where the OSTree repository is stored. Revert back to the location inside the OSTree repository. Fixes: e97975d6113c ("image_types_ostree/ota.bbclass: refactor ostree task") Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* Fix bloated OTA imagefixgbAnton Gerasimov2018-11-271-1/+1
| | | | | | Curly braces are necessary around bitbake variables Signed-off-by: Anton Gerasimov <anton.gerasimov@here.com>
* image_types_ota.bbclass: move a dependency inMing Liu2018-11-242-5/+2
| | | | | | | Move the dependency do_image_wic -> do_image_ota_ext4 from sota.bbclass to image_types_ota.bbclass, since it's a image specific dependency. Signed-off-by: Ming Liu <liu.ming50@gmail.com>
* image_types_ostree/ota.bbclass: refactor ostree taskMing Liu2018-11-244-84/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several flaws with ostree tasks, as follows: - ${IMAGE_NAME}.rootfs.ostree.tar.bz2 is generated, but it's not being used during ostree commit, so it should be removed if it's just a intermittent artifact. Or if we intend to deploy this tar.bz2 file, it should be tracked by sstate cache, that is to day, it should be generated in ${IMGDEPLOYDIR} rather than in ${DEPLOY_DIR_IMAGE}. - There are quite a few redundant code like mktemp/cd/rm a directory, which can be replaced by setting 'dirs', 'cleandirs' varflags. - There are some redundant variable check logic in image_types_ostree and image_types_ota bbclass. To fix the above, we make the following changes: - Introduce a new conversion image type 'tar', it could convert ostree and ota to ostree.tar, ota.tar, hence we can drop the code generating ostree.tar.bz2 in image_types_ostree.bbclass, and also drop the do_image_ota-tar task. To let this conversion type take effect, the otasetup task needs to be changed to ota. - Introduce BUILD_OSTREE_TARBALL variable, when being set to 1, a ostree.tar.bz2 tarball would be built, BUILD_OSTREE_TARBALL defaults to be 1, to be consistent with original behavior. - Replace 'ota-tar ota-tar.xz' with ota.tar.xz in IMAGE_FSTYPES. - Add a sanity check bbclass sota_sanity.bbclass, to ensure ostree or ota is not in OVERRIDES, this is to prevent potential naming pollution with other meta layers, and also check the required variables are not empty. This sota_sanity.bbclass is a common class that could be extended easily in furture, and one of its most advantages is that all the check are done in bb.event.SanityCheck event handler, so the end users could get the error message at very beginning of the recipe parsing time. Signed-off-by: Ming Liu <liu.ming50@gmail.com>
* meta: drop redundant export syntaxMing Liu2018-11-243-23/+11
| | | | | | | | | | | There are quite a few 'export' syntax, they are either not necessary or being redundant. Actually only the variables being referred in ostree or aktualizr need to be exported, we can move them into sota.bbclass so they can be exported once only for all other classes referring to them. And drop all other unnecessary exports. Signed-off-by: Ming Liu <liu.ming50@gmail.com>
* image_types_ostree.bbclass: fix some dependencies issuesMing Liu2018-11-241-5/+2
| | | | | | | | | | | | | | - unzip-native:do_populate_sysroot should be depended by do_image_garagesign task instead of by do_image_ostree task. - openssl-native:do_populate_sysroot can be removed since it's being depended by aktualizr-native already. - do_image_garagesign and do_image_garagecheck does not have to depend on aktualizr-native:do_populate_sysroot, that dependency is being added by do_image_ostreepush -> aktualizr-native:do_populate_sysroot. - drop ostreepush dependency from IMAGE_TYPEDEP_garagecheck, that is redundant. Signed-off-by: Ming Liu <liu.ming50@gmail.com>
* meta: replace bberror with bbfatalMing Liu2018-11-242-10/+6
| | | | | | | | | When calling bbfatal, it reports error message and exit 1, it should be used to replace of 'bberror && exit 1' to avoid being redundant. Also fixed some incorrect bberror usages and typos. Signed-off-by: Ming Liu <liu.ming50@gmail.com>
* Allow setup custom hardware_idfeat/hardware_idSerhiy Stetskovych2018-11-222-2/+3
| | | | Signed-off-by: Serhiy Stetskovych <patriotyk@gmail.com>
* Merge pull request #431 from albard00/masterPatrick Vacek2018-11-131-2/+2
|\ | | | | Fix function name conflict
| * Fix function name conflictAlexandre Bard2018-11-131-2/+2
| | | | | | | | | | | | | | | | | | buildinfo function name is used in poky: meta/classes/image-buildinfo.bbclass Both classes could not be used together Signed-off-by: Alexandre Bard <alexandre.bard@netmodule.com>
* | aktualizr: Fix virtual secondary support.Patrick Vacek2018-11-131-5/+0
|/ | | | | | | | Use /etc/sota/ecus as using /var/sota/ecus was conflicting with the provisioning recipes that also use /var/sota. Not totally ideal, but the best compromise I could find. Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* Merge pull request #421 from agners/master-toradexPatrick Vacek2018-11-021-1/+2
|\ | | | | classes: image_types_ostree: use locking during OSTree repo update
| * classes: image_types_ostree: use locking during OSTree repo updateStefan Agner2018-11-021-0/+1
| | | | | | | | | | | | | | | | The OSTree repository might be shared accross several individual OSTree builders. Use bitbakes lockfiles mechanism to lock the OSTree for exclusive use. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
| * classes: image_types_ostree: check OSTree repo existence using ostreeStefan Agner2018-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Currently we assume if the OSTree repo exists, that there is a OSTree repo in it. This does not need to be true in general, and when using lockfiles bitbake will create the directory before the do_image_ostree task is executed the first time. Use ostree refs to detect whether the target directory contains a OSTree repo. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* | Document version overriding and add warningsAnton Gerasimov2018-10-302-2/+3
| |
* | Provide example for setting UPTANE target version automaticallyAnton Gerasimov2018-10-303-1/+16
|/
* Merge pull request #410 from agners/use-imgdeploydirOYTIS2018-10-251-12/+3
|\ | | | | Use IMGDEPLOYDIR
| * image_types_ota: use IMGDEPLOYDIR for ota-ext4 imagesStefan Agner2018-10-181-6/+2
| | | | | | | | | | | | | | | | | | | | | | Do not write directly to the IMAGE_DEPLOY_DIR but to the new deploy directory IMGDEPLOYDIR. Also change the image ending to match the image type name (from otaimg to ota-ext4). This allows to use the automatic symlinking and output artefact management too. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
| * image_types_ota: use IMGDEPLOYDIR for ota-tar imagesStefan Agner2018-10-181-6/+1
| | | | | | | | | | | | | | | | Do not write directly to the IMAGE_DEPLOY_DIR but to the new deploy directory IMGDEPLOYDIR. This allows to use the automatic symlinking too. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* | Merge pull request #407 from LukaPivk/masterlbonn2018-10-251-1/+10
|\ \ | |/ |/| Extend ostree support
| * Added support to automatically update ostree summaryLuka Pivk2018-10-241-1/+6
| | | | | | | | | | | | | | Use OSTREE_UPDATE_SUMMARY to automatically update summary after committing to ostree repo Signed-off-by: Luka Pivk <luka.pivk@toradex.com>
| * Added support to set custom commit subject and bodyLuka Pivk2018-10-241-2/+6
| | | | | | | | | | | | | | Use OSTREE_COMMIT_BODY write custom text to ostree body Use OSTREE_COMMIT_SUBJECT to write custom subject Signed-off-by: Luka Pivk <luka.pivk@toradex.com>
* | image_types_ota: simplify image creationStefan Agner2018-10-121-28/+15
| | | | | | | | | | | | | | | | Almost all code in create_ota is either tar or ext4 specific. Move the code directly into the respective IMAGE_CMD_ functions. This gets rid of unnecessary work for the tar image and simplifies code. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* | image_types_ota: remove explicit IMAGE_FSTYPES checkStefan Agner2018-10-121-9/+2
|/ | | | | | | OpenEmbedded makes sure that IMAGE_CMD_type gets only called if the type is in IMAGE_FSTYPE. There is no need to explicitly check for it. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* Add SOTA_DEPLOY_CREDENTIALS variable to control whether the built image ↵Anton Gerasimov2018-10-011-0/+2
| | | | should be provisioned
* Add support for rollback on Raspberry PiAnton Gerasimov2018-09-181-0/+2
|
* Update `installed_versions` passing to new locationLaurent Bonnans2018-09-181-2/+3
|
* Don't commit credentials to OSTree repositorybugfix/OTA-852/pushcredentialsAnton Gerasimov2018-09-122-3/+11
|
* Update fitimage initramfs image namefix/OTA-638/rpi-masterLaurent Bonnans2018-09-041-1/+1
| | | | | | From poky master This fixes image builds but does not boot yet...
* Add back dependency on INITRAMFS_IMAGE:do_image_completefit-initramfs-supportPhil Wise2018-08-141-0/+1
| | | | | | | Without this the build fails because the initramfs hasn't been build before do_image_ostree. There should be a dependency through virtual/kernel:do_deploy, but there is clearly some reason why this isn't enough.
* classes: image_types_ostree: Fix copying standalone initramfsYevgeny Popovych2018-08-141-1/+1
| | | | Signed-off-by: Yevgeny Popovych <yevgenyp@pointgrab.com>
* ostree-initrd: Make it an initramfs, not initrdYevgeny Popovych2018-08-143-2/+3
| | | | | | | | | | | | | | | | | | | The reasoning here is to allow initramfs generated by this recipe to be included in FIT. To do so w/o changing openembedded-core (it allows only cpio format) - init script should be able to execute from a rootfs (i.e. true initramfs), not ramdisk (initrd). See [1] for more information on these keywords. The gist of this change is switch from `pivot_root` to `switch_root`. This also allows to get rid of some clutter, since `switch_root` handles transition to new sysroot all by itself. Again, see [1] for details on these utility/syscall. [1] https://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt Signed-off-by: Yevgeny Popovych <yevgenyp@pointgrab.com>
* classes: image_types_ostree: A hack to allow initramfs in FITYevgeny Popovych2018-08-141-1/+8
| | | | | | | | | | | | | | | | | | | | | The issue is that when only vmlinuz-* file is present (the case when both DTB and initramfs are in FIT), libostree will assume that there is no initramfs at all and will supply different init= parameter on the kernel command line (aimed to boot directly from sysroot). This effectively breaks boot process as init specified on the kernel cmdline is not present in initramfs. Solution is to basically create an empty initramfs-* file when we use FIT. The proper solution would be to make libostree aware of whether we use FIT or not. Note, to actually boot with initramfs in FIT - a change to u-boot script (env) is needed which will remove explicit usage of initramfs. Signed-off-by: Yevgeny Popovych <yevgenyp@pointgrab.com>
* classes, images: Use standard variables for initramfsYevgeny Popovych2018-08-144-7/+6
| | | | | | | | This will reduce the level of indirection and improve compatibility with the rest of OE. For example, FIT that includes initramfs may now be built. Signed-off-by: Yevgeny Popovych <yevgenyp@pointgrab.com>
* Add support for building ota-tar.xz, and fixes from review commentsBen Clouser2018-07-102-8/+7
|
* Adding support for creating an otaimg.tar file in addition to the ext4 imageBen Clouser2018-06-292-78/+121
|
* Merge pull request #338 from rsalveti/ostree-imagecajun-rat2018-06-271-6/+0
|\ | | | | image_types_ostree: no need to create boot/loader folders when creating ostree repo
| * image_types_ostree: no need to create boot/loader folders when creating ↵Ricardo Salveti2018-06-121-6/+0
| | | | | | | | | | | | | | | | | | ostree repo The boot/loader folders are only required at the deploy stage, which is already created by image_types_ota.bbclass. Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>
* | sota.bbclass: remove obsolete/incorrect comment.Patrick Vacek2018-06-191-1/+0
| |
* | garage-push: enable verbose logging by defaultRicardo Salveti2018-06-121-1/+1
|/ | | | | | | Make garage-push logs more useful in case of errors when pushing to the OTA+ server. Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>
* Include fix for qemu in sota_qemux86-64.bbclassLaurent Bonnans2018-05-231-0/+3
|
* Remove support for u-boot on minnowboardLaurent Bonnans2018-05-181-8/+0
| | | | See https://github.com/advancedtelematic/meta-updater-minnowboard/pull/6
* Fix boot on qemux86-64Laurent Bonnans2018-05-162-1/+2
| | | | It needs a plain compressed file system and not an u-boot legacy image
* Check for custom target version for installed_versionsRicardo Salveti2018-05-161-1/+5
| | | | | | | Make sure to use the custom target version when creating installed_versions if defined by the user. Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>
* image_types_ota: make default grub.cfg a link to loader/grub.cfgRicardo Salveti2018-05-161-1/+1
| | | | | | | /boot/grub2/grub.cfg should reflect the grub.cfg used by the boot process instead of being an empty file. Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>
* Replace INITRAMFS_FSTYPES with OSTREE_INITRAMFS_FSTYPESRicardo Salveti2018-05-162-2/+2
| | | | | | | | | | User is able to customize the init script via OSTREE_INITRAMFS_IMAGE but there is no way to set INITRAMFS_FSTYPES as it gets defined by sota.bbclass. Create a new variable called OSTREE_INITRAMFS_IMAGE to handle the INITRAMFS_FSTYPES update, and also allow the user to override it. Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>