summaryrefslogtreecommitdiffstats
path: root/classes
Commit message (Collapse)AuthorAgeFilesLines
* Update garage-push invocation for new clirls/2020.7Laurent Bonnans2020-05-291-1/+1
| | | | Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* image_types_ostree: allow to add layer specific OSTree commit argumentsStefan Agner2020-05-261-1/+2
| | | | | | | | | | The OSTree commit command allows to add metadata to the commit. This might be customized in a distro layer for distribution specific needs. Allow to pass extra arguments using EXTRA_OSTREE_COMMIT variable (using a variable named similar to EXTRA_OEMAKE used to pass extra make arguments). Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* Merge pull request #716 from agners/master-ostree-fix-deployment-refPatrick Vacek2020-05-122-14/+18
|\ | | | | Use checksum as deployment source and refspec in the deployment
| * image_types_ota: use named referenceStefan Agner2020-05-071-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use named reference when deploying the device tree. This makes sure that this reference will end up in the deployments .origin file, which will be visible by the user in ostree admin status. This reference will also be used when running ostree admin upgrade. This is not really required when using aktualizr, but can be useful during test/debugging when using pure OSTree updates. Make sure to make ${OSTREE_REPO} accessible via http and add a remote on the device called ${OSTREE_OSNAME} pointing to the http exposed archive OSTree. With that ostree admin upgrade should work. Note: We could use the name reference in ostree pull-local already, but this is potentially racy if multiple builds are committing to the same branch. Use the OSTree commit hash to get the actual commit and recreate a local reference to this commit. This makes absolutely sure that we use the same OSTree commit this bitbake execution committed during the do_image_ostreecommit task. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
| * image_types_ostree/ota: use hash from ostree commitStefan Agner2020-05-072-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relying on a OSTree branch reference has been problematic in the past and addressed by adding more attributes to it in commit 202a8c70ba8c ("image_types_ostree: Add a unique ref to fix simultaneous bitbaking."). However, depening on what kind of OpenEmbedded builds are running in parallel, even more attributes would need to be taken into account. Instead of relying on a reference, store the exact ostree commit hash in a manifest file and reuse it in the do_image_ota deploy task. This guarantees that the correct reference gets picked even when two builds with the exact same machine/image name run in parallel. Note: This gets rid of the second branch name again. If the branch name with image name is preferred, the variable OSTREE_BRANCHNAME can be used: OSTREE_BRANCHNAME = "${SOTA_HARDWARE_ID}-${IMAGE_BASENAME}" Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* | sota_sanity.bbclass: introduce sota_check_boolean_variableMing Liu2020-05-112-10/+17
|/ | | | | | | | | | The current sanity check are too strict for some boolean variables, introduce sota_check_boolean_variable to allow a boolean value to be set like yes/y/true/t/1 or no/n/false/f/0. Also change to use oe.types.boolean to check their values. Signed-off-by: Ming Liu <ming.liu@toradex.com>
* image_types_ostree/ota: move home physically to /var/rootdirs/homeStefan Agner2020-04-272-4/+5
| | | | | | | | | | | | | | | | | | | | | | Instead of using the double indirection mode /home -> /var/rootdirs/home -> /sysroot/home move the home directory physically into /var/rootdirs. This allows to use the --modern flag when initializing the file system. The "old" style is still supported, and does make sense in case the home directories need to be shared between multiple deployments. Since multiple deployments is not a use case in meta-updater use the /var approach. See also: https://github.com/ostreedev/ostree/issues/2085. The modern flag also gets rid of dev, proc, root, run, sys and tmp. All of them have been empty and unused. Note: This change cannot be pushed through updates as this is an initial deployment setting. Only devices provisioned with images built with this change applied will use the new layout. Updates will continue to work on both systems as the symlink from the deployment stays the same (first indirection is still /home -> /var/rootdirs/home). Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* image_types_ostree/ota: do not commit homes to the OSTreeStefan Agner2020-04-272-9/+7
| | | | | | | | | | | | | | The home directory currently are commited to the OSTree, presumably to then use it for the deployment. However, we do have access to the original rootfs in the OSTree deployment tasks (do_image_ota) hence transferring the files "via OSTree" is not necessary. We do already carry over some files from the original OE rootfs to /var/sota. Follow this approach for /var/local and /home as well. The home will still be stored in the sysroot as documented in https://ostree.readthedocs.io/en/latest/manual/adapting-existing/. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* image_types_ostree: use hardlink treeStefan Agner2020-04-271-5/+15
| | | | | | | | | | | Instead of copying the files to be commited to the ostree just use a hardlink tree. This improves performance and wasts less diskspace. When using this method the root directory has already the correct permission bits set. Also get rid of the unnecessary sync. This halfs the execution time of the do_image_ostree tasks in my measurments. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* image_types_ostree: drop unnecessary tmp handlingStefan Agner2020-04-271-3/+0
| | | | | | | | | | | | | The current code clears tmp and then creates a symlink inside it to /sysroot/tmp: tmp └── tmp -> sysroot/tmp This is likely a mistake and the root tmp should have pointed to sysroot/tmp. However, since /tmp is mounted as a tmpfs anyways, we can get rid of all this logic. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* image_types_ota: export OSTREE_BOOT_PARTITION when neededStefan Agner2020-04-271-2/+5
| | | | | | | | The environment variable OSTREE_BOOT_PARTITION is only used when using GRUB. Move the export into the if statement. Also add a comment why manually adding /boot/loader{.0} directory is necessary. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* Rename defconfig and bootfilesfix/agl-renesas-buildMinori Yasumura2020-03-041-3/+4
| | | | | | The file name of sota has been changed in AGL, so change it to apply. Signed-off-by: Minori Yasumura <minori@witz-inc.co.jp>
* sota_bleeding: Also set aktualizr-native to the latest.Patrick Vacek2020-02-271-0/+1
| | | | | | I'm a bit surprised we never noticed this was missing! Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* image_types_ostree: update doc link.fix/doc-linkPatrick Vacek2020-02-181-2/+2
| | | | | | | Most of the README content has been moved to the docs portal, so provide the direct link. Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* Merge pull request #669 from liuming50/fix-some-problems-in-image-recipesPatrick Vacek2020-02-103-6/+0
|\ | | | | Fix some problems in image recipes
| * meta: move HOSTTOOLS definitions to sota.conf.incMing Liu2020-01-303-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HOSTTOOLS and HOSTTOOLS_NONFATAL are global variables that being handled in base_eventhandler, so they must be defined in config files or in INHERIT classes or classes being inherited by base.bbclass, or else we might run into the following problems: ``` $ bitbake pkgname $ bitbake imgname ``` the HOSTTOOLS and HOSTTOOLS_NONFATAL in the above image recipe, for instance, 'repo python' in image_repo_manifest.bbclass, they would not be copied to HOSTTOOLS_DIR. Signed-off-by: Ming Liu <liu.ming50@gmail.com>
* | image_types_ostree: set version metadata fieldpr/670Stefan Agner2020-01-281-0/+2
|/ | | | | | | | | | | | | OSTree uses the "version" metadata field in various places, e.g. in ostree admin status. Use DISTRO_VERSION as default version number source. This gives a more human readable version number to a particular OSTree: $ ostree admin status * torizon f1825d8a8f89c48cc0915ea059bd23463a97655757a53ae0ab0fe7a97e1ebeb2.0 Version: 3.0+snapshot-20200128 origin refspec: f1825d8a8f89c48cc0915ea059bd23463a97655757a53ae0ab0fe7a97e1ebeb Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* Allow dots in ostree branch names and hw idsfix/dots-in-namesLaurent Bonnans2020-01-081-4/+4
| | | | Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* meta: add python to HOSTTOOLS_NONFATALMing Liu2020-01-022-3/+3
| | | | | | | | | | repo is requiring python to be able to work correctly, add python to HOSTTOOLS_NONFATAL as well. image_repo_manifest is actually a image bbclass, move it to IMAGE_CLASSES instead of inheriting it in sota.bbclass. Signed-off-by: Ming Liu <liu.ming50@gmail.com>
* Merge pull request #631 from ↵Patrick Vacek2019-11-272-14/+47
|\ | | | | | | | | advancedtelematic/feat/ota-3202/Add-sanity-checks-for-SOTA-variables-in-meta-updater Add sanity checks for user-defined SOTA variables
| * keep new name suggestion remove ostree repo checkfeat/ota-3202/Add-sanity-checks-for-SOTA-variables-in-meta-updaterZee3141592019-11-271-3/+7
| | | | | | | | Signed-off-by: Zee314159 <252806294@qq.com>
| * Use regex and add some variablesZee3141592019-11-221-37/+38
| | | | | | | | Signed-off-by: Zee314159 <252806294@qq.com>
| * Add sanity checks for user-defined SOTA variablesZee3141592019-11-182-14/+42
| | | | | | | | Signed-off-by: Zee314159 <252806294@qq.com>
* | image_types_ostree.bbclass: do not inherit distro_features_checkMing Liu2019-11-241-2/+3
|/ | | | | | | Change to inherit features_check, since distro_features_check has been deprecated in OE. Signed-off-by: Ming Liu <liu.ming50@gmail.com>
* Fix uart output on raspberrypi3Laurent Bonnans2019-11-121-3/+3
| | | | | | | The broadcom firmware now needs device trees to be present in/boot to set it up. Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* Only push repo manifest if garage-push supports itLaurent Bonnans2019-11-111-1/+2
| | | | Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* Send a copy of repo manifest through garage-pushLaurent Bonnans2019-11-081-2/+8
| | | | Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* meta: change OTA_IMAGE_ROOTFS to TAR_IMAGE_ROOTFSchange-OTA_IMAGE_ROOTFS-to-TAR_IMAGE_ROOTFSMing Liu2019-11-062-3/+3
| | | | | | | No functional changes, rename OTA_IMAGE_ROOTFS to TAR_IMAGE_ROOTFS since the later is a more common name. Signed-off-by: Ming Liu <liu.ming50@gmail.com>
* image_types_ostree: Fix OSTree ref-bindingsfix-ref-bindingJeremias Cordoba2019-10-151-1/+2
| | | | | | | | | | | | The command "ostree refs --create" creates a new ref that points to a pre-existing commit hash. This does not add this new ref to the ref-bindings metadata in OSTree. The missing metadata leads to OSTree verifcation failures when working with the new ref. Fix this by adding the "--bind-ref" option to "ostree commit" which adds the needed ref-binding metadata. Signed-off-by: Jeremias Cordoba <js.cordoba8321@gmail.com>
* Use the recommended kernel entry point on RPIfeat/rpi4Laurent Bonnans2019-09-171-1/+1
| | | | | | | 0x8000 does not work on raspberrypi4-64 whereas 0x80000 is the value recommended for all platforms on u-boot Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* Raspberrypi4 initial supportLaurent Bonnans2019-09-171-1/+31
| | | | Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* Use a default expiry of one month if nothing is specified.Patrick Vacek2019-08-211-0/+2
| | | | | | | This mimics the intended behavior of the default in garage-sign, but doesn't rely on the date in the unsigned targets. Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* aktualizr: latest garage-sign with expiration support.Patrick Vacek2019-08-202-4/+15
| | | | | | | Use GARAGE_TARGET_EXPIRES or GARAGE_TARGET_EXPIRE_AFTER (but not both!) to set the garage-sign parameters. Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* Expose OSTREE_BOOT_PARTITION in do_image_otafix/grub-ostreeLaurent Bonnans2019-08-191-0/+2
| | | | | | Used by ostree-grub-generator Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* Do not export anything in sota.bbclassfix/ostree-branchname-2Laurent Bonnans2019-08-151-5/+5
| | | | | | | A simple variable definition will be enough and doing an export there completely kills caching. Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* Revert "Move OSTREE_BRANCHNAME to image_types_ostree.bbclass."Laurent Bonnans2019-08-152-3/+3
| | | | | | This reverts commit 8e7a0aeb3682386ed674ed0f682634d6a50983b7. Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* freedom-u540: Remove the fitImage overridesAlistair Francis2019-07-261-6/+2
| | | | | | | meta-riscv now generates a fitImage by default for the freedom-u540 machine so remove the unneeded overrides. Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
* sota: add support for freedom-u540Ricardo Salveti2019-07-242-0/+17
| | | | | | fitImage used by default. Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
* Merge pull request #557 from agners/follow-fhsPatrick Vacek2019-07-241-9/+34
|\ | | | | Follow Filesystem Hierarchy Standard
| * image_types_ostree: add /usr/local supportStefan Agner2019-07-191-0/+25
| | | | | | | | | | | | | | | | | | | | Add /usr/local support as outlined in OSTree documentation. This makes sure that a writeable and persistent /usr/local directory is available. See also: https://ostree.readthedocs.io/en/latest/manual/adapting-existing/ Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
| * image_types_ostree: make root directory only readable by rootStefan Agner2019-07-191-2/+2
| | | | | | | | | | | | | | Make the root home directory only accessible by root. Use 700 as commonly used for the root home directory. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
| * image_types_ostree: add top level directories unconditionallyStefan Agner2019-07-191-7/+7
| | | | | | | | | | | | | | | | The Filesystem Hierarchy Standard defines several top-level directory to be writeable. Add those even in the absence of files installed by OpenEmbedded so a user might actually use them. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* | Merge pull request #550 from advancedtelematic/fix/branch-rebuildlbonn2019-07-192-3/+3
|\ \ | | | | | | Move OSTREE_BRANCHNAME to image_types_ostree.bbclass.
| * | Move OSTREE_BRANCHNAME to image_types_ostree.bbclass.fix/branch-rebuildPatrick Vacek2019-07-182-3/+3
| |/ | | | | | | | | | | | | | | If it is set in sota.bbclass and overwritten in local.conf, bitbake will rebuild everything. Now bitbake should only rerun the commands in image_types_ostree (and image_types_ota) as expected. Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* / Allow customization of data in targets.jsonAndy Doan2019-07-172-0/+7
|/ | | | | | | This allows a user to define their own script to be executed after a target has been added to the repository but not yet signed. Signed-off-by: Andy Doan <andy@foundries.io>
* Add support for raspberrypi3-64Laurent Bonnans2019-06-071-0/+3
| | | | Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
* sota.bbclass: Translate old prov recipe names into the new versions.refactor/OTA-2798/rename-provisioningPatrick Vacek2019-06-051-0/+14
| | | | | | | This should help ease the transition so that no one is surprised when their provisioning suddenly stops working. Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* Rename provisioning methods.Patrick Vacek2019-06-051-1/+1
| | | | | | | | | | | | "Autoprovisioning" or "automatic provisioning" is now known as "shared credential provisioning". "Implicit provisioning" is now known as "device credential provisioning". "HSM provisioning" was always a misnomer, so it is now refered to as "device credential provisioning with an HSM". This includes a bump of the aktualizr version as well. Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
* sota.bbclass: move sota to DISTROOVERRIDESMing Liu2019-05-211-1/+1
| | | | | | | | | | Move sota to DISTROOVERRIDES from OVERRIDES, it should be a distro overrides. This change also let 'sota' to be in front of 'forcevariable' in OVERRIDES, since 'forcevariable' should always be the last overrides. Signed-off-by: Ming Liu <liu.ming50@gmail.com>
* OTA-2418: Remove example.com URL from automated garage-sign usagefeat/OTA-2418/remove-example.comMykhaylo Sul2019-04-032-2/+7
| | | | Signed-off-by: Mykhaylo Sul <ext-mykhaylo.sul@here.com>